Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
AC_CHECK_HEADERS should come before AC_SEARCH_LIBS
Browse files Browse the repository at this point in the history
the latter can make use of the result of the former

Also, annoyingly, AC_CHECK_HEADERS will call the action-if-not-found for
*every* header it its list that is not found (as opposed to just if no
header in the list is found.  So we should set sage_spkg_install_libffi=no again in case the second header is found but not the first.
  • Loading branch information
embray committed Jan 29, 2019
1 parent 4d9ccb4 commit 761c978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/pkgs/libffi/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ SAGE_SPKG_CONFIGURE([libffi], [
dnl First try checking for libffi with pkg-config
PKG_CHECK_MODULES([LIBFFI], [libffi], [], [
dnl Fallback to manually grubbing around for headers and libs
AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [sage_spkg_install_libffi=no; break], [sage_spkg_install_libffi=yes])
AC_SEARCH_LIBS([ffi_call], [ffi], [], [sage_spkg_install_libffi=yes])
AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break], [sage_spkg_install_libffi=yes])
])
])

0 comments on commit 761c978

Please sign in to comment.