summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-05-25 21:48:34 +0200
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-05-25 21:48:34 +0200
commiteb1cafcf5603f08f5916a205e6c205364ba85af7 (patch)
tree6ca94577dbb285b18195d3931c2abbca8061d0d8
parent95cfd9d2fe51e8b225295558115cfc37581adfb7 (diff)
downloadtcpdump-4.3.tar.gz
Fix errors (7 tests failed) with 'make check'tcpdump-4.3
Simplify the detection of OpenSSL libcrypto, based on Marc Abramowitz commit c4b7e5f2b287ee3d1de8f706b809a8e217720c4e
-rwxr-xr-xconfigure148
-rw-r--r--configure.in73
2 files changed, 14 insertions, 207 deletions
diff --git a/configure b/configure
index 807b0fbb..f817517e 100755
--- a/configure
+++ b/configure
@@ -1338,8 +1338,7 @@ Optional Packages:
--without-smi don't link with libsmi
--with-user=USERNAME drop privileges by default to USERNAME
--with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
- --with-crypto[=PATH] use SSLeay libcrypto (located in directory PATH, if
- supplied). [default=yes, if available]
+ --with-crypto use OpenSSL libcrypto [default=yes, if available]
Some influential environment variables:
CC C compiler command
@@ -7373,11 +7372,11 @@ $as_echo "$ac_cv_var_h_errno" >&6; }
fi
-# Check for SSLeay
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use SSLeay libcrypto" >&5
-$as_echo_n "checking whether to use SSLeay libcrypto... " >&6; }
+# Check for OpenSSL libcrypto
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL libcrypto" >&5
+$as_echo_n "checking whether to use OpenSSL libcrypto... " >&6; }
# Specify location for both includes and libraries.
-want_libcrypto=youmama
+want_libcrypto=ifavailable
# Check whether --with-crypto was given.
if test "${with_crypto+set}" = set; then :
@@ -7392,11 +7391,6 @@ $as_echo "no" >&6; }
want_libcrypto=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- else
- want_libcrypto=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- crypto_dir=$withval
fi
else
@@ -7411,121 +7405,7 @@ $as_echo "yes, if available" >&6; }
fi
if test "$want_libcrypto" != "no"; then
- ac_cv_ssleay_path=no
- incdir=no
- if test "x$crypto_dir" = x; then
- #
- # Location not specified; check the default locations.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where SSLeay is located" >&5
-$as_echo_n "checking where SSLeay is located... " >&6; }
- dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
- if test "x${host_alias}" != x; then
- dirs="/usr/${host_alias} $dirs"
- fi
- for dir in $dirs; do
-
- #
- # Find the last component of $libdir; it's not necessarily
- # "lib" - it might be "lib64" on, for example, x86-64
- # Linux systems.
- #
- # We assume the directory in which we're looking for
- # libcrypto has a subdirectory with that as its name.
- #
- tmplib=`echo "$libdir" | sed 's,.*/,,'`
-
- #
- # XXX - is there a better way to check if a given library is
- # in a given directory than checking each of the possible
- # shared library suffixes?
- #
- # Are there any other suffixes we need to look for? Do we
- # have to worry about ".so.{version}"?
- #
- # Or should we just look for "libcrypto.*"?
- #
- if test -d "$dir/$tmplib" -a \( -f "$dir/$tmplib/libcrypto.a" -o \
- -f "$dir/$tmplib/libcrypto.so" -o \
- -f "$dir/$tmplib/libcrypto.sl" -o \
- -f "$dir/$tmplib/libcrypto.dylib" \); then
- ac_cv_ssleay_path="$dir"
- fi
-
- #
- # Make sure we have the headers as well.
- #
- if test -d "$dir/include/openssl" -a -f "$dir/include/openssl/des.h"; then
- incdir="-I$dir/include"
- fi
-
-
- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
- break;
- else
- ac_cv_ssleay_path=no
- incdir=no
- fi
- done
- if test "$ac_cv_ssleay_path" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ssleay_path" >&5
-$as_echo "$ac_cv_ssleay_path" >&6; }
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSLeay in $crypto_dir" >&5
-$as_echo_n "checking for SSLeay in $crypto_dir... " >&6; }
-
- #
- # Find the last component of $libdir; it's not necessarily
- # "lib" - it might be "lib64" on, for example, x86-64
- # Linux systems.
- #
- # We assume the directory in which we're looking for
- # libcrypto has a subdirectory with that as its name.
- #
- tmplib=`echo "$libdir" | sed 's,.*/,,'`
-
- #
- # XXX - is there a better way to check if a given library is
- # in a given directory than checking each of the possible
- # shared library suffixes?
- #
- # Are there any other suffixes we need to look for? Do we
- # have to worry about ".so.{version}"?
- #
- # Or should we just look for "libcrypto.*"?
- #
- if test -d "$crypto_dir/$tmplib" -a \( -f "$crypto_dir/$tmplib/libcrypto.a" -o \
- -f "$crypto_dir/$tmplib/libcrypto.so" -o \
- -f "$crypto_dir/$tmplib/libcrypto.sl" -o \
- -f "$crypto_dir/$tmplib/libcrypto.dylib" \); then
- ac_cv_ssleay_path="$crypto_dir"
- fi
-
- #
- # Make sure we have the headers as well.
- #
- if test -d "$crypto_dir/include/openssl" -a -f "$crypto_dir/include/openssl/des.h"; then
- incdir="-I$crypto_dir/include"
- fi
-
- if test "$ac_cv_ssleay_path" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
- if test "$ac_cv_ssleay_path" != no; then
- V_INCLS="$V_INCLS $incdir"
- if test "$dir" != "/usr"; then
- LDFLAGS="-L$dir/lib $LDFLAGS"
- fi
- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
- LIBS="$LIBS -lRSAglue"
- fi
- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
- LIBS="$LIBS -lrsaref"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
$as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
if ${ac_cv_lib_crypto_DES_cbc_encrypt+:} false; then :
$as_echo_n "(cached) " >&6
@@ -7570,10 +7450,7 @@ _ACEOF
fi
-
- savedcppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $V_INCLS"
- for ac_header in openssl/evp.h
+ for ac_header in openssl/evp.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
@@ -7585,17 +7462,6 @@ fi
done
- CPPFLAGS="$savedcppflags"
- else
- #
- # Not found. Did the user explicitly ask for it?
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- if test "$want_libcrypto" = yes; then
- as_fn_error $? "SSLeay not found" "$LINENO" 5
- fi
- fi
fi
if test "$missing_includes" = "yes"; then
diff --git a/configure.in b/configure.in
index c03a1607..0f6bdb0f 100644
--- a/configure.in
+++ b/configure.in
@@ -1000,13 +1000,13 @@ AC_LBL_UNALIGNED_ACCESS
AC_VAR_H_ERRNO
-# Check for SSLeay
-AC_MSG_CHECKING(whether to use SSLeay libcrypto)
+# Check for OpenSSL libcrypto
+AC_MSG_CHECKING(whether to use OpenSSL libcrypto)
# Specify location for both includes and libraries.
-want_libcrypto=youmama
+want_libcrypto=ifavailable
AC_ARG_WITH(crypto,
- AS_HELP_STRING([--with-crypto@<:@=PATH@:>@],
- [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]),
+ AS_HELP_STRING([--with-crypto],
+ [use OpenSSL libcrypto @<:@default=yes, if available@:>@]),
[
if test $withval = no
then
@@ -1016,10 +1016,6 @@ AC_ARG_WITH(crypto,
then
want_libcrypto=yes
AC_MSG_RESULT(yes)
- else
- want_libcrypto=yes
- AC_MSG_RESULT(yes)
- crypto_dir=$withval
fi
],[
#
@@ -1029,63 +1025,8 @@ AC_ARG_WITH(crypto,
AC_MSG_RESULT([yes, if available])
])
if test "$want_libcrypto" != "no"; then
- ac_cv_ssleay_path=no
- incdir=no
- if test "x$crypto_dir" = x; then
- #
- # Location not specified; check the default locations.
- #
- AC_MSG_CHECKING(where SSLeay is located)
- dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
- if test "x${host_alias}" != x; then
- dirs="/usr/${host_alias} $dirs"
- fi
- for dir in $dirs; do
- AC_LBL_SSLEAY($dir)
-
- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
- break;
- else
- ac_cv_ssleay_path=no
- incdir=no
- fi
- done
- if test "$ac_cv_ssleay_path" != no; then
- AC_MSG_RESULT($ac_cv_ssleay_path)
- fi
- else
- AC_MSG_CHECKING(for SSLeay in $crypto_dir)
- AC_LBL_SSLEAY($crypto_dir)
- if test "$ac_cv_ssleay_path" != no; then
- AC_MSG_RESULT(found)
- fi
- fi
- if test "$ac_cv_ssleay_path" != no; then
- V_INCLS="$V_INCLS $incdir"
- if test "$dir" != "/usr"; then
- LDFLAGS="-L$dir/lib $LDFLAGS"
- fi
- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
- LIBS="$LIBS -lRSAglue"
- fi
- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
- LIBS="$LIBS -lrsaref"
- fi
- AC_CHECK_LIB(crypto, DES_cbc_encrypt)
-
- savedcppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $V_INCLS"
- AC_CHECK_HEADERS(openssl/evp.h)
- CPPFLAGS="$savedcppflags"
- else
- #
- # Not found. Did the user explicitly ask for it?
- #
- AC_MSG_RESULT(not found)
- if test "$want_libcrypto" = yes; then
- AC_MSG_ERROR(SSLeay not found)
- fi
- fi
+ AC_CHECK_LIB(crypto, DES_cbc_encrypt)
+ AC_CHECK_HEADERS(openssl/evp.h)
fi
dnl