diff --git a/configure b/configure index cfad85261..cd0e62a32 100755 --- a/configure +++ b/configure @@ -766,6 +766,7 @@ with_libnbase with_libnsock with_ncat with_nmap_update +with_subversion ' ac_precious_vars='build_alias host_alias @@ -1435,6 +1436,7 @@ Optional Packages: --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 + --with-subversion=DIR Look for libsvn1 in DIR/include and DIR/libs. Some influential environment variables: CC C compiler command @@ -7605,6 +7607,25 @@ else fi + +# Check whether --with-subversion was given. +if test "${with_subversion+set}" = set; then : + withval=$with_subversion; +case "$with_subversion" in + yes) + ;; + no) + with_nmap_update=no + ;; + *) + CPPFLAGS="-I$with_subversion/include $CPPFLAGS" + LDFLAGS="-L$with_subversion/lib $LDFLAGS" + ;; + esac + +fi + + if test "$with_nmap_update" != "no"; then have_libsvn=yes if test "$have_libsvn" = "yes"; then @@ -7659,7 +7680,7 @@ else 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 : - echo $ac_cv_header_subversion_1_svn_client_h + else have_libsvn=no fi diff --git a/configure.ac b/configure.ac index cc27be38b..7c23065a0 100644 --- a/configure.ac +++ b/configure.ac @@ -858,6 +858,22 @@ AC_SUBST(NCAT_DIST_CLEAN) AC_ARG_WITH([nmap-update], AC_HELP_STRING([--without-nmap-update], [Skip build and installation of nmap-update]), [], [with_nmap_update=check]) +AC_ARG_WITH(subversion, +AC_HELP_STRING([--with-subversion=DIR], [Look for libsvn1 in DIR/include and DIR/libs.]), +[ +case "$with_subversion" in + yes) + ;; + no) + with_nmap_update=no + ;; + *) + CPPFLAGS="-I$with_subversion/include $CPPFLAGS" + LDFLAGS="-L$with_subversion/lib $LDFLAGS" + ;; + esac +]) + if test "$with_nmap_update" != "no"; then have_libsvn=yes if test "$have_libsvn" = "yes"; then diff --git a/nmap-update/configure b/nmap-update/configure index 68c8e6ee0..0a47834c1 100755 --- a/nmap-update/configure +++ b/nmap-update/configure @@ -657,6 +657,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +with_subversion ' ac_precious_vars='build_alias host_alias @@ -1272,6 +1273,11 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-subversion=DIR Look for libsvn1 in DIR/include and DIR/libs. + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -3051,6 +3057,25 @@ fi done + +# Check whether --with-subversion was given. +if test "${with_subversion+set}" = set; then : + withval=$with_subversion; +case "$with_subversion" in + yes) + ;; + no) + as_fn_error $? "Subversion and libsvn1 are required to build nmap-update." "$LINENO" 5 + ;; + *) + CPPFLAGS="-I$with_subversion/include $CPPFLAGS" + LDFLAGS="-L$with_subversion/lib $LDFLAGS" + ;; + esac + +fi + + # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for svn_client_create_context in -lsvn_client-1" >&5 diff --git a/nmap-update/configure.ac b/nmap-update/configure.ac index a35fc6db2..81372d293 100644 --- a/nmap-update/configure.ac +++ b/nmap-update/configure.ac @@ -11,6 +11,22 @@ AC_PROG_INSTALL AC_PATH_TOOL([STRIP], [strip], [/bin/true]) AC_CHECK_PROGS([APR_CONFIG], [apr-1-config]) +AC_ARG_WITH(subversion, +AC_HELP_STRING([--with-subversion=DIR], [Look for libsvn1 in DIR/include and DIR/libs.]), +[ +case "$with_subversion" in + yes) + ;; + no) + AC_MSG_ERROR([Subversion and libsvn1 are required to build nmap-update.]) + ;; + *) + CPPFLAGS="-I$with_subversion/include $CPPFLAGS" + LDFLAGS="-L$with_subversion/lib $LDFLAGS" + ;; + esac +]) + # Checks for libraries. AC_CHECK_LIB([svn_client-1], [svn_client_create_context]) AC_CHECK_LIB([svn_subr-1], [svn_handle_error2])