[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inappropriate usage of pkg-config in acinclude.m4
From: |
Mike Miller |
Subject: |
Re: Inappropriate usage of pkg-config in acinclude.m4 |
Date: |
Tue, 5 Jul 2016 09:02:35 -0700 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Tue, Jul 05, 2016 at 00:55:36 -0700, siko1056 wrote:
> 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.
I agree, I think this pkg-config check should only be activated for the
case where the user did not specify the --with-foo or --without-bar
options. I'll test a fix for this.
--
mike
signature.asc
Description: PGP signature