From: Tom Lane Date: Sun, 24 Feb 2008 05:22:33 +0000 (+0000) Subject: Use our own getopt() and getopt_long() on Solaris, because that platform's X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=1fe710c93ba85fc67113ebbd8c4994cf71b0bd69;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/configure b/configure index 23aa9facc9..c673b3ee02 100755 --- a/configure +++ b/configure @@ -12758,8 +12758,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 bac42a7e8f..3b5508e1ea 100644 --- a/configure.in +++ b/configure.in @@ -19,7 +19,7 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros AC_INIT([PostgreSQL], [8.0.15], [pgsql-bugs@postgresql.org]) -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.])]) @@ -942,8 +942,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)