summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-02-24 05:21:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-02-24 05:21:54 +0000
commitad20c990f7392a14d2b9699b5b5857d5e5353715 (patch)
tree03e1f3fb5e23138ddd0a48af46d27233096fcff1 /configure.in
parent2e0e563124d3b1b279c4242927d1786e43303a0f (diff)
downloadpostgresql-ad20c990f7392a14d2b9699b5b5857d5e5353715.tar.gz
Use our own getopt() and getopt_long() on Solaris, because that platform's
versions don't handle long options the way we want. Per Zdenek Kotala.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 220204463c..2bdc371984 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.551 2008/02/19 01:05:28 momjian Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.552 2008/02/24 05:21:54 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -1095,8 +1095,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)