From 1d26226d9583ad7bee290ca9bba1aa3794e98a53 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 4 Apr 2009 21:55:50 +0000 Subject: 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. --- configure.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'configure.in') 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 ], + [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 ], [extern int optreset; optreset = 1;], -- cgit v1.2.3