1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 04:19:02 +00:00

Reorder checks and libs to fix building when OpenSSL requires -ldl

This commit is contained in:
dmiller
2016-07-31 13:57:01 +00:00
parent 26bec9be41
commit 28bd96b82e
5 changed files with 37 additions and 16 deletions

19
nping/configure vendored
View File

@@ -2216,6 +2216,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check whether --with-localdirs was given.
if test "${with_localdirs+set}" = set; then :
withval=$with_localdirs; case "$with_localdirs" in
@@ -5058,7 +5075,7 @@ if test "$use_openssl" = "yes"; then
OPENSSL_LIBS="-lssl -lcrypto"
LIBS_TMP="$LIBS"
LIBS="$LIBS $OPENSSL_LIBS"
LIBS="$OPENSSL_LIBS $LIBS"
# Check whether the installed OpenSSL supports SHA-256 (ver 0.9.8 or later).
ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
if test "x$ac_cv_func_EVP_sha256" = xyes; then :

View File

@@ -175,7 +175,7 @@ if test "$use_openssl" = "yes"; then
AC_DEFINE(HAVE_OPENSSL)
OPENSSL_LIBS="-lssl -lcrypto"
LIBS_TMP="$LIBS"
LIBS="$LIBS $OPENSSL_LIBS"
LIBS="$OPENSSL_LIBS $LIBS"
# Check whether the installed OpenSSL supports SHA-256 (ver 0.9.8 or later).
AC_CHECK_FUNC(EVP_sha256,, AC_MSG_ERROR([Your version of OpenSSL does not support SHA-256. Please install OpenSSL 0.9.8 or later.]))
LIBS="$LIBS_TMP"

16
nsock/src/configure vendored
View File

@@ -4889,14 +4889,11 @@ if test "$use_openssl" = "yes"; then
$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
OPENSSL_LIBS="-lssl -lcrypto"
LIBS="$LIBS $OPENSSL_LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_set_tlsext_host_name" >&5
LIBS_TMP="$LIBS"
LIBS="$OPENSSL_LIBS $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_set_tlsext_host_name" >&5
$as_echo_n "checking for SSL_set_tlsext_host_name... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <openssl/ssl.h>
int
@@ -4917,6 +4914,11 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$LIBS_TMP"
fi

View File

@@ -257,16 +257,18 @@ OPENSSL_LIBS=
if test "$use_openssl" = "yes"; then
AC_DEFINE(HAVE_OPENSSL)
OPENSSL_LIBS="-lssl -lcrypto"
LIBS="$LIBS $OPENSSL_LIBS"
LIBS_TMP="$LIBS"
LIBS="$OPENSSL_LIBS $LIBS"
AC_MSG_CHECKING([for SSL_set_tlsext_host_name])
AC_TRY_LINK([#include <openssl/ssl.h>], [SSL_set_tlsext_host_name(NULL, NULL)],
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_SSL_SET_TLSEXT_HOST_NAME)],
[AC_MSG_RESULT([no])])
LIBS="$LIBS_TMP"
fi
AC_SUBST(OPENSSL_LIBS)
AC_MSG_CHECKING([for SSL_set_tlsext_host_name])
AC_TRY_LINK([#include <openssl/ssl.h>], [SSL_set_tlsext_host_name(NULL, NULL)],
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_SSL_SET_TLSEXT_HOST_NAME)],
[AC_MSG_RESULT([no])])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_ARG_WITH(libnbase,

View File

@@ -11,7 +11,7 @@ CC = @CC@
CPPFLAGS = @CPPFLAGS@ -I../include
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @OPENSSL_LIBS@ @LIBPCAP_LIBS@
LIBS = @OPENSSL_LIBS@ @LIBPCAP_LIBS@ @LIBS@
SRC = tests_main.c \
basic.c \