summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTom Lane2009-04-04 21:55:50 +0000
committerTom Lane2009-04-04 21:55:50 +0000
commit1d26226d9583ad7bee290ca9bba1aa3794e98a53 (patch)
treec9912aaa9ff6ea6dec0920cc4fc491bf2f1cc1cc /configure.in
parent090173a3f937952b2a5c6d92a3ab139e79ca3033 (diff)
Make an attempt at fixing our current Solaris 11 breakage: add a configure
probe for opterr (exactly like the one for optreset) and have getopt.c define the variables only if configure doesn't find them in libc.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 33560af351c..5a742d8323a 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.592 2009/03/27 19:58:11 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.593 2009/04/04 21:55:50 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -1317,6 +1317,15 @@ AC_CHECK_FUNC(syslog,
[AC_CHECK_HEADER(syslog.h,
[AC_DEFINE(HAVE_SYSLOG, 1, [Define to 1 if you have the syslog interface.])])])
+AC_CACHE_CHECK([for opterr], pgac_cv_var_int_opterr,
+[AC_TRY_LINK([#include <unistd.h>],
+ [extern int opterr; opterr = 1;],
+ [pgac_cv_var_int_opterr=yes],
+ [pgac_cv_var_int_opterr=no])])
+if test x"$pgac_cv_var_int_opterr" = x"yes"; then
+ AC_DEFINE(HAVE_INT_OPTERR, 1, [Define to 1 if you have the global variable 'int opterr'.])
+fi
+
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
[AC_TRY_LINK([#include <unistd.h>],
[extern int optreset; optreset = 1;],