From d6eb11a3111e978c9892f53538be29831c9c4525 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Tue, 28 Jun 2016 22:15:29 -0700 Subject: [PATCH] Use AC_TRY_COMPILE instead of AC_TRY_RUN when configuring w/ OpenSSL, since we don't actually use test prog output, and the run requirement breaks cross compiling w/ OpenSSL. --- configure | 25 ++++++++++++------------- configure.ac | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/configure b/configure index dc0aa84..136b3ad 100755 --- a/configure +++ b/configure @@ -7139,13 +7139,7 @@ else # Basic test to check for compatible library and # correct linking - 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. */ #include @@ -7158,18 +7152,23 @@ int main(void) return(RAND_status() <= 0); } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +int +main () +{ found_crypto=1 break; -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test ! -z "$found_crypto" ; then break; fi diff --git a/configure.ac b/configure.ac index 43e48cb..18944a8 100644 --- a/configure.ac +++ b/configure.ac @@ -371,7 +371,7 @@ then # Basic test to check for compatible library and # correct linking - AC_TRY_RUN( + AC_TRY_COMPILE( [ #include #include