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,6 +7139,15 @@ else
|
||||||
|
|
||||||
# Basic test to check for compatible library and
|
# Basic test to check for compatible library and
|
||||||
# correct linking
|
# correct linking
|
||||||
|
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
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
@ -7152,22 +7161,18 @@ int main(void)
|
||||||
return(RAND_status() <= 0);
|
return(RAND_status() <= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
_ACEOF
|
||||||
main ()
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
{
|
|
||||||
|
|
||||||
found_crypto=1
|
found_crypto=1
|
||||||
break;
|
break;
|
||||||
|
|
||||||
;
|
fi
|
||||||
return 0;
|
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||||
}
|
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
_ACEOF
|
fi
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
|
|
||||||
if test ! -z "$found_crypto" ; then
|
if test ! -z "$found_crypto" ; then
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -371,7 +371,10 @@ then
|
||||||
|
|
||||||
# Basic test to check for compatible library and
|
# Basic test to check for compatible library and
|
||||||
# correct linking
|
# correct linking
|
||||||
AC_TRY_COMPILE(
|
if test "$cross_compiling" = yes; then
|
||||||
|
found_crypto=1
|
||||||
|
else
|
||||||
|
AC_TRY_RUN(
|
||||||
[
|
[
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
@ -388,6 +391,7 @@ int main(void)
|
||||||
break;
|
break;
|
||||||
], []
|
], []
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if test ! -z "$found_crypto" ; then
|
if test ! -z "$found_crypto" ; then
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue