summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-16 19:13:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-16 19:13:01 -0700
commit3cdd67db736815caafc8007df6930777691316a4 (patch)
treec7457dca97de8c6656525040bb53d7930be52b7a /configure
parent477eb2cd965f8f7151cc21e04fe60dd09d703585 (diff)
downloadtxr-3cdd67db736815caafc8007df6930777691316a4.tar.gz
txr-3cdd67db736815caafc8007df6930777691316a4.tar.bz2
txr-3cdd67db736815caafc8007df6930777691316a4.zip
Quick and dirty port to MinGW.
* configure: Test for presence of <sys/wait.h> added. Conditionally generates HAVE_SYS_WAIT variable in config.h. * stream.c: Include <sys/wait.h> conditionally. (pipe_close): Do not test ermination status with WIFEXITED, etc. if there is no <sys/wait.h> header.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index ed45dc8d..f833ef10 100755
--- a/configure
+++ b/configure
@@ -838,6 +838,27 @@ else
fi
#
+# sys/wait.h
+#
+
+printf "Checking whether we have <sys/wait.h> ... "
+
+cat > conftest.c <<!
+#include <sys/wait.h>
+
+int main(void)
+{
+ return 0;
+}
+!
+if ! make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then
+ printf "no\n"
+else
+ printf "yes\n"
+ printf "#define HAVE_SYS_WAIT 1\n" >> config.h
+fi
+
+#
# Clean up
#