- AC_TRY_COMPILE([#include <stdlib.h>
-#include <sys/types.h>
-#include <strings.h>
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif],
- [fd_set fds; FD_ZERO(&fds);], xpdf_ok=yes, xpdf_ok=no)
- if test $xpdf_ok = yes; then
- AC_DEFINE(HAVE_STRINGS_H, 1, [Have strings.h.])
- AC_MSG_RESULT([need strings.h])
- else
- AC_TRY_COMPILE([#include <stdlib.h>
-#include <sys/types.h>
-#include <bstring.h>
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif],
- [fd_set fds; FD_ZERO(&fds);], xpdf_ok=yes, xpdf_ok=no)
- if test $xpdf_ok = yes; then
- AC_DEFINE(HAVE_BSTRING_H, 1, [Have bstring.h.])
- AC_MSG_RESULT([need bstring.h])
- else
- AC_MSG_RESULT([problem])
- fi
- fi
-fi
-
-dnl Look for rewinddir.
-AC_CHECK_FUNCS(rewinddir)
-if test $ac_cv_func_rewinddir = no; then
- AC_CHECK_LIB(cposix, rewinddir)
-fi
-
-dnl Checks for library functions.
-AC_CHECK_FUNCS(popen)
-dnl # This should use 'AC_CHECK_FUNCS(mkstemp)' but that fails if
-dnl # the mkstemp exists in the library but isn't declared in the
-dnl # include file (e.g., in cygwin 1.1.2).
-AC_CACHE_CHECK([for mkstemp],
-xpdf_cv_func_mkstemp,
-[AC_TRY_LINK([#include <stdlib.h>
-#include <unistd.h>],
-[mkstemp("foo");],
-xpdf_cv_func_mkstemp=yes, xpdf_cv_func_mkstemp=no)])
-if test "$xpdf_cv_func_mkstemp" = yes; then
- AC_DEFINE(HAVE_MKSTEMP, 1, [Have mkstemp().])
-fi
-dnl Check for mkstemps, just like mkstemp.
-AC_CACHE_CHECK([for mkstemps],
-xpdf_cv_func_mkstemps,
-[AC_TRY_LINK([#include <stdlib.h>
-#include <unistd.h>],
-[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, 1, [Have mkstemps().])