1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2009-04-04 21:55:50 +00:00
parent 090173a3f9
commit 1d26226d95
4 changed files with 88 additions and 4 deletions

View File

@ -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;],