summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorBruce Momjian2008-02-18 21:46:22 +0000
committerBruce Momjian2008-02-18 21:46:22 +0000
commitfc54be81d1905a550abab797cf8089e009104842 (patch)
tree1a7a6cb50be800e8601e7b5ec1dfec32fd6bddc8 /configure.in
parenta345dcd2f78ffa1fbf3f2699f7b81d91fac7f4ba (diff)
autoconf 2.61's AC_FUNC_FSEEKO reports success/failure differently, so
reorganize code for NetBSD/BSDi port/fseeko.c usage, and make code more modular.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 12 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index cfc5f45f22c..461b612c737 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.548 2008/02/17 16:36:42 petere Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.549 2008/02/18 21:46:22 momjian Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -1080,7 +1080,7 @@ fi
pgac_save_LIBS="$LIBS"
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
-AC_REPLACE_FUNCS([crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv])
+AC_REPLACE_FUNCS([crypt getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv])
LIBS="$pgac_save_LIBS"
@@ -1102,13 +1102,6 @@ else
AC_LIBOBJ(getopt_long)
fi
-# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
-# We override the previous test that said fseeko/ftello didn't exist
-# OS tests are also done in include/c.h and port/fseeko.c
-case $host_os in bsdi*|netbsd*)
-ac_cv_func_fseeko=yes
-esac
-
# Win32 support
if test "$PORTNAME" = "win32"; then
AC_REPLACE_FUNCS(gettimeofday)
@@ -1160,7 +1153,16 @@ AC_CHECK_FUNCS(atexit, [],
[AC_CHECK_FUNCS(on_exit, [],
[AC_MSG_ERROR([neither atexit() nor on_exit() found])])])
-AC_FUNC_FSEEKO
+AC_REPLACE_FUNCS(fseeko)
+case $host_os in
+ # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
+ bsdi*|netbsd*)
+ AC_DEFINE(HAVE_FSEEKO, 1, [Define to 1 because replacement version used.])
+ ac_cv_func_fseeko=yes;;
+ *)
+ AC_FUNC_FSEEKO;;
+esac
+
#
# Pthreads