* modify the ld + cflags for gprof and backtrace if enabled.
authorWilfried Göesgens <willi@citadel.org>
Thu, 30 Aug 2007 19:16:49 +0000 (19:16 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 30 Aug 2007 19:16:49 +0000 (19:16 +0000)
citadel/Makefile.in
citadel/citserver.c
citadel/configure.ac

index 4f633350b67466f08144b981b3080a233e885976..77390db2a11d0d2fe2acaa04a3f9829ef01a5cff 100644 (file)
@@ -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@
index 79ebddefa18d789b5cdf04031231ce64b2346eed..a25a2ea2077e69332092e67c537395c807eb7d91 100644 (file)
@@ -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;
index 79ce0e2dd30a4c35daa7f0ac0785a5691a03009c..fb370e35dbacb96dcf99177403242366f99a12f5 100644 (file)
@@ -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)