improve package detection
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user