summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-07-20 08:51:52 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-07-20 08:51:52 (GMT)
commit6f18a3c12409b190a2909871f6653901e7412a5f (patch)
tree4f6653457f0e5c096210b4542b4103b4e283ad77 /configure.in
parent0a30e648e06be85b3380a62ae156a9c7f343392f (diff)
downloadcpython-6f18a3c12409b190a2909871f6653901e7412a5f.zip
cpython-6f18a3c12409b190a2909871f6653901e7412a5f.tar.gz
cpython-6f18a3c12409b190a2909871f6653901e7412a5f.tar.bz2
Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
available in the configure tests already.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 208dc05..98d54d1 100644
--- a/configure.in
+++ b/configure.in
@@ -20,6 +20,19 @@ VERSION=2.3
AC_SUBST(SOVERSION)
SOVERSION=1.0
+# The later defininition of _XOPEN_SOURCE disables certain features
+# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
+AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
+
+# The definition of _GNU_SOURCE potentially causes a change of the value
+# of _XOPEN_SOURCE. So define it only conditionally.
+AH_VERBATIM([_XOPEN_SOURCE],
+[/* Define on UNIX to activate XPG/5 features. */
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 500
+#endif])
+AC_DEFINE(_XOPEN_SOURCE, 500)
+
# Arguments passed to configure.
AC_SUBST(CONFIG_ARGS)
CONFIG_ARGS="$ac_configure_args"