forked from ariadne/pkgconf
Merge pull request #31 from bapt/master
add --with-system-includedir and --with-system-libdirfeature/tap-sh
commit
f7496747a5
32
Makefile.in
32
Makefile.in
|
@ -1,19 +1,21 @@
|
|||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
includedir = @includedir@
|
||||
pkgconfigdir = @PKGCONFIGDIR@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
includedir = @includedir@
|
||||
system_includedir = @SYSTEM_INCLUDEDIR@
|
||||
system_libdir = @SYSTEM_LIBDIR@
|
||||
pkgconfigdir = @PKGCONFIGDIR@
|
||||
|
||||
CC = @CC@
|
||||
PROG = pkgconf@EXEEXT@
|
||||
SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tuple.c dependency.c
|
||||
OBJS = ${SRCS:.c=.o}
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${pkgconfigdir}\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2
|
||||
CC = @CC@
|
||||
PROG = pkgconf@EXEEXT@
|
||||
SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tuple.c dependency.c
|
||||
OBJS = ${SRCS:.c=.o}
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${pkgconfigdir}\" -DSYSTEM_INCLUDEDIR=\"${system_includedir}\" -DSYSTEM_LIBDIR=\"${system_libdir}\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2
|
||||
|
||||
all: build
|
||||
build: ${PROG}
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -41,6 +41,17 @@ AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify
|
|||
|
||||
AC_SUBST([PKGCONFIGDIR])
|
||||
|
||||
AC_ARG_WITH([system-libdir],[AC_HELP_STRING([--with-system-libdir],[specify the
|
||||
system library directory (default LIBDIR)])],
|
||||
SYSTEM_LIBDIR="$withval", SYSTEM_LIBDIR="${libdir}")
|
||||
|
||||
AC_SUBST([SYSTEM_LIBDIR])
|
||||
|
||||
AC_ARG_WITH([system-includedir],[AC_HELP_STRING([--with-system-libdir],[specify the
|
||||
system include directory (default INCLUDEDIR)])],
|
||||
SYSTEM_INCLUDEDIR="$withval", SYSTEM_INCLUDEDIR="${includedir}")
|
||||
|
||||
AC_SUBST([SYSTEM_INCLUDEDIR])
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
|
|
8
main.c
8
main.c
|
@ -59,10 +59,10 @@ fragment_has_system_dir(pkg_fragment_t *frag)
|
|||
switch (frag->type)
|
||||
{
|
||||
case 'L':
|
||||
if (!want_keep_system_libs && !strcasecmp(LIBDIR, frag->data))
|
||||
if (!want_keep_system_libs && !strcasecmp(SYSTEM_LIBDIR, frag->data))
|
||||
return true;
|
||||
case 'I':
|
||||
if (!want_keep_system_cflags && !strcasecmp(INCLUDEDIR, frag->data))
|
||||
if (!want_keep_system_cflags && !strcasecmp(SYSTEM_INCLUDEDIR, frag->data))
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
|
@ -469,8 +469,8 @@ usage(void)
|
|||
printf(" linking to stdout\n");
|
||||
printf(" --print-variables print all known variables in module to stdout\n");
|
||||
printf(" --digraph print entire dependency graph in graphviz 'dot' format\n");
|
||||
printf(" --keep-system-cflags keep -I%s entries in cflags output\n", INCLUDEDIR);
|
||||
printf(" --keep-system-libs keep -L%s entries in libs output\n", LIBDIR);
|
||||
printf(" --keep-system-cflags keep -I%s entries in cflags output\n", SYSTEM_INCLUDEDIR);
|
||||
printf(" --keep-system-libs keep -L%s entries in libs output\n", SYSTEM_LIBDIR);
|
||||
|
||||
printf("\nreport bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue