From 09032b0bdf681830671bcb333ba39389f2dad799 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Tue, 24 Jul 2012 08:48:23 +0200 Subject: [PATCH] new --with-pkg-config-dir options Allow one to configure the place where pc files are store, it default on ${libdir}/pkgconfig:${datadir}/pkgconfig --- Makefile.in | 3 ++- configure.ac | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index a8da42e..4dafc46 100644 --- a/Makefile.in +++ b/Makefile.in @@ -5,6 +5,7 @@ libdir = @libdir@ datarootdir = @datarootdir@ datadir = @datadir@ includedir = @includedir@ +pkgconfigdir = @PKGCONFIGDIR@ CC = @CC@ 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} CFLAGS = @CFLAGS@ 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 build: ${PROG} diff --git a/configure.ac b/configure.ac index c1dccfa..db2f442 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,7 @@ AC_CONFIG_SRCDIR([pkg.c]) AC_CONFIG_HEADERS([config.h]) AC_CHECK_FUNCS([strlcpy strlcat strndup]) + AC_ARG_ENABLE([strict], [AC_HELP_STRING([--enable-strict], [enable POSIX-strict argument checking and disable some workarounds])], @@ -34,6 +35,13 @@ fi 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_CC AC_PROG_INSTALL