forked from ariadne/pkgconf
add --with-system-includedir and --with-system-libdir
By default they are defined to --includedir and --libdirfeature/tap-sh
parent
b8f3beef2b
commit
abcea07a1c
32
Makefile.in
32
Makefile.in
|
@ -1,19 +1,21 @@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
pkgconfigdir = @PKGCONFIGDIR@
|
system_includedir = @SYSTEM_INCLUDEDIR@
|
||||||
|
system_libdir = @SYSTEM_LIBDIR@
|
||||||
|
pkgconfigdir = @PKGCONFIGDIR@
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
PROG = pkgconf@EXEEXT@
|
PROG = pkgconf@EXEEXT@
|
||||||
SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tuple.c dependency.c
|
SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tuple.c dependency.c
|
||||||
OBJS = ${SRCS:.c=.o}
|
OBJS = ${SRCS:.c=.o}
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${pkgconfigdir}\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2
|
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
|
all: build
|
||||||
build: ${PROG}
|
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_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_CPP
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
8
main.c
8
main.c
|
@ -59,10 +59,10 @@ fragment_has_system_dir(pkg_fragment_t *frag)
|
||||||
switch (frag->type)
|
switch (frag->type)
|
||||||
{
|
{
|
||||||
case 'L':
|
case 'L':
|
||||||
if (!want_keep_system_libs && !strcasecmp(LIBDIR, frag->data))
|
if (!want_keep_system_libs && !strcasecmp(SYSTEM_LIBDIR, frag->data))
|
||||||
return true;
|
return true;
|
||||||
case 'I':
|
case 'I':
|
||||||
if (!want_keep_system_cflags && !strcasecmp(INCLUDEDIR, frag->data))
|
if (!want_keep_system_cflags && !strcasecmp(SYSTEM_INCLUDEDIR, frag->data))
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -469,8 +469,8 @@ usage(void)
|
||||||
printf(" linking to stdout\n");
|
printf(" linking to stdout\n");
|
||||||
printf(" --print-variables print all known variables in module 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(" --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-cflags keep -I%s entries in cflags output\n", SYSTEM_INCLUDEDIR);
|
||||||
printf(" --keep-system-libs keep -L%s entries in libs output\n", LIBDIR);
|
printf(" --keep-system-libs keep -L%s entries in libs output\n", SYSTEM_LIBDIR);
|
||||||
|
|
||||||
printf("\nreport bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
printf("\nreport bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue