The Ted T'so school of program optimization: make progress visible and
[rsync/rsync.git] / configure.in
index f7704cb..b5b5e9a 100644 (file)
@@ -22,6 +22,9 @@ AC_PROG_INSTALL
 AC_PROG_CC_STDC
 AC_SUBST(SHELL)
 
+AC_DEFINE([_GNU_SOURCE], 1,
+          [Define _GNU_SOURCE so that we get all necessary prototypes])
+
 if test "$xac_cv_prog_cc_stdc" = xno
 then
        AC_MSG_WARN([rsync requires an ANSI C compiler and you don't seem to have one])
@@ -30,6 +33,9 @@ fi
 # compile with optimisation and without debugging by default, unless
 # --debug is given.  We must decide this before testing the compiler.
 
+# Please allow this to default to yes, so that your users have more
+# chance of getting a useful stack trace if problems occur.
+
 AC_MSG_CHECKING([whether to include debugging symbols])
 AC_ARG_ENABLE(debug,
        AC_HELP_STRING([--enable-debug],
@@ -49,6 +55,12 @@ fi
 
 CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
 
+# If GCC, turn on warnings.
+if test "x$GCC" = "xyes"
+then
+       CFLAGS="$CFLAGS -Wall"
+fi
+
 AC_ARG_WITH(included-popt,
         [  --with-included-popt    use bundled popt library, not from system])