1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Link against -lodm and -lcfg on AIX.

This commit is contained in:
david
2008-06-15 07:05:12 +00:00
parent 8de4c7bdeb
commit e052c2eaae
2 changed files with 150 additions and 0 deletions

145
configure vendored
View File

@@ -4327,6 +4327,151 @@ _ACEOF
LIBS="-lnm $LIBS"
fi
;;
*-aix*)
# use some AIX specific libraries
{ echo "$as_me:$LINENO: checking for odm_initialize in -lodm" >&5
echo $ECHO_N "checking for odm_initialize in -lodm... $ECHO_C" >&6; }
if test "${ac_cv_lib_odm_odm_initialize+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lodm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char odm_initialize ();
int
main ()
{
return odm_initialize ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_odm_odm_initialize=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_odm_odm_initialize=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_odm_odm_initialize" >&5
echo "${ECHO_T}$ac_cv_lib_odm_odm_initialize" >&6; }
if test $ac_cv_lib_odm_odm_initialize = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBODM 1
_ACEOF
LIBS="-lodm $LIBS"
fi
{ echo "$as_me:$LINENO: checking for _system_configuration in -lcfg" >&5
echo $ECHO_N "checking for _system_configuration in -lcfg... $ECHO_C" >&6; }
if test "${ac_cv_lib_cfg__system_configuration+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcfg $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char _system_configuration ();
int
main ()
{
return _system_configuration ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_cfg__system_configuration=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_cfg__system_configuration=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_cfg__system_configuration" >&5
echo "${ECHO_T}$ac_cv_lib_cfg__system_configuration" >&6; }
if test $ac_cv_lib_cfg__system_configuration = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCFG 1
_ACEOF
LIBS="-lcfg $LIBS"
fi
;;

View File

@@ -134,6 +134,11 @@ case "$host" in
# on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000@yahoo.com)
AC_CHECK_LIB(nm, open_mib)
;;
*-aix*)
# use some AIX specific libraries
AC_CHECK_LIB(odm, odm_initialize)
AC_CHECK_LIB(cfg, _system_configuration)
;;
*-solaris2.0*)
AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)
AC_DEFINE(SOLARIS)