summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-11-27 21:19:02 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-11-27 21:19:02 -0800
commit900322c2c899af14b991bcbf324b44a0ea7e163e (patch)
treea5637accef448ffa7721d4630c5d19f4122e2452 /configure
parent5285db54f7199cf75c0b740faaeee15cc9cc8c6a (diff)
downloadtxr-900322c2c899af14b991bcbf324b44a0ea7e163e.tar.gz
txr-900322c2c899af14b991bcbf324b44a0ea7e163e.tar.bz2
txr-900322c2c899af14b991bcbf324b44a0ea7e163e.zip
* Changelog: missing entries reconstructed.
* Makefile (conftest.clean): Use @ to suppress output. * configure (have_unistd): New variable. Set true by every successful test that compiles something that contains #include <unistd.h>. HAVE_UNISTD_H is conditionally generated in config.h based on this variable. Minor cleanup. * parser.l: Inclusion of <unistd.h> wrapped in #if/#endif. * stream.c: Conditional inclusion of <unistd.h> based on new HAVE_UNISTD_H symbol.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure b/configure
index b184d6c4..fe27ace2 100755
--- a/configure
+++ b/configure
@@ -97,6 +97,7 @@ gen_gc=
mpi_version=1.8.6
have_quilt=
have_patch=
+have_unistd=
#
# Parse configuration variables
@@ -675,6 +676,7 @@ int main(void) { return 0; }
rm -f conftest
if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then
printf "#define %s txr_%s\n" $ident $ident >> config.h
+ have_unistd=y
fi
done
@@ -1241,6 +1243,7 @@ if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then
else
printf "yes\n"
printf "#define HAVE_FORK_STUFF 1\n" >> config.h
+ have_unistd=y
fi
#
@@ -1295,10 +1298,16 @@ if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then
else
printf "yes\n"
printf "#define HAVE_POSIX_SLEEP 1\n" >> config.h
+ have_unistd=y
fi
+#
+# Dependent variables
+#
-printf "done\n"
+if [ -n "$have_unistd" ] ; then
+ printf "#define HAVE_UNISTD_H 1\n" >> config.h
+fi
#
# Extra debugging.
@@ -1393,7 +1402,7 @@ fi
printf "Regenerating config.make ... "
gen_config_make
-printf "\n"
+printf "done\n"
#
# Save configuration in config.log