summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/Makefile.in2
-rwxr-xr-xBuild/source/configure64
-rw-r--r--Build/source/libs/Makefile.in2
-rwxr-xr-xBuild/source/libs/configure24
-rw-r--r--Build/source/m4/kpse-setup.m46
-rw-r--r--Build/source/texk/Makefile.in2
-rwxr-xr-xBuild/source/texk/configure24
-rw-r--r--Build/source/texk/dvisvgm/Makefile.in2
-rw-r--r--Build/source/texk/dvisvgm/ac/dvisvgm.ac10
-rw-r--r--Build/source/texk/dvisvgm/ac/libgs.ac9
-rw-r--r--Build/source/texk/dvisvgm/ac/withenable.ac2
-rw-r--r--Build/source/texk/dvisvgm/config.h.in3
-rwxr-xr-xBuild/source/texk/dvisvgm/configure104
-rw-r--r--Build/source/texk/dvisvgm/configure.ac22
-rw-r--r--Build/source/texk/kpathsea/ChangeLog11
-rw-r--r--Build/source/texk/kpathsea/kpathsea.c129
-rw-r--r--Build/source/texk/kpathsea/progname.c58
-rw-r--r--Build/source/texk/kpathsea/tex-file.c79
-rw-r--r--Build/source/texk/kpathsea/types.h3
-rw-r--r--Build/source/utils/Makefile.in2
-rwxr-xr-xBuild/source/utils/configure24
21 files changed, 322 insertions, 260 deletions
diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in
index 6a4f8beba01..38694afba41 100644
--- a/Build/source/Makefile.in
+++ b/Build/source/Makefile.in
@@ -88,6 +88,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-common.m4 \
$(top_srcdir)/texk/dvipos/ac/withenable.ac \
$(top_srcdir)/texk/dvipsk/ac/withenable.ac \
$(top_srcdir)/texk/dvisvgm/ac/withenable.ac \
+ $(top_srcdir)/texk/dvisvgm/ac/dvisvgm.ac \
+ $(top_srcdir)/texk/dvisvgm/ac/libgs.ac \
$(top_srcdir)/texk/gsftopk/ac/withenable.ac \
$(top_srcdir)/texk/lacheck/ac/withenable.ac \
$(top_srcdir)/texk/lcdf-typetools/ac/withenable.ac \
diff --git a/Build/source/configure b/Build/source/configure
index 3c59e2a525f..e159938cda6 100755
--- a/Build/source/configure
+++ b/Build/source/configure
@@ -937,6 +937,7 @@ with_gs
enable_dvipos
enable_dvipsk
enable_dvisvgm
+with_system_libgs
enable_gsftopk
enable_lacheck
enable_lcdf_typetools
@@ -1773,6 +1774,8 @@ Optional Packages:
--with-editor=CMD invoke CMD from the `e' option [vi +%d %s]
--without-mf-x-toolkit do not use X toolkit for METAFONT
--with-gs=/PATH/TO/gs Hard-wire the location of GhostScript
+ --with-system-libgs build dvisvgm with installed gs headers and library
+ [default: no, may require CPPFLAGS and LDFLAGS]
--with-xdvi-x-toolkit=KIT
Use toolkit KIT (motif/xaw/xaw3d/neXtaw) for xdvi
[default: Motif if available, else Xaw]
@@ -2941,10 +2944,10 @@ case $enable_libtool_hack in #(
: ;; #(
*) :
case $host_os in #(
- linux* | solaris*) :
- enable_libtool_hack=yes ;; #(
+ do-not-match) :
+ enable_libtool_hack=no ;; #(
*) :
- enable_libtool_hack=no ;;
+ enable_libtool_hack=yes ;;
esac
ac_configure_args="$ac_configure_args '--enable-libtool-hack=$enable_libtool_hack'" ;;
esac
@@ -3751,6 +3754,21 @@ test "x$enable_dvisvgm" = xno || {
need_zlib=yes
}
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure options for dvisvgm
+
+# Check whether --with-system-libgs was given.
+if test "${with_system_libgs+set}" = set; then :
+ withval=$with_system_libgs;
+fi
+
+
+## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure checks for dvisvgm and libgs
+if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then
+ as_fn_error "you can not use system libraries for a native TeX Live build" "$LINENO" 5
+fi
+
## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/
## configure options and TL libraries required for gsftopk
@@ -6711,13 +6729,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:6714: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6732: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:6717: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6735: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:6720: output\"" >&5)
+ (eval echo "\"\$as_me:6738: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -7923,7 +7941,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 7926 "configure"' > conftest.$ac_ext
+ echo '#line 7944 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9555,11 +9573,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9558: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9576: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9562: \$? = $ac_status" >&5
+ echo "$as_me:9580: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9894,11 +9912,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9897: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9915: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9901: \$? = $ac_status" >&5
+ echo "$as_me:9919: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9999,11 +10017,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10002: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10020: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10006: \$? = $ac_status" >&5
+ echo "$as_me:10024: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10054,11 +10072,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10057: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10075: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10061: \$? = $ac_status" >&5
+ echo "$as_me:10079: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12421,7 +12439,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12424 "configure"
+#line 12442 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12517,7 +12535,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12520 "configure"
+#line 12538 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16990,11 +17008,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16993: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17011: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16997: \$? = $ac_status" >&5
+ echo "$as_me:17015: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17089,11 +17107,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17092: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17110: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17096: \$? = $ac_status" >&5
+ echo "$as_me:17114: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17141,11 +17159,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17144: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17162: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17148: \$? = $ac_status" >&5
+ echo "$as_me:17166: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
diff --git a/Build/source/libs/Makefile.in b/Build/source/libs/Makefile.in
index 42b54777d7e..76de6207491 100644
--- a/Build/source/libs/Makefile.in
+++ b/Build/source/libs/Makefile.in
@@ -92,6 +92,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../texk/dvipos/ac/withenable.ac \
$(top_srcdir)/../texk/dvipsk/ac/withenable.ac \
$(top_srcdir)/../texk/dvisvgm/ac/withenable.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/dvisvgm.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/libgs.ac \
$(top_srcdir)/../texk/gsftopk/ac/withenable.ac \
$(top_srcdir)/../texk/lacheck/ac/withenable.ac \
$(top_srcdir)/../texk/lcdf-typetools/ac/withenable.ac \
diff --git a/Build/source/libs/configure b/Build/source/libs/configure
index 95c8891dff3..ea3a06465b7 100755
--- a/Build/source/libs/configure
+++ b/Build/source/libs/configure
@@ -696,6 +696,7 @@ with_gs
enable_dvipos
enable_dvipsk
enable_dvisvgm
+with_system_libgs
enable_gsftopk
enable_lacheck
enable_lcdf_typetools
@@ -1505,6 +1506,8 @@ Optional Packages:
--with-editor=CMD invoke CMD from the `e' option [vi +%d %s]
--without-mf-x-toolkit do not use X toolkit for METAFONT
--with-gs=/PATH/TO/gs Hard-wire the location of GhostScript
+ --with-system-libgs build dvisvgm with installed gs headers and library
+ [default: no, may require CPPFLAGS and LDFLAGS]
--with-xdvi-x-toolkit=KIT
Use toolkit KIT (motif/xaw/xaw3d/neXtaw) for xdvi
[default: Motif if available, else Xaw]
@@ -2119,10 +2122,10 @@ case $enable_libtool_hack in #(
: ;; #(
*) :
case $host_os in #(
- linux* | solaris*) :
- enable_libtool_hack=yes ;; #(
+ do-not-match) :
+ enable_libtool_hack=no ;; #(
*) :
- enable_libtool_hack=no ;;
+ enable_libtool_hack=yes ;;
esac
ac_configure_args="$ac_configure_args '--enable-libtool-hack=$enable_libtool_hack'" ;;
esac
@@ -2929,6 +2932,21 @@ test "x$enable_dvisvgm" = xno || {
need_zlib=yes
}
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure options for dvisvgm
+
+# Check whether --with-system-libgs was given.
+if test "${with_system_libgs+set}" = set; then :
+ withval=$with_system_libgs;
+fi
+
+
+## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure checks for dvisvgm and libgs
+if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then
+ as_fn_error "you can not use system libraries for a native TeX Live build" "$LINENO" 5
+fi
+
## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/
## configure options and TL libraries required for gsftopk
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index 765a9fd7f8e..0b6edf5c71e 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -44,9 +44,9 @@ fi
AS_CASE([$enable_libtool_hack],
[yes | no], [:],
[AS_CASE([$host_os],
- [linux* | solaris*],
- [enable_libtool_hack=yes],
- [enable_libtool_hack=no])
+ [do-not-match],
+ [enable_libtool_hack=no],
+ [enable_libtool_hack=yes])
ac_configure_args="$ac_configure_args '--enable-libtool-hack=$enable_libtool_hack'"])
AS_CASE([$enable_shared],
[no], [:],
diff --git a/Build/source/texk/Makefile.in b/Build/source/texk/Makefile.in
index 23038359beb..6a652ef350c 100644
--- a/Build/source/texk/Makefile.in
+++ b/Build/source/texk/Makefile.in
@@ -92,6 +92,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../texk/dvipos/ac/withenable.ac \
$(top_srcdir)/../texk/dvipsk/ac/withenable.ac \
$(top_srcdir)/../texk/dvisvgm/ac/withenable.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/dvisvgm.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/libgs.ac \
$(top_srcdir)/../texk/gsftopk/ac/withenable.ac \
$(top_srcdir)/../texk/lacheck/ac/withenable.ac \
$(top_srcdir)/../texk/lcdf-typetools/ac/withenable.ac \
diff --git a/Build/source/texk/configure b/Build/source/texk/configure
index 7dfd4229ca7..17f1b7b25c5 100755
--- a/Build/source/texk/configure
+++ b/Build/source/texk/configure
@@ -696,6 +696,7 @@ with_gs
enable_dvipos
enable_dvipsk
enable_dvisvgm
+with_system_libgs
enable_gsftopk
enable_lacheck
enable_lcdf_typetools
@@ -1525,6 +1526,8 @@ Optional Packages:
--with-editor=CMD invoke CMD from the `e' option [vi +%d %s]
--without-mf-x-toolkit do not use X toolkit for METAFONT
--with-gs=/PATH/TO/gs Hard-wire the location of GhostScript
+ --with-system-libgs build dvisvgm with installed gs headers and library
+ [default: no, may require CPPFLAGS and LDFLAGS]
--with-xdvi-x-toolkit=KIT
Use toolkit KIT (motif/xaw/xaw3d/neXtaw) for xdvi
[default: Motif if available, else Xaw]
@@ -2139,10 +2142,10 @@ case $enable_libtool_hack in #(
: ;; #(
*) :
case $host_os in #(
- linux* | solaris*) :
- enable_libtool_hack=yes ;; #(
+ do-not-match) :
+ enable_libtool_hack=no ;; #(
*) :
- enable_libtool_hack=no ;;
+ enable_libtool_hack=yes ;;
esac
ac_configure_args="$ac_configure_args '--enable-libtool-hack=$enable_libtool_hack'" ;;
esac
@@ -2949,6 +2952,21 @@ test "x$enable_dvisvgm" = xno || {
need_zlib=yes
}
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure options for dvisvgm
+
+# Check whether --with-system-libgs was given.
+if test "${with_system_libgs+set}" = set; then :
+ withval=$with_system_libgs;
+fi
+
+
+## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure checks for dvisvgm and libgs
+if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then
+ as_fn_error "you can not use system libraries for a native TeX Live build" "$LINENO" 5
+fi
+
## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/
## configure options and TL libraries required for gsftopk
diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in
index 1516c13dd18..c14d964849f 100644
--- a/Build/source/texk/dvisvgm/Makefile.in
+++ b/Build/source/texk/dvisvgm/Makefile.in
@@ -63,7 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
$(top_srcdir)/../../m4/ltsugar.m4 \
$(top_srcdir)/../../m4/ltversion.m4 \
$(top_srcdir)/../../m4/lt~obsolete.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/ac/dvisvgm.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
diff --git a/Build/source/texk/dvisvgm/ac/dvisvgm.ac b/Build/source/texk/dvisvgm/ac/dvisvgm.ac
new file mode 100644
index 00000000000..bd617772022
--- /dev/null
+++ b/Build/source/texk/dvisvgm/ac/dvisvgm.ac
@@ -0,0 +1,10 @@
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## configure options for dvisvgm
+AC_ARG_WITH([system-libgs],
+ AS_HELP_STRING([--with-system-libgs],
+ [build dvisvgm with installed gs headers and library
+ @<:@default: no, may require CPPFLAGS and LDFLAGS@:>@]))
diff --git a/Build/source/texk/dvisvgm/ac/libgs.ac b/Build/source/texk/dvisvgm/ac/libgs.ac
new file mode 100644
index 00000000000..25b904f72e4
--- /dev/null
+++ b/Build/source/texk/dvisvgm/ac/libgs.ac
@@ -0,0 +1,9 @@
+## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## configure checks for dvisvgm and libgs
+if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then
+ AC_MSG_ERROR([you can not use system libraries for a native TeX Live build])
+fi
diff --git a/Build/source/texk/dvisvgm/ac/withenable.ac b/Build/source/texk/dvisvgm/ac/withenable.ac
index 24d76219324..78220e06e04 100644
--- a/Build/source/texk/dvisvgm/ac/withenable.ac
+++ b/Build/source/texk/dvisvgm/ac/withenable.ac
@@ -5,3 +5,5 @@ dnl You may freely use, modify and/or distribute this file.
dnl
## configure options and TL libraries required for dvisvgm
KPSE_ENABLE_PROG([dvisvgm], [kpathsea freetype2 zlib])
+m4_include(kpse_TL[texk/dvisvgm/ac/dvisvgm.ac])
+m4_include(kpse_TL[texk/dvisvgm/ac/libgs.ac])
diff --git a/Build/source/texk/dvisvgm/config.h.in b/Build/source/texk/dvisvgm/config.h.in
index c08bdf6a429..09dbb64a9f5 100644
--- a/Build/source/texk/dvisvgm/config.h.in
+++ b/Build/source/texk/dvisvgm/config.h.in
@@ -46,6 +46,9 @@
/* Define to 1 if you have the <iostream> header file. */
#undef HAVE_IOSTREAM
+/* Define to 1 if you have the `freetype2' library (-lfreetype). */
+#undef HAVE_LIBFREETYPE
+
/* Define to 1 if you have the `kpathsea' library (-lkpathsea). */
#undef HAVE_LIBKPATHSEA
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index dad5aefa40d..34c6534104c 100755
--- a/Build/source/texk/dvisvgm/configure
+++ b/Build/source/texk/dvisvgm/configure
@@ -891,6 +891,7 @@ with_gnu_ld
enable_libtool_lock
enable_largefile
enable_compiler_warnings
+with_system_libgs
enable_cxx_runtime_hack
with_system_kpathsea
with_kpathsea_includes
@@ -1553,6 +1554,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-system-libgs build dvisvgm with installed gs headers and library
+ [default: no, may require CPPFLAGS and LDFLAGS]
--with-system-kpathsea use installed kpathsea headers and library
--with-kpathsea-includes=DIR
kpathsea headers installed in DIR
@@ -4713,13 +4716,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4716: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4719: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4719: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4722: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4722: output\"" >&5)
+ (eval echo "\"\$as_me:4725: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5925,7 +5928,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5928 "configure"' > conftest.$ac_ext
+ echo '#line 5931 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7557,11 +7560,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7560: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7563: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7564: \$? = $ac_status" >&5
+ echo "$as_me:7567: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7896,11 +7899,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7899: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7902: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7903: \$? = $ac_status" >&5
+ echo "$as_me:7906: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8001,11 +8004,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8004: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8007: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8008: \$? = $ac_status" >&5
+ echo "$as_me:8011: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8056,11 +8059,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8059: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8062: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8063: \$? = $ac_status" >&5
+ echo "$as_me:8066: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10423,7 +10426,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10426 "configure"
+#line 10429 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10519,7 +10522,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10522 "configure"
+#line 10525 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11611,6 +11614,16 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure options for dvisvgm
+
+# Check whether --with-system-libgs was given.
+if test "${with_system_libgs+set}" = set; then :
+ withval=$with_system_libgs;
+fi
+
+
+
ac_config_headers="$ac_config_headers config.h"
@@ -14306,11 +14319,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14309: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14322: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14313: \$? = $ac_status" >&5
+ echo "$as_me:14326: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14405,11 +14418,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14408: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14421: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14412: \$? = $ac_status" >&5
+ echo "$as_me:14425: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14457,11 +14470,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14460: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14473: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14464: \$? = $ac_status" >&5
+ echo "$as_me:14477: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17552,17 +17565,28 @@ kpse_save_LIBS=$LIBS
eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$ZLIB_LIBS \$LIBS\"
-ac_fn_c_check_func "$LINENO" "deflate" "ac_cv_func_deflate"
-if test "x$ac_cv_func_deflate" = x""yes; then :
+ac_fn_c_check_func "$LINENO" "gzopen" "ac_cv_func_gzopen"
+if test "x$ac_cv_func_gzopen" = x""yes; then :
$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+else
+ as_fn_error "cannot find/use zlib" "$LINENO" 5
fi
eval CPPFLAGS=\"$FREETYPE2_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$FREETYPE2_LIBS \$LIBS\"
+ac_fn_c_check_func "$LINENO" "FT_Init_FreeType" "ac_cv_func_FT_Init_FreeType"
+if test "x$ac_cv_func_FT_Init_FreeType" = x""yes; then :
+
+$as_echo "#define HAVE_LIBFREETYPE 1" >>confdefs.h
+
+else
+ as_fn_error "cannot find/use libfreetype" "$LINENO" 5
+fi
+
eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\"
eval LIBS=\"$KPATHSEA_LIBS \$LIBS\"
@@ -17587,6 +17611,42 @@ fi
DVISVGM_TREE=dvisvgm-0.8.7
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ac_link="./libtool --mode=link --tag=CXX $ac_link"
+
+CPPFLAGS="-I$srcdir/$DVISVGM_TREE/src $CPPFLAGS"
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "iapi.h"
+int
+main ()
+{
+typedef struct gs_main_inst_s gs_main_inst; gs_main_inst *inst;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ gs_old_api=yes
+else
+ gs_old_api=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gs_old_api=$gs_old_api" >&5
+$as_echo "gs_old_api=$gs_old_api" >&6; }
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_link="./libtool --mode=link --tag=CC $ac_link"
+
+
ac_config_files="$ac_config_files Makefile"
diff --git a/Build/source/texk/dvisvgm/configure.ac b/Build/source/texk/dvisvgm/configure.ac
index 8cc8319d0ea..ecca8d7da4c 100644
--- a/Build/source/texk/dvisvgm/configure.ac
+++ b/Build/source/texk/dvisvgm/configure.ac
@@ -23,6 +23,9 @@ AC_CONFIG_MACRO_DIR([../../m4])
# Common code for all programs using libkpathsea.
KPSE_COMMON([dvisvgm])
+dnl Include additional code for dvisvgm.
+m4_include([ac/dvisvgm.ac])
+
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
@@ -46,11 +49,16 @@ if test "x$enable_build" != xno || test -f config.force; then
# Checks for more libraries.
KPSE_ADD_FLAGS([zlib])
-AC_CHECK_FUNC([deflate],
+AC_CHECK_FUNC([gzopen],
[AC_DEFINE([HAVE_LIBZ], 1,
- [Define to 1 if you have the `z' library (-lz).])])
+ [Define to 1 if you have the `z' library (-lz).])],
+ [AC_MSG_ERROR([cannot find/use zlib])])
KPSE_ADD_FLAGS([freetype2])
+AC_CHECK_FUNC([FT_Init_FreeType],
+ [AC_DEFINE([HAVE_LIBFREETYPE], 1,
+ [Define to 1 if you have the `freetype2' library (-lfreetype).])],
+ [AC_MSG_ERROR([cannot find/use libfreetype])])
KPSE_ADD_FLAGS([kpathsea])
AC_CHECK_FUNC([kpse_set_progname],
@@ -66,6 +74,16 @@ fi
DVISVGM_TREE=[dvisvgm-]dvisvgm_version
AC_SUBST([DVISVGM_TREE])
+AC_LANG_PUSH([C++])
+CPPFLAGS="-I$srcdir/$DVISVGM_TREE/src $CPPFLAGS"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "iapi.h"]],
+ [[typedef struct gs_main_inst_s gs_main_inst; gs_main_inst *inst;]])],
+ [gs_old_api=yes],
+ [gs_old_api=no])
+AC_MSG_RESULT([gs_old_api=$gs_old_api])
+AC_LANG_POP([C++])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 86f0b66a105..bf7eabd007d 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * types.h (kpathsea_instance): For Win/Mingw/Cygwin declare
+ suffixlist, listing the executable file suffixes.
+ * progname.c (kpathsea_set_program_name): Build suffixlist.
+ * tex-file.c (kpathsea_out_name_ok): Use suffixlist.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+ * kpathsea.c: Remove obsolete initializer.
+ (kpathsea_finish): Destroy suffixlist (not yet used).
+
2009-11-14 Peter Breitenlohner <peb@mppmu.mpg.de>
* tex-file.c (kpathsea_out_name_ok): Allow writing of .pl files.
diff --git a/Build/source/texk/kpathsea/kpathsea.c b/Build/source/texk/kpathsea/kpathsea.c
index fe5a439e205..86a4d053b63 100644
--- a/Build/source/texk/kpathsea/kpathsea.c
+++ b/Build/source/texk/kpathsea/kpathsea.c
@@ -114,6 +114,14 @@ kpathsea_finish (kpathsea kpse)
string_free (kpse->saved_env[i]);
free (kpse->saved_env);
}
+#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
+ if (kpse->suffixlist != NULL) {
+ char **p;
+ for p = kpse->suffixlist; *p; p++)
+ free (*p);
+ free (kpse->suffixlist);
+ }
+#endif /* WIN32 || __MINGW32__ || __CYGWIN__ */
#endif /* KPATHSEA_CAN_FREE */
#if defined (KPSE_COMPAT_API)
if (kpse==kpse_def)
@@ -125,128 +133,7 @@ kpathsea_finish (kpathsea kpse)
#if defined (KPSE_COMPAT_API)
-/*
- * FIXME: completely remove the initializer.
- */
-
-#if 0
-
-#define NULL_FORMAT_INFO(kpse_file_format_type) { \
- NULL, /* const_string type */ \
- NULL, /* const_string path */ \
- NULL, /* const_string raw_path */ \
- NULL, /* const_string path_source */ \
- NULL, /* const_string override_path */ \
- NULL, /* const_string client_path */ \
- NULL, /* const_string cnf_path */ \
- NULL, /* const_string default_path */ \
- NULL, /* const_string *suffix */ \
- NULL, /* const_string *alt_suffix */ \
- false, /* boolean suffix_search_only */ \
- NULL, /* const_string program */ \
- 0, /* int argc */ \
- NULL, /* const_string *argv */ \
- false, /* boolean program_enabled_p */ \
- 0, /* kpse_src_type program_enable_level */ \
- false /* boolean binmode */ \
- }
-
-kpathsea_instance kpse_def_inst = {
- NULL, /* p_record_input record_input */
- NULL, /* p_record_output record_output */
- {NULL, 0}, /* hash_table_type cnf_hash */
- false, /* boolean doing_cnf_init */
- {NULL, 0}, /* hash_table_type db */
- {NULL, 0}, /* hash_table_type alias_db */
- {0, NULL}, /* str_list_type db_dir_list */
- 0, /* unsigned debug */
- {NULL, 0}, /* hash_table_type link_table */
- NULL, /* cache_entry *the_cache */
- 0, /* unsigned cache_length */
- {NULL, 0}, /* hash_table_type map */
- NULL, /* const_string map_path */
- false, /* boolean debug_hash_lookup_int */
- NULL, /* string elt */
- 0, /* unsigned elt_alloc */
- NULL, /* const_string path */
- false, /* boolean followup_search */
- NULL, /* FILE *log_file */
- false, /* boolean log_opened */
- NULL, /* string invocation_name */
- NULL, /* string invocation_short_name */
- NULL, /* string program_name */
- 0, /* int ll_verbose */
- NULL, /* const_string fallback_font */
- NULL, /* const_string fallback_resolutions_string */
- 0, /* unsigned *fallback_resolutions */
- { /* kpse_format_info_type format_info[kpse_last_format] */
- NULL_FORMAT_INFO(kpse_gf_format),
- NULL_FORMAT_INFO(kpse_pk_format),
- NULL_FORMAT_INFO(kpse_any_glyph_format),
- NULL_FORMAT_INFO(kpse_tfm_format),
- NULL_FORMAT_INFO(kpse_afm_format),
- NULL_FORMAT_INFO(kpse_base_format),
- NULL_FORMAT_INFO(kpse_bib_format),
- NULL_FORMAT_INFO(kpse_bst_format),
- NULL_FORMAT_INFO(kpse_cnf_format),
- NULL_FORMAT_INFO(kpse_db_format),
- NULL_FORMAT_INFO(kpse_fmt_format),
- NULL_FORMAT_INFO(kpse_fontmap_format),
- NULL_FORMAT_INFO(kpse_mem_format),
- NULL_FORMAT_INFO(kpse_mf_format),
- NULL_FORMAT_INFO(kpse_mfpool_format),
- NULL_FORMAT_INFO(kpse_mft_format),
- NULL_FORMAT_INFO(kpse_mp_format),
- NULL_FORMAT_INFO(kpse_mppool_format),
- NULL_FORMAT_INFO(kpse_mpsupport_format),
- NULL_FORMAT_INFO(kpse_ocp_format),
- NULL_FORMAT_INFO(kpse_ofm_format),
- NULL_FORMAT_INFO(kpse_opl_format),
- NULL_FORMAT_INFO(kpse_otp_format),
- NULL_FORMAT_INFO(kpse_ovf_format),
- NULL_FORMAT_INFO(kpse_ovp_format),
- NULL_FORMAT_INFO(kpse_pict_format),
- NULL_FORMAT_INFO(kpse_tex_format),
- NULL_FORMAT_INFO(kpse_texdoc_format),
- NULL_FORMAT_INFO(kpse_texpool_format),
- NULL_FORMAT_INFO(kpse_texsource_format),
- NULL_FORMAT_INFO(kpse_tex_ps_header_format),
- NULL_FORMAT_INFO(kpse_troff_font_format),
- NULL_FORMAT_INFO(kpse_type1_format),
- NULL_FORMAT_INFO(kpse_vf_format),
- NULL_FORMAT_INFO(kpse_dvips_config_format),
- NULL_FORMAT_INFO(kpse_ist_format),
- NULL_FORMAT_INFO(kpse_truetype_format),
- NULL_FORMAT_INFO(kpse_type42_format),
- NULL_FORMAT_INFO(kpse_web2c_format),
- NULL_FORMAT_INFO(kpse_program_text_format),
- NULL_FORMAT_INFO(kpse_program_binary_format),
- NULL_FORMAT_INFO(kpse_miscfonts_format),
- NULL_FORMAT_INFO(kpse_web_format),
- NULL_FORMAT_INFO(kpse_cweb_format),
- NULL_FORMAT_INFO(kpse_enc_format),
- NULL_FORMAT_INFO(kpse_cmap_format),
- NULL_FORMAT_INFO(kpse_sfd_format),
- NULL_FORMAT_INFO(kpse_opentype_format),
- NULL_FORMAT_INFO(kpse_pdftex_config_format),
- NULL_FORMAT_INFO(kpse_lig_format),
- NULL_FORMAT_INFO(kpse_texmfscripts_format),
- NULL_FORMAT_INFO(kpse_lua_format)
- },
- false, /* boolean make_tex_discard_errors */
- NULL, /* FILE *missfont */
- NULL, /* expansion_type *expansions */
- 0, /* unsigned expansion_len */
- NULL, /* char **saved_env */
- 0 /* int saved_count */
-};
-
-#else /* zero */
-
kpathsea_instance kpse_def_inst;
-
-#endif /* zero */
-
kpathsea kpse_def = &kpse_def_inst;
#endif /* KPSE_COMPAT_API */
diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c
index 2a8fdfb692a..d2ae4848f5f 100644
--- a/Build/source/texk/kpathsea/progname.c
+++ b/Build/source/texk/kpathsea/progname.c
@@ -417,9 +417,61 @@ kpse_selfdir (const_string argv0)
}
#endif
-
#endif /* not WIN32 */
+#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
+
+/* Create a list of executable suffixes of files not to be written. */
+#define EXE_SUFFIXES ".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.ws;.tcl;.py;.pyw"
+
+static void
+mk_suffixlist (kpathsea kpse)
+{
+ char **p;
+ char *q, *r, *v;
+ int n;
+
+#if defined(__CYGWIN__)
+ v = xstrdup (EXE_SUFFIXES);
+#else
+ v = getenv ("PATHEXT");
+ if (v) /* strlwr() exists also in MingW */
+ v = strlwr (xstrdup (v));
+ else
+ v = xstrdup (EXE_SUFFIXES);
+#endif
+
+ q = v;
+ n = 0;
+
+ while ((r = strchr (q, ';')) != NULL) {
+ n++;
+ r++;
+ q = r;
+ }
+ if (*q)
+ n++;
+ kpse->suffixlist = (char **) xmalloc ((n + 2) * sizeof (char *));
+ p = (char **)kpse->suffixlist;
+ *p = xstrdup (".dll");
+ p++;
+ q = v;
+ while ((r = strchr (q, ';')) != NULL) {
+ *r = '\0';
+ *p = xstrdup (q);
+ p++;
+ r++;
+ q = r;
+ }
+ if (*q) {
+ *p = xstrdup (q);
+ p++;
+ }
+ *p = NULL;
+ free (v);
+}
+#endif /* WIN32 || __MINGW32__ || __CYGWIN__ */
+
void
kpathsea_set_program_name (kpathsea kpse, const_string argv0, const_string progname)
{
@@ -574,6 +626,10 @@ kpathsea_set_program_name (kpathsea kpse, const_string argv0, const_string prog
sdir_grandparent = xdirname (sdir_parent);
kpathsea_xputenv (kpse, "SELFAUTOPARENT", sdir_grandparent);
+#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
+ mk_suffixlist(kpse);
+#endif /* WIN32 || __MINGW32__ || __CYGWIN__ */
+
free (sdir);
free (sdir_parent);
free (sdir_grandparent);
diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c
index f34f58924e8..30d7d0fca26 100644
--- a/Build/source/texk/kpathsea/tex-file.c
+++ b/Build/source/texk/kpathsea/tex-file.c
@@ -1182,91 +1182,16 @@ Isspace (char c)
return (c == ' ' || c == '\t');
}
-/* Create a list of executable suffixes of files not to be written. */
-#define EXE_SUFFIXES ".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.ws;.tcl;.py;.pyw"
-
-static void
-mk_suffixlist (char ***ext)
-{
- char **p;
- char *q, *r, *v;
- int n;
-
-#if defined(__CYGWIN__)
- v = (char *) xmalloc (strlen (EXE_SUFFIXES) + 1);
- strcpy (v, EXE_SUFFIXES);
-#else
- v = (char *) getenv ("PATHEXT");
- if (v) /* strlwr() exists also in MingW */
- (void) strlwr (v);
- else {
- v = (char *) xmalloc (strlen (EXE_SUFFIXES) + 1);
- strcpy (v, EXE_SUFFIXES);
- }
-#endif
-
- q = v;
- n = 0;
-
- while ((r = strchr (q, ';')) != 0) {
- n++;
- r++;
- q = r;
- }
- if (*q)
- n++;
- *ext = (char **) xmalloc ((n + 2) * sizeof (char *));
- p = *ext;
- *p = (char *) xmalloc(5);
- strcpy(*p, ".dll");
- p++;
- q = v;
- while ((r = strchr (q, ';')) != 0) {
- *r = '\0';
- *p = (char *) xmalloc (strlen (q) + 1);
- strcpy (*p, q);
- *r = ';';
- r++;
- q = r;
- p++;
- }
- if (*q) {
- *p = (char *) xmalloc (strlen (q) + 1);
- strcpy (*p, q);
- p++;
- *p = NULL;
- } else
- *p = NULL;
- free (v);
-}
-
-static void
-free_suffixlist (char ***ext)
-{
- char **p;
-
- if (*ext) {
- p = *ext;
- while (*p) {
- free (*p);
- p++;
- }
- free (*ext);
- }
-}
-
static boolean
executable_filep (kpathsea kpse, const_string fname)
{
string p, q, base;
string *pp;
- char **suffixlist = NULL;
/* check openout_any */
p = kpathsea_var_value (kpse, "openout_any");
if (p && *p == 'p') {
free (p);
- mk_suffixlist (&suffixlist);
/* get base name
we cannot use xbasename() for abnormal names.
*/
@@ -1293,21 +1218,19 @@ executable_filep (kpathsea kpse, const_string fname)
*q = '\0'; /* remove trailing '.' , ' ' and '\t' */
}
q = strrchr (p, '.'); /* get extension part */
- pp = suffixlist;
+ pp = kpse->suffixlist;
if (pp && q) {
while (*pp) {
if (strchr (fname, ':') || !strcmp (q, *pp)) {
fprintf (stderr, "\nThe name %s is forbidden to open for writing.\n",
fname);
free (base);
- free_suffixlist (&suffixlist);
return true;
}
pp++;
}
}
free (base);
- free_suffixlist (&suffixlist);
} else if (p) {
free (p);
}
diff --git a/Build/source/texk/kpathsea/types.h b/Build/source/texk/kpathsea/types.h
index 19684f117e0..c70abe13ade 100644
--- a/Build/source/texk/kpathsea/types.h
+++ b/Build/source/texk/kpathsea/types.h
@@ -254,6 +254,9 @@ typedef struct kpathsea_instance {
*/
char **saved_env; /* these keep track of changed items */
int saved_count;
+#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
+ char **suffixlist;
+#endif /* WIN32 || __MINGW32__ || __CYGWIN__ */
} kpathsea_instance;
/* these come from kpathsea.c */
diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in
index a0dc70f8032..8ee4a7a5648 100644
--- a/Build/source/utils/Makefile.in
+++ b/Build/source/utils/Makefile.in
@@ -92,6 +92,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../texk/dvipos/ac/withenable.ac \
$(top_srcdir)/../texk/dvipsk/ac/withenable.ac \
$(top_srcdir)/../texk/dvisvgm/ac/withenable.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/dvisvgm.ac \
+ $(top_srcdir)/../texk/dvisvgm/ac/libgs.ac \
$(top_srcdir)/../texk/gsftopk/ac/withenable.ac \
$(top_srcdir)/../texk/lacheck/ac/withenable.ac \
$(top_srcdir)/../texk/lcdf-typetools/ac/withenable.ac \
diff --git a/Build/source/utils/configure b/Build/source/utils/configure
index f60a8b6222a..b613d69d3c9 100755
--- a/Build/source/utils/configure
+++ b/Build/source/utils/configure
@@ -696,6 +696,7 @@ with_gs
enable_dvipos
enable_dvipsk
enable_dvisvgm
+with_system_libgs
enable_gsftopk
enable_lacheck
enable_lcdf_typetools
@@ -1502,6 +1503,8 @@ Optional Packages:
--with-editor=CMD invoke CMD from the `e' option [vi +%d %s]
--without-mf-x-toolkit do not use X toolkit for METAFONT
--with-gs=/PATH/TO/gs Hard-wire the location of GhostScript
+ --with-system-libgs build dvisvgm with installed gs headers and library
+ [default: no, may require CPPFLAGS and LDFLAGS]
--with-xdvi-x-toolkit=KIT
Use toolkit KIT (motif/xaw/xaw3d/neXtaw) for xdvi
[default: Motif if available, else Xaw]
@@ -2116,10 +2119,10 @@ case $enable_libtool_hack in #(
: ;; #(
*) :
case $host_os in #(
- linux* | solaris*) :
- enable_libtool_hack=yes ;; #(
+ do-not-match) :
+ enable_libtool_hack=no ;; #(
*) :
- enable_libtool_hack=no ;;
+ enable_libtool_hack=yes ;;
esac
ac_configure_args="$ac_configure_args '--enable-libtool-hack=$enable_libtool_hack'" ;;
esac
@@ -2926,6 +2929,21 @@ test "x$enable_dvisvgm" = xno || {
need_zlib=yes
}
+## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure options for dvisvgm
+
+# Check whether --with-system-libgs was given.
+if test "${with_system_libgs+set}" = set; then :
+ withval=$with_system_libgs;
+fi
+
+
+## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/
+## configure checks for dvisvgm and libgs
+if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then
+ as_fn_error "you can not use system libraries for a native TeX Live build" "$LINENO" 5
+fi
+
## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/
## configure options and TL libraries required for gsftopk