aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure9
-rw-r--r--configure.in13
2 files changed, 16 insertions, 6 deletions
diff --git a/configure b/configure
index 54cd1ad023a..16191405981 100755
--- a/configure
+++ b/configure
@@ -12137,8 +12137,13 @@ else
LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
fi
-# similarly, use system's getopt_long() only if system provides struct option.
-if test x"$ac_cv_type_struct_option" = xyes ; then
+# Similarly, use system's getopt_long() only if system provides struct option.
+# Solaris' getopt() doesn't do what we want for long options, so always use
+# our versions on that platform.
+if test "$PORTNAME" = "solaris"; then
+ LIBOBJS="$LIBOBJS getopt.$ac_objext"
+ LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+elif test x"$ac_cv_type_struct_option" = xyes ; then
for ac_func in getopt_long
do
diff --git a/configure.in b/configure.in
index f7bdec33538..f61b120f005 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.301.2.29 2008/01/03 21:42:17 tgl Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.301.2.30 2008/02/24 05:22:44 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -26,7 +26,7 @@ m4_undefine([infodir])
m4_undefine([info])
AC_SUBST(docdir)
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.53], [], [m4_fatal([Autoconf version 2.59 is required.
+m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.53], [], [m4_fatal([Autoconf version 2.53 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
recommended. You can remove the check from 'configure.in' but it is then
your responsibility whether the result works or not.])])
@@ -943,8 +943,13 @@ else
AC_LIBOBJ(getaddrinfo)
fi
-# similarly, use system's getopt_long() only if system provides struct option.
-if test x"$ac_cv_type_struct_option" = xyes ; then
+# Similarly, use system's getopt_long() only if system provides struct option.
+# Solaris' getopt() doesn't do what we want for long options, so always use
+# our versions on that platform.
+if test "$PORTNAME" = "solaris"; then
+ AC_LIBOBJ(getopt)
+ AC_LIBOBJ(getopt_long)
+elif test x"$ac_cv_type_struct_option" = xyes ; then
AC_REPLACE_FUNCS([getopt_long])
else
AC_LIBOBJ(getopt_long)