diff mbox

[for-4.8] tools/configure: Drop -lcrypto search

Message ID 20161115150950.22253-1-ian.jackson@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson Nov. 15, 2016, 3:09 p.m. UTC
This seems to be looking for a function MD5.  But nothing uses it.
The build works fine if this is disabled and libcrypto is not
installed.

This check was first introduced in 68a3e1e87325 "[TOOLS] Add more
checks for devel packages." in 2006.  At that time -lcrypto was used
by tools/blktap/ and tools/vtpm_manager/, which are both gone now.

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
---
 tools/config.h.in  |  3 ---
 tools/configure    | 47 -----------------------------------------------
 tools/configure.ac |  1 -
 3 files changed, 51 deletions(-)

Comments

Wei Liu Nov. 15, 2016, 4:04 p.m. UTC | #1
On Tue, Nov 15, 2016 at 03:09:50PM +0000, Ian Jackson wrote:
> This seems to be looking for a function MD5.  But nothing uses it.
> The build works fine if this is disabled and libcrypto is not
> installed.
> 
> This check was first introduced in 68a3e1e87325 "[TOOLS] Add more
> checks for devel packages." in 2006.  At that time -lcrypto was used
> by tools/blktap/ and tools/vtpm_manager/, which are both gone now.
> 
> Signed-off-by: Ian Jackson <ian.jackson@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>
Wei Liu Nov. 15, 2016, 4:19 p.m. UTC | #2
On Tue, Nov 15, 2016 at 04:04:05PM +0000, Wei Liu wrote:
> On Tue, Nov 15, 2016 at 03:09:50PM +0000, Ian Jackson wrote:
> > This seems to be looking for a function MD5.  But nothing uses it.
> > The build works fine if this is disabled and libcrypto is not
> > installed.
> > 
> > This check was first introduced in 68a3e1e87325 "[TOOLS] Add more
> > checks for devel packages." in 2006.  At that time -lcrypto was used
> > by tools/blktap/ and tools/vtpm_manager/, which are both gone now.
> > 
> > Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Applied
diff mbox

Patch

diff --git a/tools/config.h.in b/tools/config.h.in
index 58856bc..c66a78c 100644
--- a/tools/config.h.in
+++ b/tools/config.h.in
@@ -30,9 +30,6 @@ 
 /* Define to 1 if you have the `aio' library (-laio). */
 #undef HAVE_LIBAIO
 
-/* Define to 1 if you have the `crypto' library (-lcrypto). */
-#undef HAVE_LIBCRYPTO
-
 /* Define to 1 if you have the `fdt' library (-lfdt). */
 #undef HAVE_LIBFDT
 
diff --git a/tools/configure b/tools/configure
index 3ffbf6f..4c756ab 100755
--- a/tools/configure
+++ b/tools/configure
@@ -8419,53 +8419,6 @@  fi
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5
-$as_echo_n "checking for MD5 in -lcrypto... " >&6; }
-if ${ac_cv_lib_crypto_MD5+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $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 MD5 ();
-int
-main ()
-{
-return MD5 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_crypto_MD5=yes
-else
-  ac_cv_lib_crypto_MD5=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_crypto_MD5" >&5
-$as_echo "$ac_cv_lib_crypto_MD5" >&6; }
-if test "x$ac_cv_lib_crypto_MD5" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPTO 1
-_ACEOF
-
-  LIBS="-lcrypto $LIBS"
-
-else
-  as_fn_error $? "Could not find libcrypto" "$LINENO" 5
-fi
-
 
 ac_fn_c_check_header_mongrel "$LINENO" "ext2fs/ext2fs.h" "ac_cv_header_ext2fs_ext2fs_h" "$ac_includes_default"
 if test "x$ac_cv_header_ext2fs_ext2fs_h" = xyes; then :
diff --git a/tools/configure.ac b/tools/configure.ac
index 1a8e493..873e18d 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -375,7 +375,6 @@  AS_IF([test "x$enable_blktap2" = "xyes"], [
 AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
 ])
 AC_SUBST(system_aio)
-AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])])
 AX_CHECK_EXTFS
 AC_CHECK_LIB([gcrypt], [gcry_md_hash_buffer], [libgcrypt="y"], [libgcrypt="n"])
 AC_SUBST(libgcrypt)