mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 12:29:03 +00:00
Add configure/Makefile stuff for libsvn1 detection.
nmap-update is built optionally, only if libsvn1 is present.
This commit is contained in:
167
configure
vendored
167
configure
vendored
@@ -602,6 +602,12 @@ ac_includes_default="\
|
||||
enable_option_checking=no
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
NMAP_UPDATE_DIST_CLEAN
|
||||
NMAP_UPDATE_CLEAN
|
||||
NMAP_UPDATE_UNINSTALL
|
||||
NMAP_UPDATE_INSTALL
|
||||
NMAP_UPDATE_BUILD
|
||||
APR_CONFIG
|
||||
NCAT_DIST_CLEAN
|
||||
NCAT_CLEAN
|
||||
NCAT_UNINSTALL
|
||||
@@ -759,6 +765,7 @@ with_liblinear
|
||||
with_libnbase
|
||||
with_libnsock
|
||||
with_ncat
|
||||
with_nmap_update
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -778,7 +785,8 @@ libpcre
|
||||
libdnet-stripped
|
||||
nbase
|
||||
nsock/src
|
||||
ncat'
|
||||
ncat
|
||||
nmap-update'
|
||||
|
||||
# Initialize some variables set by options.
|
||||
ac_init_help=
|
||||
@@ -1426,6 +1434,7 @@ Optional Packages:
|
||||
--with-libnbase=DIR Look for nbase include/libs in DIR
|
||||
--with-libnsock=DIR Compile and link to libnsock in DIR
|
||||
--without-ncat Skip build and installation of Ncat
|
||||
--without-nmap-update Skip build and installation of nmap-update
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
@@ -7586,6 +7595,162 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-nmap-update was given.
|
||||
if test "${with_nmap_update+set}" = set; then :
|
||||
withval=$with_nmap_update;
|
||||
else
|
||||
with_nmap_update=check
|
||||
fi
|
||||
|
||||
|
||||
if test "$with_nmap_update" != "no"; then
|
||||
have_libsvn=yes
|
||||
if test "$have_libsvn" = "yes"; then
|
||||
for ac_prog in apr-1-config
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_APR_CONFIG+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$APR_CONFIG"; then
|
||||
ac_cv_prog_APR_CONFIG="$APR_CONFIG" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_APR_CONFIG="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
APR_CONFIG=$ac_cv_prog_APR_CONFIG
|
||||
if test -n "$APR_CONFIG"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $APR_CONFIG" >&5
|
||||
$as_echo "$APR_CONFIG" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$APR_CONFIG" && break
|
||||
done
|
||||
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $($APR_CONFIG --cppflags --includes)"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "subversion-1/svn_client.h" "ac_cv_header_subversion_1_svn_client_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_subversion_1_svn_client_h" = xyes; then :
|
||||
|
||||
else
|
||||
have_libsvn=no
|
||||
fi
|
||||
|
||||
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
fi
|
||||
if test "$have_libsvn" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for svn_client_create_context in -lsvn_client-1" >&5
|
||||
$as_echo_n "checking for svn_client_create_context in -lsvn_client-1... " >&6; }
|
||||
if ${ac_cv_lib_svn_client_1_svn_client_create_context+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lsvn_client-1 $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* 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 svn_client_create_context ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return svn_client_create_context ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_svn_client_1_svn_client_create_context=yes
|
||||
else
|
||||
ac_cv_lib_svn_client_1_svn_client_create_context=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svn_client_1_svn_client_create_context" >&5
|
||||
$as_echo "$ac_cv_lib_svn_client_1_svn_client_create_context" >&6; }
|
||||
if test "x$ac_cv_lib_svn_client_1_svn_client_create_context" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBSVN_CLIENT_1 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lsvn_client-1 $LIBS"
|
||||
|
||||
else
|
||||
have_libsvn=no
|
||||
fi
|
||||
|
||||
fi
|
||||
if test "$have_libsvn" != "yes"; then
|
||||
if test "$with_nmap_update" = "check"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not building nmap-update because libsvn1 was not found" >&5
|
||||
$as_echo "$as_me: WARNING: Not building nmap-update because libsvn1 was not found" >&2;}
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "--with-nmap-update requires libsvn1
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
with_nmap_update=no
|
||||
else
|
||||
with_nmap_update=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_nmap_update" = "no"; then
|
||||
NMAP_UPDATE_BUILD=""
|
||||
NMAP_UPDATE_INSTALL=""
|
||||
NMAP_UPDATE_UNINSTALL=""
|
||||
NMAP_UPDATE_CLEAN=""
|
||||
NMAP_UPDATE_DIST_CLEAN=""
|
||||
else
|
||||
NMAP_UPDATE_BUILD="build-nmap-update"
|
||||
NMAP_UPDATE_INSTALL="install-nmap-update"
|
||||
NMAP_UPDATE_UNINSTALL="uninstall-nmap-update"
|
||||
NMAP_UPDATE_CLEAN="clean-nmap-update"
|
||||
NMAP_UPDATE_DIST_CLEAN="distclean-nmap-update"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
subdirs="$subdirs nmap-update"
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile libnetutil/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
|
||||
Reference in New Issue
Block a user