summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-20 23:51:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-20 23:51:28 -0800
commitb4f52e75fdd10db6148b868920a76934f8d42cb3 (patch)
tree63e39fdd250feceac0a7d3023abfa60f3b3a221f /configure
parentd613cde8a2579f8e40248dc3839c39c89de4009e (diff)
downloadtxr-b4f52e75fdd10db6148b868920a76934f8d42cb3.tar.gz
txr-b4f52e75fdd10db6148b868920a76934f8d42cb3.tar.bz2
txr-b4f52e75fdd10db6148b868920a76934f8d42cb3.zip
configure: move Darwin check into Makefile.
* Makefile (conftest.darwin): New phony target. * configure: Always do Darwin check via make conftest.darwin.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 11 insertions, 15 deletions
diff --git a/configure b/configure
index 7770872d..cb9f595d 100755
--- a/configure
+++ b/configure
@@ -887,21 +887,17 @@ 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
- printf "yes\n"
- need_darwin_c_source=y
- lang_flags="$lang_flags -D_DARWIN_C_SOURCE"
- printf "Regenerating %s ..." $config_make
- gen_config_make
- printf "done\n"
- else
- printf "no\n"
- fi
- ;;
-esac
+printf "Checking for Apple environment ... "
+if [ "$(make conftest.darwin)" = "yes" ] ; then
+ printf "yes\n"
+ need_darwin_c_source=y
+ lang_flags="$lang_flags -D_DARWIN_C_SOURCE"
+ printf "Regenerating %s ..." $config_make
+ gen_config_make
+ printf "done\n"
+else
+ printf "no\n"
+fi
#
# Detect stupid FreeBSD problem: no defined way to reveal