mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Add search for libgetopt.a in hopes of finding getopt_long().
This commit is contained in:
parent
b9104e3a97
commit
cc618f2653
75
configure
vendored
75
configure
vendored
@ -6045,6 +6045,65 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for main in -lgetopt" >&5
|
||||
echo $ECHO_N "checking for main in -lgetopt... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_getopt_main+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lgetopt $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
main ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_getopt_main=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_cv_lib_getopt_main=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_getopt_main" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_getopt_main" >&6
|
||||
if test $ac_cv_lib_getopt_main = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGETOPT 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lgetopt $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
# QNX:
|
||||
|
||||
echo "$as_me:$LINENO: checking for main in -lunix" >&5
|
||||
@ -11070,7 +11129,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
GETRUSAGE='getrusage.o'
|
||||
GETRUSAGE='$(top_builddir)/src/backend/port/getrusage.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11149,7 +11208,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
SRANDOM='srandom.o'
|
||||
SRANDOM='$(top_builddir)/src/backend/port/srandom.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11228,7 +11287,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
GETHOSTNAME='gethostname.o'
|
||||
GETHOSTNAME='$(top_builddir)/src/backend/port/gethostname.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11307,7 +11366,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
MISSING_RANDOM='random.o'
|
||||
MISSING_RANDOM='$(top_builddir)/src/backend/port/random.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11386,7 +11445,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
INET_ATON='inet_aton.o'
|
||||
INET_ATON='$(top_builddir)/src/backend/port/inet_aton.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11623,7 +11682,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
STRTOL='strtol.o'
|
||||
STRTOL='$(top_builddir)/src/backend/port/strtol.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11702,7 +11761,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
STRTOUL='strtoul.o'
|
||||
STRTOUL='$(top_builddir)/src/backend/port/strtoul.o'
|
||||
fi
|
||||
done
|
||||
|
||||
@ -11781,7 +11840,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
STRCASECMP='strcasecmp.o'
|
||||
STRCASECMP='$(top_builddir)/src/backend/port/strcasecmp.o'
|
||||
fi
|
||||
done
|
||||
|
||||
|
19
configure.in
19
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.188 2002/07/15 21:34:04 momjian Exp $
|
||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.189 2002/07/15 22:41:45 momjian Exp $
|
||||
dnl
|
||||
dnl Developers, please strive to achieve this order:
|
||||
dnl
|
||||
@ -696,6 +696,7 @@ AC_CHECK_LIB(BSD, main)
|
||||
AC_CHECK_LIB(gen, main)
|
||||
AC_CHECK_LIB(PW, main)
|
||||
AC_CHECK_LIB(resolv, main)
|
||||
AC_CHECK_LIB(getopt, main)
|
||||
# QNX:
|
||||
AC_CHECK_LIB([[unix]], main)
|
||||
AC_SEARCH_LIBS(crypt, crypt)
|
||||
@ -903,25 +904,25 @@ fi
|
||||
AC_SUBST(ISINF)
|
||||
|
||||
|
||||
AC_CHECK_FUNCS(getrusage, [], GETRUSAGE='getrusage.o')
|
||||
AC_CHECK_FUNCS(getrusage, [], GETRUSAGE='$(top_builddir)/src/backend/port/getrusage.o')
|
||||
AC_SUBST(GETRUSAGE)
|
||||
AC_CHECK_FUNCS(srandom, [], SRANDOM='srandom.o')
|
||||
AC_CHECK_FUNCS(srandom, [], SRANDOM='$(top_builddir)/src/backend/port/srandom.o')
|
||||
AC_SUBST(SRANDOM)
|
||||
AC_CHECK_FUNCS(gethostname, [], GETHOSTNAME='gethostname.o')
|
||||
AC_CHECK_FUNCS(gethostname, [], GETHOSTNAME='$(top_builddir)/src/backend/port/gethostname.o')
|
||||
AC_SUBST(GETHOSTNAME)
|
||||
AC_CHECK_FUNCS(random, [], MISSING_RANDOM='random.o')
|
||||
AC_CHECK_FUNCS(random, [], MISSING_RANDOM='$(top_builddir)/src/backend/port/random.o')
|
||||
AC_SUBST(MISSING_RANDOM)
|
||||
AC_CHECK_FUNCS(inet_aton, [], INET_ATON='inet_aton.o')
|
||||
AC_CHECK_FUNCS(inet_aton, [], INET_ATON='$(top_builddir)/src/backend/port/inet_aton.o')
|
||||
AC_SUBST(INET_ATON)
|
||||
AC_CHECK_FUNCS(strerror, [], STRERROR='$(top_builddir)/src/backend/port/strerror.o')
|
||||
AC_SUBST(STRERROR)
|
||||
AC_CHECK_FUNCS(strdup, [], STRDUP='$(top_builddir)/src/utils/strdup.o')
|
||||
AC_SUBST(STRDUP)
|
||||
AC_CHECK_FUNCS(strtol, [], STRTOL='strtol.o')
|
||||
AC_CHECK_FUNCS(strtol, [], STRTOL='$(top_builddir)/src/backend/port/strtol.o')
|
||||
AC_SUBST(STRTOL)
|
||||
AC_CHECK_FUNCS(strtoul, [], STRTOUL='strtoul.o')
|
||||
AC_CHECK_FUNCS(strtoul, [], STRTOUL='$(top_builddir)/src/backend/port/strtoul.o')
|
||||
AC_SUBST(STRTOUL)
|
||||
AC_CHECK_FUNCS(strcasecmp, [], STRCASECMP='strcasecmp.o')
|
||||
AC_CHECK_FUNCS(strcasecmp, [], STRCASECMP='$(top_builddir)/src/backend/port/strcasecmp.o')
|
||||
AC_SUBST(STRCASECMP)
|
||||
|
||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
|
||||
|
Loading…
Reference in New Issue
Block a user