summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-01-22 17:58:37 -0500
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-01-22 17:58:37 -0500
commitfd838c02be3b3755efb872fd05a51fce99c46ae3 (patch)
treeaf4d273ae328973f121bfdeedeafc5d887fc35a6 /configure.ac
parentfd77f9cbbade5e2e4516c2d755425d07a90d1923 (diff)
Bug #9555: Always define _GNU_SOURCE in glibc environments.
This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and _XOPEN_SORUCE to get the C environment we want in different places. It also fixes the build on linux due to RTLD_DEFAULT having not been defined. (cherry picked from 7fccec91c46baac4f8d2965180dc535b4eb7d65c commit)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 7 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 4c29909b7..d72c74ff2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1599,20 +1599,13 @@ dnl and the rest of these are generic, so they're in config.h
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
AC_DEFINE(XResExtension, 1, [Build XRes extension])
-dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined
-dnl _*_SOURCE on Solaris restricts to the standards, and removes non-standard
-dnl functions which X uses
-case $host_os in
- cygwin*) ;;
- solaris*) ;;
- darwin*) ;;
- freebsd*|netbsd*|openbsd*) ;;
- *)
- AC_DEFINE(_POSIX_SOURCE, 1, [POSIX-compliant source])
- AC_DEFINE(_XOPEN_SOURCE, 500, [X/Open-compliant source])
- AC_DEFINE(_BSD_SOURCE, 1, [BSD-compliant source])
- ;;
-esac
+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])])
AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])