improve package detection

master
Marc Wäckerlin 10 years ago
parent 27b9a14ca9
commit bfc6c41505
  1. 6
      ax_init_standard_project.m4

@ -412,13 +412,13 @@ AC_DEFUN([AX_PKG_REQUIRE], [
old_CPPFLAGS=${CPPFLAGS}
CPPFLAGS=" ${$1_CFLAGS} ${CPPFLAGS}"
AC_CHECK_HEADER([$3], [
$1_found=yes
$1_found=${tmp_package}
], [
for x in ${$1_CFLAGS}; do
AC_MSG_NOTICE([search for $3 in ${x[#]-I}])
for f in $(find ${x[#]-I} -name "$3"); do
if test -f "$f"; then
$1_found=yes
$1_found=${tmp_package}
$1_CFLAGS+=" -I${f%/*}"
AC_MSG_NOTICE([added path ${f%/*}])
break;
@ -434,7 +434,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AC_MSG_NOTICE([search for $3 in $x])
for f in $(find ${x} -name "$3"); do
if test -f "$f"; then
$1_found=yes
$1_found=${tmp_package}
$1_CFLAGS+=" -I${f%/*}"
AC_MSG_NOTICE([added path ${f%/*}])
break;

Loading…
Cancel
Save