autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AX_CREATE_PKGCONFIG_INFO and hardcoded paths


From: LRN
Subject: AX_CREATE_PKGCONFIG_INFO and hardcoded paths
Date: Wed, 27 Mar 2013 16:41:30 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Thunderbird/22.0a1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been cross-compiling cloog, and noticed that cloog creates a .pc
file by simply doing:
PACKAGE_NAME="cloog-isl"
PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1"
AX_CREATE_PKGCONFIG_INFO

which results in:

# generated by configure / remove this line to disable regeneration
prefix=/root
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
libdir=${exec_prefix}/lib
datarootdir=/root/share
datadir=${datarootdir}
sysconfdir=/etc
includedir=${prefix}/include
package=cloog-isl
suffix=

Name: cloog-isl
Description: cloog-isl Library
Version: 0.18.0
Requires:
Libs: -L${libdir} -L/root/lib -lcloog-isl -lgmp
Cflags: -I${includedir} -I/root/include -DCLOOG_INT_GMP=1

Note that -l${libdir} and -I${includedir} depend on ${prefix} value, and
pkg-config knows how to re-define ${prefix} at runtime (can be
disabled, optionally).
However, -L/root/lib and -I/root/include are hardcoded, and thus are
completely wrong (and potentially dangerous, if the system where cloog
is deployed has /root/include and/or /root/lib directories.

Is this an AX_CREATE_PKGCONFIG_INFO feature, or cloog does something
wrong?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRUuj6AAoJEOs4Jb6SI2CwyGUIAI4hUcVLZdvmFgNvk0EFJeU7
p9C0Df8ws8BxFV0i40RPVDvzs0i9ea4sARF4iFHmUn2BYNxJJjMuVg9VAVqa0toJ
FQ19eXnghhGEqwTtQnOmYpI1Hap9RcmnOe6GbzY34FUXXECb3ONW+54YMXMa7Aam
n4nBA2iqgGufNIgTlFXp+MnnavJqp1a5DDoVPUKHRRca2l5NOaYcZAmKpT8BywaW
Ai4VRAmJs6rM40U3DRIqrDfg5Tho8H/J6hZxCBuVLsogBBhPHh/UxJkp63elOpfo
RtX/lraRSoNDV3j+IsXM+DGFLMzE7EbyNAY8dhKeIUugwggAUr6nn54vaA84Atk=
=GD/X
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]