configure: use pkg-config
found via PATH.
We only care if the `pkg-config` bin is there, don't override it with the result from _which(). In the xbps-src world, pkg-config is a wrapper, that makes it cross compile easily.
This commit is contained in:
parent
66b856fa77
commit
9775a20dbc
32
configure
vendored
32
configure
vendored
@ -683,14 +683,14 @@ fi
|
|||||||
LIBARCHIVE_REQVER=3.3.3
|
LIBARCHIVE_REQVER=3.3.3
|
||||||
|
|
||||||
printf "Checking for libarchive >= ${LIBARCHIVE_REQVER} via pkg-config ... "
|
printf "Checking for libarchive >= ${LIBARCHIVE_REQVER} via pkg-config ... "
|
||||||
if ! $PKGCONFIG_BIN --atleast-version=${LIBARCHIVE_REQVER} libarchive; then
|
if ! pkg-config --atleast-version=${LIBARCHIVE_REQVER} libarchive; then
|
||||||
echo "libarchive.pc file not found, exiting."
|
echo "libarchive.pc file not found, exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "found version $($PKGCONFIG_BIN --modversion libarchive)."
|
echo "found version $(pkg-config --modversion libarchive)."
|
||||||
echo "CFLAGS += $($PKGCONFIG_BIN --cflags libarchive)" >>$CONFIG_MK
|
echo "CFLAGS += $(pkg-config --cflags libarchive)" >>$CONFIG_MK
|
||||||
echo "LDFLAGS += $($PKGCONFIG_BIN --libs libarchive)" >>$CONFIG_MK
|
echo "LDFLAGS += $(pkg-config --libs libarchive)" >>$CONFIG_MK
|
||||||
echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libarchive)" \
|
echo "STATIC_LIBS += $(pkg-config --libs --static libarchive)" \
|
||||||
>>$CONFIG_MK
|
>>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -698,17 +698,17 @@ fi
|
|||||||
# libssl with pkg-config support is required.
|
# libssl with pkg-config support is required.
|
||||||
#
|
#
|
||||||
printf "Checking for libssl via pkg-config ... "
|
printf "Checking for libssl via pkg-config ... "
|
||||||
if $PKGCONFIG_BIN --exists 'libssl < 1.2' && ! $PKGCONFIG_BIN --exists libtls ; then
|
if pkg-config --exists 'libssl < 1.2' && ! pkg-config --exists libtls ; then
|
||||||
echo "found OpenSSL version $($PKGCONFIG_BIN --modversion libssl)."
|
echo "found OpenSSL version $(pkg-config --modversion libssl)."
|
||||||
elif $PKGCONFIG_BIN --exists libssl libtls; then
|
elif pkg-config --exists libssl libtls; then
|
||||||
echo "found LibreSSL version $($PKGCONFIG_BIN --modversion libssl)."
|
echo "found LibreSSL version $(pkg-config --modversion libssl)."
|
||||||
else
|
else
|
||||||
echo "libssl.pc file not found or incompatible version detected, exiting."
|
echo "libssl.pc file not found or incompatible version detected, exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK
|
echo "CFLAGS += $(pkg-config --cflags libssl)" >>$CONFIG_MK
|
||||||
echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK
|
echo "LDFLAGS += $(pkg-config --libs libssl)" >>$CONFIG_MK
|
||||||
echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \
|
echo "STATIC_LIBS += $(pkg-config --libs --static libssl)" \
|
||||||
>>$CONFIG_MK
|
>>$CONFIG_MK
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -726,13 +726,13 @@ fi
|
|||||||
#
|
#
|
||||||
if [ "$BUILD_TESTS" = "yes" ]; then
|
if [ "$BUILD_TESTS" = "yes" ]; then
|
||||||
printf "Checking for ATF via pkg-config ... "
|
printf "Checking for ATF via pkg-config ... "
|
||||||
if ! $PKGCONFIG_BIN --atleast-version=0.15 atf-c; then
|
if ! pkg-config --atleast-version=0.15 atf-c; then
|
||||||
echo "ATF >= 0.15 not found in PKG_CONFIG_LIBDIR, exiting."
|
echo "ATF >= 0.15 not found in PKG_CONFIG_LIBDIR, exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "found version $($PKGCONFIG_BIN --modversion atf-c)."
|
echo "found version $(pkg-config --modversion atf-c)."
|
||||||
echo "TEST_CFLAGS += $($PKGCONFIG_BIN --cflags atf-c)" >>$CONFIG_MK
|
echo "TEST_CFLAGS += $(pkg-config --cflags atf-c)" >>$CONFIG_MK
|
||||||
echo "TEST_LDFLAGS += $($PKGCONFIG_BIN --libs atf-c)" >>$CONFIG_MK
|
echo "TEST_LDFLAGS += $(pkg-config --libs atf-c)" >>$CONFIG_MK
|
||||||
echo "BUILD_TESTS = yes" >>$CONFIG_MK
|
echo "BUILD_TESTS = yes" >>$CONFIG_MK
|
||||||
BUILD_TESTS_VALUE=yes
|
BUILD_TESTS_VALUE=yes
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user