If using gcc, then also turn on -W to get even more warnings.
[rsync/rsync.git] / configure.in
index 2931927..fe512e4 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])
@@ -50,12 +53,27 @@ else
     dnl CFLAGS=${CFLAGS-"-g"}
 fi
 
+
+
+
+AC_ARG_ENABLE(profile,
+       AC_HELP_STRING([--enable-profile],      
+               [turn on CPU profiling (default no)],
+               [], []))
+if test x"$enable_profile" = xyes
+then
+       CFLAGS="$CFLAGS -pg"
+fi
+
+
+# This is needed for our included version of popt.  Kind of silly, but
+# I don't want our version too far out of sync.
 CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
 
 # If GCC, turn on warnings.
 if test "x$GCC" = "xyes"
 then
-       CFLAGS="$CFLAGS -Wall"
+       CFLAGS="$CFLAGS -Wall -W"
 fi
 
 AC_ARG_WITH(included-popt,
@@ -278,7 +296,7 @@ fi
 
 AC_CHECK_LIB(resolv, inet_ntop)
 
-AC_MSG_NOTICE([Looking in libraries: $LIBS])
+dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
 
 AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 
 AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))