summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik
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/source/texk/xdvik
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/source/texk/xdvik')
-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
3 files changed, 104 insertions, 25 deletions
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@