summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-18 06:45:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-18 06:45:31 -0700
commitd76d11198035408667b20e3c0972e059551cde69 (patch)
tree44137a279b009b312a3e78297ff241442351bae3
parente822ba5e7733472644542701ef82fc0f8d001a10 (diff)
downloadtxr-d76d11198035408667b20e3c0972e059551cde69.tar.gz
txr-d76d11198035408667b20e3c0972e059551cde69.tar.bz2
txr-d76d11198035408667b20e3c0972e059551cde69.zip
Detect mkstemps function.
* configure: Add check for mkstemps. (HAVE_MKSTEMPS): New preprocessor symbol, conditionally deposited into config/config.h
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index aa9c8f05..aa5264fa 100755
--- a/configure
+++ b/configure
@@ -2234,6 +2234,26 @@ if [ -z "$have_winsize" ] ; then
printf "no\n"
fi
+printf "Checking for mkstemps ... "
+
+cat > conftest.c <<!
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+ char template[] = "abcXXXXXX.xyz";
+ int fd = mkstemps(template, 4);
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_MKSTEMPS 1\n" >> $config_h
+else
+ printf "no\n"
+fi
+
#
# Dependent variables
#