From 673112b192a9494ea96f7daca061b080db5d3977 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 14:18:07 +0200 Subject: Check for support of -z nodelete LD flag, don't use it unconditionally. On non-GNU, non-Sun linkers, the -z option is often not understood; make sure that the -z nodelete option is usable before making use of it. Unbreaks build on Mac OS X. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cc7f674a..112a1a8f 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,15 @@ dnl other linkes might be added later CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"]) AC_SUBST([IMMEDIATE_LDFLAGS]) +dnl On ELF systems we don't want the libraries to be unloaded since we +dnl don't clean them up properly, so we request the nodelete flag to be +dnl enabled. +dnl +dnl On other systems, we don't really know how to do that, but it's +dnl welcome if somebody can tell. +CC_CHECK_LDFLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS="-Wl,-z,nodelete"]) +AC_SUBST([NODELETE_LDFLAGS]) + dnl Check for the proper way to build libraries that have no undefined dnl symbols; on some hosts this needs to be avoided but the macro dnl takes care of it. -- cgit From a6d67187126ef37b69b0d8d94dfeebeb364a8444 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 14:33:33 +0200 Subject: Request explicitly POSIX.1-2001 for clock_gettime. This might actually call for a rewrite of system extensions handling. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 112a1a8f..9b49f23e 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,9 @@ case $host in AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris) AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) ;; + *-*-darwin* ) + AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X]) + ;; esac AM_SILENT_RULES([yes]) -- cgit From 0a5257b520ae540775367eb20a4db3e76436cdf9 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 20:41:58 +0200 Subject: Also request Darwin extensions, as they are needed for stuff like NSIG. Without this definition, non-POSIX interfaces (which are needed) are hidden by the _POSIX_C_SOURCE request (for clock_gettime). --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9b49f23e..18007357 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,7 @@ case $host in ;; *-*-darwin* ) AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X]) + AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X]) ;; esac -- cgit