- if test "$GCC" = "yes" && test "$STRICT" = "yes"; then
- CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
+
+ AC_ARG_ENABLE([debug],
+ AC_HELP_STRING([--enable-debug],[build a debug version [[default=no]]]),
+ [DEBUG=$enableval], [DEBUG="no"])
+
+ AC_ARG_ENABLE([gprof],
+ AC_HELP_STRING([--enable-gprof],[Enable gprof profiling output [[default=no]]]),
+ [PROF=$enableval], [PROF="no"])
+
+ AC_ARG_ENABLE([gprof-libc],
+ AC_HELP_STRING([--enable-gprof-libc],[Link against libc with profiling support [[default=no]]]),
+ [PROFLC=$enableval], [PROFLC="no"])
+
+ if test "$PROFLC" = "yes"; then
+ PROF="yes" # always enable profiling then