summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-04-04 21:55:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-04-04 21:55:50 +0000
commit1d26226d9583ad7bee290ca9bba1aa3794e98a53 (patch)
treec9912aaa9ff6ea6dec0920cc4fc491bf2f1cc1cc /configure
parent090173a3f937952b2a5c6d92a3ab139e79ca3033 (diff)
downloadpostgresql-1d26226d9583ad7bee290ca9bba1aa3794e98a53.tar.gz
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')
-rwxr-xr-xconfigure59
1 files changed, 59 insertions, 0 deletions
diff --git a/configure b/configure
index f20c8a2d30..fc17b1a5fe 100755
--- a/configure
+++ b/configure
@@ -18655,6 +18655,65 @@ fi
fi
+{ echo "$as_me:$LINENO: checking for opterr" >&5
+echo $ECHO_N "checking for opterr... $ECHO_C" >&6; }
+if test "${pgac_cv_var_int_opterr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+extern int opterr; opterr = 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ pgac_cv_var_int_opterr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pgac_cv_var_int_opterr=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
+echo "${ECHO_T}$pgac_cv_var_int_opterr" >&6; }
+if test x"$pgac_cv_var_int_opterr" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT_OPTERR 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for optreset" >&5
echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
if test "${pgac_cv_var_int_optreset+set}" = set; then