1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add search for libgetopt.a in hopes of finding getopt_long().

This commit is contained in:
Bruce Momjian
2002-07-15 22:41:45 +00:00
parent b9104e3a97
commit cc618f2653
2 changed files with 77 additions and 17 deletions

75
configure vendored
View File

@ -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