From: Andrei Pavel Date: Tue, 14 Sep 2021 08:27:16 +0000 (+0300) Subject: [#2049] AX_FIND_LIBRARY: look in lib64 also X-Git-Tag: Kea-2.0.0~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fe151c002bb694df543e4a6eb4ad362bee7fdfc;p=thirdparty%2Fkea.git [#2049] AX_FIND_LIBRARY: look in lib64 also --- diff --git a/m4macros/ax_find_library.m4 b/m4macros/ax_find_library.m4 index 7e045e65b7..b2d0055013 100644 --- a/m4macros/ax_find_library.m4 +++ b/m4macros/ax_find_library.m4 @@ -88,7 +88,6 @@ AC_DEFUN([AX_FIND_LIBRARY], [ if ! "${LIBRARY_FOUND}"; then for p in /usr /usr/local; do headers_found=true - libraries_found=true for i in ${list_of_headers}; do if test ! -f "${p}/include/${i}"; then AX_ADD_TO_LIBRARY_WARNINGS([${library} header ${i} not found in ${p}]) @@ -101,17 +100,24 @@ AC_DEFUN([AX_FIND_LIBRARY], [ LIBRARY_INCLUDEDIR="-I${p}/include" fi + libraries_found=true LIBRARY_LIBS="-L${p}/lib -Wl,-rpath=${p}/lib" for i in ${list_of_libraries}; do + i_found=false for l in lib lib64; do - if test ! -f "${p}/${l}/${i}"; then + if test -f "${p}/${l}/${i}"; then + lib=$(printf '%s' "${i}" | sed 's/^lib//g;s/.so$//g') + LIBRARY_LIBS="${LIBRARY_LIBS} -l${lib}" + i_found=true + break + else AX_ADD_TO_LIBRARY_WARNINGS([${library} library ${i} not found in ${p}/${l}]) - libraries_found=false - break 2 fi - lib=$(printf '%s' "${i}" | sed 's/^lib//g;s/.so$//g') - LIBRARY_LIBS="${LIBRARY_LIBS} -l${lib}" done + if ! "${i_found}"; then + libraries_found=false + break + fi done if "${headers_found}" && "${libraries_found}"; then