diff -aurN tetex-src-2.0.2/ChangeLog tetex-bin-2.0.2-1/ChangeLog --- tetex-src-2.0.2/ChangeLog 2003-03-01 06:27:27.000000000 +0900 +++ tetex-bin-2.0.2-1/ChangeLog 2003-03-06 05:08:05.000000000 +0900 @@ -1,3 +1,7 @@ +2003-03-05 Jan Nieuwenhuizen + + * libs/type1/t1io.c (T1Open)[__CYGWIN__]: Bugfix: read binary mode. + Fri Feb 28 20:53:26 CET 2003 * portability fix for texk/kpathsea/cnf.c * pdftex version 1.10b diff -aurN tetex-src-2.0.2/Makefile.in tetex-bin-2.0.2-1/Makefile.in --- tetex-src-2.0.2/Makefile.in 2003-02-02 18:48:11.000000000 +0900 +++ tetex-bin-2.0.2-1/Makefile.in 2003-02-21 18:37:01.000000000 +0900 @@ -25,6 +25,7 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ scriptdir = $(bindir) +runscriptdir = @runscriptdir@ texmf = @texmfmain@ NCURSESDIR=libs/ncurses @@ -55,33 +56,33 @@ install: all for dir in $(ESUBDIRS); do \ echo making $@ in $$dir; \ - (cd $$dir && PATH=$(scriptdir):$(bindir):$(PATH) \ + (cd $$dir && PATH=$(runscriptdir):$(bindir):$(PATH) \ $(MAKE) $@) || exit 1; \ done $(srcdir)/selfautofix "$(bindir)" "$(texmf)/web2c" cd $(bindir); for i in $(ALLPROGS); do test -f $$i && echo strip $$i && strip $$i || true; done if test -f $(scriptdir)/mktexlsr; then \ - TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \ + TEXMFMAIN=$(texmf) PATH=$(runscriptdir):$(bindir):$(PATH) \ $(scriptdir)/mktexlsr; \ else :; fi if test -f $(scriptdir)/fmtutil; then \ - TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \ + TEXMFMAIN=$(texmf) PATH=$(runscriptdir):$(bindir):$(PATH) \ $(scriptdir)/fmtutil --all; \ else :; fi if test -f $(scriptdir)/texlinks; then \ - TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \ + TEXMFMAIN=$(texmf) PATH=$(runscriptdir):$(bindir):$(PATH) \ $(scriptdir)/texlinks; \ else :; fi install-exec: for dir in $(ESUBDIRS); do \ echo making $@ in $$dir; \ - (cd $$dir && PATH=$(scriptdir):$(bindir):$(PATH) \ + (cd $$dir && PATH=$(runscriptdir):$(bindir):$(PATH) \ $(MAKE) $@) || exit 1; \ done cd $(bindir); for i in $(ALLPROGS); do test -f $$i && echo strip $$i && strip $$i || true; done if test -f $(scriptdir)/texlinks; then \ - TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \ + TEXMFMAIN=$(texmf) PATH=$(runscriptdir):$(bindir):$(PATH) \ $(scriptdir)/texlinks; \ else :; fi diff -aurN tetex-src-2.0.2/autogen.sh tetex-bin-2.0.2-1/autogen.sh --- tetex-src-2.0.2/autogen.sh 1970-01-01 09:00:00.000000000 +0900 +++ tetex-bin-2.0.2-1/autogen.sh 2003-03-06 05:07:47.000000000 +0900 @@ -0,0 +1,18 @@ +#!/bin/sh + +set -x + +src=$(cd $(dirname $0); pwd) +# reautoconf is still broken in 2.0.1 +#PATH=/usr/bin:$PATH bash -x reautoconf +for i in $(find . -name configure.in -o -name configure.ac); do + cd $src + cd $(dirname $i) + rm -f configure + PATH=/usr/bin:$PATH autoconf2.13 -m $src/texk/etc/autoconf + +# || \ +# PATH=/usr/bin:$PATH autoconf2.50 --include $src/texk/etc/autoconf || \ +# PATH=/usr/bin:$PATH autoconf --include $src/texk/etc/autoconf || \ +# +done diff -aurN tetex-src-2.0.2/configure.in tetex-bin-2.0.2-1/configure.in --- tetex-src-2.0.2/configure.in 2003-02-01 09:34:34.000000000 +0900 +++ tetex-bin-2.0.2-1/configure.in 2003-02-21 18:31:05.000000000 +0900 @@ -49,6 +49,7 @@ sinclude(texk/kpathsea/xt.ac) sinclude(texk/web2c/withenable.ac) sinclude(texk/xdvik/withenable.ac) +sinclude(texk/cross.ac) sinclude(libs/libwww/withenable.ac) sinclude(libs/ncurses/withenable.ac) sinclude(libs/libpng/withenable.ac) diff -aurN tetex-src-2.0.2/libs/libwww/config/klibtool tetex-bin-2.0.2-1/libs/libwww/config/klibtool --- tetex-src-2.0.2/libs/libwww/config/klibtool 2002-11-11 18:43:05.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/libwww/config/klibtool 2003-02-21 18:31:05.000000000 +0900 @@ -215,7 +215,10 @@ args_STATIC_compile args_SHARED_compile args_STATIC_archive STATIC_ranlib args_SHARED_archive args_SHARED_link - SHARED_postinstall" + SHARED_postinstall + import_lib + shared_prefix + shared_postverext" for v in $config_vars; do # Preserve existing value of a couple variables. case $v in @@ -225,6 +228,9 @@ done test -z "$LIBTOOL_OBJTYPES" && LIBTOOL_OBJTYPES=STATIC shared_ext=so + import_lib= + shared_postverext= + shared_prefix=lib libpath_var=LD_LIBRARY_PATH STATIC_ranlib=$RANLIB @@ -313,11 +319,22 @@ SHARED_postinstall='ldconfig -m $libdir' ;; + *-cygwin*) + shared_support=true + args_SHARED_compile="-DKPSE_DLL" + SHARED_postinstall= + args_SHARED_archive='-shared -Wl,--image-base=0x10000000 -Wl,--out-implib,`eval echo $lib_base | sed -e ''s@${shared_prefix}@lib@'' -e s/[-.]\\\\\([0-9][0-9]*\\\\\)//g`.a' + shared_prefix=cyg + shared_ext= + shared_postverext=.dll + import_lib='`eval echo $libname | sed -e ''s@${shared_prefix}@lib@'' -e s/[-.]\\\\\([0-9][0-9]*\\\\\)//g`.a' + ;; + hppa*-*-hpux*) if test $compiler = gcc; then shared_support=true args_SHARED_archive='-shared -fPIC' - shared_ext='sl' + shared_ext='.sl' fi ;; @@ -412,7 +429,11 @@ $verbose "$0: running $0 version $newarg." verstring=`$0 version $newarg` $verbose "$0: got version $verstring." - libname=`echo $newarg | sed 's/\.a$/\.'$shared_ext$verstring/` + libname=`echo $newarg | sed 's/\.a$/$shared_ext$verstring/'` + if test "$shared_prefix" = "cyg"; then + verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)/-\1/g'` + libname=`echo $newarg | sed -e 's@lib@${shared_prefix}@' -e 's/\.a$/${verstring}${shared_postverext}/'` + fi else libname=$newarg fi @@ -430,7 +451,9 @@ # If it supports shared libraries, it supports symlinks. # Although this is unnecessary on (e.g.) SunOS, it # doesn't hurt, and it is necessary on (e.g.) Solaris. - post="&& rm -f $lib_base && ln -s $lib_basename $lib_base" + if test "$lib_basename" != "$lib_base"; then + post="&& rm -f $lib_base && ln -s $lib_basename $lib_base" + fi elif test $ot = STATIC; then ranlib=`eval echo '$'${ot}_ranlib` $verbose "${ot}_ranlib = $ranlib." @@ -609,7 +632,12 @@ case $ot in SHARED) # needs shared extension and version number. verstring=`$0 version $arg` - libname=`echo $arg | sed 's/\.la$/\.'$shared_ext$verstring/` + libname=`echo $arg | sed 's/\.la$/'$shared_ext$verstring/` + if test "$shared_prefix" = "cyg"; then + verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)/-\1/g'` + ##libname=`echo $arg | sed -e 's@/lib@/${shared_prefix}@' -e 's/\.la$/${shared_ext}${verstring}${shared_postverext}/'` + libname=`echo $arg | sed -e "s@/lib@/${shared_prefix}@" -e "s/\.la$/${shared_ext}${verstring}${shared_postverext}/"` + fi ;; STATIC) # just get rid of the `l'. libname=`echo $arg | sed 's/l\(.\)$/\1/'` @@ -630,7 +658,14 @@ # Link libfoo.so to libfoo.so.1.2.3. lib_base=`echo $lib_basename | sed 's/[.0-9]*$//'` $verbose "$0: linking $libdir/$lib_base to $lib_basename" - (cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base) + if test "$lib_base" != "$lib_basename"; then + (cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base) + fi + if test -n "$import_lib"; then + bindir="$libdir/../bin/" + cmd="${INSTALL_PROGRAM-cp} $libname $bindir/" + cmd="$cmd && ${INSTALL_DATA-cp} $import_lib $libdir/" + fi fi # # Run ldconfig, etc. diff -aurN tetex-src-2.0.2/libs/libwww/configure.in tetex-bin-2.0.2-1/libs/libwww/configure.in --- tetex-src-2.0.2/libs/libwww/configure.in 2003-01-26 03:02:14.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/libwww/configure.in 2003-02-22 23:31:49.000000000 +0900 @@ -111,7 +111,7 @@ fi AC_PATH_PROG(RM, rm, rm) -AC_PATH_PROG(AR, ar, ar) +AC_SUBST(AR) AC_PATH_PROG(MKDIR, mkdir, mkdir) AC_PATH_PROG(CHMOD, chmod, chmod) AC_PATH_PROG(CP, cp, cp) diff -aurN tetex-src-2.0.2/libs/type1/t1io.c tetex-bin-2.0.2-1/libs/type1/t1io.c --- tetex-src-2.0.2/libs/type1/t1io.c 2001-01-18 02:12:08.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/type1/t1io.c 2003-03-06 05:05:49.000000000 +0900 @@ -102,8 +102,7 @@ eexec_endOK=0; /* We know we are only reading */ - /* cygwin32 also needs the binary flag to be set */ -#if defined(MSDOS) | defined(_WIN32) | defined (__EMX__) +#if defined(MSDOS) | defined(_WIN32) | defined (__EMX__) | defined (__CYGWIN__) if ((of->fd=open(fn, O_RDONLY | O_BINARY)) < 0) return NULL; #else if ((of->fd=open(fn, O_RDONLY)) < 0) return NULL; diff -aurN tetex-src-2.0.2/libs/xpdf/configure.in tetex-bin-2.0.2-1/libs/xpdf/configure.in --- tetex-src-2.0.2/libs/xpdf/configure.in 2002-12-06 08:44:31.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/xpdf/configure.in 2003-02-22 23:32:26.000000000 +0900 @@ -50,7 +50,6 @@ dnl ##### Default values for Unix. EXE="" LIBPREFIX="lib" -AR="ar rc" UP_DIR="" dnl ##### Check for OS/2. @@ -82,6 +81,7 @@ AC_SUBST(EXE) AC_SUBST(LIBPREFIX) AC_SUBST(AR) +AC_SUBST(ARFLAGS) AC_SUBST(UP_DIR) dnl ##### Checks for header files. diff -aurN tetex-src-2.0.2/libs/xpdf/goo/Makefile.in tetex-bin-2.0.2-1/libs/xpdf/goo/Makefile.in --- tetex-src-2.0.2/libs/xpdf/goo/Makefile.in 2002-11-12 07:13:50.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/xpdf/goo/Makefile.in 2003-02-22 19:29:55.000000000 +0900 @@ -10,8 +10,8 @@ VPATH = @srcdir@ kpathsea_include_dir = -I$(srcdir)/../../../texk -I../../../texk -ALLCFLAGS = $(CFLAGS) @DEFS@ -I.. -I$(srcdir) -I. $(kpathsea_include_dir) -ALLCXXFLAGS = $(CXXFLAGS) @DEFS@ -I.. -I$(srcdir) -I. $(kpathsea_include_dir) +ALLCFLAGS = $(CFLAGS) @DEFS@ -I.. -I$(srcdir)/.. -I. -I$(srcdir) $(kpathsea_include_dir) +ALLCXXFLAGS = $(CXXFLAGS) @DEFS@ -I.. -I$(srcdir)/.. -I. -I$(srcdir) $(kpathsea_include_dir) CXXFLAGS = @CXXFLAGS@ CC = @CC@ CXX = @CXX@ diff -aurN tetex-src-2.0.2/libs/xpdf/libxpdf.ac tetex-bin-2.0.2-1/libs/xpdf/libxpdf.ac --- tetex-src-2.0.2/libs/xpdf/libxpdf.ac 2002-11-12 07:13:50.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/xpdf/libxpdf.ac 2003-02-23 03:52:38.000000000 +0900 @@ -3,7 +3,7 @@ LDLIBXPDF= LIBXPDFDEP= else - LIBXPDFCPPFLAGS='-I$(LIBXPDFDIR) -I$(LIBXPDFDIR)/xpdf -I$(LIBXPDFDIR)/goo -I$(LIBXPDFSRCDIR)/xpdf -I$(LIBXPDFSRCDIR)/goo' + LIBXPDFCPPFLAGS='-I$(LIBXPDFDIR) -I$(LIBXPDFDIR)/xpdf -I$(LIBXPDFDIR) -I$(LIBXPDFDIR)/goo -I$(LIBXPDFSRCDIR)/xpdf -I$(LIBXPDFSRCDIR) -I$(LIBXPDFSRCDIR)/goo' LDLIBXPDF='$(LIBXPDFDIR)/xpdf/libxpdf.a $(LIBXPDFDIR)/goo/libGoo.a' LIBXPDFDEP='$(LIBXPDFDIR)/xpdf/libxpdf.a $(LIBXPDFDIR)/goo/libGoo.a' fi diff -aurN tetex-src-2.0.2/libs/xpdf/xpdf/Makefile.in tetex-bin-2.0.2-1/libs/xpdf/xpdf/Makefile.in --- tetex-src-2.0.2/libs/xpdf/xpdf/Makefile.in 2002-12-10 19:33:37.000000000 +0900 +++ tetex-bin-2.0.2-1/libs/xpdf/xpdf/Makefile.in 2003-02-21 19:24:42.000000000 +0900 @@ -15,7 +15,7 @@ goodir = $(srcdir)/../goo CXXFLAGS = @CXXFLAGS@ -ALLCXXFLAGS = $(CXXFLAGS) @DEFS@ $(XCFLAGS) -I.. -I$(goodir) -I. -I$(srcdir) -DPDF_PARSER_ONLY -DNO_DECRYPTION +ALLCXXFLAGS = $(CXXFLAGS) @DEFS@ $(XCFLAGS) -I.. -I$(goodir) -I. -I$(srcdir) -I$(srcdir)/.. -DPDF_PARSER_ONLY -DNO_DECRYPTION CXX = @CXX@ diff -aurN tetex-src-2.0.2/strip tetex-bin-2.0.2-1/strip --- tetex-src-2.0.2/strip 1970-01-01 09:00:00.000000000 +0900 +++ tetex-bin-2.0.2-1/strip 2003-03-06 05:07:51.000000000 +0900 @@ -0,0 +1,2 @@ +#!/bin/sh +echo NOT stripping: $* diff -aurN tetex-src-2.0.2/texk/ChangeLog tetex-bin-2.0.2-1/texk/ChangeLog --- tetex-src-2.0.2/texk/ChangeLog 2003-01-28 18:48:48.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/ChangeLog 2003-03-05 08:36:05.000000000 +0900 @@ -1,3 +1,13 @@ +2003-03-04 Jan Nieuwenhuizen + + * xdvik/font-open.c (font_open): Use FOPEN_RBIN_MODE for opening + binary files (was FOPEN_R_MODE). This fixes reading of dvi and pk + files from Cygwin textmode mounts. + + * xdvik/xdvi.h (OPEN_MODE): Use FOPEN_RBIN_MODE (was + FOPEN_R_MODE). This fixes reading of dvi and pk files from Cygwin + textmode mounts. + 2003-01-28 Olaf Weber * etc/texinfo.tex: Update to 2003-01-24.17 diff -aurN tetex-src-2.0.2/texk/configure.in tetex-bin-2.0.2-1/texk/configure.in --- tetex-src-2.0.2/texk/configure.in 2003-01-14 02:32:40.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/configure.in 2003-02-21 18:31:12.000000000 +0900 @@ -34,6 +34,7 @@ dnl will show all the options. sinclude(acklibtool.m4) sinclude(withenable.ac) +sinclude(cross) sinclude(kpathsea/withenable.ac) sinclude(web2c/withenable.ac) sinclude(xdvik/withenable.ac) diff -aurN tetex-src-2.0.2/texk/cross.ac tetex-bin-2.0.2-1/texk/cross.ac --- tetex-src-2.0.2/texk/cross.ac 1970-01-01 09:00:00.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/cross.ac 2003-02-23 00:47:16.000000000 +0900 @@ -0,0 +1,83 @@ +dnl cross.ac: cross compilation stuff -*-autoconf-*- + +## Cross building +if test "$cross_compiling" = "yes"; then + AC_MSG_CHECKING(cc for build) + ## /usr/bin/cc still uses wrong assembler + ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}" + CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}" +else + CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" +fi +AC_ARG_WITH(cc-for-build, + [ --with-cc-for-build=CC native C compiler, to be used during build]) +test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build" + +## AC_MSG_CHECKING("if we are cross compiling") +## AC_MSG_RESULT($cross_compiling) +if test "$cross_compiling" = "yes"; then + AC_MSG_RESULT($CC_FOR_BUILD) +fi + +## No need as yet to be more elaborate +CCLD_FOR_BUILD="$CC_FOR_BUILD" + +AC_SUBST(cross_compiling) +AC_SUBST(CC_FOR_BUILD) +AC_SUBST(CCLD_FOR_BUILD) + +if test "$cross_compiling" = "yes"; then + for_build='-for-build' + runscriptdir=/usr/bin + AC_PATH_PROG(CTANGLE, ctangle, /usr/bin/ctangle) + AC_PATH_PROG(DVIPS, dvips, /usr/bin/dvips) + AC_PATH_PROG(ETEX, etex, /usr/bin/etex) + AC_PATH_PROG(KPSEWHICH, kpsewhich, /usr/bin/kpsewhich) + AC_PATH_PROG(MF, mf, /usr/bin/mf) + AC_PATH_PROG(MPOST, mpost, /usr/bin/mpost) + AC_PATH_PROG(OMEGA, omega, /usr/bin/omega) + AC_PATH_PROG(OTANGLE, otangle, /usr/bin/otangle) + AC_PATH_PROG(PDFETEX, pdfetex, /usr/bin/pdfetex) + AC_PATH_PROG(PDFTEX, pdftex, /usr/bin/pdftex) + AC_PATH_PROG(PLTOTF, pltotf, /usr/bin/pltotf) + AC_PATH_PROG(TANGLE, tangle, /usr/bin/tangle) + AC_PATH_PROG(TEX, tex, /usr/bin/tex) + AC_PATH_PROG(TFTOPL, tftopl, /usr/bin/tftopl) + AC_PATH_PROG(TIE, tie, /usr/bin/tie) +else + for_build= + runscriptdir='$(bindir)' + CTANGLE=./ctangle + DVIPS=./dvips + ETEX=./etex + KPSEWHICH='$(kpathsea_dir)/kpsewhich' + MF=./mf + MPOST=./mpost + OMEGA=./omega + OTANGLE=./otangle + PDFETEX=./pdfetex + PDFTEX=./pdftex + PLTOTF=./pltotf + TANGLE=./tangle + TEX=./tex + TFTOPL=./tftopl + TIE=./tie +fi + +AC_SUBST(for_build) +AC_SUBST(runscriptdir) +AC_SUBST(CTANGLE) +AC_SUBST(DVIPS) +AC_SUBST(ETEX) +AC_SUBST(KPSEWHICH) +AC_SUBST(MF) +AC_SUBST(MPOST) +AC_SUBST(OMEGA) +AC_SUBST(OTANGLE) +AC_SUBST(PDFETEX) +AC_SUBST(PDFTEX) +AC_SUBST(PLTOTF) +AC_SUBST(TANGLE) +AC_SUBST(TEX) +AC_SUBST(TFTOPL) +AC_SUBST(TIE) diff -aurN tetex-src-2.0.2/texk/dviljk/configure.in tetex-bin-2.0.2-1/texk/dviljk/configure.in --- tetex-src-2.0.2/texk/dviljk/configure.in 1999-02-09 06:42:01.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/dviljk/configure.in 2003-02-21 18:31:12.000000000 +0900 @@ -9,6 +9,7 @@ AC_PROG_LN_S sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) dnl These tests prevent reliable cross-compilation. Sigh. AC_C_CHAR_UNSIGNED diff -aurN tetex-src-2.0.2/texk/dvipsk/Makefile.in tetex-bin-2.0.2-1/texk/dvipsk/Makefile.in --- tetex-src-2.0.2/texk/dvipsk/Makefile.in 2003-02-01 03:07:46.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/dvipsk/Makefile.in 2003-02-21 18:31:12.000000000 +0900 @@ -19,12 +19,14 @@ ac_include ../make/texi.mk prog_cflags = -DUNIX -DKPATHSEA -DNeedFunctionPrototypes -DSHIFTLOWCHARS +DVIPS = @DVIPS@ + # The `t[mp]-' business is so that we don't create an empty .pro file, # if running squeeze fails for some reason. A dependency on squeeze # fails here, so we include it below. .SUFFIXES: .pro .lpro .lpro.pro: - ./squeeze <$< >t-$@ + ./squeeze$(for-build) <$< >t-$@ mv t-$@ $@ prologues = tex.pro texps.pro texc.pro special.pro finclude.pro \ color.pro crop.pro hps.pro @@ -45,11 +47,11 @@ $(kpathsea_link) $(objects) $(LOADLIBES) afm2tfm: $(kpathsea) afm2tfm.o $(kpathsea_link) afm2tfm.o $(LOADLIBES) -# Omit LOADLIBES since no need to dynamically link with kpathsea. squeeze: squeeze.o $(link_command) squeeze.o $(LIBS) $(XLOADLIBES) +squeeze-for-build: squeeze$(for-build).o -$(prologues): squeeze +$(prologues): squeeze$(for-build) texc.lpro: texc.script tex.lpro $(SHELL) $(srcdir)/texc.script $(srcdir)/tex.lpro $@ @@ -59,11 +61,11 @@ rm -f mtest.ps -(TFMFONTS=$(srcdir)/testdata: VFFONTS=$(srcdir)/testdata: \ TEXPSHEADERS=$(srcdir)/testdata TEXCONFIG=$(srcdir)/testdata \ - ./dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o dvipstst.ps) + $(DVIPS) -D 300 $(srcdir)/testdata/dvipstst.xdv -o dvipstst.ps) mv dvipstst.ps mtest.ps -(TFMFONTS=$(srcdir)/testdata: VFFONTS=$(srcdir)/testdata: \ TEXPSHEADERS=$(srcdir)/testdata: TEXCONFIG=$(srcdir)/testdata: \ - ./dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o) + $(DVIPS) -D 300 $(srcdir)/testdata/dvipstst.xdv -o) -diff $(srcdir)/testdata/dvipstst.xps dvipstst.ps install: install-exec install-data diff -aurN tetex-src-2.0.2/texk/dvipsk/configure.in tetex-bin-2.0.2-1/texk/dvipsk/configure.in --- tetex-src-2.0.2/texk/dvipsk/configure.in 2002-02-01 04:59:19.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/dvipsk/configure.in 2003-02-21 18:31:12.000000000 +0900 @@ -13,6 +13,7 @@ sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) dnl These tests prevent reliable cross-compilation. Sigh. dnl Some special hacks are used to make cross-compilation diff -aurN tetex-src-2.0.2/texk/etc/autoconf/acsite.m4 tetex-bin-2.0.2-1/texk/etc/autoconf/acsite.m4 --- tetex-src-2.0.2/texk/etc/autoconf/acsite.m4 1998-03-04 22:19:45.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/etc/autoconf/acsite.m4 2003-02-21 18:31:12.000000000 +0900 @@ -15,7 +15,7 @@ dnl Check if gcc asm for i386 needs external symbols with an underscore. dnl Peter Breitenlohner, April 15, 1996. -undefine([pb_AC_ASM_UNDERSCORE]) +# undefine([pb_AC_ASM_UNDERSCORE]) AC_DEFUN(pb_AC_ASM_UNDERSCORE, [AC_REQUIRE_CPP()dnl AC_CACHE_CHECK(whether gcc asm needs underscore, pb_cv_asm_underscore, diff -aurN tetex-src-2.0.2/texk/etc/autoconf/acspecific.m4 tetex-bin-2.0.2-1/texk/etc/autoconf/acspecific.m4 --- tetex-src-2.0.2/texk/etc/autoconf/acspecific.m4 2003-02-18 15:46:57.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/etc/autoconf/acspecific.m4 2003-03-06 03:32:16.000000000 +0900 @@ -117,43 +117,6 @@ fi ]) -AC_DEFUN(AC_PROG_CXX, -[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl -AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) - -AC_PROG_CXX_WORKS -AC_PROG_CXX_GNU - -if test $ac_cv_prog_gxx = yes; then - GXX=yes -else - GXX= -fi - -dnl Check whether -g works, even if CXXFLAGS is set, in case the package -dnl plays around with CXXFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -AC_PROG_CXX_G -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -]) - dnl Determine a Fortran 77 compiler to use. If `F77' is not already set dnl in the environment, check for `g77', `f77' and `f2c', in that order. dnl Set the output variable `F77' to the name of the compiler found. @@ -2689,6 +2652,44 @@ AC_SUBST(X_EXTRA_LIBS)dnl ]) +dnl Check for C++. Do this after checking all libraries -- jcn +AC_DEFUN(AC_PROG_CXX, +[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl +AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) + +AC_PROG_CXX_WORKS +AC_PROG_CXX_GNU + +if test $ac_cv_prog_gxx = yes; then + GXX=yes +else + GXX= +fi + +dnl Check whether -g works, even if CXXFLAGS is set, in case the package +dnl plays around with CXXFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +AC_PROG_CXX_G +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +]) + dnl The old Cygwin32 macro is deprecated. AC_DEFUN(AC_CYGWIN32, [AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl @@ -2779,11 +2780,15 @@ ac_exeext=$EXEEXT AC_SUBST(EXEEXT)]) + +dnl This is completely and utterly broken -- jcn +dnl Non-autoconf functions should not be prefixed 'AC_' anyway + dnl Unset CC to run configure with cross compiler. -AC_DEFUN(AC_UNSET_CC, [ +AC_DEFUN(BROKEN_AC_UNSET_CC, [ ZZ= if test "$cross_compiling" = yes && - (test "x$CC" = "xdos-gcc" || test "x$CC" = "xi386-mingw32-gcc" || test "x$CC" = "xgnuwin32gcc") ; then + (test "x$CC" = "xdos-gcc" || test "x$CC" = "xi386-mingw32-gcc" || test "x$CC" = "xgnuwin32gcc") ; then ZZ=$CC unset CC cross_compiling=no @@ -2791,13 +2796,16 @@ ]) dnl Restore CC that has been unset by AC_UNSET_CC -AC_DEFUN(AC_RESET_CC, [ +AC_DEFUN(BROKEN_AC_RESET_CC, [ if test "x$ZZ" = "xdos-gcc" || test "x$ZZ" = "xi386-mingw32-gcc" || test "x$ZZ" = "xgnuwin32gcc" ; then CC=$ZZ cross_compiling=yes fi ]) +AC_DEFUN(AC_UNSET_CC, true) +AC_DEFUN(AC_RESET_CC, true) + dnl ### Checks for UNIX variants dnl These are kludges which should be replaced by a single POSIX check. diff -aurN tetex-src-2.0.2/texk/gsftopk/configure.in tetex-bin-2.0.2-1/texk/gsftopk/configure.in --- tetex-src-2.0.2/texk/gsftopk/configure.in 1999-04-22 14:53:37.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/gsftopk/configure.in 2003-02-21 18:31:12.000000000 +0900 @@ -9,6 +9,7 @@ AC_PROG_LN_S sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) dnl Checks for header files. AC_HEADER_SYS_WAIT diff -aurN tetex-src-2.0.2/texk/klibtool tetex-bin-2.0.2-1/texk/klibtool --- tetex-src-2.0.2/texk/klibtool 2002-11-11 18:43:05.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/klibtool 2003-02-23 19:20:13.000000000 +0900 @@ -15,7 +15,7 @@ # os's (like multiple version compatibility, encoding directory paths in # the binary, etc.) See the configure mode. I can send you the # hello,world Makefile I used for testing if you want it. -# +# rcs_version='$Id: klibtool,v 1.11 2002/11/11 09:43:05 olaf Exp $' version=0.1 maint=tex-k@mail.tug.org @@ -215,7 +215,10 @@ args_STATIC_compile args_SHARED_compile args_STATIC_archive STATIC_ranlib args_SHARED_archive args_SHARED_link - SHARED_postinstall" + SHARED_postinstall + import_lib + shared_prefix + shared_postverext" for v in $config_vars; do # Preserve existing value of a couple variables. case $v in @@ -224,7 +227,10 @@ esac done test -z "$LIBTOOL_OBJTYPES" && LIBTOOL_OBJTYPES=STATIC - shared_ext=so + shared_ext='.so' + import_lib= + shared_postverext= + shared_prefix=lib libpath_var=LD_LIBRARY_PATH STATIC_ranlib=$RANLIB @@ -313,11 +319,22 @@ SHARED_postinstall='ldconfig -m $libdir' ;; + *-cygwin*) + shared_support=true + args_SHARED_compile="-DKPSE_DLL" + SHARED_postinstall= + args_SHARED_archive='-shared -Wl,--image-base=0x10000000 -Wl,--out-implib,`eval echo $lib_base | sed -e ''s@${shared_prefix}@lib@'' -e s/[-.]\\\\\([0-9][0-9]*\\\\\)//g`.a' + shared_prefix=cyg + shared_ext= + shared_postverext=.dll + import_lib='`eval echo $libname | sed -e ''s@${shared_prefix}@lib@'' -e s/[-.]\\\\\([0-9][0-9]*\\\\\)//g`.a' + ;; + hppa*-*-hpux*) if test $compiler = gcc; then shared_support=true args_SHARED_archive='-shared -fPIC' - shared_ext='sl' + shared_ext='.sl' fi ;; @@ -412,7 +429,17 @@ $verbose "$0: running $0 version $newarg." verstring=`$0 version $newarg` $verbose "$0: got version $verstring." - libname=`echo $newarg | sed 's/\.a$/\.'$shared_ext$verstring/` + libname=`echo $newarg | sed 's/\.a$/$shared_ext$verstring/'` + if test "$shared_prefix" = "cyg"; then + #bleh, only major version for windows + #major-minor-revision + #verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)/-\1/g'` + #major-minor + #verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)[.]\([0-9][0-9]*\)[.]\([0-9][0-9]*\)/-\1-\2/'` + #major + verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)\([.][0-9][0-9]*\)*/-\1/'` + libname=`echo $newarg | sed -e 's@lib@${shared_prefix}@' -e 's/\.a$/${verstring}${shared_postverext}/'` + fi else libname=$newarg fi @@ -430,7 +457,9 @@ # If it supports shared libraries, it supports symlinks. # Although this is unnecessary on (e.g.) SunOS, it # doesn't hurt, and it is necessary on (e.g.) Solaris. - post="&& rm -f $lib_base && ln -s $lib_basename $lib_base" + if test "$lib_basename" != "$lib_base"; then + post="&& rm -f $lib_base && ln -s $lib_basename $lib_base" + fi elif test $ot = STATIC; then ranlib=`eval echo '$'${ot}_ranlib` $verbose "${ot}_ranlib = $ranlib." @@ -609,7 +638,17 @@ case $ot in SHARED) # needs shared extension and version number. verstring=`$0 version $arg` - libname=`echo $arg | sed 's/\.la$/\.'$shared_ext$verstring/` + libname=`echo $arg | sed 's/\.la$/'$shared_ext$verstring/` + if test "$shared_prefix" = "cyg"; then + #bleh, only major version for windows + #major-minor-revision + #verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)/-\1/g'` + #major-minor + #verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)[.]\([0-9][0-9]*\)[.]\([0-9][0-9]*\)/-\1-\2/'` + #major + verstring=`echo ${verstring} | sed -e 's/[.]\([0-9][0-9]*\)\([.][0-9][0-9]*\)*/-\1/'` + libname=`echo $arg | sed -e "s@/lib@/${shared_prefix}@" -e "s/\.la$/${shared_ext}${verstring}${shared_postverext}/"` + fi ;; STATIC) # just get rid of the `l'. libname=`echo $arg | sed 's/l\(.\)$/\1/'` @@ -630,7 +669,14 @@ # Link libfoo.so to libfoo.so.1.2.3. lib_base=`echo $lib_basename | sed 's/[.0-9]*$//'` $verbose "$0: linking $libdir/$lib_base to $lib_basename" - (cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base) + if test "$lib_base" != "$lib_basename"; then + (cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base) + fi + if test -n "$import_lib"; then + bindir="$libdir/../bin/" + cmd="${INSTALL_PROGRAM-cp} $libname $bindir/" + cmd="$cmd && ${INSTALL_DATA-cp} $import_lib $libdir/" + fi fi # # Run ldconfig, etc. diff -aurN tetex-src-2.0.2/texk/kpathsea/Makefile.in tetex-bin-2.0.2-1/texk/kpathsea/Makefile.in --- tetex-src-2.0.2/texk/kpathsea/Makefile.in 2003-02-16 02:21:42.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/Makefile.in 2003-02-21 18:31:12.000000000 +0900 @@ -36,7 +36,7 @@ KPATHSEA_CC = $(LIBTOOL) compile "$(CC)" .SUFFIXES: .lo .c.lo: - $(KPATHSEA_CC) $< $(ALL_CFLAGS) + $(KPATHSEA_CC) $< $(ALL_CFLAGS) -DMAKE_KPSE_DLL default all: kpsewhich kpsestat access readlink $(library).info manfiles diff -aurN tetex-src-2.0.2/texk/kpathsea/c-pathch.h tetex-bin-2.0.2-1/texk/kpathsea/c-pathch.h --- tetex-src-2.0.2/texk/kpathsea/c-pathch.h 2001-11-12 16:45:59.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/c-pathch.h 2003-02-21 18:31:12.000000000 +0900 @@ -70,10 +70,23 @@ #ifndef NAME_BEGINS_WITH_DEVICE #define NAME_BEGINS_WITH_DEVICE(name) 0 #endif + +#if defined (__CYGWIN__) && 0 +#define IS_UNC_NAME(name) (strlen (name) >= 3 && IS_DIR_SEP (*name) \ + && IS_DIR_SEP (*(name+1)) \ + && (IS_DIR_SEP (*(name+2)) || isalnum(*(name+2)))) +#endif + #ifndef IS_UNC_NAME /* Unc names are in practice found on Win32 only. */ #define IS_UNC_NAME(name) 0 #endif +#ifdef WIN32 +# define DEVICE_SEP_LEN 1 +#else +# define DEVICE_SEP_LEN 0 +#endif + /* What separates elements in environment variable path lists? */ #ifndef ENV_SEP #ifdef VMS diff -aurN tetex-src-2.0.2/texk/kpathsea/c-proto.h tetex-bin-2.0.2-1/texk/kpathsea/c-proto.h --- tetex-src-2.0.2/texk/kpathsea/c-proto.h 2001-11-18 07:14:56.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/c-proto.h 2003-02-21 18:31:12.000000000 +0900 @@ -19,21 +19,26 @@ #ifndef KPATHSEA_C_PROTO_H #define KPATHSEA_C_PROTO_H -#if defined(WIN32) -#ifdef KPSE_DLL +#define KPSE_DLL + +#if (defined (WIN32) || defined (__CYGWIN__)) && defined (KPSE_DLL) #ifdef MAKE_KPSE_DLL -#define KPSEDLL __declspec( dllexport) -#else -#define KPSEDLL __declspec( dllimport) -#endif -#else +#ifdef __CYGWIN__ #define KPSEDLL +#define KPSEDLL_EXPORT +#else /* ! CYGWIN */ +#define KPSEDLL +#define KPSEDLL_EXPORT __declspec(dllexport) +#endif /* ! CYGWIN */ +#else /* ! MAKE_KPSE_DLL */ +#define KPSEDLL __declspec(dllimport) +#define KPSEDLL_EXPORT #endif -#else /* ! WIN32 */ +#else /* ( !WIN32 && ! __CYGWIN__) || ! KPSE_DLL */ #define KPSEDLL +#define KPSEDLL_EXPORT #endif - /* These macros munge function declarations to make them work in both cases. The P?H macros are used for declarations, the P?C for definitions. Cf. from the GNU C library. P1H(void) diff -aurN tetex-src-2.0.2/texk/kpathsea/config.h tetex-bin-2.0.2-1/texk/kpathsea/config.h --- tetex-src-2.0.2/texk/kpathsea/config.h 2003-01-25 04:43:55.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/config.h 2003-02-21 18:31:12.000000000 +0900 @@ -33,10 +33,10 @@ #endif /* If we have either DOS or OS2, we are DOSISH. */ -#if defined(__i386_pc_gnu__) || \ - defined(OS2) || \ +#if !defined (__CYGWIN__) && \ + (defined(OS2) || \ defined(MSDOS) || defined(__MSDOS__) || defined(DOS) || \ - defined(WIN32) || defined(__WIN32__) || defined(_WIN32) + defined(WIN32) || defined(__WIN32__) || defined(_WIN32)) #define DOSISH #endif diff -aurN tetex-src-2.0.2/texk/kpathsea/elt-dirs.c tetex-bin-2.0.2-1/texk/kpathsea/elt-dirs.c --- tetex-src-2.0.2/texk/kpathsea/elt-dirs.c 2001-10-23 06:31:30.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/elt-dirs.c 2003-02-21 18:31:12.000000000 +0900 @@ -357,6 +357,7 @@ handle well filenames like c://dir/foo. So canonicalize the names. The resulting name will always be shorter than the one passed, so no problem. + - Similarly for Cygwin, re(mem)move multiple leading slashes. - If possible, we merely skip multiple leading slashes to prevent expanding from the root of a UNIX filesystem tree. */ @@ -365,7 +366,7 @@ { unsigned ret; unsigned i; - + if (NAME_BEGINS_WITH_DEVICE(elt)) { if (*elt >= 'A' && *elt <= 'Z') *elt += 'a' - 'A'; @@ -375,15 +376,38 @@ memmove(elt+3, elt+i, strlen(elt+i) + 1); ret = 2; } else if (IS_UNC_NAME(elt)) { - for (ret = 2; elt[ret] && !IS_DIR_SEP(elt[ret]); ++ret) + for (ret = 1 + DEVICE_SEP_LEN; elt[ret] && !IS_DIR_SEP(elt[ret]); ++ret) ; for (i = ret; elt[i] && IS_DIR_SEP(elt[i]); ++i) ; - if (i > ret+1) - memmove(elt+ret+1, elt+i, strlen(elt+i) + 1); + if (i > ret + DEVICE_SEP_LEN) + memmove(elt+ret+DEVICE_SEP_LEN, elt+i, strlen(elt+i) + 1); } else { + char* p; for (ret = 0; IS_DIR_SEP(elt[ret]); ++ret) ; +#ifdef __CYGWIN__ + /* We've got a dilemma here. + + Currently, things like //share/texmf-local and //texmf/web2c + get expanded; which is clearly wrong: those are UNC paths, + and trigger hostname lookups. + + Otoh, something like //texserver/c/cygwin/usr/share/texmf// + would be perfectly valid, and should not get collapsed to + /texserver/c/...; but we should also not start a recursive + search at //texserver. So we collapse UNC prefixes, unless + evironment var KPSE_SEARCH_UNC is set. + + It doesn't seem a brilliant idea to overload the use of //, + in this case meaning recursive search. Using another + character, like /usr/share/texmf/@, would probably cause less + trouble. --jcn */ + + p = getenv ("KPSE_SEARCH_UNC"); + if (ret > 1 && !(p && strcasecmp (p, "no"))) + memmove(elt, elt+ret-1, strlen(elt+ret) + 1); +#endif } if (KPSE_DEBUG_P (KPSE_DEBUG_STAT)) diff -aurN tetex-src-2.0.2/texk/kpathsea/getopt.h tetex-bin-2.0.2-1/texk/kpathsea/getopt.h --- tetex-src-2.0.2/texk/kpathsea/getopt.h 2000-04-04 04:35:25.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/getopt.h 2003-02-21 18:31:12.000000000 +0900 @@ -26,17 +26,26 @@ #ifndef __STDC__ #define __STDC__ 1 #endif -#if defined (KPSE_DLL) || defined (GNUW32_DLL) -#if defined (MAKE_KPSE_DLL) || defined (MAKE_GNUW32_DLL) -#define KPSEDLL __declspec( dllexport) -#else -#define KPSEDLL __declspec( dllimport) #endif -#else + +#define KPSE_DLL + +#if (defined (WIN32) || defined (__CYGWIN__)) && defined (KPSE_DLL) +#ifdef MAKE_KPSE_DLL +#ifdef __CYGWIN__ +#define KPSEDLL +#define KPSEDLL_EXPORT +#else /* ! CYGWIN */ #define KPSEDLL +#define KPSEDLL_EXPORT __declspec(dllexport) +#endif /* ! CYGWIN */ +#else /* ! MAKE_KPSE_DLL */ +#define KPSEDLL __declspec(dllimport) +#define KPSEDLL_EXPORT #endif -#else /* ! WIN32 */ +#else /* ( !WIN32 && ! __CYGWIN__) || ! KPSE_DLL */ #define KPSEDLL +#define KPSEDLL_EXPORT #endif #ifdef __cplusplus diff -aurN tetex-src-2.0.2/texk/kpathsea/mktex.opt tetex-bin-2.0.2-1/texk/kpathsea/mktex.opt --- tetex-src-2.0.2/texk/kpathsea/mktex.opt 2002-10-23 03:33:24.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/mktex.opt 2003-02-21 18:31:12.000000000 +0900 @@ -26,7 +26,11 @@ # MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate # directories in path lists whereas Unix uses `:'. # Create a variable that holds the right character to be used by the scripts. -if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) ;; + *) if test -n "$COMSPEC" -o -n "$ComSpec"; then DOSISH=yes; fi +esac +if test -z "$DOSISH" -o "$DOSISH" = "no"; then SEP=':'; else SEP=';'; fi # TEMPDIR needs to be unique to each process because of the possibility of two # people running dvips (or whatever) simultaneously. @@ -91,10 +95,10 @@ # Possible features: appendonlydir dosnames fontmaps nomfdrivers nomode # stripsupplier striptypeface varfonts. -if test -n "$COMSPEC"; then - : ${MT_FEATURES=appendonlydir:dosnames} -else +if test -z "$DOSISH" -o "$DOSISH" = "no"; then : ${MT_FEATURES=appendonlydir} +else + : ${MT_FEATURES=appendonlydir:dosnames} fi : ${MODE=ljfour} : ${BDPI=600} diff -aurN tetex-src-2.0.2/texk/kpathsea/mktexlsr tetex-bin-2.0.2-1/texk/kpathsea/mktexlsr --- tetex-src-2.0.2/texk/kpathsea/mktexlsr 2002-10-23 03:34:07.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/mktexlsr 2003-02-21 18:31:12.000000000 +0900 @@ -25,7 +25,11 @@ # MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate # directories in path lists whereas Unix uses `:'. # Create a variable that holds the right character to be used by the scripts. -if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) ;; + *) if test -n "$COMSPEC" -o -n "$ComSpec"; then DOSISH=yes; fi +esac +if test -z "$DOSISH" -o "$DOSISH" = "no"; then SEP=':'; else SEP=';'; fi # Add the location of the script to the PATH if necessary. This must # be done before kpsewhich can be called, and thus cannot be put into diff -aurN tetex-src-2.0.2/texk/kpathsea/pathsearch.c tetex-bin-2.0.2-1/texk/kpathsea/pathsearch.c --- tetex-src-2.0.2/texk/kpathsea/pathsearch.c 2002-12-13 22:50:01.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/pathsearch.c 2003-02-21 18:31:12.000000000 +0900 @@ -376,16 +376,20 @@ } } -#define TEXFONTS "/usr/local/lib/tex/fonts" +#define TEXFONTS "/usr/share/texmf/fonts" int main () { +#ifdef __CYGWIN__ + kpse_set_progname (argv[0]); +#endif + /* All lists end with NULL. */ test_path_search (".", "nonexistent"); test_path_search (".", "/nonexistent"); test_path_search ("/k" ENV_SEP_STRING ".", "kpathsea.texi"); - test_path_search ("/k" ENV_SEP_STRING ".", "/etc/fstab"); + test_path_search ("/k" ENV_SEP_STRING ".", "/etc/profile"); test_path_search ("." ENV_SEP_STRING TEXFONTS "//", "cmr10.tfm"); test_path_search ("." ENV_SEP_STRING TEXFONTS "//", "logo10.tfm"); test_path_search (TEXFONTS "//times" ENV_SEP_STRING "." diff -aurN tetex-src-2.0.2/texk/kpathsea/version.c tetex-bin-2.0.2-1/texk/kpathsea/version.c --- tetex-src-2.0.2/texk/kpathsea/version.c 1999-01-27 05:34:19.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/version.c 2003-02-21 18:31:12.000000000 +0900 @@ -1,7 +1,7 @@ #include "c-auto.h" #include -KPSEDLL char *kpathsea_version_string = (char *) KPSEVERSION; +KPSEDLL_EXPORT char *kpathsea_version_string = (char *) KPSEVERSION; /* If you are redistributing a modified version of my original distribution, please change this address. @@ -11,5 +11,5 @@ Thanks. --kb@cs.umb.edu */ -KPSEDLL char *kpse_bug_address = (char *) +KPSEDLL_EXPORT char *kpse_bug_address = (char *) "Email bug reports to tex-k@mail.tug.org.\n"; diff -aurN tetex-src-2.0.2/texk/kpathsea/xdirname.c tetex-bin-2.0.2-1/texk/kpathsea/xdirname.c --- tetex-src-2.0.2/texk/kpathsea/xdirname.c 2001-11-18 06:33:10.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/kpathsea/xdirname.c 2003-02-21 18:31:12.000000000 +0900 @@ -37,7 +37,7 @@ if (NAME_BEGINS_WITH_DEVICE(name)) { limit = 2; -#ifdef WIN32 +#if defined (WIN32) || defined (__CYGWIN__) } else if (IS_UNC_NAME(name)) { for (limit = 2; name[limit] && !IS_DIR_SEP(name[limit]); limit++) ; diff -aurN tetex-src-2.0.2/texk/make/common.mk tetex-bin-2.0.2-1/texk/make/common.mk --- tetex-src-2.0.2/texk/make/common.mk 2003-01-25 04:22:12.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/make/common.mk 2003-02-23 01:20:50.000000000 +0900 @@ -49,4 +49,41 @@ @MAINT@XDEFS = -Wpointer-arith $(warn_more) @MAINT@CFLAGS = -g $(XCFLAGS) @MAINT@endif + + + +## Cross build stuff -- jcn + +cross_compiling = @cross_compiling@ +for-build = @for_build@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CCLD_FOR_BUILD = @CCLD_FOR_BUILD@ +CFLAGS_FOR_BUILD = '-Duexit=exit' $(ALL_CFLAGS) + + +## Override default rule; this should be compiled for BUILD host. +%-for-build.o: %.c + if [ "$(cross_compiling)" = "yes" ]; then \ + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o $@ $<; \ + else \ + $(compile) $<; \ + fi + +## Override default rule; this should run on BUILD host. +%-for-build: %-for-build.o + @rm -f $@ + if [ "$(cross_compiling)" = "yes" ]; then \ + $(CCLD_FOR_BUILD) -o $@ $< $(LOADLIBES_FOR_BUILD); \ + else \ + $(kpathsea_link) $< $(LOADLIBES); \ + fi + +%: %.exe + cp -f $< $@ + +%-for-build: %-for-build.exe + cp -f $< $@ + + + # End of common.mk. diff -aurN tetex-src-2.0.2/texk/make/library.mk tetex-bin-2.0.2-1/texk/make/library.mk --- tetex-src-2.0.2/texk/make/library.mk 1999-02-04 19:41:49.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/make/library.mk 2003-02-22 23:32:52.000000000 +0900 @@ -1,5 +1,7 @@ # library.mk -- stuff only useful for libraries. AR = @AR@ -ARFLAGS = @ARFLAGS@ +# @ARFLAGS@ does not get substituted by default configure script +# ARFLAGS = @ARFLAGS@ +ARFLAGS = rc RANLIB = @RANLIB@ # End of library.mk. diff -aurN tetex-src-2.0.2/texk/make/programs.mk tetex-bin-2.0.2-1/texk/make/programs.mk --- tetex-src-2.0.2/texk/make/programs.mk 2001-10-27 19:21:12.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/make/programs.mk 2003-02-21 18:31:12.000000000 +0900 @@ -7,7 +7,8 @@ # proglib is for web2c; # XLOADLIBES is for the installer. LIBS = @LIBS@ -LOADLIBES = $(proglib) $(kpathsea) $(LIBS) $(XLOADLIBES) +LOADLIBES = $(proglib) $(kpathsea) $(XLOADLIBES) +LOADLIBES_FOR_BUILD = $(proglib-for-build) -lkpathsea -lm # May as well separate linking from compiling, just in case. CCLD = $(CC) diff -aurN tetex-src-2.0.2/texk/makeindexk/configure.in tetex-bin-2.0.2-1/texk/makeindexk/configure.in --- tetex-src-2.0.2/texk/makeindexk/configure.in 2002-10-02 21:29:04.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/makeindexk/configure.in 2003-02-21 18:31:12.000000000 +0900 @@ -9,6 +9,7 @@ AC_PROG_LN_S sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) AC_ARG_PROGRAM AC_HAVE_HEADERS(ctype.h types.h locale.h) diff -aurN tetex-src-2.0.2/texk/odvipsk/Makefile.in tetex-bin-2.0.2-1/texk/odvipsk/Makefile.in --- tetex-src-2.0.2/texk/odvipsk/Makefile.in 2003-02-01 03:08:27.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/odvipsk/Makefile.in 2003-02-21 18:31:12.000000000 +0900 @@ -24,7 +24,7 @@ # fails here, so we include it below. .SUFFIXES: .pro .lpro .lpro.pro: - ./squeeze <$< >t-$@ + ./squeeze$(for-build) <$< >t-$@ mv t-$@ $@ prologues = tex.pro texps.pro texc.pro special.pro finclude.pro \ color.pro crop.pro hps.pro @@ -45,11 +45,11 @@ $(kpathsea_link) $(objects) $(LOADLIBES) afm2tfm: $(kpathsea) afm2tfm.o $(kpathsea_link) afm2tfm.o $(LOADLIBES) -# Omit LOADLIBES since no need to dynamically link with kpathsea. squeeze: squeeze.o $(link_command) squeeze.o $(LIBS) $(XLOADLIBES) +squeeze-for-build: squeeze$(for-build).o -$(prologues): squeeze +$(prologues): squeeze$(for-build) texc.lpro: texc.script tex.lpro $(SHELL) $(srcdir)/texc.script $(srcdir)/tex.lpro $@ diff -aurN tetex-src-2.0.2/texk/oxdvik/Makefile.in tetex-bin-2.0.2-1/texk/oxdvik/Makefile.in --- tetex-src-2.0.2/texk/oxdvik/Makefile.in 2003-02-03 03:53:12.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/oxdvik/Makefile.in 2003-02-21 18:31:19.000000000 +0900 @@ -63,6 +63,7 @@ squeeze: squeeze.o $(link_command) squeeze.o $(LIBS) $(XLOADLIBES) +squeeze-for-build: squeeze$(for-build).o ### ### the CC_CONCAT_FILES listed here use ANSI-style string concatenation; @@ -87,8 +88,8 @@ >> krheader.h; done echo "#endif /* HAVE_CC_CONCAT */" >> krheader.h -psheader.c: psheader.txt squeeze - ./squeeze $(srcdir)/psheader.txt $@ +psheader.c: psheader.txt squeeze$(for-build) + ./squeeze$(for-build) $(srcdir)/psheader.txt $@ xdvi.1: xdvi.man sedscript sed -f sedscript <$(srcdir)/xdvi.man >$@ diff -aurN tetex-src-2.0.2/texk/oxdvik/configure.in tetex-bin-2.0.2-1/texk/oxdvik/configure.in --- tetex-src-2.0.2/texk/oxdvik/configure.in 2003-02-02 04:28:32.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/oxdvik/configure.in 2003-02-21 18:31:19.000000000 +0900 @@ -54,6 +54,7 @@ sinclude(xt.ac) sinclude(withenable.ac) +sinclude(../cross.ac) sinclude(../../libs/libwww/withenable.ac) sinclude(../../libs/libwww/libwww.ac) sinclude(../../libs/zlib/withenable.ac) diff -aurN tetex-src-2.0.2/texk/oxdvik/font-open.c tetex-bin-2.0.2-1/texk/oxdvik/font-open.c --- tetex-src-2.0.2/texk/oxdvik/font-open.c 2002-10-13 01:52:20.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/oxdvik/font-open.c 2003-03-05 08:36:27.000000000 +0900 @@ -72,7 +72,7 @@ /* pretend it has the expected dpi value, else caller will complain */ *dpi_ret = dpi; *filename_ret = name; - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } #ifdef T1LIB @@ -95,7 +95,7 @@ if (name) { /* success */ *dpi_ret = file_ret.dpi; *filename_ret = name; - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } else if (alt_font != NULL) { /* The strange thing about kpse_find_glyph() is that it @@ -124,7 +124,7 @@ *dpi_ret = file_ret.dpi; *filename_ret = name; *font_ret = xstrdup(alt_font); - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } } /* all other cases are failure */ diff -aurN tetex-src-2.0.2/texk/oxdvik/xdvi.h tetex-bin-2.0.2-1/texk/oxdvik/xdvi.h --- tetex-src-2.0.2/texk/oxdvik/xdvi.h 2002-12-27 07:35:27.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/oxdvik/xdvi.h 2003-03-05 07:11:57.000000000 +0900 @@ -272,7 +272,7 @@ * SU, 2001/01/07: xdvi defines OPEN_MODE as "r" or as "r", "ctx=stm" (for VMS), * but we use the definition of FOPEN_R_MODE from kpathsea/c-fopen.h instead: */ -#define OPEN_MODE FOPEN_R_MODE +#define OPEN_MODE FOPEN_RBIN_MODE #endif /* OPEN_MODE */ #ifndef VMS diff -aurN tetex-src-2.0.2/texk/ps2pkm/configure.in tetex-bin-2.0.2-1/texk/ps2pkm/configure.in --- tetex-src-2.0.2/texk/ps2pkm/configure.in 2001-10-31 06:09:23.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/ps2pkm/configure.in 2003-02-21 18:31:19.000000000 +0900 @@ -9,6 +9,7 @@ AC_PROG_LN_S sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) AC_CHECK_LIB(m, main) dnl Checks for header files. diff -aurN tetex-src-2.0.2/texk/tetex/configure.in tetex-bin-2.0.2-1/texk/tetex/configure.in --- tetex-src-2.0.2/texk/tetex/configure.in 2002-11-02 03:19:16.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/tetex/configure.in 2003-02-21 18:31:19.000000000 +0900 @@ -7,5 +7,6 @@ AC_PROG_MAKE_SET sinclude(../kpathsea/withenable.ac) +sinclude(../cross.ac) AC_OUTPUT(Makefile) diff -aurN tetex-src-2.0.2/texk/tetex/epstopdf tetex-bin-2.0.2-1/texk/tetex/epstopdf --- tetex-src-2.0.2/texk/tetex/epstopdf 2002-11-23 09:58:03.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/tetex/epstopdf 2003-02-21 18:31:19.000000000 +0900 @@ -58,7 +58,6 @@ ### ghostscript command name my $GS = "gs"; $GS = "gswin32c" if $^O eq 'MSWin32'; -$GS = "gswin32c" if $^O =~ /cygwin/; if ($IsWin32) { $GS = `kpsecheck --ghostscript`; diff -aurN tetex-src-2.0.2/texk/tetex/texconfig tetex-bin-2.0.2-1/texk/tetex/texconfig --- tetex-src-2.0.2/texk/tetex/texconfig 2003-02-16 04:04:56.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/tetex/texconfig 2003-03-06 03:34:29.000000000 +0900 @@ -199,7 +199,7 @@ { { u=`uname -s`; } 2>/dev/null case "$u" in - FreeBSD|Linux) + FreeBSD|Linux|cygwin*|CYGWIN*) test -f /usr/bin/whiptail && DIALOG_PROG=/usr/bin/whiptail test -f /usr/bin/dialog && DIALOG_PROG=/usr/bin/dialog test -f /bin/dialog && DIALOG_PROG=/bin/dialog @@ -322,7 +322,7 @@ { type=$1 ; name=$2; what=$3 if [ ! "$type" "$name" ]; then - msg="Could not find $what." + msg="Could not find $what. ($name)" if test -f "$log"; then msg="$msg\\n\\nThe program will show you the error-log and then exit." else @@ -443,7 +443,6 @@ { echo "Running mf to create plain base ..." fmtutil --byfmt mf - fmtutil --byfmt mfw echo "Done."; echo } @@ -1791,7 +1790,7 @@ test -z "$TC_DFT_CONFIG_PS" && TC_DFT_CONFIG_PS=$TC_TEXMFMAIN/dvips/config/config.ps : ${TC_DFT_DVIPDFM_CFG=`kpsewhich -progname=dvipdfm -format='other text files' config`} -test -z "$TC_DFT_DVIPDFM_CFG" && TC_DFT_DVIPDFM_CFG=$TC_TEXMFMAIN/dvipdfm/config +test -z "$TC_DFT_DVIPDFM_CFG" && TC_DFT_DVIPDFM_CFG=$TC_TEXMFMAIN/dvipdfm/config/config : ${TC_DFT_PDFTEX_CFG=`kpsewhich -progname=pdftex --format=tex pdftex.cfg`} test -z "$TC_DFT_PDFTEX_CFG" && TC_DFT_PDFTEX_CFG=$TC_TEXMFMAIN/pdftex/config/pdftex.cfg @@ -1820,7 +1819,7 @@ xdvi_app_dir=$TC_VARTEXMF/xdvi xdvi_app_file=$xdvi_app_dir/XDvi dvips_conf_dir=$TC_VARTEXMF/dvips/config -dvipdfm_conf_dir=$TC_VARTEXMF/dvipdfm +dvipdfm_conf_dir=$TC_VARTEXMF/dvipdfm/config pdftex_conf_dir=$TC_VARTEXMF/pdftex/config maketex_site_dir=$TC_VARTEXMF/web2c maketex_site_file=$maketex_site_dir/mktex.cnf diff -aurN tetex-src-2.0.2/texk/tetex/thumbpdf tetex-bin-2.0.2-1/texk/tetex/thumbpdf --- tetex-src-2.0.2/texk/tetex/thumbpdf 2002-05-31 01:30:15.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/tetex/thumbpdf 2003-02-21 18:31:19.000000000 +0900 @@ -122,6 +122,8 @@ # 2002/05/26 v3.2 # * Fix: "MacOS/X: darwin" is now not interpreted as # Windows. +# 2002/07/17 v3.2.jcn1 +# * Fix: Revert Cygwin detection: is unix. # ### program identification @@ -136,12 +138,10 @@ $GS = "gs386" if $^O =~ /dos/i; $GS = "gsos2" if $^O =~ /os2/i; $GS = "gswin32c" if $^O =~ /mswin32/i; -$GS = "gswin32c" if $^O =~ /cygwin/i; # Windows detection (no SIGHUP) my $Win = 0; $Win = 1 if $^O =~ /mswin32/i; -$Win = 1 if $^O =~ /cygwin/i; my $gspages = 1; $gspages = 0 if $^O =~ /dos/i; diff -aurN tetex-src-2.0.2/texk/web2c/Makefile.in tetex-bin-2.0.2-1/texk/web2c/Makefile.in --- tetex-src-2.0.2/texk/web2c/Makefile.in 2003-02-02 01:51:16.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/web2c/Makefile.in 2003-02-23 01:22:59.000000000 +0900 @@ -31,6 +31,18 @@ DIFF = diff DIFFFLAGS = +CTANGLE = @CTANGLE@ +ETEX = @ETEX@ +KPSEWHICH = @KPSEWHICH@ +MF = @MF@ +MPOST = @MPOST@ +OMEGA = @OMEGA@ +OTANGLE = @OTANGLE@ +PDFETEX = @PDFETEX@ +PDFTEX = @PDFTEX@ +TANGLE = @TANGLE@ +TEX = @TEX@ + .SUFFIXES: # get rid of .p.o ac_include ../make/common.mk ac_include ../make/programs.mk @@ -70,6 +82,7 @@ $(makevars) $(common_makeargs) proglib = lib/lib.a +proglib-for-build = lib/lib-for-build.a windowlib = window/window.a @PTEX@ZLIBDIR=../../libs/zlib @PTEX@ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR) @@ -91,7 +104,7 @@ web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert # Additional dependencies: web2c_aux = web2c/convert web2c/common.defines -web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c +web2c_programs = web2c/fixwrites$(for-build) web2c/splitup$(for-build) web2c/web2c$(for-build) # Unfortunately, suffix rules can't have dependencies, or multiple # targets, and we can't assume all makes supports pattern rules. @@ -99,7 +112,7 @@ .p.c: # really depends on $(web2c_programs), and generates .h. $(web2c) $* .ch.p: # really depends on ./tangle; for mf/mp/tex, also generates .pool - ./tangle $(srcdir)/$*.web $< + $(TANGLE) $(srcdir)/$*.web $< # These definitions have to come before the rules that expand them. # The *{ini,[0-2]}.c files are created by splitup, run as part of convert. @@ -215,6 +228,7 @@ $(kpathsea_link) $(tex_o) $(socketlibs) $(LOADLIBES) tie: tie.o $(kpathsea_link) tie.o $(LOADLIBES) +tie-for-build: tie$(for-build).o tftopl: tftopl.o $(kpathsea_link) tftopl.o $(LOADLIBES) vftovp: vftovp.o @@ -232,7 +246,7 @@ bibtex.p dvicopy.p dvitomp.p dvitype.p etex.p gftopk.p gftodvi.p gftype.p \ mf.p mft.p mp.p odvicopy.p odvitype.p omega.p otangle.p patgen.p pdfetex.p \ pdftex.p pktogf.p pktype.p pltotf.p pooltype.p tex.p tftopl.p vftovp.p \ - vptovf.p weave.p: tangle + vptovf.p weave.p: $(TANGLE) # We need to be explicit for a number of programs because there is a # $(srcdir) in the suffix rule. This also means we can use a different # suffix for the change file than .ch, if we want to. @@ -241,7 +255,7 @@ dvitomp.p: dvitomp.web dvitomp.ch dvitype.p: dvitype.web dvitype.ch etex.p etex.pool: etex.web etex.ch - ./tangle etex.web etex.ch + $(TANGLE) etex.web etex.ch gftodvi.p: gftodvi.web gftodvi.ch gftopk.p: gftopk.web gftopk.ch gftype.p: gftype.web gftype.ch @@ -249,18 +263,18 @@ mp.p mp.pool: mp.web mp.ch mft.p: mft.web mft.ch odvicopy.p: odvicopy.web odvicopy.ch - ./tangle odvicopy.web odvicopy.ch + $(TANGLE) odvicopy.web odvicopy.ch odvitype.p: odvitype.web odvitype.ch - ./tangle odvitype.web odvitype.ch + $(TANGLE) odvitype.web odvitype.ch otangle.p: otangle.web otangle.ch - ./tangle otangle.web otangle.ch + $(TANGLE) otangle.web otangle.ch omega.p omega.pool: otangle omega.web omega.ch - ./otangle omega.web omega.ch + $(OTANGLE) omega.web omega.ch patgen.p: patgen.web patgen.ch pdftex.p pdftex.pool: pdftex.web pdftex.ch - ./tangle pdftex.web pdftex.ch + $(TANGLE) pdftex.web pdftex.ch pdfetex.p pdfetex.pool: pdfetex.web pdfetex.ch - ./tangle pdfetex.web pdfetex.ch + $(TANGLE) pdfetex.web pdfetex.ch pktogf.p: pktogf.web pktogf.ch pktype.p: pktype.web pktype.ch pltotf.p: pltotf.web pltotf.ch @@ -315,12 +329,12 @@ # Special rules for cweb cweave.c: ctangle cwebdir/cweave.w cwebdir/cweav-w2c.ch -rm -f $@ - CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangle cweave.w cweav-w2c.ch + CWEBINPUTS=.:$(srcdir)/cwebdir $(CTANGLE) cweave.w cweav-w2c.ch # A special rule for tie tie.c: ctangle tiedir/tie.w tiedir/tie-w2c.ch -rm -f $@ - ./ctangle $(srcdir)/tiedir/tie.w $(srcdir)/tiedir/tie-w2c.ch + $(CTANGLE) $(srcdir)/tiedir/tie.w $(srcdir)/tiedir/tie-w2c.ch # Additional dependencies for recompiling the C code are generated # automatically, included at the end. @@ -334,11 +348,12 @@ tangle: tangle.o $(kpathsea_link) tangle.o $(LOADLIBES) $(MAKE) $(common_makeargs) tangleboot.p +tangle-for-build: tangle$(for-build).o # tangle.p is a special case, since it is needed to compile itself. We # convert and compile the (distributed) tangleboot.p to make a tangle # which we use to make the other programs. -tangle.p: tangleboot tangle.web tangle.ch - ./tangleboot $(srcdir)/tangle.web $(srcdir)/tangle.ch +tangle.p: tangleboot$(for-build) tangle.web tangle.ch + ./tangleboot$(for-build) $(srcdir)/tangle.web $(srcdir)/tangle.ch tangle.web: @echo "You seem to be missing tangle.web, perhaps because you" >&2 @echo "didn't retrieve web.tar.gz, only web2c.tar.gz." >&2 @@ -352,17 +367,22 @@ tangleboot: tangleboot.o $(kpathsea_link) tangleboot.o $(LOADLIBES) +tangleboot-for-build: tangleboot$(for-build).o tangleboot.c tangleboot.h: stamp-tangle $(web2c_programs) $(web2c_aux) $(web2c) tangleboot # tangleboot.p is in the distribution -stamp-tangle: tangleboot.p +stamp-tangle: $(srcdir)/tangleboot.p date >stamp-tangle +%-for-build.c: %.c + cp -pv $< $@ +%-for-build.p: %.p + cp -pv $< $@ # This is not run unless tangle.web or tangle.ch is changed. -# Only try to run ./tangle if it actually exists, otherwise +# Only try to run $(TANGLE) if it actually exists, otherwise # just touch tangleboot.p and build tangle. tangleboot.p: tangle.web tangle.ch - if [ -r ./tangle ] || [ -r ./tangle.exe ]; then \ - ./tangle $(srcdir)/tangle.web $(srcdir)/tangle.ch; \ + if [ -r $(TANGLE) ] || [ -r ./tangle.exe ]; then \ + $(TANGLE) $(srcdir)/tangle.web $(srcdir)/tangle.ch; \ mv tangle.p tangleboot.p; \ else \ touch tangleboot.p; \ @@ -376,21 +396,30 @@ $(kpathsea_link) ctangle.o cweb.o $(LOADLIBES) $(MAKE) $(common_makeargs) ctangleboot.c cwebboot.c # ctangle.c is a special case, since it is needed to compile itself. -ctangle.c: ctangleboot cwebdir/ctangle.w cwebdir/ctang-w2c.ch - CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangleboot ctangle.w ctang-w2c.ch -cweb.c: ctangleboot cwebdir/common.w cwebdir/comm-w2c.ch - CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangleboot common.w comm-w2c.ch cweb.c +ctangle.c: ctangleboot$(for-build) cwebdir/ctangle.w cwebdir/ctang-w2c.ch + CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangleboot$(for-build) ctangle.w ctang-w2c.ch +cweb.c: ctangleboot$(for-build) cwebdir/common.w cwebdir/comm-w2c.ch + CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangleboot$(for-build) common.w comm-w2c.ch cweb.c ctangleboot: ctangleboot.o cwebboot.o $(kpathsea_link) ctangleboot.o cwebboot.o $(LOADLIBES) +ctangleboot-for-build: ctangleboot$(for-build).o cwebboot$(for-build).o +# copy from common.mk: need two .o files +ctangleboot-for-build: ctangleboot-for-build.o cwebboot-for-build.o + @rm -f $@ + if [ "$(cross_compiling)" = "yes" ]; then \ + $(CCLD_FOR_BUILD) -o $@ $^ $(LOADLIBES_FOR_BUILD); \ + else \ + $(kpathsea_link) $^ $(LOADLIBES); \ + fi # ctangleboot.c is in the distribution -stamp-ctangle: ctangleboot.c cwebboot.c +stamp-ctangle: $(srcdir)/ctangleboot.c $(srcdir)/cwebboot.c # This is not run unless tangle.web or tangle.ch is changed. -# Only try to run ./tangle if it actually exists, otherwise +# Only try to run $(CTANGLE) if it actually exists, otherwise # just touch tangleboot.p and build tangle. ctangleboot.c: cwebdir/ctangle.w cwebdir/ctang-w2c.ch - if [ -r ./ctangle ] || [ -r ./ctangle.exe ]; then \ - CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangle ctangle.w ctang-w2c.ch; \ + if [ -r $(CTANGLE) ] || [ -r ./ctangle.exe ]; then \ + CWEBINPUTS=.:$(srcdir)/cwebdir $(CTANGLE) ctangle.w ctang-w2c.ch; \ mv ctangle.c ctangleboot.c; \ else \ touch ctangleboot.c; \ @@ -398,8 +427,8 @@ date >stamp-ctangle $(MAKE) $(common_makeargs) ctangle cwebboot.c: cwebdir/common.w cwebdir/comm-w2c.ch - if [ -r ./ctangle ] || [ -r ./ctangle.exe ]; then \ - CWEBINPUTS=.:$(srcdir)/cwebdir ./ctangle common.w comm-w2c.ch cweb.c; \ + if [ -r $(CTANGLE) ] || [ -r ./ctangle.exe ]; then \ + CWEBINPUTS=.:$(srcdir)/cwebdir $(CTANGLE) common.w comm-w2c.ch cweb.c; \ mv cweb.c cwebboot.c; \ else \ touch cwebboot.c; \ @@ -440,12 +469,12 @@ @PTEX@ cd $(LIBXPDFDIR)/goo; $(MAKE) $(common_makeargs) libGoo.a # The web2c program consists of several executables. -web2c/fixwrites: web2c/fixwrites.c - cd web2c && $(MAKE) $(common_makeargs) fixwrites -web2c/splitup: web2c/splitup.c - cd web2c && $(MAKE) $(common_makeargs) splitup -web2c/web2c: web2c/main.c web2c/web2c.h web2c/web2c.l web2c/web2c.y - cd web2c && $(MAKE) $(common_makeargs) web2c +web2c/fixwrites$(for-build): web2c/fixwrites.c + cd web2c && $(MAKE) $(common_makeargs) fixwrites$(for-build) +web2c/splitup$(for-build): web2c/splitup.c + cd web2c && $(MAKE) $(common_makeargs) splitup$(for-build) +web2c/web2c$(for-build): web2c/main.c web2c/web2c.h web2c/web2c.l web2c/web2c.y + cd web2c && $(MAKE) $(common_makeargs) web2c$(for-build) ac_include ../make/tkpathsea.mk @@ -475,75 +504,75 @@ tex.fmt: tex $(dumpenv) $(MAKE) progname=tex files="plain.tex cmr10.tfm" prereq-check - $(dumpenv) ./tex --jobname=tex --ini \\input plain \\dump /dev/null || $(MAKE) prereq-lose >/dev/null + $(KPSEWHICH) --progname=$(progname) $(files) >/dev/null || $(MAKE) prereq-lose >/dev/null prereq-lose: @echo "You seem to be missing input files necessary to make the" >&2 @@ -561,15 +590,15 @@ $(kpathsea_dir)/kpsewhich: $(kpathsea) amstex.fmt: tex - $(dumpenv) ./tex --progname=amstex --ini amstex.ini >> See $(etestdir)/etrip.diffs for example of acceptable diffs." >&2 @echo "*** TRIP test for e-TeX in compatibility mode ***." - ./pltotf $(testdir)/trip.pl trip.tfm - ./tftopl ./trip.tfm trip.pl + $(PLTOTF) $(testdir)/trip.pl trip.tfm + $(TFTOPL) ./trip.tfm trip.pl -diff $(testdir)/trip.pl trip.pl rm -f trip.tex; $(LN) $(testdir)/trip.tex . # get same filename in log - -$(SHELL) -c '$(etestenv) ./etex --progname=einitex <$(testdir)/trip1.in >ctripin.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) --progname=einitex <$(testdir)/trip1.in >ctripin.fot' mv trip.log ctripin.log -diff $(testdir)/tripin.log ctripin.log - -$(SHELL) -c '$(etestenv) ./etex <$(testdir)/trip2.in >ctrip.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) <$(testdir)/trip2.in >ctrip.fot' mv trip.log ctrip.log -diff $(testdir)/trip.fot ctrip.fot -$(DIFF) $(DIFFFLAGS) $(testdir)/trip.log ctrip.log - $(SHELL) -c '$(etestenv) ./dvitype $(dvitype_args) trip.dvi >ctrip.typ' + $(SHELL) -c '$(etestenv) $(dvitype) $(dvitype_args) trip.dvi >ctrip.typ' -$(DIFF) $(DIFFFLAGS) $(testdir)/trip.typ ctrip.typ @echo "*** TRIP test for e-TeX in extended mode ***." - -$(SHELL) -c '$(etestenv) ./etex --progname=einitex <$(etestdir)/etrip1.in >xtripin.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) --progname=einitex <$(etestdir)/etrip1.in >xtripin.fot' mv trip.log xtripin.log -diff ctripin.log xtripin.log - -$(SHELL) -c '$(etestenv) ./etex <$(etestdir)/trip2.in >xtrip.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) <$(etestdir)/trip2.in >xtrip.fot' mv trip.log xtrip.log -diff ctrip.fot xtrip.fot -$(DIFF) $(DIFFFLAGS) ctrip.log xtrip.log - $(SHELL) -c '$(etestenv) ./dvitype $(dvitype_args) trip.dvi >xtrip.typ' + $(SHELL) -c '$(etestenv) $(dvitype) $(dvitype_args) trip.dvi >xtrip.typ' -$(DIFF) $(DIFFFLAGS) ctrip.typ xtrip.typ @echo "*** e-TeX specific part of e-TRIP test ***." - ./pltotf $(etestdir)/etrip.pl etrip.tfm - ./tftopl ./etrip.tfm etrip.pl + $(PLTOTF) $(etestdir)/etrip.pl etrip.tfm + $(TFTOPL) ./etrip.tfm etrip.pl -diff $(etestdir)/etrip.pl etrip.pl rm -f etrip.tex; $(LN) $(etestdir)/etrip.tex . # get same filename in log - -$(SHELL) -c '$(etestenv) ./etex --progname=einitex <$(etestdir)/etrip2.in >etripin.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) --progname=einitex <$(etestdir)/etrip2.in >etripin.fot' mv etrip.log etripin.log -diff $(etestdir)/etripin.log etripin.log - -$(SHELL) -c '$(etestenv) ./etex <$(etestdir)/etrip3.in >etrip.fot' + -$(SHELL) -c '$(etestenv) $(ETEX) <$(etestdir)/etrip3.in >etrip.fot' -diff $(etestdir)/etrip.fot etrip.fot -$(DIFF) $(DIFFFLAGS) $(etestdir)/etrip.log etrip.log diff $(etestdir)/etrip.out etrip.out - $(SHELL) -c '$(etestenv) ./dvitype $(dvitype_args) etrip.dvi >etrip.typ' + $(SHELL) -c '$(etestenv) $(dvitype) $(dvitype_args) etrip.dvi >etrip.typ' -$(DIFF) $(DIFFFLAGS) $(etestdir)/etrip.typ etrip.typ etex-check: etrip etex.efmt # Test truncation (but don't bother showing the warning msg). - ./etex --output-comment="`cat $(srcdir)/PROJECTS`" \ + $(ETEX) --output-comment="`cat $(srcdir)/PROJECTS`" \ $(srcdir)/tests/hello 2>/dev/null \ - && ./dvitype hello.dvi | grep olaf@infovore.xs4all.nl >/dev/null + && $(dvitype) hello.dvi | grep olaf@infovore.xs4all.nl >/dev/null # \openout should show up in \write's. - ./etex $(srcdir)/tests/openout && grep xfoo openout.log + $(ETEX) $(srcdir)/tests/openout && grep xfoo openout.log # one.two.tex -> one.two.log - ./etex $(srcdir)/tests/one.two && ls -l one.two.log + $(ETEX) $(srcdir)/tests/one.two && ls -l one.two.log # uno.dos -> uno.log - ./etex $(srcdir)/tests/uno.dos && ls -l uno.log - ./etex $(srcdir)/tests/just.texi && ls -l just.log - -./etex $(srcdir)/tests/batch.tex - ./etex --shell $(srcdir)/tests/write18 | grep echo + $(ETEX) $(srcdir)/tests/uno.dos && ls -l uno.log + $(ETEX) $(srcdir)/tests/just.texi && ls -l just.log + -$(ETEX) $(srcdir)/tests/batch.tex + $(ETEX) --shell $(srcdir)/tests/write18 | grep echo # tcx files are a bad idea. -# ./etex --translate-file=$(srcdir)/share/isol1-t1.tcx \ -# $(srcdir)/tests/eight && ./dvitype eight.dvi >eigh.typ - ./etex --mltex --progname=einitex $(srcdir)/tests/mltextst - -./etex eigh.typ + $(ETEX) --mltex --progname=einitex $(srcdir)/tests/mltextst + -$(ETEX) > krheader.h; done echo "#endif /* HAVE_CC_CONCAT */" >> krheader.h -psheader.c: psheader.txt squeeze - ./squeeze $(srcdir)/psheader.txt $@ +psheader.c: psheader.txt squeeze$(for-build) + ./squeeze$(for-build) $(srcdir)/psheader.txt $@ xdvi.1: xdvi.man sedscript sed -f sedscript <$(srcdir)/xdvi.man >$@ @@ -118,6 +119,8 @@ $(INSTALL_DATA) $(srcdir)/t1mapper.1 $(man1dir)/t1mapper.$(manext) $(INSTALL_DATA) $(srcdir)/xdvizilla.1 $(man1dir)/xdvizilla.$(manext) $(INSTALL_DATA) $(srcdir)/texmf/xdvi-teTeX.cfg $(texmf)/xdvi/xdvi.cfg + $(INSTALL_DATA) $(srcdir)/texmf/XDvi $(texmf)/xdvi +# $(INSTALL_DATA) $(srcdir)/texmf/ps2pk.map $(texmf)/xdvi uninstall-data: rm -f $(man1dir)/xdvi.$(manext) diff -aurN tetex-src-2.0.2/texk/xdvik/configure.in tetex-bin-2.0.2-1/texk/xdvik/configure.in --- tetex-src-2.0.2/texk/xdvik/configure.in 2003-02-02 04:28:32.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/xdvik/configure.in 2003-02-21 18:31:19.000000000 +0900 @@ -54,6 +54,7 @@ sinclude(xt.ac) sinclude(withenable.ac) +sinclude(../cross.ac) sinclude(../../libs/libwww/withenable.ac) sinclude(../../libs/libwww/libwww.ac) sinclude(../../libs/zlib/withenable.ac) diff -aurN tetex-src-2.0.2/texk/xdvik/font-open.c tetex-bin-2.0.2-1/texk/xdvik/font-open.c --- tetex-src-2.0.2/texk/xdvik/font-open.c 2002-10-13 01:52:20.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/xdvik/font-open.c 2003-03-05 08:36:27.000000000 +0900 @@ -72,7 +72,7 @@ /* pretend it has the expected dpi value, else caller will complain */ *dpi_ret = dpi; *filename_ret = name; - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } #ifdef T1LIB @@ -95,7 +95,7 @@ if (name) { /* success */ *dpi_ret = file_ret.dpi; *filename_ret = name; - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } else if (alt_font != NULL) { /* The strange thing about kpse_find_glyph() is that it @@ -124,7 +124,7 @@ *dpi_ret = file_ret.dpi; *filename_ret = name; *font_ret = xstrdup(alt_font); - return xfopen_local(name, FOPEN_R_MODE); + return xfopen_local(name, FOPEN_RBIN_MODE); } } /* all other cases are failure */ diff -aurN tetex-src-2.0.2/texk/xdvik/xdvi.h tetex-bin-2.0.2-1/texk/xdvik/xdvi.h --- tetex-src-2.0.2/texk/xdvik/xdvi.h 2002-12-27 07:35:27.000000000 +0900 +++ tetex-bin-2.0.2-1/texk/xdvik/xdvi.h 2003-03-05 07:11:57.000000000 +0900 @@ -272,7 +272,7 @@ * SU, 2001/01/07: xdvi defines OPEN_MODE as "r" or as "r", "ctx=stm" (for VMS), * but we use the definition of FOPEN_R_MODE from kpathsea/c-fopen.h instead: */ -#define OPEN_MODE FOPEN_R_MODE +#define OPEN_MODE FOPEN_RBIN_MODE #endif /* OPEN_MODE */ #ifndef VMS