]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
* modify the ld + cflags for gprof and backtrace if enabled.
[citadel.git] / citadel / configure.ac
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)