mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-08 21:58:05 +02:00
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>
This commit is contained in:
parent
84b7a91ef8
commit
5c1cde105d
1 changed files with 6 additions and 9 deletions
15
configure.ac
15
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue