diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-13 08:07:03 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-13 08:07:03 -0800 |
commit | 108b50a38b298ade25dc7d355c75ebe0c21b9001 (patch) | |
tree | 0d14bc3168fb5e4962411e3a9ef042b7df340e77 /configure | |
parent | 3b60aa9463bc649ae8982173e0630d864d254806 (diff) | |
download | txr-108b50a38b298ade25dc7d355c75ebe0c21b9001.tar.gz txr-108b50a38b298ade25dc7d355c75ebe0c21b9001.tar.bz2 txr-108b50a38b298ade25dc7d355c75ebe0c21b9001.zip |
Mac OSX Upkeep.
* configure: (need_svid_source, need_bsd_source): Variables removed.
(need_darwin_c_source): New variable. Detect Apple environment and add
-D_DARWIN_C_SOURCE, which is needed to reveal some functions in headers.
* signal.c (sig_init): Wrap #ifdefs around SIGPOLL; it is not defined
on Darwin.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -103,8 +103,7 @@ have_timegm= have_syslog= have_windows_h= have_posix_sigs= -need_svid_source= -need_bsd_source= +need_darwin_c_source= # # Parse configuration variables @@ -732,6 +731,22 @@ else fi # +# Detect Apple environment. We need _DARWIN_C_SOURCE. +# + +case "$ccname" in + *gcc ) + printf "Checking for Apple environment ... " + if echo | gcc -dM -E - | grep -s __APPLE__ > /dev/null 2>&1 ; then + need_darwin_c_source=y + printf "yes\n" + else + printf "no\n" + fi + ;; +esac + +# # Check for annoying warnings from ctype.h macros # @@ -1370,12 +1385,11 @@ int main(void) } ! rm -f conftest$exe -if ! $make EXTRA_FLAGS='-D_BSD_SOURCE' conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then +if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then printf "no\n" else printf "yes\n" printf "#define HAVE_SETENV 1\n" >> config.h - need_bsd_source=y fi printf "Checking for tzset function ... " @@ -1676,12 +1690,10 @@ fi printf "Regenerating config.make ... " -if [ -n "$need_svid_source" ] ; then - lang_flags="$lang_flags -D_SVID_SOURCE" -fi -if [ -n "$need_bsd_source" ] ; then - lang_flags="$lang_flags -D_BSD_SOURCE" +if [ -n "$need_darwin_c_source" ] ; then + lang_flags="$lang_flags -D_DARWIN_C_SOURCE" fi + gen_config_make printf "done\n" |