summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2007-04-20 13:03:25 -0400
committerSteve Dickson <steved@redhat.com>2007-04-20 13:03:25 -0400
commit208ebb96f63907ae24a4ab44bb284f08fdd4e63b (patch)
tree20c9920d637874914d5c3a52465b8ccead2ce063
parent2d03c93306242fd3a86a4825ad6b6e3a22784ffe (diff)
downloadrpcbind-208ebb96f63907ae24a4ab44bb284f08fdd4e63b.tar.gz
Allow the debugging code to be enabled at compile time
with the --enable-debug configuration flag Signed-off-by: Steve Dickson <steved@redhat.com>
-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 \