From 57c0fc16902009914c5f1aebce46b0179b4b5c20 Mon Sep 17 00:00:00 2001
From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE>
Date: Sun, 26 Apr 2009 13:30:58 +0000
Subject: [PATCH] Also define _DARWIN_C_SOUCE if compiling on Darwin.

---
 configure.ac | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 21ee9fa..e8f7ae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([alberta], [3.0-rc3], [Claus.Heine@Mathematik.Uni-Freiburg.DE])
+AC_INIT([alberta], [devel], [Claus.Heine@Mathematik.Uni-Freiburg.DE])
 AC_CONFIG_SRCDIR([alberta/src/Common/alberta.h])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -469,8 +469,19 @@ AC_CHECK_HEADERS([malloc.h])
 # try to pull in some special features (but make sure to supply
 # replacements if they are not available)
 #
-AC_DEFINE([_XOPEN_SOURCE], 600, [Define to get POSIX and XPG stuff])
+DARWIN_C_SOURCE=0
+XOPEN_SOURCE=0
+if test "x$target_os" = "xdarwin"; then
+	DARWIN_C_SOURCE=1
+fi
+if test "x$target_os" = "xlinux-gnu"; then
+	XOPEN_SOURCE=600
+fi
 AC_DEFINE([_SVID_SOURCE], 1, [Define to get SVID stuff, e.g. strdup])
+AC_DEFINE_UNQUOTED([_XOPEN_SOURCE], [$XOPEN_SOURCE],
+  [Define to get POSIX and XPG stuff])
+AC_DEFINE_UNQUOTED([_DARWIN_C_SOURCE], [$DARWIN_C_SOURCE],
+  [Define to 1 if compiling for MAC OS/X (Darwin)])
 
 #
 # check for some functions we need ... add more as needed.
-- 
GitLab