Check libcrypto before libssl to avoid configure errors

This commit is contained in:
Mico Micic 2024-08-26 22:10:50 +02:00 committed by Olof Hagsand
parent 4553419cc2
commit 5af422f09b
2 changed files with 85 additions and 85 deletions

90
configure vendored
View file

@ -6664,51 +6664,6 @@ fi
# This is for digest / restconf
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5
printf %s "checking for OPENSSL_init_ssl in -lssl... " >&6; }
if test ${ac_cv_lib_ssl_OPENSSL_init_ssl_+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lssl $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. */
char OPENSSL_init_ssl ();
int
main (void)
{
return OPENSSL_init_ssl ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ssl_OPENSSL_init_ssl_=yes
else $as_nop
ac_cv_lib_ssl_OPENSSL_init_ssl_=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_OPENSSL_init_ssl_" >&5
printf "%s\n" "$ac_cv_lib_ssl_OPENSSL_init_ssl_" >&6; }
if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl_" = xyes
then :
printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
LIBS="-lssl $LIBS"
else $as_nop
as_fn_error $? "libssl missing" "$LINENO" 5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
printf %s "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
if test ${ac_cv_lib_crypto_CRYPTO_new_ex_data+y}
@ -6754,6 +6709,51 @@ else $as_nop
as_fn_error $? "libcrypto missing" "$LINENO" 5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5
printf %s "checking for OPENSSL_init_ssl in -lssl... " >&6; }
if test ${ac_cv_lib_ssl_OPENSSL_init_ssl_+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lssl $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. */
char OPENSSL_init_ssl ();
int
main (void)
{
return OPENSSL_init_ssl ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ssl_OPENSSL_init_ssl_=yes
else $as_nop
ac_cv_lib_ssl_OPENSSL_init_ssl_=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_OPENSSL_init_ssl_" >&5
printf "%s\n" "$ac_cv_lib_ssl_OPENSSL_init_ssl_" >&6; }
if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl_" = xyes
then :
printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h
LIBS="-lssl $LIBS"
else $as_nop
as_fn_error $? "libssl missing" "$LINENO" 5
fi
# This is for libxml2 XSD regex engine
# Note this only enables the compiling of the code. In order to actually