summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-11 17:34:27 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-11 17:34:27 +0000
commitcccf458bc431d5acf57051e42292f42ea20ebb7e (patch)
treee029956c061897544f69d9baad97338ce7849d23 /Build/source/texk
parentb66972550a98f8260ff627d68e9b120ab3e960d1 (diff)
build system: use pkg-config to detect installed libpng
git-svn-id: svn://tug.org/texlive/trunk@21029 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-xBuild/source/texk/configure19
-rw-r--r--Build/source/texk/dvipdfmx/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvipdfmx/configure123
-rw-r--r--Build/source/texk/dvipdfmx/data/Makefile.in1
-rw-r--r--Build/source/texk/dvipdfmx/src/Makefile.in1
-rw-r--r--Build/source/texk/dvipng/Makefile.in1
-rwxr-xr-xBuild/source/texk/dvipng/configure123
-rw-r--r--Build/source/texk/dvipng/doc/Makefile.in1
-rw-r--r--Build/source/texk/dvipng/help/Makefile.in1
-rwxr-xr-xBuild/source/texk/web2c/configure30
-rwxr-xr-xBuild/source/texk/xdvipdfmx/configure216
11 files changed, 315 insertions, 202 deletions
diff --git a/Build/source/texk/configure b/Build/source/texk/configure
index 5ebb43725ce..3b11090d9bd 100755
--- a/Build/source/texk/configure
+++ b/Build/source/texk/configure
@@ -783,8 +783,6 @@ with_system_t1lib
with_t1lib_includes
with_t1lib_libdir
with_system_libpng
-with_libpng_includes
-with_libpng_libdir
with_system_zlib
with_zlib_includes
with_zlib_libdir
@@ -1625,11 +1623,8 @@ Optional Packages:
--with-t1lib-includes=DIR
t1lib headers installed in DIR
--with-t1lib-libdir=DIR t1lib library installed in DIR
- --with-system-libpng use installed libpng headers and library
- --with-libpng-includes=DIR
- libpng headers installed in DIR
- --with-libpng-libdir=DIR
- libpng library installed in DIR
+ --with-system-libpng use installed libpng headers and library (requires
+ pkg-config)
--with-system-zlib use installed zlib headers and library
--with-zlib-includes=DIR
zlib headers installed in DIR
@@ -4806,16 +4801,6 @@ fi
if test "${with_system_libpng+set}" = set; then :
withval=$with_system_libpng;
fi
-
-# Check whether --with-libpng-includes was given.
-if test "${with_libpng_includes+set}" = set; then :
- withval=$with_libpng_includes;
-fi
-
-# Check whether --with-libpng-libdir was given.
-if test "${with_libpng_libdir+set}" = set; then :
- withval=$with_libpng_libdir;
-fi
if test "x$with_system_libpng" = x; then
if test -f $srcdir/../libs/libpng/configure; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`libpng' headers and library from TL tree" >&5
diff --git a/Build/source/texk/dvipdfmx/Makefile.in b/Build/source/texk/dvipdfmx/Makefile.in
index f739e8fb676..f3ff9f8f833 100644
--- a/Build/source/texk/dvipdfmx/Makefile.in
+++ b/Build/source/texk/dvipdfmx/Makefile.in
@@ -185,6 +185,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/dvipdfmx/configure b/Build/source/texk/dvipdfmx/configure
index 6beb0f5156f..536133af119 100755
--- a/Build/source/texk/dvipdfmx/configure
+++ b/Build/source/texk/dvipdfmx/configure
@@ -621,6 +621,7 @@ LIBPNG_RULE
LIBPNG_DEPEND
LIBPNG_LIBS
LIBPNG_INCLUDES
+PKG_CONFIG
ZLIB_RULE
ZLIB_DEPEND
ZLIB_LIBS
@@ -763,8 +764,6 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_libpng
-with_libpng_includes
-with_libpng_libdir
with_paper
'
ac_precious_vars='build_alias
@@ -1428,11 +1427,8 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-libpng use installed libpng headers and library
- --with-libpng-includes=DIR
- libpng headers installed in DIR
- --with-libpng-libdir=DIR
- libpng library installed in DIR
+ --with-system-libpng use installed libpng headers and library (requires
+ pkg-config)
--with-paper=DIR use paper include/library files from DIR
Some influential environment variables:
@@ -15042,29 +15038,110 @@ ${top_builddir}/../../libs/zlib/include/zconf.h:
cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild'
fi
-## _KPSE_LIB_FLAGS: Setup libpng (-lpng) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng was given.
-if test "${with_system_libpng+set}" = set; then :
- withval=$with_system_libpng;
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-libpng-includes was given.
-if test "${with_libpng_includes+set}" = set; then :
- withval=$with_libpng_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng-libdir was given.
-if test "${with_libpng_libdir+set}" = set; then :
- withval=$with_libpng_libdir;
fi
-if test "x$with_system_libpng" = xyes; then
- if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then
- LIBPNG_INCLUDES="-I$with_libpng_includes"
fi
-LIBPNG_LIBS="-lpng"
-if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then
- LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_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 libpng (-lpng) flags
+
+# Check whether --with-system-libpng was given.
+if test "${with_system_libpng+set}" = set; then :
+ withval=$with_system_libpng;
+fi
+if test "x$with_system_libpng" = xyes; then
+ 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
+ as_fn_error $? "did not find libpng" "$LINENO" 5
fi
else
LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng/include' | sed \
diff --git a/Build/source/texk/dvipdfmx/data/Makefile.in b/Build/source/texk/dvipdfmx/data/Makefile.in
index b4a201c5f10..bfb75185ab5 100644
--- a/Build/source/texk/dvipdfmx/data/Makefile.in
+++ b/Build/source/texk/dvipdfmx/data/Makefile.in
@@ -150,6 +150,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/dvipdfmx/src/Makefile.in b/Build/source/texk/dvipdfmx/src/Makefile.in
index 64f8c07dce1..59e3fbc62a1 100644
--- a/Build/source/texk/dvipdfmx/src/Makefile.in
+++ b/Build/source/texk/dvipdfmx/src/Makefile.in
@@ -191,6 +191,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/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in
index 7a02b5bf7db..e1053a24715 100644
--- a/Build/source/texk/dvipng/Makefile.in
+++ b/Build/source/texk/dvipng/Makefile.in
@@ -246,6 +246,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure
index 5c9821e518c..4f2357350f4 100755
--- a/Build/source/texk/dvipng/configure
+++ b/Build/source/texk/dvipng/configure
@@ -642,6 +642,7 @@ LIBPNG_RULE
LIBPNG_DEPEND
LIBPNG_LIBS
LIBPNG_INCLUDES
+PKG_CONFIG
ZLIB_RULE
ZLIB_DEPEND
ZLIB_LIBS
@@ -794,8 +795,6 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_libpng
-with_libpng_includes
-with_libpng_libdir
with_system_t1lib
with_t1lib_includes
with_t1lib_libdir
@@ -1468,11 +1467,8 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-libpng use installed libpng headers and library
- --with-libpng-includes=DIR
- libpng headers installed in DIR
- --with-libpng-libdir=DIR
- libpng library installed in DIR
+ --with-system-libpng use installed libpng headers and library (requires
+ pkg-config)
--with-system-t1lib use installed t1lib headers and library
--with-t1lib-includes=DIR
t1lib headers installed in DIR
@@ -15900,29 +15896,110 @@ ${top_builddir}/../../libs/zlib/include/zconf.h:
cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild'
fi
-## _KPSE_LIB_FLAGS: Setup libpng (-lpng) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng was given.
-if test "${with_system_libpng+set}" = set; then :
- withval=$with_system_libpng;
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-libpng-includes was given.
-if test "${with_libpng_includes+set}" = set; then :
- withval=$with_libpng_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng-libdir was given.
-if test "${with_libpng_libdir+set}" = set; then :
- withval=$with_libpng_libdir;
fi
-if test "x$with_system_libpng" = xyes; then
- if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then
- LIBPNG_INCLUDES="-I$with_libpng_includes"
fi
-LIBPNG_LIBS="-lpng"
-if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then
- LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_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 libpng (-lpng) flags
+
+# Check whether --with-system-libpng was given.
+if test "${with_system_libpng+set}" = set; then :
+ withval=$with_system_libpng;
+fi
+if test "x$with_system_libpng" = xyes; then
+ 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
+ as_fn_error $? "did not find libpng" "$LINENO" 5
fi
else
LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng/include' | sed \
diff --git a/Build/source/texk/dvipng/doc/Makefile.in b/Build/source/texk/dvipng/doc/Makefile.in
index 1594ba9498b..9d0947ba42b 100644
--- a/Build/source/texk/dvipng/doc/Makefile.in
+++ b/Build/source/texk/dvipng/doc/Makefile.in
@@ -177,6 +177,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/texk/dvipng/help/Makefile.in b/Build/source/texk/dvipng/help/Makefile.in
index 377e4050dc4..33aec474c67 100644
--- a/Build/source/texk/dvipng/help/Makefile.in
+++ b/Build/source/texk/dvipng/help/Makefile.in
@@ -136,6 +136,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index 14fb7d5e0b7..7ddb26275b9 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -927,8 +927,6 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_libpng
-with_libpng_includes
-with_libpng_libdir
with_system_xpdf
with_system_zziplib
with_system_graphite
@@ -1660,11 +1658,8 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-libpng use installed libpng headers and library
- --with-libpng-includes=DIR
- libpng headers installed in DIR
- --with-libpng-libdir=DIR
- libpng library installed in DIR
+ --with-system-libpng use installed libpng headers and library (requires
+ pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
--with-system-zziplib use installed zziplib headers and library (requires
@@ -21981,23 +21976,12 @@ fi
if test "${with_system_libpng+set}" = set; then :
withval=$with_system_libpng;
fi
-
-# Check whether --with-libpng-includes was given.
-if test "${with_libpng_includes+set}" = set; then :
- withval=$with_libpng_includes;
-fi
-
-# Check whether --with-libpng-libdir was given.
-if test "${with_libpng_libdir+set}" = set; then :
- withval=$with_libpng_libdir;
-fi
if test "x$with_system_libpng" = xyes; then
- if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then
- LIBPNG_INCLUDES="-I$with_libpng_includes"
-fi
-LIBPNG_LIBS="-lpng"
-if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then
- LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_LIBS"
+ 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
+ as_fn_error $? "did not find libpng" "$LINENO" 5
fi
else
LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng/include' | sed \
diff --git a/Build/source/texk/xdvipdfmx/configure b/Build/source/texk/xdvipdfmx/configure
index 345bc0b8d7a..abf354e85f3 100755
--- a/Build/source/texk/xdvipdfmx/configure
+++ b/Build/source/texk/xdvipdfmx/configure
@@ -621,7 +621,6 @@ build_FALSE
build_TRUE
FONTCONFIG_LIBS
FONTCONFIG_INCLUDES
-PKG_CONFIG
FREETYPE2_RULE
FREETYPE2_DEPEND
FREETYPE2_LIBS
@@ -631,6 +630,7 @@ LIBPNG_RULE
LIBPNG_DEPEND
LIBPNG_LIBS
LIBPNG_INCLUDES
+PKG_CONFIG
ZLIB_RULE
ZLIB_DEPEND
ZLIB_LIBS
@@ -774,8 +774,6 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
with_system_libpng
-with_libpng_includes
-with_libpng_libdir
with_system_freetype2
with_paper
with_fontconfig_includes
@@ -1443,11 +1441,8 @@ Optional Packages:
--with-zlib-includes=DIR
zlib headers installed in DIR
--with-zlib-libdir=DIR zlib library installed in DIR
- --with-system-libpng use installed libpng headers and library
- --with-libpng-includes=DIR
- libpng headers installed in DIR
- --with-libpng-libdir=DIR
- libpng library installed in DIR
+ --with-system-libpng use installed libpng headers and library (requires
+ pkg-config)
--with-system-freetype2 use installed freetype2 headers and library
(requires freetype-config)
--with-paper=DIR use paper include/library files from DIR
@@ -15083,29 +15078,110 @@ ${top_builddir}/../../libs/zlib/include/zconf.h:
cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild'
fi
-## _KPSE_LIB_FLAGS: Setup libpng (-lpng) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng was given.
-if test "${with_system_libpng+set}" = set; then :
- withval=$with_system_libpng;
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-libpng-includes was given.
-if test "${with_libpng_includes+set}" = set; then :
- withval=$with_libpng_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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-libpng-libdir was given.
-if test "${with_libpng_libdir+set}" = set; then :
- withval=$with_libpng_libdir;
fi
-if test "x$with_system_libpng" = xyes; then
- if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then
- LIBPNG_INCLUDES="-I$with_libpng_includes"
fi
-LIBPNG_LIBS="-lpng"
-if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then
- LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_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 libpng (-lpng) flags
+
+# Check whether --with-system-libpng was given.
+if test "${with_system_libpng+set}" = set; then :
+ withval=$with_system_libpng;
+fi
+if test "x$with_system_libpng" = xyes; then
+ 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
+ as_fn_error $? "did not find libpng" "$LINENO" 5
fi
else
LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng/include' | sed \
@@ -15550,98 +15626,6 @@ $as_echo "#define HAVE_APPLICATIONSERVICES 1" >>confdefs.h
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
-{ $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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
-
# Check whether --with-fontconfig-includes was given.
if test "${with_fontconfig_includes+set}" = set; then :