Source: duo-unix
Version: 1.11.3-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
duo-unix fails to cross build from source, because it uses AC_RUN_IFELSE
to determine whether an openssl function exists. As it does not check
the return value of the function, a link check would be sufficient here.
I'm attaching a patch to convert this to the more commonly used
AC_CHECK_FUNC that also happens to work for cross compilation.
Helmut
--- duo-unix-1.11.3.orig/autotools/ax_check_x509.m4
+++ duo-unix-1.11.3/autotools/ax_check_x509.m4
@@ -14,20 +14,16 @@
AU_ALIAS([CHECK_X509], [AX_CHECK_X509])
AC_DEFUN([AX_CHECK_X509],[
- AC_MSG_CHECKING([whether X509_TEA_set_state runs])
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
save_CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
LIBS="$OPENSSL_LIBS $LIBS"
CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([void X509_TEA_set_state(int change);], [X509_TEA_set_state(0);])],
+ AC_CHECK_FUNC([X509_TEA_set_state],
[
- AC_MSG_RESULT([yes])
$1
], [
- AC_MSG_RESULT([no])
$2
])
CPPFLAGS="$save_CPPFLAGS"