Define _GNU_SOURCE before checking for structures
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 14:49:32 +0000 (16:49 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 14:50:45 +0000 (16:50 +0200)
On Linux, useful features that are industry standard are
"protected" by requiring -D_GNU_SOURCE.  Why would you want
your users to *use* the features of libc?

configure
configure.in

index 41e1525..a60da7d 100755 (executable)
--- a/configure
+++ b/configure
@@ -3824,6 +3824,10 @@ else
 fi
 
 
+if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
+fi
+
 # Check whether --enable-largefile was given.
 if test "${enable_largefile+set}" = set; then
   enableval=$enable_largefile;
@@ -25117,10 +25121,6 @@ else
 fi
 
 
-if test "x$GCC" = "xyes"; then
-    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
-fi
-
 { echo "$as_me:$LINENO: checking for developer gcc flags" >&5
 echo $ECHO_N "checking for developer gcc flags... $ECHO_C" >&6; }
 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
index 4523d74..28f7227 100644 (file)
@@ -52,6 +52,13 @@ AC_PROG_GCC_TRADITIONAL
 AC_PROG_CC_SUNPRO
 AC_PROG_RANLIB
 
+dnl #
+dnl # Set Default CFLAGS
+dnl #
+if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
+fi
+
 dnl Compile in large (2G+) file support.
 AC_SYS_LARGEFILE
 
@@ -923,13 +930,6 @@ else
 fi
 AC_SUBST(LIBPREFIX)
 
-dnl #
-dnl # Set Default CFLAGS
-dnl #
-if test "x$GCC" = "xyes"; then
-    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
-fi
-
 AC_MSG_CHECKING(for developer gcc flags)
 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"