configure: add --exec-prefix and fix pkgconfig file paths.

This commit is contained in:
Juan RP 2012-01-18 11:28:55 +01:00
parent dfc7ff4232
commit 9147488b19
3 changed files with 21 additions and 13 deletions

22
configure vendored
View File

@ -28,13 +28,14 @@ an installation prefix other than \`/usr/local' using \`--prefix',
for instance \`--prefix=\$HOME'. for instance \`--prefix=\$HOME'.
--prefix=DIR install architecture-independent files in PREFIX --prefix=DIR install architecture-independent files in PREFIX
--exec-prefix=DIR install architecture-dependent files in EPREFIX
--sbindir=DIR system admin executables [PREFIX/sbin] --sbindir=DIR system admin executables [PREFIX/sbin]
--libdir=DIR object code libraries [PREFIX/lib] --libdir=DIR object code libraries [PREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [EPREFIX/include]
--mandir=DIR man documentation [PREFIX/share/man] --mandir=DIR man documentation [EPREFIX/share/man]
--datadir=DIR read-only architecture-independent data [PREFIX/share] --datadir=DIR read-only architecture-independent data [EPREFIX/share]
--etcdir=DIR configuration files [PREFIX/etc] --etcdir=DIR configuration files [PREFIX/etc]
--pkgconfigdir=DIR pkg-config directory [PREFIX/lib/pkgconfig] --pkgconfigdir=DIR pkg-config directory [EPREFIX/lib/pkgconfig]
--debug Build with debugging code and symbols --debug Build with debugging code and symbols
--verbose Disable silent build to see compilation details --verbose Disable silent build to see compilation details
@ -51,6 +52,7 @@ for x; do
case "$opt" in case "$opt" in
--debug) DEBUG=yes;; --debug) DEBUG=yes;;
--prefix) PREFIX=$var;; --prefix) PREFIX=$var;;
--exec-prefix) EPREFIX=$var;;
--sbindir) SBINDIR=$var;; --sbindir) SBINDIR=$var;;
--mandir) MANDIR=$var;; --mandir) MANDIR=$var;;
--datadir) SHAREDIR=$var;; --datadir) SHAREDIR=$var;;
@ -73,12 +75,13 @@ done
: ${SED:=sed} : ${SED:=sed}
: ${PREFIX:=/usr/local} : ${PREFIX:=/usr/local}
: ${EPREFIX:=${PREFIX}}
: ${SYSCONFDIR:=${PREFIX}/etc} : ${SYSCONFDIR:=${PREFIX}/etc}
: ${SBINDIR:=${PREFIX}/sbin} : ${SBINDIR:=${PREFIX}/sbin}
: ${LIBDIR:=${PREFIX}/lib} : ${LIBDIR:=${EPREFIX}/lib}
: ${SHAREDIR:=${PREFIX}/share} : ${SHAREDIR:=${EPREFIX}/share}
: ${MANDIR:=${PREFIX}/share/man} : ${MANDIR:=${EPREFIX}/share/man}
: ${INCLUDEDIR:=${PREFIX}/include} : ${INCLUDEDIR:=${EPREFIX}/include}
: ${ETCDIR:=${PREFIX}/etc} : ${ETCDIR:=${PREFIX}/etc}
: ${PKGCONFIGDIR:=${LIBDIR}/pkgconfig} : ${PKGCONFIGDIR:=${LIBDIR}/pkgconfig}
: ${TOPDIR:=..} : ${TOPDIR:=..}
@ -134,6 +137,7 @@ echo "/* $OS */" >$CONFIG_H
echo "TOPDIR ?= $TOPDIR" >>$CONFIG_MK echo "TOPDIR ?= $TOPDIR" >>$CONFIG_MK
echo "PREFIX ?= $PREFIX" >>$CONFIG_MK echo "PREFIX ?= $PREFIX" >>$CONFIG_MK
echo "EPREFIX ?= $EPREFIX" >>$CONFIG_MK
echo "SBINDIR ?= $SBINDIR" >>$CONFIG_MK echo "SBINDIR ?= $SBINDIR" >>$CONFIG_MK
echo "INCLUDEDIR ?= $INCLUDEDIR" >>$CONFIG_MK echo "INCLUDEDIR ?= $INCLUDEDIR" >>$CONFIG_MK
echo "LIBDIR ?= $LIBDIR" >>$CONFIG_MK echo "LIBDIR ?= $LIBDIR" >>$CONFIG_MK
@ -596,6 +600,8 @@ fi
echo echo
echo " XBPS has been configured with the following options:" echo " XBPS has been configured with the following options:"
echo echo
echo " PREFIX = $PREFIX"
echo " EPREFIX = $EPREFIX"
echo " SBINDIR = $SBINDIR" echo " SBINDIR = $SBINDIR"
echo " LIBDIR = $LIBDIR" echo " LIBDIR = $LIBDIR"
echo " INCLUDEDIR = $INCLUDEDIR" echo " INCLUDEDIR = $INCLUDEDIR"

View File

@ -5,7 +5,9 @@ PCFILE = libxbps.pc
.PHONY: all .PHONY: all
all: all:
sed -e "s|@@VERSION@@|${VERSION}|g;s|@@PREFIX@@|${PREFIX}|g" \ sed -e "s|@@VERSION@@|${VERSION}|g" \
-e "s|@@PREFIX@@|${PREFIX}|g" \
-e "s|@@EPREFIX@@|${EPREFIX}|g" \
${PCFILE}.in > ${PCFILE} ${PCFILE}.in > ${PCFILE}
.PHONY: install .PHONY: install

View File

@ -1,10 +1,10 @@
prefix=@@PREFIX@@ prefix=@@PREFIX@@
exec_prefix=${prefix} exec_prefix=@@EPREFIX@@
libdir=${exec_prefix}/lib libdir=${exec_prefix}/lib
includedir=${prefix}/include includedir=${exec_prefix}/include
Name: XBPS API Library Name: XBPS API Library
Description: The X Binary Package System library Description: The X Binary Package System library
Version: @@VERSION@@ Version: @@VERSION@@
Libs: -lprop -lxbps Libs: -lprop -lxbps -L${libdir}
Cflags: -I${includedir} -L${libdir} Cflags: -I${includedir}