aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurin-Luis Lehning <65224843+e820@users.noreply.github.com>2021-03-04 19:55:31 +0100
committerMartin Mareš <mj@ucw.cz>2021-12-26 22:19:10 +0100
commit5fe984a8de70773ef7b9a617702d0091a968e77f (patch)
tree7979073cab74ae4caf4ddeb5cab54e7bfb2e431b
parentfe4074e525ec31b7d03a9fa963fb18f346a1fd7e (diff)
downloadpciutils-5fe984a8de70773ef7b9a617702d0091a968e77f.tar.gz
Fix the primitive system dependency discovery for Darwin systems
-rwxr-xr-xlib/configure6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/configure b/lib/configure
index e181b7f..77a0816 100755
--- a/lib/configure
+++ b/lib/configure
@@ -62,6 +62,7 @@ echo >$m 'WITH_LIBS='
echo_n "Looking for access methods..."
LIBRESOLV=-lresolv
LIBEXT=so
+MACSDKROOT=
case $sys in
linux*)
@@ -112,6 +113,7 @@ case $sys in
echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
LIBRESOLV=
LIBEXT=dylib
+ MACSDKROOT=$(xcrun --sdk macosx --show-sdk-path)
;;
aix)
echo_n " aix-device"
@@ -172,7 +174,7 @@ echo_n "Checking for zlib support... "
if [ "$ZLIB" = yes -o "$ZLIB" = no ] ; then
echo "$ZLIB (set manually)"
else
- if [ -f /usr/include/zlib.h -o -f /usr/local/include/zlib.h ] ; then
+ if [ -f "$MACSDKROOT"/usr/include/zlib.h -o -f /usr/local/include/zlib.h ] ; then
ZLIB=yes
else
ZLIB=no
@@ -193,7 +195,7 @@ echo_n "Checking for DNS support... "
if [ "$DNS" = yes -o "$DNS" = no ] ; then
echo "$DNS (set manually)"
else
- if [ -f /usr/include/resolv.h ] ; then
+ if [ -f "$MACSDKROOT"/usr/include/resolv.h ] ; then
DNS=yes
else
DNS=no