2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 12:37:55 +00:00

[#2311] ax_find_library: search for .pc file in lib64 as well

This commit is contained in:
Andrei Pavel 2022-10-06 13:05:34 +03:00
parent bc1eeaf01a
commit 0a249709a4
No known key found for this signature in database
GPG Key ID: D4E804481939CB21

View File

@ -46,8 +46,8 @@ AC_DEFUN([AX_FIND_LIBRARY], [
elif test -d "${with_library}"; then elif test -d "${with_library}"; then
# User has pointed --with-library to a directory. # User has pointed --with-library to a directory.
# Let's try to find a library.pc first inside that directory. # Let's try to find a library.pc first inside that directory.
library_pc="${with_library}/lib/pkgconfig/${library}.pc" for l in lib lib64; do
library_pc="${with_library}/${l}/pkgconfig/${library}.pc"
if test -f "${library_pc}"; then if test -f "${library_pc}"; then
if test -n "${PKG_CONFIG}"; then if test -n "${PKG_CONFIG}"; then
AX_FIND_LIBRARY_WITH_PKG_CONFIG("${library_pc}", ["${list_of_variables}"], ["${pkg_config_paths}"]) AX_FIND_LIBRARY_WITH_PKG_CONFIG("${library_pc}", ["${list_of_variables}"], ["${pkg_config_paths}"])
@ -57,15 +57,11 @@ AC_DEFUN([AX_FIND_LIBRARY], [
else else
AX_ADD_TO_LIBRARY_WARNINGS([pkg-config file not found at ${library_pc}]) AX_ADD_TO_LIBRARY_WARNINGS([pkg-config file not found at ${library_pc}])
fi fi
done
else else
AC_MSG_RESULT(["no"]) AC_MSG_RESULT(["no"])
AX_DISPLAY_LIBRARY_WARNINGS() AX_DISPLAY_LIBRARY_WARNINGS()
# TODO: It can also point to a .pc file, but the current sysrepo AC_MSG_ERROR(["${with_library}" needs to point to the installation directory or to a .pc file])
# implementation does not allow it because there are more .pc files than
# --with flags. After migration to sysrepo v2 has been done there will be
# four flags and four .pc files so change the error message to say that it
# can also point to a .pc file.
AC_MSG_ERROR(["${with_library}" needs to point to the installation directory])
fi fi
else else