aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2014-02-02 18:13:09 +0000
committerdos-reis <gdr@axiomatics.org>2014-02-02 18:13:09 +0000
commit04d35cbbb03e68759fc6f05c0149daa8cd655fce (patch)
tree084d8ff9ff43e9a7c4efc4c1d2efab8be97e9e48 /config
parentca207c84f9c3fb49a1fed906d5de6b2db547ad1d (diff)
downloadopen-axiom-04d35cbbb03e68759fc6f05c0149daa8cd655fce.tar.gz
Prefer mktemp over tempnam.
Diffstat (limited to 'config')
-rw-r--r--config/open-axiom.m48
-rw-r--r--config/openaxiom-c-macros.h.in12
2 files changed, 19 insertions, 1 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 2218be2c..410923b1 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -848,7 +848,13 @@ dnl ------------------------
dnl -- OPENAXIOM_CHECK_IO --
dnl ------------------------
AC_DEFUN([OPENAXIOM_CHECK_IO],[
-AC_CHECK_DECLS([tempnam],[],[],[#include <stdio.h>])
+# Utility for temporary pathnames.
+if test -n $ac_cv_header_unistd_h; then
+ AC_CHECK_DECLS([mktemp, mkdtemp, mkstemp], [], [], [[#include <unistd.h>]])
+fi
+if test -n $ac_cv_have_decl_mktemp; then
+ AC_CHECK_DECLS([tempnam],[],[],[[#include <stdio.h>]])
+fi
# Honor support for large files
AC_SYS_LARGEFILE
# What about long file names?
diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in
index 6a93a786..571fd4d3 100644
--- a/config/openaxiom-c-macros.h.in
+++ b/config/openaxiom-c-macros.h.in
@@ -33,6 +33,18 @@
*/
#undef HAVE_DECL_KILL
+/* Define to 1 if you have the declaration of `mkdtemp', and to 0 if you
+ don't. */
+#undef HAVE_DECL_MKDTEMP
+
+/* Define to 1 if you have the declaration of `mkstemp', and to 0 if you
+ don't. */
+#undef HAVE_DECL_MKSTEMP
+
+/* Define to 1 if you have the declaration of `mktemp', and to 0 if you don't.
+ */
+#undef HAVE_DECL_MKTEMP
+
/* Define to 1 if you have the declaration of `openpty', and to 0 if you
don't. */
#undef HAVE_DECL_OPENPTY