From: Wilfried Göesgens Date: Thu, 30 Aug 2007 19:16:49 +0000 (+0000) Subject: * modify the ld + cflags for gprof and backtrace if enabled. X-Git-Tag: v7.86~3101 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=f1275c774787228d3f967eadb7cf0bdd4657e232;p=citadel.git * modify the ld + cflags for gprof and backtrace if enabled. --- diff --git a/citadel/Makefile.in b/citadel/Makefile.in index 4f633350b..77390db2a 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -94,7 +94,7 @@ INSTALL=@INSTALL@ INSTALL_DATA=@INSTALL_DATA@ RESOLV=@RESOLV@ SHELL=/bin/sh -SERVER_LDFLAGS=@SERVER_LDFLAGS@ -rdynamic +SERVER_LDFLAGS=@SERVER_LDFLAGS@ SERVER_LIBS=@SERVER_LIBS@ SETUP_LIBS=@SETUP_LIBS@ YACC=@YACC@ diff --git a/citadel/citserver.c b/citadel/citserver.c index 79ebddefa..a25a2ea20 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -76,7 +76,6 @@ int panic_fd; void cit_backtrace(void) { #ifdef HAVE_BACKTRACE -snatoehu void *stack_frames[50]; size_t size, i; char **strings; diff --git a/citadel/configure.ac b/citadel/configure.ac index 79ce0e2dd..fb370e35d 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -299,13 +299,27 @@ AC_CHECK_FUNCS(crypt gethostbyname connect ) dnl disable backtrace if we don't want it. AC_ARG_WITH(backtrace, - [ --with-backtrace Disable backtrace dumps in the syslog], + [ --with-backtrace enable backtrace dumps in the syslog], [ if test "x$withval" != "xno" ; then + CFLAGS="$CFLAGS -rdynamic " + LDFLAGS="$LDFLAGS -rdynamic " + SERVER_LDFLAGS="$SERVER_LDFLAGS -rdynamic " AC_CHECK_FUNCS(backtrace) fi ] ) +dnl disable backtrace if we don't want it. +AC_ARG_WITH(gprof, + [ --with-gprof enable profiling], + [ if test "x$withval" != "xno" ; then + CFLAGS="$CFLAGS -pg " + LDFLAGS="$LDFLAGS -pg " + SERVER_LDFLAGS="$SERVER_LDFLAGS -pg " + fi + ] +) + if test "$ac_cv_func_gethostbyname" = no; then AC_CHECK_LIB(nsl, gethostbyname)