LRN
2013-03-27 12:41:30 UTC
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?
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?