summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-04-17 22:14:47 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-04-27 22:06:10 -0700
commit5c1cde105db10df24d3c532f032cbc59050c7313 (patch)
tree99e5d91335f0a55a9b84c05d8d551ea8058d1c8b
parent84b7a91ef84f345384e4b0e13907385ca3ca3255 (diff)
Use AC_USE_SYSTEM_EXTENSIONS instead of hand-rolled check for _GNU_SOURCE
Raises minimum autoconf version required to 2.60 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--configure.ac15
1 files changed, 6 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index b4593f40..5ecd6267 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.57)
+AC_PREREQ(2.60)
AC_INIT([libX11],
1.2.1,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
@@ -18,6 +18,11 @@ AC_CONFIG_HEADER([include/X11/XlibConf.h])
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.2)
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
+# to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
# Checks for programs.
AC_PROG_LIBTOOL
DOLT
@@ -364,14 +369,6 @@ if test "x$GCC" = "xyes"; then
X11_CFLAGS="$GCC_WARNINGS $X11_CFLAGS"
fi
-AC_TRY_COMPILE([
-#include <features.h>
-#ifndef __GLIBC__
-#error not glibc
-#endif
-], [], [AC_DEFINE(_GNU_SOURCE, 1,
- [ Enable GNU and other extensions to the C environment for glibc])])
-
X11_DATADIR="${datadir}/X11"
AC_DEFINE_DIR(X11_DATADIR, X11_DATADIR, [Location of libX11 data])
AC_SUBST(X11_DATADIR)