--- configure.in.org Fri Sep 1 14:35:10 2000 +++ configure.in Fri Sep 1 14:21:53 2000 @@ -75,6 +75,7 @@ dnl ##### Checks for header files. AC_PATH_XTRA AC_HEADER_DIRENT +AC_CHECK_HEADERS(unistd.h) dnl ##### Switch over to C++. This will make the checks below a little dnl ##### bit stricter (requiring function prototypes in include files). @@ -173,11 +174,27 @@ dnl # include file (e.g., in cygwin 1.1.2). AC_CACHE_CHECK([for mkstemp], xpdf_cv_func_mkstemp, -[AC_TRY_COMPILE([#include ], +[AC_TRY_COMPILE([#include +#ifdef HAVE_UNISTD_H +#include +#endif +], [mkstemp("foo");], xpdf_cv_func_mkstemp=yes, xpdf_cv_func_mkstemp=no)]) if test "$xpdf_cv_func_mkstemp" = yes; then AC_DEFINE(HAVE_MKSTEMP) +fi +dnl # Ditto mkstemps() +AC_CACHE_CHECK([for mkstemps], +xpdf_cv_func_mkstemps, +[AC_TRY_COMPILE([#include +#ifdef HAVE_UNISTD_H +#include +#endif], +[mkstemps("foo", 0);], +xpdf_cv_func_mkstemps=yes, xpdf_cv_func_mkstemps=no)]) +if test "$xpdf_cv_func_mkstemps" = yes; then + AC_DEFINE(HAVE_MKSTEMPS) fi dnl ##### Check select argument type: on HP-UX before version 10, select