new --with-pkg-config-dir options

Allow one to configure the place where pc files are store, it default on
${libdir}/pkgconfig:${datadir}/pkgconfig
feature/tap-sh
Baptiste Daroussin 2012-07-24 08:48:23 +02:00
parent 53770f1935
commit 09032b0bdf
2 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,7 @@ libdir = @libdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
datadir = @datadir@ datadir = @datadir@
includedir = @includedir@ includedir = @includedir@
pkgconfigdir = @PKGCONFIGDIR@
CC = @CC@ CC = @CC@
PROG = pkgconf@EXEEXT@ PROG = pkgconf@EXEEXT@
@ -12,7 +13,7 @@ SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tu
OBJS = ${SRCS:.c=.o} OBJS = ${SRCS:.c=.o}
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${libdir}/pkgconfig:${datadir}/pkgconfig\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2 CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${pkgconfigdir}\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2
all: build all: build
build: ${PROG} build: ${PROG}

View File

@ -17,6 +17,7 @@ AC_CONFIG_SRCDIR([pkg.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CHECK_FUNCS([strlcpy strlcat strndup]) AC_CHECK_FUNCS([strlcpy strlcat strndup])
AC_ARG_ENABLE([strict], AC_ARG_ENABLE([strict],
[AC_HELP_STRING([--enable-strict], [AC_HELP_STRING([--enable-strict],
[enable POSIX-strict argument checking and disable some workarounds])], [enable POSIX-strict argument checking and disable some workarounds])],
@ -34,6 +35,13 @@ fi
AC_SUBST([STRICT_MODE]) AC_SUBST([STRICT_MODE])
AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify
the place where pc files will be found])],PKGCONFIGDIR="$withval",
PKGCONFIGDIR="${libdir}/pkgconfig:${datadir}/pkgconfig")
AC_SUBST([PKGCONFIGDIR])
AC_PROG_CPP AC_PROG_CPP
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL