Ok, using AC_TRY_COMPILE while configuring w/ OpenSSL fails when configuring normally (non-cross) & ssl is present. So now we use the AC_TRY_RUN if cross compiling, and assume presence otherwise (since the subsequent header exists checks fail if it's not actually there.)
This commit is contained in:
parent
1c8ec94fd2
commit
1a5a588f0d
|
@ -7139,7 +7139,16 @@ else
|
|||
|
||||
# Basic test to check for compatible library and
|
||||
# correct linking
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
if test "$cross_compiling" = yes; then
|
||||
found_crypto=1
|
||||
else
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <string.h>
|
||||
|
@ -7152,22 +7161,18 @@ int main(void)
|
|||
return(RAND_status() <= 0);
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
found_crypto=1
|
||||
break;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test ! -z "$found_crypto" ; then
|
||||
break;
|
||||
|
|
|
@ -371,7 +371,10 @@ then
|
|||
|
||||
# Basic test to check for compatible library and
|
||||
# correct linking
|
||||
AC_TRY_COMPILE(
|
||||
if test "$cross_compiling" = yes; then
|
||||
found_crypto=1
|
||||
else
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#include <string.h>
|
||||
#include <openssl/rand.h>
|
||||
|
@ -388,6 +391,7 @@ int main(void)
|
|||
break;
|
||||
], []
|
||||
)
|
||||
fi
|
||||
|
||||
if test ! -z "$found_crypto" ; then
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue