Skip to content

Commit

Permalink
updated .m4 file
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed Apr 18, 2024
1 parent f684bd3 commit fe826b0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions m4/ac_osx_pkg.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# osx_pkg.m4 - Macros to add OSX brew locations to pkg-config. -*- Autoconf -*-
# serial 1
# serial 2 (pkg-config-0.24)
#
# Copyright © 2018 Ko van der Sloot <[email protected]>
# Copyright © 2024 Ko van der Sloot <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -40,6 +40,13 @@ case ${host_os} in
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/$i/lib/pkgconfig"
fi
done
for i in `ls /opt/homewbrew/opt`
do
if test -d "/opt/homebrew/opt/$i/lib/pkgconfig"
then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/homebrew/opt/$i/lib/pkgconfig"
fi
done
;;
esac
])
Expand All @@ -55,12 +62,17 @@ case ${host_os} in
# linux is wellbehaved
;;
darwin*)
# darwin isn't
# darwin/macos isn't
for i in $*
do
if test -d "/usr/local/opt/$i/lib/pkgconfig"
then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/$i/lib/pkgconfig"
else
if test -d "/opt/homebrew/opt//$i/lib/pkgconfig"
then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/homebrew/opt/$i/lib/pkgconfig"
fi
fi
done
;;
Expand Down

0 comments on commit fe826b0

Please sign in to comment.