summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in7
-rw-r--r--src/Makefile.am6
2 files changed, 11 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 0298c80..9a64b45 100644
--- a/configure.in
+++ b/configure.in
@@ -10,6 +10,13 @@ AC_CONFIG_SRCDIR([src/rpcbind.c])
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
+AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
+ [case "${enableval}" in
+ yes) debug=true ;;
+ no) debug=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+ esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \
diff --git a/src/Makefile.am b/src/Makefile.am
index 8684a4b..52d3857 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,8 +18,10 @@ rpcbind_LDFLAGS = -lpthread -ltirpc
rpcbind_LDADD = $(LIB_TIRPC)
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
-## -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL \
-## -DND_DEBUG -DBIND_DEBUG
+if DEBUG
+INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
+INCLUDES += -DND_DEBUG -DBIND_DEBUG
+endif
$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \