summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-05-27 21:12:47 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-05-27 21:12:47 +0000
commit6390ef3c11fb2a1347d830b5ece22dc4102b7b8c (patch)
tree753a1c7200c6a860506bf7f0eecebd9b4dcaefb6
parentf3dc063667f858ed8ff99dc2a47b139b2f6f5b44 (diff)
downloadlibapr-6390ef3c11fb2a1347d830b5ece22dc4102b7b8c.tar.gz
* configure.in: Safer check for fstat64; fix HP-UX 11 build.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65140 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--configure.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 644fa2815..75bb3fa3e 100644
--- a/configure.in
+++ b/configure.in
@@ -802,7 +802,7 @@ AC_SUBST(sharedmem)
dnl ----------------------------- Checks for Any required Functions
dnl Checks for library functions. (N.B. poll is further down)
-AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan fstat64)
+AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan)
AC_CHECK_FUNCS(getenv putenv setenv unsetenv)
AC_CHECK_FUNCS(setrlimit, [ have_setrlimit="1" ], [ have_setrlimit="0" ])
AC_CHECK_FUNCS(getrlimit, [ have_getrlimit="1" ], [ have_getrlimit="0" ])
@@ -1867,6 +1867,22 @@ dnl Check for langinfo support
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)
+dnl Random late checks...
+
+# AC_CHECK_FUNCS is not sufficient since the function may be usable when
+# struct stat64 is not exposed (e.g. HP-UX). Note that fstat64 only
+# happens to be usable on Linux because -D_GNU_SOURCE is picked up
+# by the earlier crypt_r check.
+AC_CACHE_CHECK([for usable fstat64], [apr_cv_func_fstat64],
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>], [struct stat64 st; fstat64(0, &st);],
+ [apr_cv_func_fstat64=yes], [apr_cv_func_fstat64=no])])
+if test $apr_cv_func_fstat64 = yes; then
+ AC_DEFINE(HAVE_FSTAT64, 1, [Define if fstat64 can be used])
+fi
+
+
dnl ----------------------------- Finalize the variables
echo "${nl}Restore user-defined environment settings..."