[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inappropriate usage of pkg-config in acinclude.m4
From: |
siko1056 |
Subject: |
Inappropriate usage of pkg-config in acinclude.m4 |
Date: |
Tue, 5 Jul 2016 00:55:36 -0700 (PDT) |
Dear Jordi,
Your recent changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/a2c29df93df7
seems useful, but in my case I don't want pkg-config to find my system-wide
installed library, as I use a self-compiled one.
A short explanation:
./configure --with-arpack='-larpack_Octave64'
resulted in
ARPACK libraries: -larpack_Octave64
now pkg-config also finds my system-wide installed ARPACK, too:
ARPACK libraries: -larpack -larpack_Octave64
and this caused me some headache.
I see it is pretty useful, but pkg-config should only become active, if the
user does not provide a value he wants there to be. I don't fully understand
this m4 language, but a potential fix might be:
m4_toupper([$1])_LIBS=
warn_$1="$3"
case $with_$1 in
no)
warn_$1="--without-$1 specified. Functions or features that depend on
$2 will be disabled."
m4_toupper([$1])_LIBS=
;;
yes | "")
m4_toupper([$1])_LIBS="-l$1"
PKG_CHECK_EXISTS([$1], [
m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l $1)
$m4_toupper([$1])_LIBS"
])
;;
-* | */* | *.a | *.so | *.so.* | *.o)
m4_toupper([$1])_LIBS="$with_$1"
;;
*)
m4_toupper([$1])_LIBS="-l$with_$1"
;;
esac
Or some if-else stuff.
Best,
Kai
--
View this message in context:
http://octave.1599824.n4.nabble.com/Inappropriate-usage-of-pkg-config-in-acinclude-m4-tp4678193.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.