From c0cfabf990b4b698f67f3945652909a7ff91695f Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Fri, 20 Feb 2004 14:44:16 +0000 Subject: [PATCH] Enable GNU extensions on systems that have them. Use AC_SYS_LARGEFILE instead of manually defining _FILE_OFFSET_BITS=64 in CFLAGS. (Logical change 1.279) --- configure.ac | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3cf51d48..54d2a6ca 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,14 @@ AC_ARG_ENABLE(really-static, AM_CONDITIONAL(REALLYSTATIC, test "$enable_really_static" = yes) +# Enable GNU extensions on systems that have them. +AH_VERBATIM([_GNU_SOURCE], +[/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif]) +AC_DEFINE(_GNU_SOURCE) + # Checks for programs. AC_PROG_CC AC_PROG_INSTALL @@ -67,6 +75,9 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LIBTOOL +# Enable large file support. +AC_SYS_LARGEFILE + AC_ARG_ENABLE(gnome-vfs, [ --disable-gnome-vfs Omit Gnome-VFS-2.0 'libntfs' interface (default=detect)], , enable_gnome_vfs=auto @@ -124,9 +135,8 @@ AC_MSG_RESULT($cc_version) # Add our compiler switches not discarding 'CFLAGS' as they may have been # passed to us by rpmbuild(8). -# We add -Wall to enable compiler warnings and define _FILE_OFFSET_BITS to 64 -# enable 64-bit (device) file access functions and parameters. -CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -Wall" +# We add -Wall to enable compiler warnings. +CFLAGS="$CFLAGS -Wall" # Add lots of extra warnings if in maintainer mode. if test "$USE_MAINTAINER_MODE" = "yes";then