summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-03-12 14:42:02 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-03-12 14:42:02 +0000
commite96d533771de7ceeb155f9e2a093e67e0dc40ab1 (patch)
treee307e1ae0d17abcb640c37be30b7bdf5e370e074 /Build
parent43053489cfb1957b1779be81ba6bd1ac96f71165 (diff)
Build system: Reorganize flags for system (installed) libraries
git-svn-id: svn://tug.org/texlive/trunk@36495 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/configure122
-rwxr-xr-xBuild/source/libs/cairo/configure2
-rwxr-xr-xBuild/source/libs/configure38
-rw-r--r--Build/source/m4/ChangeLog5
-rw-r--r--Build/source/m4/kpse-cairo-flags.m49
-rw-r--r--Build/source/m4/kpse-common.m417
-rw-r--r--Build/source/m4/kpse-graphite2-flags.m417
-rw-r--r--Build/source/m4/kpse-harfbuzz-flags.m417
-rw-r--r--Build/source/m4/kpse-kpathsea-flags.m453
-rw-r--r--Build/source/m4/kpse-libpng-flags.m417
-rw-r--r--Build/source/m4/kpse-pixman-flags.m411
-rw-r--r--Build/source/m4/kpse-poppler-flags.m411
-rw-r--r--Build/source/m4/kpse-ptexenc-flags.m410
-rw-r--r--Build/source/m4/kpse-teckit-flags.m49
-rw-r--r--Build/source/m4/kpse-xpdf-flags.m415
-rw-r--r--Build/source/m4/kpse-zziplib-flags.m411
-rw-r--r--Build/source/texk/afm2pl/Makefile.in1
-rwxr-xr-xBuild/source/texk/afm2pl/configure127
-rw-r--r--Build/source/texk/bibtex-x/Makefile.in1
-rwxr-xr-xBuild/source/texk/bibtex-x/configure127
-rw-r--r--Build/source/texk/chktex/Makefile.in1
-rwxr-xr-xBuild/source/texk/chktex/configure127
-rw-r--r--Build/source/texk/cjkutils/Makefile.in1
-rwxr-xr-xBuild/source/texk/cjkutils/configure127
-rwxr-xr-xBuild/source/texk/configure38
-rw-r--r--Build/source/texk/detex/Makefile.in1
-rwxr-xr-xBuild/source/texk/detex/configure127
-rw-r--r--Build/source/texk/dtl/Makefile.in1
-rwxr-xr-xBuild/source/texk/dtl/configure127
-rw-r--r--Build/source/texk/dvi2tty/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvi2tty/configure157
-rw-r--r--Build/source/texk/dvidvi/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvidvi/configure123
-rw-r--r--Build/source/texk/dviljk/Makefile.in1
-rwxr-xr-xBuild/source/texk/dviljk/configure127
-rw-r--r--Build/source/texk/dviljk/win32/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure220
-rwxr-xr-xBuild/source/texk/dvipng/configure220
-rw-r--r--Build/source/texk/dvipos/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvipos/configure127
-rw-r--r--Build/source/texk/dvipsk/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvipsk/configure127
-rw-r--r--Build/source/texk/dvisvgm/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvisvgm/configure127
-rw-r--r--Build/source/texk/gsftopk/Makefile.in1
-rwxr-xr-xBuild/source/texk/gsftopk/configure127
-rw-r--r--Build/source/texk/lcdf-typetools/Makefile.in1
-rwxr-xr-xBuild/source/texk/lcdf-typetools/configure127
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/cfftot1/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/libefont/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/liblcdf/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmafm/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmpfb/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otfinfo/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otftotfm/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1dotlessj/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1lint/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1rawafm/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1reencode/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1testpage/Makefile.in1
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/ttftotype42/Makefile.in1
-rw-r--r--Build/source/texk/makeindexk/Makefile.in1
-rwxr-xr-xBuild/source/texk/makeindexk/configure127
-rw-r--r--Build/source/texk/makejvf/Makefile.in1
-rwxr-xr-xBuild/source/texk/makejvf/configure157
-rw-r--r--Build/source/texk/mendexk/Makefile.in1
-rwxr-xr-xBuild/source/texk/mendexk/configure157
-rw-r--r--Build/source/texk/musixtnt/Makefile.in1
-rwxr-xr-xBuild/source/texk/musixtnt/configure127
-rw-r--r--Build/source/texk/ps2pk/Makefile.in1
-rwxr-xr-xBuild/source/texk/ps2pk/configure127
-rw-r--r--Build/source/texk/psutils/Makefile.in1
-rwxr-xr-xBuild/source/texk/psutils/configure127
-rw-r--r--Build/source/texk/ptexenc/Makefile.in1
-rwxr-xr-xBuild/source/texk/ptexenc/configure127
-rw-r--r--Build/source/texk/seetexk/Makefile.in1
-rwxr-xr-xBuild/source/texk/seetexk/configure127
-rw-r--r--Build/source/texk/tex4htk/Makefile.in1
-rwxr-xr-xBuild/source/texk/tex4htk/configure127
-rw-r--r--Build/source/texk/ttf2pk2/Makefile.in1
-rwxr-xr-xBuild/source/texk/ttf2pk2/configure127
-rw-r--r--Build/source/texk/ttfdump/Makefile.in1
-rwxr-xr-xBuild/source/texk/ttfdump/configure127
-rwxr-xr-xBuild/source/texk/web2c/configure86
-rw-r--r--Build/source/texk/xdvik/Makefile.in1
-rwxr-xr-xBuild/source/texk/xdvik/configure127
-rw-r--r--Build/source/texk/xdvik/tests/Makefile.in1
-rwxr-xr-xBuild/source/utils/configure38
89 files changed, 3085 insertions, 1311 deletions
diff --git a/Build/source/configure b/Build/source/configure
index 64751a3b0ba..6a36b47f1a1 100755
--- a/Build/source/configure
+++ b/Build/source/configure
@@ -923,11 +923,7 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_mktexmf_default
enable_mktexpk_default
enable_mktextfm_default
@@ -1798,16 +1794,10 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
@@ -6294,16 +6284,6 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = x; then
if test -f $srcdir/texk/ptexenc/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5
@@ -6348,16 +6328,6 @@ test "x$need_ptexenc" = xyes && {
if test "${with_system_kpathsea+set}" = set; then :
withval=$with_system_kpathsea;
fi
-
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
-fi
-
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
-fi
if test "x$with_system_kpathsea" = x; then
if test -f $srcdir/texk/kpathsea/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`kpathsea' headers and library from TL tree" >&5
@@ -21000,38 +20970,6 @@ kpse_save_LIBS=$LIBS
syslib_status=yes
syslib_used=no
-if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
-fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
-fi
-
-if test "x$with_ptexenc_includes" != x && test "x$with_ptexenc_includes" != xyes; then
- PTEXENC_INCLUDES="-I$with_ptexenc_includes"
-fi
-PTEXENC_LIBS="-lptexenc"
-if test "x$with_ptexenc_libdir" != x && test "x$with_ptexenc_libdir" != xyes; then
- PTEXENC_LIBS="-L$with_ptexenc_libdir $PTEXENC_LIBS"
-fi
-
-if test "x$with_zlib_includes" != x && test "x$with_zlib_includes" != xyes; then
- ZLIB_INCLUDES="-I$with_zlib_includes"
-fi
-ZLIB_LIBS="-lz"
-if test "x$with_zlib_libdir" != x && test "x$with_zlib_libdir" != xyes; then
- ZLIB_LIBS="-L$with_zlib_libdir $ZLIB_LIBS"
-fi
-
-if test "x$with_libpaper_includes" != x && test "x$with_libpaper_includes" != xyes; then
- LIBPAPER_INCLUDES="-I$with_libpaper_includes"
-fi
-LIBPAPER_LIBS="-lpaper"
-if test "x$with_libpaper_libdir" != x && test "x$with_libpaper_libdir" != xyes; then
- LIBPAPER_LIBS="-L$with_libpaper_libdir $LIBPAPER_LIBS"
-fi
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
@@ -21124,6 +21062,36 @@ else
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
fi
+if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
+fi
+
+if $PKG_CONFIG ptexenc; then
+ PTEXENC_INCLUDES=`$PKG_CONFIG ptexenc --cflags`
+ PTEXENC_LIBS=`$PKG_CONFIG ptexenc --libs`
+elif test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then
+ as_fn_error $? "did not find ptexenc" "$LINENO" 5
+fi
+
+if test "x$with_zlib_includes" != x && test "x$with_zlib_includes" != xyes; then
+ ZLIB_INCLUDES="-I$with_zlib_includes"
+fi
+ZLIB_LIBS="-lz"
+if test "x$with_zlib_libdir" != x && test "x$with_zlib_libdir" != xyes; then
+ ZLIB_LIBS="-L$with_zlib_libdir $ZLIB_LIBS"
+fi
+
+if test "x$with_libpaper_includes" != x && test "x$with_libpaper_includes" != xyes; then
+ LIBPAPER_INCLUDES="-I$with_libpaper_includes"
+fi
+LIBPAPER_LIBS="-lpaper"
+if test "x$with_libpaper_libdir" != x && test "x$with_libpaper_libdir" != xyes; then
+ LIBPAPER_LIBS="-L$with_libpaper_libdir $LIBPAPER_LIBS"
+fi
+
if $PKG_CONFIG libpng; then
LIBPNG_INCLUDES=`$PKG_CONFIG libpng --cflags`
LIBPNG_LIBS=`$PKG_CONFIG libpng --libs`
@@ -21249,14 +21217,14 @@ if $PKG_CONFIG pixman-1 --atleast-version=0.18; then
PIXMAN_INCLUDES=`$PKG_CONFIG pixman-1 --cflags`
PIXMAN_LIBS=`$PKG_CONFIG pixman-1 --libs`
elif test "x$need_pixman:$with_system_pixman" = xyes:yes; then
- as_fn_error $? "did not find pixman-0.18 or better" "$LINENO" 5
+ as_fn_error $? "did not find pixman-1 0.18 or better" "$LINENO" 5
fi
if $PKG_CONFIG cairo --atleast-version=1.12; then
CAIRO_INCLUDES=`$PKG_CONFIG cairo --cflags`
CAIRO_LIBS=`$PKG_CONFIG cairo --libs`
elif test "x$need_cairo:$with_system_cairo" = xyes:yes; then
- as_fn_error $? "did not find cairo-1.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find cairo 1.12 or better" "$LINENO" 5
fi
if test "x$with_gmp_includes" != x && test "x$with_gmp_includes" != xyes; then
@@ -21276,26 +21244,30 @@ if test "x$with_mpfr_libdir" != x && test "x$with_mpfr_libdir" != xyes; then
fi
if $PKG_CONFIG poppler --atleast-version=0.18; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ POPPLER_INCLUDES=`$PKG_CONFIG poppler --cflags`
POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
- as_fn_error $? "did not find poppler-0.18 or better" "$LINENO" 5
+ as_fn_error $? "did not find poppler 0.18 or better" "$LINENO" 5
fi
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES"
+
if $PKG_CONFIG poppler --atleast-version=0.12; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- XPDF_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags`
XPDF_LIBS=`$PKG_CONFIG poppler --libs`
elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
- as_fn_error $? "did not find poppler-0.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5
fi
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
+
if $PKG_CONFIG zziplib --atleast-version=0.12; then
ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs`
elif test "x$need_zziplib:$with_system_zziplib" = xyes:yes; then
- as_fn_error $? "did not find zziplib-0.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find zziplib 0.12 or better" "$LINENO" 5
fi
if $PKG_CONFIG graphite2; then
diff --git a/Build/source/libs/cairo/configure b/Build/source/libs/cairo/configure
index 1ff3c6488eb..d369678526c 100755
--- a/Build/source/libs/cairo/configure
+++ b/Build/source/libs/cairo/configure
@@ -6580,7 +6580,7 @@ if test "x$with_system_pixman" = xyes; then
PIXMAN_INCLUDES=`$PKG_CONFIG pixman-1 --cflags`
PIXMAN_LIBS=`$PKG_CONFIG pixman-1 --libs`
elif test "x$need_pixman:$with_system_pixman" = xyes:yes; then
- as_fn_error $? "did not find pixman-0.18 or better" "$LINENO" 5
+ as_fn_error $? "did not find pixman-1 0.18 or better" "$LINENO" 5
fi
else
PIXMAN_INCLUDES="-I$kpse_BLD/libs/pixman/include"
diff --git a/Build/source/libs/configure b/Build/source/libs/configure
index 6ccdbe8641e..1bb14c3d76b 100755
--- a/Build/source/libs/configure
+++ b/Build/source/libs/configure
@@ -834,11 +834,7 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_mktexmf_default
enable_mktexpk_default
enable_mktextfm_default
@@ -1697,16 +1693,10 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -5368,16 +5358,6 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = x; then
if test -f $srcdir/../texk/ptexenc/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5
@@ -5412,16 +5392,6 @@ test "x$need_ptexenc" = xyes && {
if test "${with_system_kpathsea+set}" = set; then :
withval=$with_system_kpathsea;
fi
-
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
-fi
-
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
-fi
if test "x$with_system_kpathsea" = x; then
if test -f $srcdir/../texk/kpathsea/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`kpathsea' headers and library from TL tree" >&5
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog
index 90582391f89..a0bf42795c8 100644
--- a/Build/source/m4/ChangeLog
+++ b/Build/source/m4/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpse-{kpathsea,ptexenc}-flags.m4: Use pkg-config.
+ * kpse-common.m4 (_KPSE_PKG_CONFIG_FLAGS): Common code.
+
2015-03-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* kpse-common.m4 (KPSE_COMMON): Drop checks for strcasecmp,
diff --git a/Build/source/m4/kpse-cairo-flags.m4 b/Build/source/m4/kpse-cairo-flags.m4
index b6f2d6839d4..a41c7df6d2a 100644
--- a/Build/source/m4/kpse-cairo-flags.m4
+++ b/Build/source/m4/kpse-cairo-flags.m4
@@ -25,11 +25,4 @@ AC_DEFUN([KPSE_CAIRO_OPTIONS], [_KPSE_LIB_OPTIONS([cairo], [$1], [pkg-config])])
# KPSE_CAIRO_SYSTEM_FLAGS
# -----------------------
AC_DEFUN([KPSE_CAIRO_SYSTEM_FLAGS], [dnl
-AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG cairo --atleast-version=1.12; then
- CAIRO_INCLUDES=`$PKG_CONFIG cairo --cflags`
- CAIRO_LIBS=`$PKG_CONFIG cairo --libs`
-elif test "x$need_cairo:$with_system_cairo" = xyes:yes; then
- AC_MSG_ERROR([did not find cairo-1.12 or better])
-fi
-]) # KPSE_CAIRO_SYSTEM_FLAGS
+_KPSE_PKG_CONFIG_FLAGS([cairo], [cairo], [1.12])])
diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4
index dfd98d9cbb8..9c98f349e8c 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -288,11 +288,24 @@ AC_DEFUN([_KPSE_MSG_WARN_PREPARE],
# _KPSE_CHECK_PKG_CONFIG
# ----------------------
# Check for pkg-config
-AC_DEFUN([_KPSE_CHECK_PKG_CONFIG],
-[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_DEFUN([_KPSE_CHECK_PKG_CONFIG], [dnl
+AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
]) # _KPSE_CHECK_PKG_CONFIG
+# _KPSE_PKG_CONFIG_FLAGS(PACKAGE-NAME, PKG_CONFIG_NAME, [AT_LEAST])
+# -----------------------------------------------------------------
+# Use pkg-config to determine INCLUDES and LIBS for a system library.
+AC_DEFUN([_KPSE_PKG_CONFIG_FLAGS], [dnl
+AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+if $PKG_CONFIG $2[]m4_ifval([$3], [ --atleast-version=$3]); then
+ AS_TR_CPP($1)_INCLUDES=`$PKG_CONFIG $2 --cflags`
+ AS_TR_CPP($1)_LIBS=`$PKG_CONFIG $2 --libs`
+elif test "x$need_[]AS_TR_SH($1):$with_system_[]AS_TR_SH($1)" = xyes:yes; then
+ AC_MSG_ERROR([did not find $2[]m4_ifval([$3], [ $3 or better])])
+fi
+]) # _KPSE_PKG_CONFIG_FLAGS
+
# KPSE_CANONICAL_HOST
# -------------------
# Require both --host and --build for cross compilations; set kpse_build_alias.
diff --git a/Build/source/m4/kpse-graphite2-flags.m4 b/Build/source/m4/kpse-graphite2-flags.m4
index 7c853707458..aae7c0b3f7f 100644
--- a/Build/source/m4/kpse-graphite2-flags.m4
+++ b/Build/source/m4/kpse-graphite2-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2012-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -11,8 +11,8 @@
#
# Set the make variables GRAPHITE2_INCLUDES and GRAPHITE2_LIBS to the CPPFLAGS and
# LIBS required for the `-lgraphite2' library in libs/graphite2/ of the TL tree.
-AC_DEFUN([KPSE_GRAPHITE2_FLAGS],
-[AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl
+AC_DEFUN([KPSE_GRAPHITE2_FLAGS], [dnl
+AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl
AC_REQUIRE([KPSE_ICU_FLAGS])[]dnl
_KPSE_LIB_FLAGS([graphite2], [graphite2], [],
[-IBLD/libs/graphite2/include -DGRAPHITE2_STATIC],
@@ -26,12 +26,5 @@ AC_DEFUN([KPSE_GRAPHITE2_OPTIONS], [_KPSE_LIB_OPTIONS([graphite2], [$1], [pkg-co
# KPSE_GRAPHITE2_SYSTEM_FLAGS
# ---------------------------
-AC_DEFUN([KPSE_GRAPHITE2_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG graphite2; then
- GRAPHITE2_INCLUDES=`$PKG_CONFIG graphite2 --cflags`
- GRAPHITE2_LIBS=`$PKG_CONFIG graphite2 --libs`
-elif test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then
- AC_MSG_ERROR([did not find graphite2])
-fi
-]) # KPSE_GRAPHITE2_SYSTEM_FLAGS
+AC_DEFUN([KPSE_GRAPHITE2_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([graphite2], [graphite2])])
diff --git a/Build/source/m4/kpse-harfbuzz-flags.m4 b/Build/source/m4/kpse-harfbuzz-flags.m4
index 716ab28a3b9..51bc12d60b9 100644
--- a/Build/source/m4/kpse-harfbuzz-flags.m4
+++ b/Build/source/m4/kpse-harfbuzz-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2012-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -11,8 +11,8 @@
#
# Set the make variables HARFBUZZ_INCLUDES and HARFBUZZ_LIBS to the CPPFLAGS and
# LIBS required for the `-lharfbuzz' library in libs/harfbuzz/ of the TL tree.
-AC_DEFUN([KPSE_HARFBUZZ_FLAGS],
-[AC_REQUIRE([KPSE_GRAPHITE2_FLAGS])[]dnl
+AC_DEFUN([KPSE_HARFBUZZ_FLAGS], [dnl
+AC_REQUIRE([KPSE_GRAPHITE2_FLAGS])[]dnl
AC_REQUIRE([KPSE_ICU_FLAGS])[]dnl
_KPSE_LIB_FLAGS([harfbuzz], [harfbuzz], [],
[-IBLD/libs/harfbuzz/include], [BLD/libs/harfbuzz/libharfbuzz.a], [],
@@ -25,12 +25,5 @@ AC_DEFUN([KPSE_HARFBUZZ_OPTIONS], [_KPSE_LIB_OPTIONS([harfbuzz], [$1], [pkg-conf
# KPSE_HARFBUZZ_SYSTEM_FLAGS
# --------------------------
-AC_DEFUN([KPSE_HARFBUZZ_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG harfbuzz-icu; then
- HARFBUZZ_INCLUDES=`$PKG_CONFIG harfbuzz-icu --cflags`
- HARFBUZZ_LIBS=`$PKG_CONFIG harfbuzz-icu --libs`
-elif test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then
- AC_MSG_ERROR([did not find harfbuzz-icu])
-fi
-]) # KPSE_HARFBUZZ_SYSTEM_FLAGS
+AC_DEFUN([KPSE_HARFBUZZ_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([harfbuzz], [harfbuzz-icu])])
diff --git a/Build/source/m4/kpse-kpathsea-flags.m4 b/Build/source/m4/kpse-kpathsea-flags.m4
index 7e5ed3273a5..f0bae6f8067 100644
--- a/Build/source/m4/kpse-kpathsea-flags.m4
+++ b/Build/source/m4/kpse-kpathsea-flags.m4
@@ -1,23 +1,20 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 0
-
# KPSE_KPATHSEA_FLAGS([OPTIONS])
# ------------------------------
-# Provide the configure options '--with-system-kpathsea' (if in the TL tree),
-# '--with-kpathsea-includes', and '--with-kpathsea-libdir'.
+# Provide the configure options '--with-system-kpathsea' (if in the TL tree).
# Options:
# no-debug - add '-DNO_DEBUG' to KPATHSEA_INCLUDES even if not needed
#
# Set the make variables KPATHSEA_INCLUDES and KPATHSEA_LIBS to the CPPFLAGS and
# LIBS required for the `-lkpathsea' library in texk/kpathsea/ of the TL tree.
-AC_DEFUN([KPSE_KPATHSEA_FLAGS],
-[AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl
+AC_DEFUN([KPSE_KPATHSEA_FLAGS], [dnl
+AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl
_KPSE_TEXLIB_FLAGS([kpathsea], [kpathsea], [lt],
[-IBLD/texk -ISRC/texk], [BLD/texk/kpathsea/libkpathsea.la], [],
[${top_srcdir}/../kpathsea/*.[ch]],
@@ -29,46 +26,46 @@ m4_if(m4_index([ $1 ], [ no-debug ]), [-1],
# KPSE_KPATHSEA_OPTIONS([WITH-SYSTEM])
# ------------------------------------
-AC_DEFUN([KPSE_KPATHSEA_OPTIONS], [_KPSE_LIB_OPTIONS([kpathsea], [$1])])
+AC_DEFUN([KPSE_KPATHSEA_OPTIONS], [_KPSE_LIB_OPTIONS([kpathsea], [$1], [pkg-config])])
# _KPSE_CHECK_KPSE_DEBUG
# ----------------------
# Internal subroutine to check if libkpathsea supports debugging.
-m4_define([_KPSE_CHECK_KPSE_DEBUG],
-[AC_CACHE_CHECK([if libkpathsea supports debugging],
- [kpse_cv_kpse_debug],
- [KPSE_ADD_FLAGS([kpathsea])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
- [[FILE *f = fopen("f", "r")]])],
- [kpse_cv_kpse_debug=yes],
- [kpse_cv_kpse_debug=no])
- KPSE_RESTORE_FLAGS])
+m4_define([_KPSE_CHECK_KPSE_DEBUG], [dnl
+AC_CACHE_CHECK([if libkpathsea supports debugging],
+ [kpse_cv_kpse_debug],
+ [KPSE_ADD_FLAGS([kpathsea])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
+ [[FILE *f = fopen("f", "r")]])],
+ [kpse_cv_kpse_debug=yes],
+ [kpse_cv_kpse_debug=no])
+ KPSE_RESTORE_FLAGS])
AS_IF([test "x$kpse_cv_kpse_debug" != xyes],
[KPATHSEA_INCLUDES="$KPATHSEA_INCLUDES -DNO_DEBUG"])[]dnl
]) # _KPSE_CHECK_KPSE_DEBUG
# KPSE_KPATHSEA_SYSTEM_FLAGS
# --------------------------
-AC_DEFUN([KPSE_KPATHSEA_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([kpathsea], [kpathsea])])
+AC_DEFUN([KPSE_KPATHSEA_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([kpathsea], [kpathsea])])
# KPSE_CHECK_KPSE_FORMAT(FORMAT,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------------
# Check whether kpathsea declares the kpse_FORMAT_format.
-AC_DEFUN([KPSE_CHECK_KPSE_FORMAT],
-[AC_CACHE_CHECK([whether kpathsea declares the kpse_$1_format],
- [kpse_cv_have_$1_format],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
- [[kpse_$1_format]])],
- [kpse_cv_have_$1_format=yes],
- [kpse_cv_have_$1_format=no])])
+AC_DEFUN([KPSE_CHECK_KPSE_FORMAT], [dnl
+AC_CACHE_CHECK([whether kpathsea declares the kpse_$1_format],
+ [kpse_cv_have_$1_format],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
+ [[kpse_$1_format]])],
+ [kpse_cv_have_$1_format=yes],
+ [kpse_cv_have_$1_format=no])])
AS_IF([test "x$kpse_cv_have_$1_format" = xyes], [$2], [$3])
]) # KPSE_CHECK_KPSE_FORMAT
# KPSE_CHECK_XBASENAME([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------------
# Check whether kpathsea declares xbasename().
-AC_DEFUN([KPSE_CHECK_XBASENAME],
-[AC_CHECK_DECL([xbasename], [$1], [$2],
- [[#include <kpathsea/kpathsea.h>]])
+AC_DEFUN([KPSE_CHECK_XBASENAME], [dnl
+AC_CHECK_DECL([xbasename], [$1], [$2], [[#include <kpathsea/kpathsea.h>]])
]) # KPSE_CHECK_XBASENAME
diff --git a/Build/source/m4/kpse-libpng-flags.m4 b/Build/source/m4/kpse-libpng-flags.m4
index a2bb76c6814..a832e96a621 100644
--- a/Build/source/m4/kpse-libpng-flags.m4
+++ b/Build/source/m4/kpse-libpng-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -13,8 +13,8 @@
#
# Set the make variables LIBPNG_INCLUDES and LIBPNG_LIBS to the CPPFLAGS and
# LIBS required for the `-lpng' library in libs/libpng/ of the TL tree.
-AC_DEFUN([KPSE_LIBPNG_FLAGS],
-[AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
+AC_DEFUN([KPSE_LIBPNG_FLAGS], [dnl
+AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
_KPSE_LIB_FLAGS([libpng], [png], [],
[-IBLD/libs/libpng/include], [BLD/libs/libpng/libpng.a], [],
[], [${top_builddir}/../../libs/libpng/include/png.h])[]dnl
@@ -26,12 +26,5 @@ AC_DEFUN([KPSE_LIBPNG_OPTIONS], [_KPSE_LIB_OPTIONS([libpng], [$1], [pkg-config])
# KPSE_LIBPNG_SYSTEM_FLAGS
# ------------------------
-AC_DEFUN([KPSE_LIBPNG_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG libpng; then
- LIBPNG_INCLUDES=`$PKG_CONFIG libpng --cflags`
- LIBPNG_LIBS=`$PKG_CONFIG libpng --libs`
-elif test "x$need_libpng:$with_system_libpng" = xyes:yes; then
- AC_MSG_ERROR([did not find libpng])
-fi
-]) # KPSE_LIBPNG_SYSTEM_FLAGS
+AC_DEFUN([KPSE_LIBPNG_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([libpng], [libpng])])
diff --git a/Build/source/m4/kpse-pixman-flags.m4 b/Build/source/m4/kpse-pixman-flags.m4
index d0266535028..4f4f3e3d62d 100644
--- a/Build/source/m4/kpse-pixman-flags.m4
+++ b/Build/source/m4/kpse-pixman-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2012-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -24,11 +24,4 @@ AC_DEFUN([KPSE_PIXMAN_OPTIONS], [_KPSE_LIB_OPTIONS([pixman], [$1], [pkg-config])
# KPSE_PIXMAN_SYSTEM_FLAGS
# ------------------------
AC_DEFUN([KPSE_PIXMAN_SYSTEM_FLAGS], [dnl
-AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG pixman-1 --atleast-version=0.18; then
- PIXMAN_INCLUDES=`$PKG_CONFIG pixman-1 --cflags`
- PIXMAN_LIBS=`$PKG_CONFIG pixman-1 --libs`
-elif test "x$need_pixman:$with_system_pixman" = xyes:yes; then
- AC_MSG_ERROR([did not find pixman-0.18 or better])
-fi
-]) # KPSE_PIXMAN_SYSTEM_FLAGS
+_KPSE_PKG_CONFIG_FLAGS([pixman], [pixman-1], [0.18])])
diff --git a/Build/source/m4/kpse-poppler-flags.m4 b/Build/source/m4/kpse-poppler-flags.m4
index 1ba2d5bf729..2883395cfdb 100644
--- a/Build/source/m4/kpse-poppler-flags.m4
+++ b/Build/source/m4/kpse-poppler-flags.m4
@@ -28,12 +28,7 @@ AC_DEFUN([KPSE_POPPLER_OPTIONS], [_KPSE_LIB_OPTIONS([poppler], [$1], [pkg-config
# KPSE_POPPLER_SYSTEM_FLAGS
# -------------------------
AC_DEFUN([KPSE_POPPLER_SYSTEM_FLAGS], [dnl
-AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG poppler --atleast-version=0.18; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
- POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
-elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
- AC_MSG_ERROR([did not find poppler-0.18 or better])
-fi
+_KPSE_PKG_CONFIG_FLAGS([poppler], [poppler], [0.18])
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES"
]) # KPSE_POPPLER_SYSTEM_FLAGS
diff --git a/Build/source/m4/kpse-ptexenc-flags.m4 b/Build/source/m4/kpse-ptexenc-flags.m4
index 8d151660bdb..12e374e3e3a 100644
--- a/Build/source/m4/kpse-ptexenc-flags.m4
+++ b/Build/source/m4/kpse-ptexenc-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2010-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2010-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -7,8 +7,7 @@
# KPSE_PTEXENC_FLAGS
# ------------------
-# Provide the configure options '--with-system-ptexenc' (if in the TL tree),
-# '--with-ptexenc-includes', and '--with-ptexenc-libdir'.
+# Provide the configure options '--with-system-ptexenc' (if in the TL tree).
#
# Set the make variables PTEXENC_INCLUDES and PTEXENC_LIBS to the CPPFLAGS and
# LIBS required for the `-lptexenc' library in texk/ptexenc/ of the TL tree.
@@ -21,8 +20,9 @@ _KPSE_TEXLIB_FLAGS([ptexenc], [ptexenc], [lt],
# KPSE_PTEXENC_OPTIONS([WITH-SYSTEM])
# -----------------------------------
-AC_DEFUN([KPSE_PTEXENC_OPTIONS], [_KPSE_LIB_OPTIONS([ptexenc], [$1])])
+AC_DEFUN([KPSE_PTEXENC_OPTIONS], [_KPSE_LIB_OPTIONS([ptexenc], [$1], [pkg-config])])
# KPSE_PTEXENC_SYSTEM_FLAGS
# -------------------------
-AC_DEFUN([KPSE_PTEXENC_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([ptexenc], [ptexenc])])
+AC_DEFUN([KPSE_PTEXENC_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([ptexenc], [ptexenc])])
diff --git a/Build/source/m4/kpse-teckit-flags.m4 b/Build/source/m4/kpse-teckit-flags.m4
index 7e027c0e1d4..dd7fe706579 100644
--- a/Build/source/m4/kpse-teckit-flags.m4
+++ b/Build/source/m4/kpse-teckit-flags.m4
@@ -25,11 +25,4 @@ AC_DEFUN([KPSE_TECKIT_OPTIONS], [_KPSE_LIB_OPTIONS([teckit], [$1], [pkg-config])
# KPSE_TECKIT_SYSTEM_FLAGS
# -------------------------
AC_DEFUN([KPSE_TECKIT_SYSTEM_FLAGS], [dnl
-AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG teckit; then
- TECKIT_INCLUDES=`$PKG_CONFIG teckit --cflags`
- TECKIT_LIBS=`$PKG_CONFIG teckit --libs`
-elif test "x$need_teckit:$with_system_teckit" = xyes:yes; then
- AC_MSG_ERROR([did not find teckit])
-fi
-]) # KPSE_TECKIT_SYSTEM_FLAGS
+_KPSE_PKG_CONFIG_FLAGS([teckit], [teckit])])
diff --git a/Build/source/m4/kpse-xpdf-flags.m4 b/Build/source/m4/kpse-xpdf-flags.m4
index 8b3afd369a2..e2207b8ad5e 100644
--- a/Build/source/m4/kpse-xpdf-flags.m4
+++ b/Build/source/m4/kpse-xpdf-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -31,13 +31,8 @@ AC_DEFUN([KPSE_XPDF_OPTIONS],
# KPSE_XPDF_SYSTEM_FLAGS
# ----------------------
-AC_DEFUN([KPSE_XPDF_SYSTEM_FLAGS],
-[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG poppler --atleast-version=0.12; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- XPDF_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
- XPDF_LIBS=`$PKG_CONFIG poppler --libs`
-elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
- AC_MSG_ERROR([did not find poppler-0.12 or better])
-fi
+AC_DEFUN([KPSE_XPDF_SYSTEM_FLAGS], [dnl
+_KPSE_PKG_CONFIG_FLAGS([xpdf], [poppler], [0.12])
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
]) # KPSE_XPDF_SYSTEM_FLAGS
diff --git a/Build/source/m4/kpse-zziplib-flags.m4 b/Build/source/m4/kpse-zziplib-flags.m4
index 7f48c3cb379..88eed9721ff 100644
--- a/Build/source/m4/kpse-zziplib-flags.m4
+++ b/Build/source/m4/kpse-zziplib-flags.m4
@@ -1,5 +1,5 @@
# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2010-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2010-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
@@ -26,11 +26,4 @@ AC_DEFUN([KPSE_ZZIPLIB_OPTIONS], [_KPSE_LIB_OPTIONS([zziplib], [$1], [pkg-config
# KPSE_ZZIPLIB_SYSTEM_FLAGS
# -------------------------
AC_DEFUN([KPSE_ZZIPLIB_SYSTEM_FLAGS], [dnl
-AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
-if $PKG_CONFIG zziplib --atleast-version=0.12; then
- ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
- ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs`
-elif test "x$need_zziplib:$with_system_zziplib" = xyes:yes; then
- AC_MSG_ERROR([did not find zziplib-0.12 or better])
-fi
-]) # KPSE_ZZIPLIB_SYSTEM_FLAGS
+_KPSE_PKG_CONFIG_FLAGS([zziplib], [zziplib], [0.12])])
diff --git a/Build/source/texk/afm2pl/Makefile.in b/Build/source/texk/afm2pl/Makefile.in
index 119b597cc4b..6a99c2f1041 100644
--- a/Build/source/texk/afm2pl/Makefile.in
+++ b/Build/source/texk/afm2pl/Makefile.in
@@ -481,6 +481,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/afm2pl/configure b/Build/source/texk/afm2pl/configure
index df644e834ea..1547c0800c8 100755
--- a/Build/source/texk/afm2pl/configure
+++ b/Build/source/texk/afm2pl/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14775,29 +14771,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14818,7 +14895,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14836,7 +14913,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/bibtex-x/Makefile.in b/Build/source/texk/bibtex-x/Makefile.in
index 52ae1730c98..6a0e5640027 100644
--- a/Build/source/texk/bibtex-x/Makefile.in
+++ b/Build/source/texk/bibtex-x/Makefile.in
@@ -526,6 +526,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/bibtex-x/configure b/Build/source/texk/bibtex-x/configure
index a2b2956e528..5454d6bdf58 100755
--- a/Build/source/texk/bibtex-x/configure
+++ b/Build/source/texk/bibtex-x/configure
@@ -649,6 +649,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CXXLD
CXXCPP
WARNING_CXXFLAGS
@@ -796,8 +797,6 @@ enable_bibtex8
enable_bibtexu
enable_cxx_runtime_hack
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_icu
'
ac_precious_vars='build_alias
@@ -1466,11 +1465,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-icu use installed ICU headers and libraries (requires
icu-config)
@@ -19162,29 +19158,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -19205,7 +19282,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -19223,7 +19300,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/chktex/Makefile.in b/Build/source/texk/chktex/Makefile.in
index 1c857456bb6..d4ae59b4f54 100644
--- a/Build/source/texk/chktex/Makefile.in
+++ b/Build/source/texk/chktex/Makefile.in
@@ -510,6 +510,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL5 = @PERL5@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/chktex/configure b/Build/source/texk/chktex/configure
index c1f033de9c5..63022e31bd2 100755
--- a/Build/source/texk/chktex/configure
+++ b/Build/source/texk/chktex/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
PERL5
CHKTEX_TREE
WIN32_WRAP_FALSE
@@ -784,8 +785,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1446,11 +1445,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14955,29 +14951,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14998,7 +15075,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15016,7 +15093,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/cjkutils/Makefile.in b/Build/source/texk/cjkutils/Makefile.in
index 04439e97529..aaf0c51edde 100644
--- a/Build/source/texk/cjkutils/Makefile.in
+++ b/Build/source/texk/cjkutils/Makefile.in
@@ -527,6 +527,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/cjkutils/configure b/Build/source/texk/cjkutils/configure
index 1a4aee40978..8abcb21351f 100755
--- a/Build/source/texk/cjkutils/configure
+++ b/Build/source/texk/cjkutils/configure
@@ -648,6 +648,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
XX_CPPFLAGS
XX_CFLAGS
CPP
@@ -785,8 +786,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1447,11 +1446,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14783,29 +14779,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14826,7 +14903,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14844,7 +14921,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/configure b/Build/source/texk/configure
index 6db49b0f103..967a9543067 100755
--- a/Build/source/texk/configure
+++ b/Build/source/texk/configure
@@ -834,11 +834,7 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_mktexmf_default
enable_mktexpk_default
enable_mktextfm_default
@@ -1707,16 +1703,10 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -5378,16 +5368,6 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = x; then
if test -f $srcdir/../texk/ptexenc/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5
@@ -5422,16 +5402,6 @@ test "x$need_ptexenc" = xyes && {
if test "${with_system_kpathsea+set}" = set; then :
withval=$with_system_kpathsea;
fi
-
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
-fi
-
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
-fi
if test "x$with_system_kpathsea" = x; then
if test -f $srcdir/../texk/kpathsea/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`kpathsea' headers and library from TL tree" >&5
diff --git a/Build/source/texk/detex/Makefile.in b/Build/source/texk/detex/Makefile.in
index 6a8bb6aea96..049abb6dbd5 100644
--- a/Build/source/texk/detex/Makefile.in
+++ b/Build/source/texk/detex/Makefile.in
@@ -497,6 +497,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/detex/configure b/Build/source/texk/detex/configure
index 0eaf67564ca..8043dfc7333 100755
--- a/Build/source/texk/detex/configure
+++ b/Build/source/texk/detex/configure
@@ -641,6 +641,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
LEXLIB
LEX_OUTPUT_ROOT
LEX
@@ -779,8 +780,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1441,11 +1440,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14917,29 +14913,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14960,7 +15037,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14978,7 +15055,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/dtl/Makefile.in b/Build/source/texk/dtl/Makefile.in
index 366464a95a2..611c7559881 100644
--- a/Build/source/texk/dtl/Makefile.in
+++ b/Build/source/texk/dtl/Makefile.in
@@ -485,6 +485,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dtl/configure b/Build/source/texk/dtl/configure
index 854956d28a2..fd62f846a81 100755
--- a/Build/source/texk/dtl/configure
+++ b/Build/source/texk/dtl/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1436,11 +1435,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14967,29 +14963,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15010,7 +15087,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15028,7 +15105,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/dvi2tty/Makefile.in b/Build/source/texk/dvi2tty/Makefile.in
index f0be5179c37..b8634db4f59 100644
--- a/Build/source/texk/dvi2tty/Makefile.in
+++ b/Build/source/texk/dvi2tty/Makefile.in
@@ -490,6 +490,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
diff --git a/Build/source/texk/dvi2tty/configure b/Build/source/texk/dvi2tty/configure
index 6363b2eb00c..bc03433a954 100755
--- a/Build/source/texk/dvi2tty/configure
+++ b/Build/source/texk/dvi2tty/configure
@@ -645,6 +645,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -780,11 +781,7 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1445,16 +1442,10 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14731,29 +14722,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
fi
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
fi
if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
-fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14774,7 +14846,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14792,7 +14864,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -14808,23 +14880,12 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = xyes; then
- if test "x$with_ptexenc_includes" != x && test "x$with_ptexenc_includes" != xyes; then
- PTEXENC_INCLUDES="-I$with_ptexenc_includes"
-fi
-PTEXENC_LIBS="-lptexenc"
-if test "x$with_ptexenc_libdir" != x && test "x$with_ptexenc_libdir" != xyes; then
- PTEXENC_LIBS="-L$with_ptexenc_libdir $PTEXENC_LIBS"
+ if $PKG_CONFIG ptexenc; then
+ PTEXENC_INCLUDES=`$PKG_CONFIG ptexenc --cflags`
+ PTEXENC_LIBS=`$PKG_CONFIG ptexenc --libs`
+elif test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then
+ as_fn_error $? "did not find ptexenc" "$LINENO" 5
fi
else
PTEXENC_INCLUDES="-I$kpse_BLD/texk/ptexenc -I$kpse_SRC/texk/ptexenc"
diff --git a/Build/source/texk/dvidvi/Makefile.in b/Build/source/texk/dvidvi/Makefile.in
index 76d6d7ffe84..388299c26bf 100644
--- a/Build/source/texk/dvidvi/Makefile.in
+++ b/Build/source/texk/dvidvi/Makefile.in
@@ -479,6 +479,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dvidvi/configure b/Build/source/texk/dvidvi/configure
index b3ed2635a40..9f9b7067512 100755
--- a/Build/source/texk/dvidvi/configure
+++ b/Build/source/texk/dvidvi/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14719,29 +14715,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
diff --git a/Build/source/texk/dviljk/Makefile.in b/Build/source/texk/dviljk/Makefile.in
index ca360ffca88..436cb6c191c 100644
--- a/Build/source/texk/dviljk/Makefile.in
+++ b/Build/source/texk/dviljk/Makefile.in
@@ -391,6 +391,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dviljk/configure b/Build/source/texk/dviljk/configure
index 90ff56d4437..1789dfc6617 100755
--- a/Build/source/texk/dviljk/configure
+++ b/Build/source/texk/dviljk/configure
@@ -644,6 +644,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -779,8 +780,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1441,11 +1440,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14975,29 +14971,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15018,7 +15095,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15036,7 +15113,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/dviljk/win32/Makefile.in b/Build/source/texk/dviljk/win32/Makefile.in
index 074e8f5c27b..92acc864371 100644
--- a/Build/source/texk/dviljk/win32/Makefile.in
+++ b/Build/source/texk/dviljk/win32/Makefile.in
@@ -243,6 +243,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index 3b2ea07e5ec..3688d6f0f04 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -651,7 +651,6 @@ LIBPNG_RULE
LIBPNG_DEPEND
LIBPNG_LIBS
LIBPNG_INCLUDES
-PKG_CONFIG
ZLIB_RULE
ZLIB_DEPEND
ZLIB_LIBS
@@ -660,6 +659,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
LIBOBJS
CPP
LT_SYS_LIBRARY_PATH
@@ -798,8 +798,6 @@ enable_largefile
enable_dvipdfmx
enable_xdvipdfmx
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1469,11 +1467,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -15665,29 +15660,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15708,7 +15784,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15726,7 +15802,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -15812,98 +15888,6 @@ $as_echo "#define z_const /**/" >>confdefs.h
;;
esac
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PKG_CONFIG"; then
- ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_PKG_CONFIG"; then
- ac_ct_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_PKG_CONFIG"; then
- ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
-if test -n "$ac_ct_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
-$as_echo "$ac_ct_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_PKG_CONFIG" = x; then
- PKG_CONFIG="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_ct_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
-fi
-
## _KPSE_LIB_FLAGS: Setup libpng (-lpng) flags
# Check whether --with-system-libpng was given.
diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure
index e5250169e87..24085ae5a4d 100755
--- a/Build/source/texk/dvipng/configure
+++ b/Build/source/texk/dvipng/configure
@@ -658,7 +658,6 @@ LIBPNG_RULE
LIBPNG_DEPEND
LIBPNG_LIBS
LIBPNG_INCLUDES
-PKG_CONFIG
ZLIB_RULE
ZLIB_DEPEND
ZLIB_LIBS
@@ -667,6 +666,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
INSTALL_INFO
AM_MAKEINFOFLAGS
LIBOBJS
@@ -812,8 +812,6 @@ enable_debug
enable_timing
with_gs
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1485,11 +1483,8 @@ Optional Packages:
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-gs=/PATH/TO/gs Hard-wire the location of GhostScript
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -15927,29 +15922,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15970,7 +16046,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15988,7 +16064,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -16074,98 +16150,6 @@ $as_echo "#define z_const /**/" >>confdefs.h
;;
esac
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PKG_CONFIG"; then
- ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_PKG_CONFIG"; then
- ac_ct_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_PKG_CONFIG"; then
- ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
-if test -n "$ac_ct_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
-$as_echo "$ac_ct_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_PKG_CONFIG" = x; then
- PKG_CONFIG="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_ct_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
-fi
-
## _KPSE_LIB_FLAGS: Setup libpng (-lpng) flags
# Check whether --with-system-libpng was given.
diff --git a/Build/source/texk/dvipos/Makefile.in b/Build/source/texk/dvipos/Makefile.in
index 69e30309609..042863aa686 100644
--- a/Build/source/texk/dvipos/Makefile.in
+++ b/Build/source/texk/dvipos/Makefile.in
@@ -306,6 +306,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dvipos/configure b/Build/source/texk/dvipos/configure
index 3ae61b1ec58..19c6d24473e 100755
--- a/Build/source/texk/dvipos/configure
+++ b/Build/source/texk/dvipos/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14775,29 +14771,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14818,7 +14895,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14836,7 +14913,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in
index 169fa63cb3a..7f13eca3493 100644
--- a/Build/source/texk/dvipsk/Makefile.in
+++ b/Build/source/texk/dvipsk/Makefile.in
@@ -584,6 +584,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/dvipsk/configure b/Build/source/texk/dvipsk/configure
index 12d49107bcd..a08bfd1af21 100755
--- a/Build/source/texk/dvipsk/configure
+++ b/Build/source/texk/dvipsk/configure
@@ -642,6 +642,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -777,8 +778,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1439,11 +1438,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14999,29 +14995,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15042,7 +15119,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15060,7 +15137,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in
index 4962e7399d9..21446e4d1e8 100644
--- a/Build/source/texk/dvisvgm/Makefile.in
+++ b/Build/source/texk/dvisvgm/Makefile.in
@@ -622,6 +622,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POTRACE_DEPEND = @POTRACE_DEPEND@
POTRACE_INCLUDES = @POTRACE_INCLUDES@
POTRACE_LIBS = @POTRACE_LIBS@
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index 44dbe164b92..b5003689060 100755
--- a/Build/source/texk/dvisvgm/configure
+++ b/Build/source/texk/dvisvgm/configure
@@ -658,6 +658,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
WIN32_FALSE
WIN32_TRUE
CXXLD
@@ -809,8 +810,6 @@ with_libgs_includes
with_libgs_libdir
enable_cxx_runtime_hack
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1489,11 +1488,8 @@ Optional Packages:
--with-libgs-includes=DIR
libgs headers installed in DIR
--with-libgs-libdir=DIR libgs library installed in DIR
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -19425,29 +19421,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -19468,7 +19545,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -19486,7 +19563,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/gsftopk/Makefile.in b/Build/source/texk/gsftopk/Makefile.in
index f2f259df546..dc76d2bf752 100644
--- a/Build/source/texk/gsftopk/Makefile.in
+++ b/Build/source/texk/gsftopk/Makefile.in
@@ -310,6 +310,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/gsftopk/configure b/Build/source/texk/gsftopk/configure
index 17657853073..5b0d4f08f40 100755
--- a/Build/source/texk/gsftopk/configure
+++ b/Build/source/texk/gsftopk/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -15094,29 +15090,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15137,7 +15214,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15155,7 +15232,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/lcdf-typetools/Makefile.in b/Build/source/texk/lcdf-typetools/Makefile.in
index 8c7182f7261..12a89068388 100644
--- a/Build/source/texk/lcdf-typetools/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/Makefile.in
@@ -493,6 +493,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure
index ab0827edff3..cdad3229bc1 100755
--- a/Build/source/texk/lcdf-typetools/configure
+++ b/Build/source/texk/lcdf-typetools/configure
@@ -645,6 +645,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
texlive_build_FALSE
texlive_build_TRUE
SELECTED_SUBDIRS
@@ -811,8 +812,6 @@ enable_ttftotype42
enable_updmap
with_kpathsea
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_selfauto_set
'
ac_precious_vars='build_alias
@@ -1500,11 +1499,8 @@ Optional Packages:
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--without-kpathsea build otftotfm without kpathsea
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -21032,29 +21028,110 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_link="./libtool --mode=link --tag=CXX $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -21075,7 +21152,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -21093,7 +21170,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/Makefile.in
index 5b3e79da437..126545c7cf6 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/Makefile.in
@@ -288,6 +288,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/cfftot1/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/cfftot1/Makefile.in
index eb8d6336b99..523c34ad2a2 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/cfftot1/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/cfftot1/Makefile.in
@@ -298,6 +298,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/libefont/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/libefont/Makefile.in
index a370f37e523..018357a7935 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/libefont/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/libefont/Makefile.in
@@ -264,6 +264,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/liblcdf/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/liblcdf/Makefile.in
index d3e4a7750e4..b64fe969ad2 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/liblcdf/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/liblcdf/Makefile.in
@@ -283,6 +283,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmafm/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmafm/Makefile.in
index 6637d40b9ac..4ad2ac4e151 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmafm/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmafm/Makefile.in
@@ -280,6 +280,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmpfb/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmpfb/Makefile.in
index e25e132b8b3..f29c81905b9 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmpfb/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/mmpfb/Makefile.in
@@ -299,6 +299,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otfinfo/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otfinfo/Makefile.in
index 7c8da202d01..530344e5759 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otfinfo/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otfinfo/Makefile.in
@@ -279,6 +279,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otftotfm/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otftotfm/Makefile.in
index 704f450ace8..9ee0531ddfc 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otftotfm/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/otftotfm/Makefile.in
@@ -312,6 +312,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1dotlessj/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1dotlessj/Makefile.in
index 47473652cea..797e2944dc0 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1dotlessj/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1dotlessj/Makefile.in
@@ -280,6 +280,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1lint/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1lint/Makefile.in
index 0b90012444e..8382383a1a4 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1lint/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1lint/Makefile.in
@@ -298,6 +298,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1rawafm/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1rawafm/Makefile.in
index 95613f12db0..eaff4257cfb 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1rawafm/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1rawafm/Makefile.in
@@ -280,6 +280,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1reencode/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1reencode/Makefile.in
index 22c3a01efab..441c68c82db 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1reencode/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1reencode/Makefile.in
@@ -298,6 +298,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1testpage/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1testpage/Makefile.in
index 25d7c64432a..61a3e3cf002 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1testpage/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/t1testpage/Makefile.in
@@ -280,6 +280,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/ttftotype42/Makefile.in b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/ttftotype42/Makefile.in
index df667e73be7..6258f75b4c5 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/ttftotype42/Makefile.in
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104/ttftotype42/Makefile.in
@@ -280,6 +280,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SELECTED_SUBDIRS = @SELECTED_SUBDIRS@
diff --git a/Build/source/texk/makeindexk/Makefile.in b/Build/source/texk/makeindexk/Makefile.in
index 822e5570d60..4a7c61672ed 100644
--- a/Build/source/texk/makeindexk/Makefile.in
+++ b/Build/source/texk/makeindexk/Makefile.in
@@ -491,6 +491,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/makeindexk/configure b/Build/source/texk/makeindexk/configure
index eb0042be35d..48b36dbfa8b 100755
--- a/Build/source/texk/makeindexk/configure
+++ b/Build/source/texk/makeindexk/configure
@@ -642,6 +642,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -777,8 +778,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1439,11 +1438,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14742,29 +14738,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14785,7 +14862,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14803,7 +14880,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/makejvf/Makefile.in b/Build/source/texk/makejvf/Makefile.in
index a3e558a169b..e462e56e120 100644
--- a/Build/source/texk/makejvf/Makefile.in
+++ b/Build/source/texk/makejvf/Makefile.in
@@ -480,6 +480,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
diff --git a/Build/source/texk/makejvf/configure b/Build/source/texk/makejvf/configure
index b69838e9c97..f6fab0ae9a7 100755
--- a/Build/source/texk/makejvf/configure
+++ b/Build/source/texk/makejvf/configure
@@ -641,6 +641,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -776,11 +777,7 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1441,16 +1438,10 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14727,29 +14718,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
fi
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
fi
if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
-fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14770,7 +14842,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14788,7 +14860,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -14804,23 +14876,12 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = xyes; then
- if test "x$with_ptexenc_includes" != x && test "x$with_ptexenc_includes" != xyes; then
- PTEXENC_INCLUDES="-I$with_ptexenc_includes"
-fi
-PTEXENC_LIBS="-lptexenc"
-if test "x$with_ptexenc_libdir" != x && test "x$with_ptexenc_libdir" != xyes; then
- PTEXENC_LIBS="-L$with_ptexenc_libdir $PTEXENC_LIBS"
+ if $PKG_CONFIG ptexenc; then
+ PTEXENC_INCLUDES=`$PKG_CONFIG ptexenc --cflags`
+ PTEXENC_LIBS=`$PKG_CONFIG ptexenc --libs`
+elif test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then
+ as_fn_error $? "did not find ptexenc" "$LINENO" 5
fi
else
PTEXENC_INCLUDES="-I$kpse_BLD/texk/ptexenc -I$kpse_SRC/texk/ptexenc"
diff --git a/Build/source/texk/mendexk/Makefile.in b/Build/source/texk/mendexk/Makefile.in
index 87d2c7850d3..0a69341e785 100644
--- a/Build/source/texk/mendexk/Makefile.in
+++ b/Build/source/texk/mendexk/Makefile.in
@@ -484,6 +484,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
diff --git a/Build/source/texk/mendexk/configure b/Build/source/texk/mendexk/configure
index 4fd71aaeea4..17cdb107d9f 100755
--- a/Build/source/texk/mendexk/configure
+++ b/Build/source/texk/mendexk/configure
@@ -641,6 +641,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -776,11 +777,7 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1441,16 +1438,10 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14754,29 +14745,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
fi
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
fi
if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
-fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14797,7 +14869,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14815,7 +14887,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -14831,23 +14903,12 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = xyes; then
- if test "x$with_ptexenc_includes" != x && test "x$with_ptexenc_includes" != xyes; then
- PTEXENC_INCLUDES="-I$with_ptexenc_includes"
-fi
-PTEXENC_LIBS="-lptexenc"
-if test "x$with_ptexenc_libdir" != x && test "x$with_ptexenc_libdir" != xyes; then
- PTEXENC_LIBS="-L$with_ptexenc_libdir $PTEXENC_LIBS"
+ if $PKG_CONFIG ptexenc; then
+ PTEXENC_INCLUDES=`$PKG_CONFIG ptexenc --cflags`
+ PTEXENC_LIBS=`$PKG_CONFIG ptexenc --libs`
+elif test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then
+ as_fn_error $? "did not find ptexenc" "$LINENO" 5
fi
else
PTEXENC_INCLUDES="-I$kpse_BLD/texk/ptexenc -I$kpse_SRC/texk/ptexenc"
diff --git a/Build/source/texk/musixtnt/Makefile.in b/Build/source/texk/musixtnt/Makefile.in
index 3e268a6d34b..547d3a9ff23 100644
--- a/Build/source/texk/musixtnt/Makefile.in
+++ b/Build/source/texk/musixtnt/Makefile.in
@@ -490,6 +490,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/musixtnt/configure b/Build/source/texk/musixtnt/configure
index e94d521bc4d..32f12137647 100755
--- a/Build/source/texk/musixtnt/configure
+++ b/Build/source/texk/musixtnt/configure
@@ -641,6 +641,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -776,8 +777,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1438,11 +1437,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14813,29 +14809,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14856,7 +14933,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14874,7 +14951,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/ps2pk/Makefile.in b/Build/source/texk/ps2pk/Makefile.in
index eda10d619a5..47e628437c7 100644
--- a/Build/source/texk/ps2pk/Makefile.in
+++ b/Build/source/texk/ps2pk/Makefile.in
@@ -510,6 +510,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/ps2pk/configure b/Build/source/texk/ps2pk/configure
index a8706105472..805cf66c16a 100755
--- a/Build/source/texk/ps2pk/configure
+++ b/Build/source/texk/ps2pk/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
KPSEWHICH
CPP
LT_SYS_LIBRARY_PATH
@@ -776,8 +777,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1438,11 +1437,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -15029,29 +15025,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -15072,7 +15149,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15090,7 +15167,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/psutils/Makefile.in b/Build/source/texk/psutils/Makefile.in
index 86ab14d78bc..f68c80cc66f 100644
--- a/Build/source/texk/psutils/Makefile.in
+++ b/Build/source/texk/psutils/Makefile.in
@@ -542,6 +542,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PSUTILS_TREE = @PSUTILS_TREE@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/texk/psutils/configure b/Build/source/texk/psutils/configure
index 3c78bbe532d..48884b6f812 100755
--- a/Build/source/texk/psutils/configure
+++ b/Build/source/texk/psutils/configure
@@ -650,6 +650,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -785,8 +786,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_libpaper
with_libpaper_includes
with_libpaper_libdir
@@ -1450,11 +1449,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-libpaper use installed libpaper headers and library
--with-libpaper-includes=DIR
libpaper headers installed in DIR
@@ -14739,29 +14735,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14782,7 +14859,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14800,7 +14877,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/ptexenc/Makefile.in b/Build/source/texk/ptexenc/Makefile.in
index 00eaf3b80e6..18cc3d357d5 100644
--- a/Build/source/texk/ptexenc/Makefile.in
+++ b/Build/source/texk/ptexenc/Makefile.in
@@ -314,6 +314,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PTEXENCVERSION = @PTEXENCVERSION@
PTEXENC_LT_VERSINFO = @PTEXENC_LT_VERSINFO@
RANLIB = @RANLIB@
diff --git a/Build/source/texk/ptexenc/configure b/Build/source/texk/ptexenc/configure
index bf095ce54e5..b68a909d65e 100755
--- a/Build/source/texk/ptexenc/configure
+++ b/Build/source/texk/ptexenc/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -777,8 +778,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_kanji_iconv
'
ac_precious_vars='build_alias
@@ -1440,11 +1439,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14724,29 +14720,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14767,7 +14844,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14785,7 +14862,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/seetexk/Makefile.in b/Build/source/texk/seetexk/Makefile.in
index a98a0155436..9758942b0b8 100644
--- a/Build/source/texk/seetexk/Makefile.in
+++ b/Build/source/texk/seetexk/Makefile.in
@@ -511,6 +511,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/seetexk/configure b/Build/source/texk/seetexk/configure
index 21548eb9112..cd52a401390 100755
--- a/Build/source/texk/seetexk/configure
+++ b/Build/source/texk/seetexk/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14779,29 +14775,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14822,7 +14899,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14840,7 +14917,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/tex4htk/Makefile.in b/Build/source/texk/tex4htk/Makefile.in
index b5db71c684b..dcb497ee985 100644
--- a/Build/source/texk/tex4htk/Makefile.in
+++ b/Build/source/texk/tex4htk/Makefile.in
@@ -316,6 +316,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/tex4htk/configure b/Build/source/texk/tex4htk/configure
index 3c5f8a7109f..c8f89e5e813 100755
--- a/Build/source/texk/tex4htk/configure
+++ b/Build/source/texk/tex4htk/configure
@@ -645,6 +645,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -780,8 +781,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1442,11 +1441,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14940,29 +14936,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14983,7 +15060,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -15001,7 +15078,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/ttf2pk2/Makefile.in b/Build/source/texk/ttf2pk2/Makefile.in
index bf8578770a9..f637dfe0bf9 100644
--- a/Build/source/texk/ttf2pk2/Makefile.in
+++ b/Build/source/texk/ttf2pk2/Makefile.in
@@ -505,6 +505,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/ttf2pk2/configure b/Build/source/texk/ttf2pk2/configure
index 5e7ba62d914..188babcb6ca 100755
--- a/Build/source/texk/ttf2pk2/configure
+++ b/Build/source/texk/ttf2pk2/configure
@@ -649,6 +649,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -784,8 +785,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1450,11 +1449,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -14785,29 +14781,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14828,7 +14905,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14846,7 +14923,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/ttfdump/Makefile.in b/Build/source/texk/ttfdump/Makefile.in
index c153ddb5faa..e37719af08e 100644
--- a/Build/source/texk/ttfdump/Makefile.in
+++ b/Build/source/texk/ttfdump/Makefile.in
@@ -508,6 +508,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
diff --git a/Build/source/texk/ttfdump/configure b/Build/source/texk/ttfdump/configure
index 79d1e870d9a..002ecd5818a 100755
--- a/Build/source/texk/ttfdump/configure
+++ b/Build/source/texk/ttfdump/configure
@@ -640,6 +640,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
@@ -775,8 +776,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
'
ac_precious_vars='build_alias
host_alias
@@ -1437,11 +1436,8 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -14935,29 +14931,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -14978,7 +15055,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -14996,7 +15073,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index eac71aa0320..d142512ce3f 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -1015,11 +1015,7 @@ with_fontconfig_includes
with_fontconfig_libdir
with_x
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1763,16 +1759,10 @@ Optional Packages:
--with-fontconfig-libdir=DIR
fontconfig library installed in DIR
--with-x use the X Window System
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -23589,23 +23579,12 @@ ac_link="./libtool --mode=link --tag=CC $ac_link"
if test "${with_system_kpathsea+set}" = set; then :
withval=$with_system_kpathsea;
fi
-
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
-fi
-
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
-fi
if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
-fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -23626,7 +23605,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -23644,7 +23623,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
@@ -23660,23 +23639,12 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = xyes; then
- if test "x$with_ptexenc_includes" != x && test "x$with_ptexenc_includes" != xyes; then
- PTEXENC_INCLUDES="-I$with_ptexenc_includes"
-fi
-PTEXENC_LIBS="-lptexenc"
-if test "x$with_ptexenc_libdir" != x && test "x$with_ptexenc_libdir" != xyes; then
- PTEXENC_LIBS="-L$with_ptexenc_libdir $PTEXENC_LIBS"
+ if $PKG_CONFIG ptexenc; then
+ PTEXENC_INCLUDES=`$PKG_CONFIG ptexenc --cflags`
+ PTEXENC_LIBS=`$PKG_CONFIG ptexenc --libs`
+elif test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then
+ as_fn_error $? "did not find ptexenc" "$LINENO" 5
fi
else
PTEXENC_INCLUDES="-I$kpse_BLD/texk/ptexenc -I$kpse_SRC/texk/ptexenc"
@@ -23933,7 +23901,7 @@ if test "x$with_system_pixman" = xyes; then
PIXMAN_INCLUDES=`$PKG_CONFIG pixman-1 --cflags`
PIXMAN_LIBS=`$PKG_CONFIG pixman-1 --libs`
elif test "x$need_pixman:$with_system_pixman" = xyes:yes; then
- as_fn_error $? "did not find pixman-0.18 or better" "$LINENO" 5
+ as_fn_error $? "did not find pixman-1 0.18 or better" "$LINENO" 5
fi
else
PIXMAN_INCLUDES="-I$kpse_BLD/libs/pixman/include"
@@ -23957,7 +23925,7 @@ if test "x$with_system_cairo" = xyes; then
CAIRO_INCLUDES=`$PKG_CONFIG cairo --cflags`
CAIRO_LIBS=`$PKG_CONFIG cairo --libs`
elif test "x$need_cairo:$with_system_cairo" = xyes:yes; then
- as_fn_error $? "did not find cairo-1.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find cairo 1.12 or better" "$LINENO" 5
fi
else
CAIRO_INCLUDES="-I$kpse_BLD/libs/cairo/cairo"
@@ -24048,12 +24016,14 @@ if test "${with_system_poppler+set}" = set; then :
fi
if test "x$with_system_poppler" = xyes; then
if $PKG_CONFIG poppler --atleast-version=0.18; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ POPPLER_INCLUDES=`$PKG_CONFIG poppler --cflags`
POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
- as_fn_error $? "did not find poppler-0.18 or better" "$LINENO" 5
+ as_fn_error $? "did not find poppler 0.18 or better" "$LINENO" 5
fi
+
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES"
else
POPPLER_INCLUDES="-I$kpse_BLD/libs/poppler/include"
POPPLER_LIBS="$kpse_BLD/libs/poppler/libpoppler.a"
@@ -24074,12 +24044,14 @@ if test "${with_system_xpdf+set}" = set; then :
fi
if test "x$with_system_xpdf" = xyes; then
if $PKG_CONFIG poppler --atleast-version=0.12; then
- POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
- XPDF_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags`
XPDF_LIBS=`$PKG_CONFIG poppler --libs`
elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
- as_fn_error $? "did not find poppler-0.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5
fi
+
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
else
XPDF_INCLUDES="-DPDF_PARSER_ONLY -I$kpse_BLD/libs/xpdf -I$kpse_BLD/libs/xpdf/goo -I$kpse_BLD/libs/xpdf/xpdf"
XPDF_LIBS="$kpse_BLD/libs/xpdf/libxpdf.a"
@@ -24103,7 +24075,7 @@ if test "x$with_system_zziplib" = xyes; then
ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs`
elif test "x$need_zziplib:$with_system_zziplib" = xyes:yes; then
- as_fn_error $? "did not find zziplib-0.12 or better" "$LINENO" 5
+ as_fn_error $? "did not find zziplib 0.12 or better" "$LINENO" 5
fi
else
ZZIPLIB_INCLUDES="-I$kpse_BLD/libs/zziplib/include"
diff --git a/Build/source/texk/xdvik/Makefile.in b/Build/source/texk/xdvik/Makefile.in
index b31b98e3f6e..3bab6db3d30 100644
--- a/Build/source/texk/xdvik/Makefile.in
+++ b/Build/source/texk/xdvik/Makefile.in
@@ -426,6 +426,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PS_DEF = @PS_DEF@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/texk/xdvik/configure b/Build/source/texk/xdvik/configure
index 68c912815ca..2f2d1b776e5 100755
--- a/Build/source/texk/xdvik/configure
+++ b/Build/source/texk/xdvik/configure
@@ -651,6 +651,7 @@ KPATHSEA_RULE
KPATHSEA_DEPEND
KPATHSEA_LIBS
KPATHSEA_INCLUDES
+PKG_CONFIG
final_exec_name
x_tool_libs
x_ext_lib
@@ -817,8 +818,6 @@ with_xpm_libraries
with_motif_include
with_motif_libdir
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1514,11 +1513,8 @@ Optional Packages:
--with-motif-include=DIR
Specify the location of Motif include files
--with-motif-libdir=DIR Specify the location of Motif libraries
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -18573,29 +18569,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_link="./libtool --mode=link --tag=CC $ac_link"
-## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKG_CONFIG"; then
+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-system-kpathsea was given.
-if test "${with_system_kpathsea+set}" = set; then :
- withval=$with_system_kpathsea;
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
+
fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+ ac_ct_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PKG_CONFIG"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
fi
-if test "x$with_system_kpathsea" = xyes; then
- if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then
- KPATHSEA_INCLUDES="-I$with_kpathsea_includes"
fi
-KPATHSEA_LIBS="-lkpathsea"
-if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then
- KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS"
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
+$as_echo "$ac_ct_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_PKG_CONFIG" = x; then
+ PKG_CONFIG="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_ct_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags
+
+# Check whether --with-system-kpathsea was given.
+if test "${with_system_kpathsea+set}" = set; then :
+ withval=$with_system_kpathsea;
+fi
+if test "x$with_system_kpathsea" = xyes; then
+ if $PKG_CONFIG kpathsea; then
+ KPATHSEA_INCLUDES=`$PKG_CONFIG kpathsea --cflags`
+ KPATHSEA_LIBS=`$PKG_CONFIG kpathsea --libs`
+elif test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then
+ as_fn_error $? "did not find kpathsea" "$LINENO" 5
fi
else
KPATHSEA_INCLUDES="-I$kpse_BLD/texk -I$kpse_SRC/texk"
@@ -18616,7 +18693,7 @@ else
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <kpathsea/kpathsea.h>
int
@@ -18634,7 +18711,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS=$kpse_save_CPPFLAGS
+ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
fi
diff --git a/Build/source/texk/xdvik/tests/Makefile.in b/Build/source/texk/xdvik/tests/Makefile.in
index 2e896a9e65e..20514c6580f 100644
--- a/Build/source/texk/xdvik/tests/Makefile.in
+++ b/Build/source/texk/xdvik/tests/Makefile.in
@@ -479,6 +479,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
PS_DEF = @PS_DEF@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/utils/configure b/Build/source/utils/configure
index 4b7f56609fd..aa8d6a96d25 100755
--- a/Build/source/utils/configure
+++ b/Build/source/utils/configure
@@ -834,11 +834,7 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_ptexenc
-with_ptexenc_includes
-with_ptexenc_libdir
with_system_kpathsea
-with_kpathsea_includes
-with_kpathsea_libdir
enable_mktexmf_default
enable_mktexpk_default
enable_mktextfm_default
@@ -1689,16 +1685,10 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-ptexenc use installed ptexenc headers and library
- --with-ptexenc-includes=DIR
- ptexenc headers installed in DIR
- --with-ptexenc-libdir=DIR
- ptexenc library installed in DIR
- --with-system-kpathsea use installed kpathsea headers and library
- --with-kpathsea-includes=DIR
- kpathsea headers installed in DIR
- --with-kpathsea-libdir=DIR
- kpathsea library installed in DIR
+ --with-system-ptexenc use installed ptexenc headers and library (requires
+ pkg-config)
+ --with-system-kpathsea use installed kpathsea headers and library (requires
+ pkg-config)
Some influential environment variables:
CC C compiler command
@@ -5360,16 +5350,6 @@ fi
if test "${with_system_ptexenc+set}" = set; then :
withval=$with_system_ptexenc;
fi
-
-# Check whether --with-ptexenc-includes was given.
-if test "${with_ptexenc_includes+set}" = set; then :
- withval=$with_ptexenc_includes;
-fi
-
-# Check whether --with-ptexenc-libdir was given.
-if test "${with_ptexenc_libdir+set}" = set; then :
- withval=$with_ptexenc_libdir;
-fi
if test "x$with_system_ptexenc" = x; then
if test -f $srcdir/../texk/ptexenc/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5
@@ -5404,16 +5384,6 @@ test "x$need_ptexenc" = xyes && {
if test "${with_system_kpathsea+set}" = set; then :
withval=$with_system_kpathsea;
fi
-
-# Check whether --with-kpathsea-includes was given.
-if test "${with_kpathsea_includes+set}" = set; then :
- withval=$with_kpathsea_includes;
-fi
-
-# Check whether --with-kpathsea-libdir was given.
-if test "${with_kpathsea_libdir+set}" = set; then :
- withval=$with_kpathsea_libdir;
-fi
if test "x$with_system_kpathsea" = x; then
if test -f $srcdir/../texk/kpathsea/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`kpathsea' headers and library from TL tree" >&5