diff options
Diffstat (limited to 'Build/source/texk')
39 files changed, 2808 insertions, 3330 deletions
diff --git a/Build/source/texk/README.TL b/Build/source/texk/README.TL index f246b508364..a30d6c6eb0c 100644 --- a/Build/source/texk/README.TL +++ b/Build/source/texk/README.TL @@ -11,5 +11,5 @@ dvipdfmx 20050831 http://project.ktug.or.kr/dvipdfmx/snapshot/current/ -> http://www.ctan.org/tex-archive/dviware/dvipdfmx/ -dvipng 1.6 +dvipng 1.9 http://www.ctan.org/tex-archive/dviware/dvipng/ diff --git a/Build/source/texk/configure b/Build/source/texk/configure index afbef2c00fe..c21766fa78e 100755 --- a/Build/source/texk/configure +++ b/Build/source/texk/configure @@ -6587,6 +6587,7 @@ PKGS=' cjkutils detex devnag + dvipng dtl dvi2tty dvidvi @@ -6610,9 +6611,6 @@ PKGS=' xdvipdfmx ' -# must finish update, accidentally checked in partial -# in revision 2009: dvipng - ESUBDIRS= for pkg in $PKGS; do if eval "test \"x`echo '$with_'${pkg}`\" != xno"; then diff --git a/Build/source/texk/dvipng/COPYING b/Build/source/texk/dvipng/COPYING index d60c31a97a5..d511905c164 100644 --- a/Build/source/texk/dvipng/COPYING +++ b/Build/source/texk/dvipng/COPYING @@ -1,8 +1,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog index e180f5fd999..c48a026bfba 100644 --- a/Build/source/texk/dvipng/ChangeLog +++ b/Build/source/texk/dvipng/ChangeLog @@ -1,3 +1,137 @@ +2006-11-11 Jan-Ake Larsson <jalar@mai.liu.se> + + * Release 1.9 + + * INSTALL: + * README: Update for 1.9 + + * Makefile.in: Make the test fail if fonts not found + + * configure.ac: Don't use "which". Add info about the selfauto + stuff. Report if CJK support present + + * test_dvipng.tex: Remove the (intentional) failing special + +2006-11-07 Jan-Ake Larsson <jalar@mai.liu.se> + + * fontmap.c: Don't warn if ttfonts.map is missing, fix pointer + + * Makefile.in: Adjust manpage target so manual intervention isn't + needed anymore + + * dvipng.1: Update manpage + + * dvipng.texi: Update for 1.9 + + * COPYING, Makefile.in, color.c, commands.h, configure.ac, draw.c, + dvi.c, dvipng.c, dvipng.h, dvipng.texi, enc.c, font.c, fontmap.c, + ft.c, macros.texi, miktex.h, miktex.mak, misc.c, papersiz.c, pk.c, + ppagelist.c, set.c, sfd.c, special.c, t1.c, test_dvipng.tex, + tfm.c, vf.c: Update FSF address + + * fontmap.c: Add ttfonts.map to the searched font maps + + * RELEASE: Prepare for 1.9 + +2006-11-02 Jan-Ake Larsson <jalar@mai.liu.se> + + * dvipng.texi: Nitpicking on bitmapped graphics + +2006-10-13 Jan-Ake Larsson <jalar@mai.liu.se> + + * readme.texi: Add note about subfont (CJK) support + + * install.texi: Add that FreeType2 is needed for subfont (CJK) support + +2006-10-12 Jan-Ake Larsson <jalar@mai.liu.se> + + * readme.texi: Fix todo + +2006-10-11 Jan-Ake Larsson <jalar@mai.liu.se> + + * sfd.c: Change && to || so that multiple subfonts work + + * ft.c: Adjust debug output + + * configure.ac: Add sfd.o + +2006-10-04 Jan-Ake Larsson <jalar@mai.liu.se> + + * configure.ac: Prepare for 1.9 + + * sfd.c: Only look for subfont file on recent kpathsea + + * dvipng.c, ft.c, fontmap.c, dvipng.h: Prepare for subfonts (CJK) + + * sfd.c: Added. Used for subfonts (CJK) + + * configure.ac: Change wording of gs helptext + + * ft.c: Adjust debug message, and encoding selection + + * special.c: Adjust debug messages + + * dvipng.texi: Document the --strict option + + * dvipng.c: Fix timer + + * Makefile.in: Add dist target, simplify distclean + + * fontmap.c: Remove segfault occuring for non-existent font + +2006-08-08 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Make showpage flag static + + * special.c: + Fix bug with -dSAFER and non-. paths, and bug with pngalpha and + background color + +2006-05-17 Jan-Ake Larsson <jalar@mai.liu.se> + + * fontmap.c: Rearrange, simplify, speed up + +2006-05-16 Jan-Ake Larsson <jalar@mai.liu.se> + + * ft.c: FT_LOAD_TARGET_LIGHT does not work in some cases, fall + back to FT_LOAD_NO_HINTING + +2006-05-08 Jan-Ake Larsson <jalar@mai.liu.se> + + * dvipng.texi: Add credit + + * Makefile.in: add www target + + * README: + * readme.texi: Update capabilities info and preview-latex link + +2006-03-30 Jan-Ake Larsson <jalar@mai.liu.se> + + * Release 1.8 + + * RELEASE: Update for 1.8 + + * set.c: + * readme.texi: + * install.texi: + * ft.c: + * dvi.c: + * draw.c: + * README: + * INSTALL: Update copyright + +2006-03-29 Jan-Ake Larsson <jalar@mai.liu.se> + + * dvipng.1: + * dvipng.texi: Document new switch, new PostScript inclusion, + rearrange and adjust + + * misc.c: + * INSTALL: + * README: + * install.texi: + * readme.texi: Minimal documentation adjustments + 2006-03-27 Jan-Ake Larsson <jalar@mai.liu.se> * ft.c: Change to FT_LOAD_TARGET_LIGHT @@ -46,8 +180,8 @@ 2006-01-31 Jan-Ake Larsson <jalar@mai.liu.se> - * special.c: - Temporary version, just try the different image decoders and see + * special.c: Temporary version, just try the different image + decoders and see * special.c: Use correct variables diff --git a/Build/source/texk/dvipng/INSTALL b/Build/source/texk/dvipng/INSTALL index a97a5713987..c22c8431097 100644 --- a/Build/source/texk/dvipng/INSTALL +++ b/Build/source/texk/dvipng/INSTALL @@ -23,18 +23,27 @@ Prerequisites not have it, download it from `http://www.ctan.org' and compile it. I have no experience with this, so I cannot help much here. - * FreeType 2 and/or T1lib - - While not strictly necessary, you may want to have FreeType 2 or - T1lib available. Their presence will enable direct support for - PostScript fonts in dvipng, rather than using `gsftopk' for - rendering the fonts. If you have PostScript versons of Computer - Modern installed, there will be no need to generate bitmapped - variants on disk of these. Then, you can render images at - different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. If both FreeType 2 and T1lib are - present, FreeType will be internally preferred by dvipng, but - T1lib can be chosen at runtime. + * The font-rendering library FreeType 2 + + While not strictly necessary, FreeType 2 is recommended since + dvipng currently will produce better-quality images with this + library available. It will also enable direct support for + PostScript and TrueType fonts, and subfont support in dvipng. That + is, if you want to render CJK-LaTeX characters, you must have + FreeType 2 installed. With FreeType 2, dvipng will not need to + generate bitmapped variants on disk of the TeX fonts since modern + TeX distributions include PostScript versions of them. Then, you + can render images at different (and unusual) resolutions without + cluttering the disk with lots of bitmapped fonts. + + * The font-rendering library T1lib + + An alternative to FreeType 2 is T1lib, but this will enable only + PostScript fonts in dvipng, and will not include subfont support. + Also here, you can render images at different (and unusual) + resolutions without cluttering the disk with lots of bitmapped + fonts. If both FreeType 2 and T1lib are present, FreeType will be + internally preferred by dvipng, but T1lib can be chosen at runtime. * libpng and libz @@ -57,7 +66,7 @@ various files will be. To do so, run (Note: if you have fetched dvipng from CVS rather than a regular release, you will have to first generate `./configure' by running -`autoconf' 2.53 or later in the `preview' directory.) +`autoconf' 2.53 or later.) On many machines, you will not need to specify any options, but if `configure' cannot determine something on its own, you'll need to help diff --git a/Build/source/texk/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in index bf5689b5a47..55febc94515 100644 --- a/Build/source/texk/dvipng/Makefile.in +++ b/Build/source/texk/dvipng/Makefile.in @@ -16,8 +16,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA. # # Copyright (C) 2002-2005 Jan-Åke Larsson # @@ -25,12 +25,47 @@ PACKAGE_STRING="@PACKAGE_STRING@" +FREETYPE2DIR = ../../libs/freetype2 +FREETYPE2SRCDIR = $(srcdir)/$(FREETYPE2DIR) +FREETYPE2CPPFLAGS = @FREETYPE2CPPFLAGS@ +FREETYPE2DEP = @FREETYPE2DEP@ +LDFREETYPE2 = @LDFREETYPE2@ + +GDDIR=../../libs/gd +GDSRCDIR=$(srcdir)/$(GDDIR) +GDCPPFLAGS = @GDCPPFLAGS@ +GDDEP = @GDDEP@ +LDGD = @LDGD@ + +LIBT1DIR=../../libs/t1lib +LIBT1SRCDIR=$(srcdir)/$(LIBT1DIR) +LIBT1CPPFLAGS = @LIBT1CPPFLAGS@ +LIBT1DEP = @LIBT1DEP@ +LDLIBT1 = @LDLIBT1@ + +LIBPNGDIR=../../libs/libpng +LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR) +LIBPNGCPPFLAGS = @LIBPNGCPPFLAGS@ +LIBPNGDEP = @LIBPNGDEP@ +LDLIBPNG = @LDLIBPNG@ + +ZLIBDIR=../../libs/zlib +ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR) +ZLIBCPPFLAGS = @ZLIBCPPFLAGS@ +ZLIBDEP = @ZLIBDEP@ +LDZLIB = @LDZLIB@ + +lib_cppflags = $(GDCPPFLAGS) $(FREETYPE2CPPFLAGS) $(LIBT1CPPFLAGS) \ + $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -I.. -I$(srcdir)/.. +lib_libs = $(LDGD) $(LDFREETYPE2) $(LDLIBT1) $(LDLIBPNG) $(LDZLIB) + CC = @CC@ CFLAGS = @CFLAGS@ -Wall -CPPFLAGS = @CPPFLAGS@ -I. +CPPFLAGS = @CPPFLAGS@ -I. $(lib_cppflags) +# -I. must come first, or get gd/config.h. LN_S = @LN_S@ -LIBS = @LIBS@ +LIBS = @LIBS@ $(lib_libs) LDFLAGS = @LDFLAGS@ srcdir = @srcdir@ @@ -95,8 +130,14 @@ dvipng.help: dvipng || cp dvipng.tmp dvipng.help rm -f dvipng.tmp -dvipng.html: $(TEXIFILES) dvipng.help - texi2html -I $(srcdir) $(srcdir)/dvipng.texi +www: $(TEXIFILES) dvipng.help + texi2html -split chapter -nosec-nav -subdir html \ + -I $(srcdir) $(srcdir)/dvipng.texi + (cd html; for i in *; do \ + sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ + done) + cp www/dvipng.html www/index.html + rm -rf html dvipng_mono.html: $(TEXIFILES) dvipng.help texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ @@ -113,7 +154,8 @@ README: readme.texi -I$(srcdir) $(srcdir)/readme.texi --output README dvipng.1: dvipng.texi readme.texi - texi2pod.pl -D man $(srcdir)/dvipng.texi > dvipng.pod + texi2pod.pl -D man $(srcdir)/dvipng.texi | \ + sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod pod2man --center="User commands" --release=$(PACKAGE_STRING)\ dvipng.pod > dvipng.1 rm dvipng.pod @@ -135,11 +177,7 @@ install-dvigif-docs: install-docs ####################################### The test test: test_dvipng.dvi dvipng - ./dvipng -v test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -tighttest: test_dvipng.dvi dvipng - ./dvipng -T tight test_dvipng + ./dvipng -T tight -strict test_dvipng echo View the result e.g. with xv test_dvipng\*.png test_dvipng.dvi: test_dvipng.tex @@ -153,10 +191,11 @@ clean: *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ *.fns *.vrs *.pgs *.html *.tmp -distclean: clean INSTALL README dvipng.1 +distclean: clean rm -f Makefile rm -f config.status config.log config.cache c-auto.h +dist: INSTALL README dvipng.1 distclean # SunOS make suffix rule wierdness .cps.h: diff --git a/Build/source/texk/dvipng/README b/Build/source/texk/dvipng/README index bef995e219d..bf362c5ddde 100644 --- a/Build/source/texk/dvipng/README +++ b/Build/source/texk/dvipng/README @@ -12,7 +12,7 @@ fast as is possible. The target audience is people who need to generate and regenerate many images again and again. The primary target is the preview-latex (X)Emacs package, a package to preview formulas from within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see `http://preview-latex.sf.net'. +buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. Another example is WeBWorK, an internet-based method for delivering homework problems to students over the internet, giving students @@ -32,7 +32,7 @@ Benefits of dvipng on-the-fly, as needed in preview-latex, WeBWorK and others. * It does not read the postamble, so it can be started before TeX - finishes. There is a -follow switch that makes dvipng wait at + finishes. There is a `--follow' switch that makes dvipng wait at end-of-file for further output, unless it finds the POST marker that indicates the end of the DVI. @@ -40,8 +40,9 @@ Benefits of dvipng through stdin, and all options are usable. It is even possible to change the input file through this interface. - * Supports PK, VF, PostScript Type1, and TrueType fonts, color - specials and simple PostScript inclusion specials. + * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts + (i.e., as used in CJK-LaTeX), color specials, and inclusion of + PostScript, PNG, JPEG or GIF images. * and more... @@ -103,15 +104,11 @@ COPYING file in the dvipng distribution or Todo ==== - * Support for CJK-LaTeX (Chinese, Japanese, Korean), that is: - subfonts. - - * Fix T1 and PK rendering so it is on par with Freetype. + * Fix T1lib and PK rendering so it is on par with Freetype. * Further speed improvements. * Other output specials and source specials. - * Remove kpathsea dependence, use dvips' environment variables (this - is maybe less of an issue now with working MiKTeX support). + * Clean internal structures. Overhaul file handling. diff --git a/Build/source/texk/dvipng/RELEASE b/Build/source/texk/dvipng/RELEASE index f4bdbfff9b4..ea0665aeecf 100644 --- a/Build/source/texk/dvipng/RELEASE +++ b/Build/source/texk/dvipng/RELEASE @@ -1,27 +1,18 @@ -Release notes for version 1.8 of the dvipng package: +Release notes for version 1.9 of the dvipng package: This program makes PNG graphics from DVI files as obtained from TeX and its relatives. -The 1.8 release adds the possibility to include bitmapped images (PNG, -JPEG, and GIF), and changes PostScript inclusion so that the image is -not cropped to the boundingbox (unless requested) and has a -transparent background. From now on, for performance reasons, the -output image will be truecolor if an image is included. +The 1.9 release adds CJK (Chinese, Japanese and Korean) support, more +specifically it adds support for the subfonts used in the CJK-latex +package. -The output quality is substantially improved when using the Freetype -font library. Freetype hinting has previously been disabled in dvipng -(because of substandard output from the Computer Modern font), but -from the 1.8 release onwards, hinting will be enabled in a mode that -prefers shape over contrast (which works well with the Computer Modern -font). +TrueType fonts have been tested somewhat more, and the ttfonts.map +file is now used, if present on the system. -In short, the output quality is visibly better when Freetype is -available than when it isn't. - -The release also fixes a few bugs and enhances the internal color -cache for better performance. +It also fixes a few bugs, most notably a version problem with +Freetype<2.1.8, and a graphics inclusion bug for non-.-paths. Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/aclocal.m4 b/Build/source/texk/dvipng/aclocal.m4 index 332367171d1..268f1c64d7d 100644 --- a/Build/source/texk/dvipng/aclocal.m4 +++ b/Build/source/texk/dvipng/aclocal.m4 @@ -1,7 +1,7 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,210 +11,79 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Configure paths for FreeType2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor - -dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS -dnl -AC_DEFUN(AC_CHECK_FT2, -[dnl -dnl Get the cflags and libraries from the freetype-config script -dnl -AC_ARG_WITH(ft-prefix, -[ --with-ft-prefix=PREFIX - Prefix where FreeType is installed (optional)], - ft_config_prefix="$withval", ft_config_prefix="") -AC_ARG_WITH(ft-exec-prefix, -[ --with-ft-exec-prefix=PREFIX - Exec prefix where FreeType is installed (optional)], - ft_config_exec_prefix="$withval", ft_config_exec_prefix="") -AC_ARG_ENABLE(freetypetest, -[ --disable-freetypetest Do not try to compile and run - a test FreeType program], - [], enable_fttest=yes) - -if test x$ft_config_exec_prefix != x ; then - ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config - fi -fi -if test x$ft_config_prefix != x ; then - ft_config_args="$ft_config_args --prefix=$ft_config_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_prefix/bin/freetype-config - fi -fi -AC_PATH_PROG(FT2_CONFIG, freetype-config, no) +# AM_CONDITIONAL -*- Autoconf -*- -min_ft_version=ifelse([$1], ,6.1.0,$1) -AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) -no_ft="" -if test "$FT2_CONFIG" = "no" ; then - no_ft=yes -else - FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` - FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` - ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - ft_min_major_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_min_minor_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_min_micro_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test x$enable_fttest = xyes ; then - ft_config_is_lt="" - if test $ft_config_major_version -lt $ft_min_major_version ; then - ft_config_is_lt=yes - else - if test $ft_config_major_version -eq $ft_min_major_version ; then - if test $ft_config_minor_version -lt $ft_min_minor_version ; then - ft_config_is_lt=yes - else - if test $ft_config_minor_version -eq $ft_min_minor_version ; then - if test $ft_config_micro_version -lt $ft_min_micro_version ; then - ft_config_is_lt=yes - fi - fi - fi - fi - fi - if test x$ft_config_is_lt = xyes ; then - no_ft=yes - else - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FT2_CFLAGS" - LIBS="$FT2_LIBS $LIBS" -dnl -dnl Sanity checks for the results of freetype-config to some extent -dnl - AC_TRY_RUN([ -#include <ft2build.h> -#include FT_FREETYPE_H -#include <stdio.h> -#include <stdlib.h> - -int -main() -{ - FT_Library library; - FT_Error error; - - error = FT_Init_FreeType(&library); +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. - if (error) - return 1; - else - { - FT_Done_FreeType(library); - return 0; - } -} -],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi # test $ft_config_version -lt $ft_min_version - fi # test x$enable_fttest = xyes -fi # test "$FT2_CONFIG" = "no" -if test x$no_ft = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' else - AC_MSG_RESULT(no) - if test "$FT2_CONFIG" = "no" ; then - echo "*** The freetype-config script installed by FreeType 2 could not be found." - echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - if test x$ft_config_is_lt = xyes ; then - echo "*** Your installed version of the FreeType 2 library is too old." - echo "*** If you have different versions of FreeType 2, make sure that" - echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" - echo "*** are used, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - echo "*** The FreeType test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropiate for your system) is correctly set." - fi - fi - FT2_CFLAGS="" - FT2_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(FT2_CFLAGS) -AC_SUBST(FT2_LIBS) -]) - - -dnl -dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACRO, -[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then - AC_MSG_CHECKING([if $MAKEINFO understands @$1{}]) - echo \\\\input texinfo > conftest.texi - echo @$1{test} >> conftest.texi - if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi - rm -f conftest.texi conftest.info + $1_TRUE='#' + $1_FALSE= fi -]) +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) -dnl -dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACROS, -[for ac_macro in $1; do - MAKEINFO_CHECK_MACRO($ac_macro, $2, - [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" - $3])dnl - done -AC_SUBST(MAKEINFO_MACROS) -]) +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -dnl -dnl Check for enc, cmap, sfd formats -dnl -AC_DEFUN(AC_HAS_KPSE_ENC_FORMATS, - [AC_MSG_CHECKING([whether kpse_enc_format is in kpathsea/tex-file.h]) - AC_TRY_COMPILE([ - #include <stdio.h> - #include <kpathsea/kpathsea.h>], - [kpse_enc_format;kpse_cmap_format;kpse_sfd_format], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KPSE_ENC_FORMATS, 1, - [Define to 1 if your kpathsea has kpse_enc_format])], - [AC_MSG_RESULT(no)])]) +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) -dnl -dnl Check devices for GS -dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) -dnl -AC_DEFUN(AC_GS_HAS_DEVICE, - [AC_MSG_CHECKING([whether $GS has the $1 device]) - if $GS -h | grep $1 >/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - $2 - fi -]) diff --git a/Build/source/texk/dvipng/color.c b/Build/source/texk/dvipng/color.c index 3fe46a2f7c5..c4470bbacb5 100644 --- a/Build/source/texk/dvipng/color.c +++ b/Build/source/texk/dvipng/color.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/commands.h b/Build/source/texk/dvipng/commands.h index ea1691808f1..5b9393e9b7b 100644 --- a/Build/source/texk/dvipng/commands.h +++ b/Build/source/texk/dvipng/commands.h @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure index a6fba6bad1f..3c71269e5df 100755 --- a/Build/source/texk/dvipng/configure +++ b/Build/source/texk/dvipng/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dvipng 1.8. +# Generated by GNU Autoconf 2.59 for dvipng 1.9. # # Report bugs to <dvipng@nongnu.org>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='dvipng' PACKAGE_TARNAME='dvipng' -PACKAGE_VERSION='1.8' -PACKAGE_STRING='dvipng 1.8' +PACKAGE_VERSION='1.9' +PACKAGE_STRING='dvipng 1.9' PACKAGE_BUGREPORT='dvipng@nongnu.org' ac_unique_file="dvipng.c" @@ -311,7 +311,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GS PSFONTS_O CPP EGREP FT2_CONFIG FT2_CFLAGS FT2_LIBS ALLOCA LIBOBJS POW_LIB INSTALL_BIN_TARGET MAKEINFO MAKEINFO_MACROS INSTALL_INFO LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA GS PSFONTS_O CPP EGREP ALLOCA MAKEINFO MAKEINFO_MACROS INSTALL_INFO ZLIBCPPFLAGS LDZLIB ZLIBDEP LIBPNGCPPFLAGS LDLIBPNG LIBPNGDEP LIBT1CPPFLAGS LDLIBT1 LIBT1DEP GDCPPFLAGS LDGD GDDEP FREETYPE2CPPFLAGS LDFREETYPE2 FREETYPE2DEP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LD AR ARFLAGS texmfmain LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dvipng 1.8 to adapt to many kinds of systems. +\`configure' configures dvipng 1.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -837,7 +837,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvipng 1.8:";; + short | recursive ) echo "Configuration of dvipng 1.9:";; esac cat <<\_ACEOF @@ -846,24 +846,45 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-debug Compile without debug (-d) option --enable-timing Output execution time of dvipng - --disable-freetypetest Do not try to compile and run - a test FreeType program - --enable-selfauto-set This option will make the final binary explicitly - set the $SELFAUTO... variables to make it look as - dvipng is installed in the main texmf tree, even if - it isn't. This is necessary when texmf.cnf uses - $SELFAUTO... variables and dvipng is not installed - in the texmf tree. Otherwise, dvipng may not be able - to find virtual fonts, or psfonts.map. + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gs=/PATH/TO/gs Specify where GhostScript is located - --with-ft-prefix=PREFIX - Prefix where FreeType is installed (optional) - --with-ft-exec-prefix=PREFIX - Exec prefix where FreeType is installed (optional) + --with-gs=/PATH/TO/gs Hard-wire the location of GhostScript + --with-system-zlib use installed zlib library + --with-zlib-libdir=DIR + Specify directory where the zlib.a resides. + --with-zlib-include=DIR + Specify the zlib header files location. + --with-system-pnglib use installed pnglib library + --with-pnglib-libdir=DIR + Specify directory where the png library (libpng.a) resides. + --with-pnglib-include=DIR + Specify the pnglib header files location. + --with-system-t1lib Use installed T1lib + --with-t1lib-libdir=DIR + Specify the location of T1lib library files (libt1.a) + --with-t1lib-include=DIR + Specify the location of T1lib header files + --with-system-gd use installed gd library + --with-gd-libdir=DIR + Specify directory where the gd library resides. + --with-gd-include=DIR + Specify the gd header files location. + --with-system-freetype2 use installed freetype2 library + --with-freetype2-libdir=DIR + Specify directory where the freetype2 library resides. + --with-freetype2-include=DIR + Specify the freetype2 header files location. + --without-mktexmf-default do not run mktexmf if MF source missing + --without-mktexpk-default do not run mktexpk if PK font missing + --without-mktextfm-default do not run mktextfm if TFM file missing + --without-mkocp-default do not run mkocp if OCP file missing + --without-mkofm-default do not run mkofm if OFM file missing + --with-mktexfmt-default run mktexfmt if format file missing + --with-mktextex-default run mktextex if TeX source missing Some influential environment variables: CC C compiler command @@ -973,7 +994,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dvipng configure 1.8 +dvipng configure 1.9 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -987,7 +1008,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dvipng $as_me 1.8, which was +It was created by dvipng $as_me 1.9, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -2419,17 +2440,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 -fi - # Check whether --with-gs or --without-gs was given. if test "${with_gs+set}" = set; then @@ -2525,6 +2535,10 @@ cat >>confdefs.h <<_ACEOF #define GS_PATH "$GS" _ACEOF + + + + GS_WARN="" echo "$as_me:$LINENO: checking whether $GS has the pngalpha device" >&5 echo $ECHO_N "checking whether $GS has the pngalpha device... $ECHO_C" >&6 @@ -2556,547 +2570,32 @@ if test -n "$GS_WARN"; then echo "$as_me: WARNING: $GS_WARN" >&2;} fi -# Checks for libraries. - - -echo "$as_me:$LINENO: checking for pow in -lm" >&5 -echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6 -if test "${ac_cv_lib_m_pow+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pow (); -int -main () -{ -pow (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_m_pow=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_m_pow=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 -echo "${ECHO_T}$ac_cv_lib_m_pow" >&6 -if test $ac_cv_lib_m_pow = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for deflate in -lz" >&5 -echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_deflate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflate (); -int -main () -{ -deflate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_z_deflate=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_z_deflate=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 -echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 -if test $ac_cv_lib_z_deflate = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for basename in -lgen" >&5 -echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6 -if test "${ac_cv_lib_gen_basename+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgen $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char basename (); -int -main () -{ -basename (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gen_basename=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_gen_basename=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 -echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6 -if test $ac_cv_lib_gen_basename = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGEN 1 -_ACEOF - - LIBS="-lgen $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for png_read_image in -lpng" >&5 -echo $ECHO_N "checking for png_read_image in -lpng... $ECHO_C" >&6 -if test "${ac_cv_lib_png_png_read_image+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpng $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char png_read_image (); -int -main () -{ -png_read_image (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_png_png_read_image=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_png_png_read_image=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_image" >&5 -echo "${ECHO_T}$ac_cv_lib_png_png_read_image" >&6 -if test $ac_cv_lib_png_png_read_image = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPNG 1 -_ACEOF - - LIBS="-lpng $LIBS" - -else - { { echo "$as_me:$LINENO: error: cannot find/use libpng" >&5 -echo "$as_me: error: cannot find/use libpng" >&2;} - { (exit 1); exit 1; }; } -fi - - -echo "$as_me:$LINENO: checking for gdImageCreate in -lgd" >&5 -echo $ECHO_N "checking for gdImageCreate in -lgd... $ECHO_C" >&6 -if test "${ac_cv_lib_gd_gdImageCreate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gdImageCreate (); -int -main () -{ -gdImageCreate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gd_gdImageCreate=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_gd_gdImageCreate=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageCreate" >&5 -echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreate" >&6 -if test $ac_cv_lib_gd_gdImageCreate = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGD 1 -_ACEOF - - LIBS="-lgd $LIBS" - -else - { { echo "$as_me:$LINENO: error: cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&5 -echo "$as_me: error: cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&2;} - { (exit 1); exit 1; }; } -fi - - -echo "$as_me:$LINENO: checking for kpse_set_progname in -lkpathsea" >&5 -echo $ECHO_N "checking for kpse_set_progname in -lkpathsea... $ECHO_C" >&6 -if test "${ac_cv_lib_kpathsea_kpse_set_progname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkpathsea $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char kpse_set_progname (); -int -main () -{ -kpse_set_progname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_kpathsea_kpse_set_progname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_kpathsea_kpse_set_progname=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_kpathsea_kpse_set_progname" >&5 -echo "${ECHO_T}$ac_cv_lib_kpathsea_kpse_set_progname" >&6 -if test $ac_cv_lib_kpathsea_kpse_set_progname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKPATHSEA 1 -_ACEOF - - LIBS="-lkpathsea $LIBS" - -else - { { echo "$as_me:$LINENO: error: cannot find/use libkpathsea" >&5 -echo "$as_me: error: cannot find/use libkpathsea" >&2;} - { (exit 1); exit 1; }; } +ac_cv_lib_t1_T1_InitLib=yes +PSFONTS_O="" +if test "$ac_cv_lib_t1_T1_InitLib" = yes; then + PSFONTS_O="t1.o" fi -echo "$as_me:$LINENO: checking for T1_InitLib in -lt1" >&5 -echo $ECHO_N "checking for T1_InitLib in -lt1... $ECHO_C" >&6 -if test "${ac_cv_lib_t1_T1_InitLib+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lt1 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +ac_have_freetype2="yes" # we have ft2 +if test "$ac_have_freetype2" = yes; then + # Have to set compiler and linker flags in Makefile.in, it seems. + PSFONTS_O="$PSFONTS_O sfd.o ft.o" -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char T1_InitLib (); -int -main () -{ -T1_InitLib (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_FT2 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_t1_T1_InitLib=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_t1_T1_InitLib=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_t1_T1_InitLib" >&5 -echo "${ECHO_T}$ac_cv_lib_t1_T1_InitLib" >&6 -if test $ac_cv_lib_t1_T1_InitLib = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBT1 1 + cat >>confdefs.h <<\_ACEOF +#define HAVE_FT_LIBRARY_VERSION 1 _ACEOF - LIBS="-lt1 $LIBS" - fi -PSFONTS_O="" -if test "$ac_cv_lib_t1_T1_InitLib" = yes; then - PSFONTS_O="t1.o" +if test -n "$PSFONTS_O"; then + PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" fi - -# Checks for header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3513,610 +3012,6 @@ _ACEOF fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -for ac_header in gd.h png.h kpathsea/kpathsea.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------- ## -## Report this to dvipng@nongnu.org ## -## -------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { echo "$as_me:$LINENO: error: cannot find/use $ac_header" >&5 -echo "$as_me: error: cannot find/use $ac_header" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - -for ac_header in t1lib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------- ## -## Report this to dvipng@nongnu.org ## -## -------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Check whether --with-ft-prefix or --without-ft-prefix was given. -if test "${with_ft_prefix+set}" = set; then - withval="$with_ft_prefix" - ft_config_prefix="$withval" -else - ft_config_prefix="" -fi; - -# Check whether --with-ft-exec-prefix or --without-ft-exec-prefix was given. -if test "${with_ft_exec_prefix+set}" = set; then - withval="$with_ft_exec_prefix" - ft_config_exec_prefix="$withval" -else - ft_config_exec_prefix="" -fi; -# Check whether --enable-freetypetest or --disable-freetypetest was given. -if test "${enable_freetypetest+set}" = set; then - enableval="$enable_freetypetest" - -else - enable_fttest=yes -fi; - -if test x$ft_config_exec_prefix != x ; then - ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config - fi -fi -if test x$ft_config_prefix != x ; then - ft_config_args="$ft_config_args --prefix=$ft_config_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_prefix/bin/freetype-config - fi -fi -# Extract the first word of "freetype-config", so it can be a program name with args. -set dummy freetype-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_FT2_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $FT2_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_FT2_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_FT2_CONFIG" && ac_cv_path_FT2_CONFIG="no" - ;; -esac -fi -FT2_CONFIG=$ac_cv_path_FT2_CONFIG - -if test -n "$FT2_CONFIG"; then - echo "$as_me:$LINENO: result: $FT2_CONFIG" >&5 -echo "${ECHO_T}$FT2_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - -min_ft_version=6.1.0 -echo "$as_me:$LINENO: checking for FreeType - version >= $min_ft_version" >&5 -echo $ECHO_N "checking for FreeType - version >= $min_ft_version... $ECHO_C" >&6 -no_ft="" -if test "$FT2_CONFIG" = "no" ; then - no_ft=yes -else - FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` - FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` - ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - ft_min_major_version=`echo $min_ft_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - ft_min_minor_version=`echo $min_ft_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - ft_min_micro_version=`echo $min_ft_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test x$enable_fttest = xyes ; then - ft_config_is_lt="" - if test $ft_config_major_version -lt $ft_min_major_version ; then - ft_config_is_lt=yes - else - if test $ft_config_major_version -eq $ft_min_major_version ; then - if test $ft_config_minor_version -lt $ft_min_minor_version ; then - ft_config_is_lt=yes - else - if test $ft_config_minor_version -eq $ft_min_minor_version ; then - if test $ft_config_micro_version -lt $ft_min_micro_version ; then - ft_config_is_lt=yes - fi - fi - fi - fi - fi - if test x$ft_config_is_lt = xyes ; then - no_ft=yes - else - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FT2_CFLAGS" - LIBS="$FT2_LIBS $LIBS" - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include <ft2build.h> -#include FT_FREETYPE_H -#include <stdio.h> -#include <stdlib.h> - -int -main() -{ - FT_Library library; - FT_Error error; - - error = FT_Init_FreeType(&library); - - if (error) - return 1; - else - { - FT_Done_FreeType(library); - return 0; - } -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -no_ft=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi # test $ft_config_version -lt $ft_min_version - fi # test x$enable_fttest = xyes -fi # test "$FT2_CONFIG" = "no" -if test x$no_ft = x ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - CFLAGS="$FT2_CFLAGS $CFLAGS" - LIBS="$FT2_LIBS $LIBS" - PSFONTS_O="$PSFONTS_O ft.o" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FT2 1 -_ACEOF - - ac_have_freetype2="yes" -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - if test "$FT2_CONFIG" = "no" ; then - echo "*** The freetype-config script installed by FreeType 2 could not be found." - echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - if test x$ft_config_is_lt = xyes ; then - echo "*** Your installed version of the FreeType 2 library is too old." - echo "*** If you have different versions of FreeType 2, make sure that" - echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" - echo "*** are used, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - echo "*** The FreeType test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropiate for your system) is correctly set." - fi - fi - FT2_CFLAGS="" - FT2_LIBS="" - ac_have_freetype2="no" -fi - - - -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then @@ -4253,94 +3148,23 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 -if test "${ac_cv_header_stdbool_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -#include <stdbool.h> -#ifndef bool -# error bool is not defined -#endif -#ifndef false -# error false is not defined -#endif -#if false -# error false is not 0 -#endif -#ifndef true -# error true is not defined -#endif -#if true != 1 -# error true is not 1 -#endif -#ifndef __bool_true_false_are_defined -# error __bool_true_false_are_defined is not defined -#endif - struct s { _Bool s: 1; _Bool t; } s; - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) -0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) -0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; -int -main () -{ - return !a + !b + !c + !d + !e + !f + !g + !h + !i; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdbool_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdbool_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 -echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 -if test "${ac_cv_type__Bool+set}" = set; then + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4350,16 +3174,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if ((_Bool *) 0) - return 0; -if (sizeof (_Bool)) - return 0; - ; - return 0; -} + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4383,37 +3199,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type__Bool=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type__Bool=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6 -if test $ac_cv_type__Bool = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - fi -if test $ac_cv_header_stdbool_h = yes; then +done -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF -fi -for ac_header in fcntl.h sys/time.h + +for ac_header in inttypes.h fcntl.h sys/time.h stdbool.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -4803,205 +3614,18 @@ _ACEOF fi -if test "$ac_cv_header_inttypes_h" = "yes"; then + +#if test "$ac_cv_header_inttypes_h" = yes; then # Sometimes we want to use gcc -ansi -pedantic as a portability test # The typedef of int64_t is not in the system header file in that # case. Then, #define int64_t as "long long", which is non-ansi, but # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t is only used as - # typecast, and there are no problems. autoconf 2.13 equivalent: - # AC_CHECK_TYPE(int64_t, long long) - # AC_CHECK_TYPE(uint64_t, unsigned long long) - echo "$as_me:$LINENO: checking for int64_t" >&5 -echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 -if test "${ac_cv_type_int64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((int64_t *) 0) - return 0; -if (sizeof (int64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 -echo "${ECHO_T}$ac_cv_type_int64_t" >&6 -if test $ac_cv_type_int64_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define int64_t long long -_ACEOF - -fi - - echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 -if test "${ac_cv_type_uint64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((uint64_t *) 0) - return 0; -if (sizeof (uint64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uint64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uint64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 -echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 -if test $ac_cv_type_uint64_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define uint64_t unsigned long long -_ACEOF - -fi - -fi -echo "$as_me:$LINENO: checking whether kpse_enc_format is in kpathsea/tex-file.h" >&5 -echo $ECHO_N "checking whether kpse_enc_format is in kpathsea/tex-file.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include <stdio.h> - #include <kpathsea/kpathsea.h> -int -main () -{ -kpse_enc_format;kpse_cmap_format;kpse_sfd_format - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KPSE_ENC_FORMATS 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # typedef can be a problem, but in dvipng int64_t only is used as + # typecast, and there are no problems. +# MY_CHECK_TYPE(int64_t, long long) +# MY_CHECK_TYPE(uint64_t, unsigned long long) +#fi # Checks for library functions. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works @@ -5365,7 +3989,7 @@ fi -for ac_header in unistd.h vfork.h +for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -5515,8 +4139,7 @@ fi done - -for ac_func in fork vfork +for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -5617,28 +4240,146 @@ _ACEOF fi done -if test "x$ac_cv_func_fork" = xyes; then - echo "$as_me:$LINENO: checking for working fork" >&5 -echo $ECHO_N "checking for working fork... $ECHO_C" >&6 -if test "${ac_cv_func_fork_works+set}" = set; then +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - ac_cv_func_fork_works=cross + ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF -/* By Ruediger Kuhlmann. */ - #include <sys/types.h> - #if HAVE_UNISTD_H - # include <unistd.h> - #endif - /* Some systems only have a dummy stub for fork() */ - int main () - { - if (fork() < 0) - exit (1); - exit (0); - } +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include <fcntl.h> +#include <sys/mman.h> + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + exit (0); +} _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -5651,231 +4392,300 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes + ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_func_fork_works=no +ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 -echo "${ECHO_T}$ac_cv_func_fork_works" >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF -else - ac_cv_func_fork_works=$ac_cv_func_fork fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - echo "$as_me:$LINENO: checking for working vfork" >&5 -echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 -if test "${ac_cv_func_vfork_works+set}" = set; then +rm -f conftest.mmap + + +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_vfork_works=cross -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -#include <stdio.h> -#include <stdlib.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/wait.h> -#if HAVE_UNISTD_H -# include <unistd.h> -#endif -#if HAVE_VFORK_H -# include <vfork.h> +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> #endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include <vfork.h>, but some compilers - (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif +extern "C" { - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus } +#endif int main () { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } +return f != $ac_func; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_vfork_works=yes + eval "$as_ac_var=yes" else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_vfork_works=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +eval "$as_ac_var=no" fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi +echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 +if test "${ac_cv_func__doprnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define _doprnt innocuous__doprnt -if test "x$ac_cv_func_vfork_works" = xyes; then +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_VFORK 1 -_ACEOF +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif -else +#undef _doprnt -cat >>confdefs.h <<\_ACEOF -#define vfork fork +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +char (*f) () = _doprnt; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != _doprnt; + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func__doprnt=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -if test "x$ac_cv_func_fork_works" = xyes; then +echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6 +if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_FORK 1 +#define HAVE_DOPRNT 1 _ACEOF fi +fi +done -for ac_header in stdlib.h + + + + + + + + + +for ac_func in dup2 strchr strrchr memchr memset putenv munmap strtol do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5889,199 +4699,374 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +fi +done + +if test "$enable_timing" = "yes"; then + + +for ac_func in ftime gettimeofday +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------- ## -## Report this to dvipng@nongnu.org ## -## -------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +fi +done + +fi + + + + + +# Documentation-related checks +# Extract the first word of "makeinfo", so it can be a program name with args. +set dummy makeinfo; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MAKEINFO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + case $MAKEINFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO=":" + ;; +esac fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +MAKEINFO=$ac_cv_path_MAKEINFO +if test -n "$MAKEINFO"; then + echo "$as_me:$LINENO: result: $MAKEINFO" >&5 +echo "${ECHO_T}$MAKEINFO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +for ac_macro in acronym env option; do + if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then + echo "$as_me:$LINENO: checking if $MAKEINFO understands @$ac_macro{}" >&5 +echo $ECHO_N "checking if $MAKEINFO understands @$ac_macro{}... $ECHO_C" >&6 + echo \\\\input texinfo > conftest.texi + echo @$ac_macro{test} >> conftest.texi + if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + : + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" + + fi + rm -f conftest.texi conftest.info fi + done -done -echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +# Extract the first word of "install-info", so it can be a program name with args. +set dummy install-info; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no + case $INSTALL_INFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH /usr/sbin /sbin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" + ;; +esac +fi +INSTALL_INFO=$ac_cv_path_INSTALL_INFO + +if test -n "$INSTALL_INFO"; then + echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 +echo "${ECHO_T}$INSTALL_INFO" >&6 else - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Check whether --with-system_zlib or --without-system_zlib was given. +if test "${with_system_zlib+set}" = set; then + withval="$with_system_zlib" + +fi; + + +# Check whether --with-zlib_libdir or --without-zlib_libdir was given. +if test "${with_zlib_libdir+set}" = set; then + withval="$with_zlib_libdir" + +fi; + + +# Check whether --with-zlib_include or --without-zlib_include was given. +if test "${with_zlib_include+set}" = set; then + withval="$with_zlib_include" + +fi; + +if test "$needs_zlib" = no; then + ZLIBCPPFLAGS= + LDZLIB= + ZLIBDEP= +else + EXTRA_ZLIB_INCLUDE= + EXTRA_ZLIB_LIBDIR= + + if test "$with_system_zlib" = yes; then + if test "x$with_zlib_libdir" != x; then + EXTRA_ZLIB_LIBDIR="-L$with_zlib_libdir" + fi + if test "x$with_zlib_include" != x; then + EXTRA_ZLIB_INCLUDE="-I$with_zlib_include" + fi + fi + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_ZLIB_LIBDIR" + CPP="$CPP $EXTRA_ZLIB_INCLUDE" + + if test "$with_system_zlib" = yes; then + +echo "$as_me:$LINENO: checking for inflate in -lz" >&5 +echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_inflate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if STDC_HEADERS || HAVE_STDLIB_H -# include <stdlib.h> -#else -char *malloc (); -#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inflate (); int main () { -exit (malloc (0) ? 0 : 1); +inflate (); ; return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes + ac_cv_lib_z_inflate=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +ac_cv_lib_z_inflate=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 -if test $ac_cv_func_malloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 +echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5 +echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6 +if test $ac_cv_lib_z_inflate = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 _ACEOF - case $LIBOBJS in - "malloc.$ac_objext" | \ - *" malloc.$ac_objext" | \ - "malloc.$ac_objext "* | \ - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF + LIBS="-lz $LIBS" +else + { echo "$as_me:$LINENO: WARNING: Standard ZLIB library not found. Compiling my own." >&5 +echo "$as_me: WARNING: Standard ZLIB library not found. Compiling my own." >&2;} + with_system_zlib=no fi + fi + if test "$with_system_zlib" = yes; then - - -for ac_header in stdlib.h unistd.h +for ac_header in zlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -6230,62 +5215,105 @@ fi done + if test "$ac_cv_header_zlib_h" != yes; then + { echo "$as_me:$LINENO: WARNING: zlib.h not found. Using my own zlib sources." >&5 +echo "$as_me: WARNING: zlib.h not found. Using my own zlib sources." >&2;} + with_system_zlib=no + fi + fi -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + LDFLAGS=$OLD_LDFLAGS + CPP=$OLD_CPP + LIBS=$OLD_LIBS + + if test "$with_system_zlib" != yes; then + ZLIBCPPFLAGS='-I$(ZLIBDIR) -I$(ZLIBSRCDIR)' + LDZLIB='$(ZLIBDIR)/libz.a' + ZLIBDEP='$(ZLIBDIR)/libz.a' + using_system_zlib=no + else + ZLIBCPPFLAGS="$EXTRA_ZLIB_INCLUDE" + LDZLIB="$EXTRA_ZLIB_LIBDIR -lz" + ZLIBDEP= + using_system_zlib=yes + fi +fi + + + + + + +# Check whether --with-system-pnglib or --without-system-pnglib was given. +if test "${with_system_pnglib+set}" = set; then + withval="$with_system_pnglib" + +fi; + + +# Check whether --with-pnglib_libdir or --without-pnglib_libdir was given. +if test "${with_pnglib_libdir+set}" = set; then + withval="$with_pnglib_libdir" + +fi; + + +# Check whether --with-pnglib_include or --without-pnglib_include was given. +if test "${with_pnglib_include+set}" = set; then + withval="$with_pnglib_include" + +fi; + +if test "$needs_pnglib" = no; then + LIBPNGCPPFLAGS= + LDLIBPNG= + LIBPNGDEP= +else + EXTRA_LIBPNG_INCLUDE= + EXTRA_LIBPNG_LIBDIR= + + if test "$with_system_pnglib" = yes; then + if test "x$with_pnglib_libdir" != x; then + EXTRA_LIBPNG_LIBDIR="-L$with_pnglib_libdir" + fi + if test "x$with_pnglib_include" != x; then + EXTRA_LIBPNG_INCLUDE="-I$with_pnglib_include" + fi + fi + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_LIBPNG_LIBDIR" + CPP="$CPP $EXTRA_LIBPNG_INCLUDE" + + if test "$with_system_pnglib" = yes; then + echo "$as_me:$LINENO: checking for png_set_read_fn in -lpng" >&5 +echo $ECHO_N "checking for png_set_read_fn in -lpng... $ECHO_C" >&6 +if test "${ac_cv_lib_png_png_set_read_fn+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng -lz -lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - +char png_set_read_fn (); int main () { -return f != $ac_func; +png_set_read_fn (); ; return 0; } @@ -6312,208 +5340,179 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_cv_lib_png_png_set_read_fn=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_cv_lib_png_png_set_read_fn=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_read_fn" >&5 +echo "${ECHO_T}$ac_cv_lib_png_png_set_read_fn" >&6 +if test $ac_cv_lib_png_png_set_read_fn = yes; then + pnglib=-lpng +else + { echo "$as_me:$LINENO: WARNING: Standard PNG library not found. Compiling my own." >&5 +echo "$as_me: WARNING: Standard PNG library not found. Compiling my own." >&2;} + with_system_pnglib=no +fi + + fi + LDFLAGS=$OLD_LDFLAGS + CPP=$OLD_CPP + LIBS=$OLD_LIBS + + if test "$with_system_pnglib" != yes; then + LIBPNGCPPFLAGS='-I$(LIBPNGDIR) -I$(LIBPNGSRCDIR)' + LDLIBPNG='$(LIBPNGDIR)/libpng.a' + LIBPNGDEP='$(LIBPNGDIR)/libpng.a' + using_system_pnglib=no + else + LIBPNGCPPFLAGS="$EXTRA_LIBPNG_INCLUDE" + LDLIBPNG="$EXTRA_LIBPNG_LIBDIR -lpng" + LIBPNGDEP= + using_system_pnglib=yes + fi fi -done -echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include <fcntl.h> -#include <sys/mman.h> -#if !STDC_HEADERS && !HAVE_STDLIB_H -char *malloc (); -#endif -/* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif +# Check whether --with-system-t1lib or --without-system-t1lib was given. +if test "${with_system_t1lib+set}" = set; then + withval="$with_system_t1lib" -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H -# include <sys/param.h> -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ +fi; -#endif /* no HAVE_GETPAGESIZE */ -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; +# Check whether --with-t1lib_libdir or --without-t1lib_libdir was given. +if test "${with_t1lib_libdir+set}" = set; then + withval="$with_t1lib_libdir" - pagesize = getpagesize (); +fi; - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - exit (1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - exit (1); - if (write (fd, data, pagesize) != pagesize) - exit (1); - close (fd); - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - exit (1); - data2 = (char *) malloc (2 * pagesize); - if (!data2) - exit (1); - data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit (1); +# Check whether --with-t1lib_include or --without-t1lib_include was given. +if test "${with_t1lib_include+set}" = set; then + withval="$with_t1lib_include" - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - exit (1); - if (read (fd, data3, pagesize) != pagesize) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit (1); - close (fd); - exit (0); +fi; + +if test "$needs_libt1" = no; then + LIBT1CPPFLAGS= + LDLIBT1= + LIBT1DEP= +else + EXTRA_LIBT1_INCLUDE= + EXTRA_LIBT1_LIBDIR= + + if test "$with_system_t1lib" = yes; then + if test "x$with_t1lib_libdir" != x; then + EXTRA_LIBT1_LIBDIR="-L$with_t1lib_libdir" + fi + if test "x$with_t1lib_include" != x; then + EXTRA_LIBT1_INCLUDE="-I$with_t1lib_include" + fi + fi + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLDCPPFLAGS=$CPPFLAGS + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_LIBT1_LIBDIR" + CPP="$CPP $EXTRA_LIBT1_INCLUDE" + CPPFLAGS="$CPPFLAGS $EXTRA_LIBT1_INCLUDE" + + if test "$with_system_t1lib" = yes; then + echo "$as_me:$LINENO: checking for T1_AddFont in -lt1" >&5 +echo $ECHO_N "checking for T1_AddFont in -lt1... $ECHO_C" >&6 +if test "${ac_cv_lib_t1_T1_AddFont+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lt1 -lz -lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char T1_AddFont (); +int +main () +{ +T1_AddFont (); + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes + ac_cv_lib_t1_T1_AddFont=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no +ac_cv_lib_t1_T1_AddFont=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_lib_t1_T1_AddFont" >&5 +echo "${ECHO_T}$ac_cv_lib_t1_T1_AddFont" >&6 +if test $ac_cv_lib_t1_T1_AddFont = yes; then + t1lib=-lt1 +else + { echo "$as_me:$LINENO: WARNING: Standard T1 library not found. Compiling my own." >&5 +echo "$as_me: WARNING: Standard T1 library not found. Compiling my own." >&2;} + with_system_t1lib=no fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF -fi -rm -f conftest.mmap + fi -echo "$as_me:$LINENO: checking for working strtod" >&5 -echo $ECHO_N "checking for working strtod... $ECHO_C" >&6 -if test "${ac_cv_func_strtod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_strtod=no + LIBS="-lt1 -lm $LIBS" + if test "$with_system_t1lib" = yes; then + echo "$as_me:$LINENO: checking whether installed T1 lib is >= v 5.0.0 " >&5 +echo $ECHO_N "checking whether installed T1 lib is >= v 5.0.0 ... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + ac_compile_t1lib=1 + ] else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6522,30 +5521,32 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -double strtod (); -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - exit (1); - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - exit (1); - } - exit (0); +#include <stdlib.h> +#include "t1lib.h" +#define BUFLEN 128 +int main() { + char *t1libId = T1_GetLibIdent(); + char testbuf[BUFLEN]; + char *p = testbuf; + int i; + int version_num; + /* T1_GetLibIdent() might return something like '0.8-beta2'; + convert the leading numbers to a single digit: */ + for (i = 0; i < BUFLEN - 1; i++) { + if (t1libId[i] >= '0' && t1libId[i] <= '9') + *p++ = t1libId[i]; + else if (t1libId[i] != '.' && t1libId[i] != '_' && t1libId[i] != '-') + break; + } + *p = '\0'; + version_num = strtoul(testbuf, (char **)NULL, 10); + /* xdvik needs >= 5.0.0. + Try to deal with version strings with 1 or more digits. */ + if (version_num >= 500 + || (version_num < 100 && version_num >= 50) + || (version_num < 10 && version_num >= 5)) + exit(0); + exit(1); } _ACEOF @@ -6560,81 +5561,121 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_strtod=yes + ac_compile_t1lib=0 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_func_strtod=no +ac_compile_t1lib=1 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + if test $ac_compile_t1lib = 0; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no, will compile my own version" >&5 +echo "${ECHO_T}no, will compile my own version" >&6 + with_system_t1lib=no + fi + fi + + LDFLAGS=$OLD_LDFLAGS + CPP=$OLD_CPP + CPPFLAGS=$OLDCPPFLAGS + LIBS=$OLD_LIBS + + if test "$with_system_t1lib" != yes; then + LIBT1CPPFLAGS='-I$(LIBT1DIR) -I$(LIBT1SRCDIR) -I$(LIBT1DIR)/../type1 -I$(LIBT1SRCDIR)/../type1' + LDLIBT1='$(LIBT1DIR)/libt1.a $(LIBT1DIR)/../type1/libtype1.a' + LIBT1DEP='$(LIBT1DIR)/libt1.a $(LIBT1DIR)/../type1/libtype1.a' + using_system_t1lib=no + else + LIBT1CPPFLAGS="$EXTRA_LIBT1_INCLUDE" + LDLIBT1="$EXTRA_LIBT1_LIBDIR -lt1" + LIBT1DEP= + using_system_t1lib=yes + fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 -if test $ac_cv_func_strtod = no; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; -esac -echo "$as_me:$LINENO: checking for pow" >&5 -echo $ECHO_N "checking for pow... $ECHO_C" >&6 -if test "${ac_cv_func_pow+set}" = set; then + + + + + +# Check whether --with-system_gd or --without-system_gd was given. +if test "${with_system_gd+set}" = set; then + withval="$with_system_gd" + +fi; + + +# Check whether --with-gd_libdir or --without-gd_libdir was given. +if test "${with_gd_libdir+set}" = set; then + withval="$with_gd_libdir" + +fi; + + +# Check whether --with-gd_include or --without-gd_include was given. +if test "${with_gd_include+set}" = set; then + withval="$with_gd_include" + +fi; + +if test "$needs_gd" = no; then + GDCPPFLAGS= + LDGD= + GDDEP= +else + EXTRA_GD_INCLUDE= + EXTRA_GD_LIBDIR= + + if test "$with_system_gd" = yes; then + if test "x$with_gd_libdir" != x; then + EXTRA_GD_LIBDIR="-L$with_gd_libdir" + fi + if test "x$with_gd_include" != x; then + EXTRA_GD_INCLUDE="-I$with_gd_include" + fi + fi + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_GD_LIBDIR" + CPP="$CPP $EXTRA_GD_INCLUDE" + + if test "$with_system_gd" = yes; then + +echo "$as_me:$LINENO: checking for gdImageCreateFromPng in -lgd" >&5 +echo $ECHO_N "checking for gdImageCreateFromPng in -lgd... $ECHO_C" >&6 +if test "${ac_cv_lib_gd_gdImageCreateFromPng+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgd $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define pow to an innocuous variant, in case <limits.h> declares pow. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define pow innocuous_pow - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pow (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef pow /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pow (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pow) || defined (__stub___pow) -choke me -#else -char (*f) () = pow; -#endif -#ifdef __cplusplus -} -#endif - +char gdImageCreateFromPng (); int main () { -return f != pow; +gdImageCreateFromPng (); ; return 0; } @@ -6661,27 +5702,43 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_pow=yes + ac_cv_lib_gd_gdImageCreateFromPng=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pow=no +ac_cv_lib_gd_gdImageCreateFromPng=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 -echo "${ECHO_T}$ac_cv_func_pow" >&6 +echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageCreateFromPng" >&5 +echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreateFromPng" >&6 +if test $ac_cv_lib_gd_gdImageCreateFromPng = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGD 1 +_ACEOF + + LIBS="-lgd $LIBS" + +else + { echo "$as_me:$LINENO: WARNING: Standard gd library not found. Compiling my own." >&5 +echo "$as_me: WARNING: Standard gd library not found. Compiling my own." >&2;} + with_system_gd=no +fi + + fi + + if test "$with_system_gd" = yes; then -if test $ac_cv_func_pow = no; then - echo "$as_me:$LINENO: checking for pow in -lm" >&5 -echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6 -if test "${ac_cv_lib_m_pow+set}" = set; then +echo "$as_me:$LINENO: checking for gdImageGif in -lgd" >&5 +echo $ECHO_N "checking for gdImageGif in -lgd... $ECHO_C" >&6 +if test "${ac_cv_lib_gd_gdImageGif+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" +LIBS="-lgd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6695,11 +5752,11 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pow (); +char gdImageGif (); int main () { -pow (); +gdImageGif (); ; return 0; } @@ -6726,93 +5783,63 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_m_pow=yes + ac_cv_lib_gd_gdImageGif=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_m_pow=no +ac_cv_lib_gd_gdImageGif=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 -echo "${ECHO_T}$ac_cv_lib_m_pow" >&6 -if test $ac_cv_lib_m_pow = yes; then - POW_LIB=-lm -else - { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 -echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageGif" >&5 +echo "${ECHO_T}$ac_cv_lib_gd_gdImageGif" >&6 +if test $ac_cv_lib_gd_gdImageGif = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGD 1 +_ACEOF -fi + LIBS="-lgd $LIBS" +else + { echo "$as_me:$LINENO: WARNING: gd library does not have the necessary gif support. Compiling my own." >&5 +echo "$as_me: WARNING: gd library does not have the necessary gif support. Compiling my own." >&2;} + with_system_gd=no fi + fi -for ac_func in vprintf + if test "$with_system_gd" = yes; then + +for ac_header in gd.h do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -6826,81 +5853,215 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -echo "$as_me:$LINENO: checking for _doprnt" >&5 -echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 -if test "${ac_cv_func__doprnt+set}" = set; then +fi + +done + + if test "$ac_cv_header_gd_h" != yes; then + { echo "$as_me:$LINENO: WARNING: gd.h not found. Using my own gd sources." >&5 +echo "$as_me: WARNING: gd.h not found. Using my own gd sources." >&2;} + with_system_gd=no + fi + fi + + LDFLAGS=$OLD_LDFLAGS + CPP=$OLD_CPP + LIBS=$OLD_LIBS + + if test "$with_system_gd" != yes; then + GDCPPFLAGS='-I$(GDDIR) -I$(GDSRCDIR)' + LDGD='$(GDDIR)/libgd.a' + GDDEP='$(GDDIR)/libgd.a' + using_system_gd=no + else + GDCPPFLAGS="$EXTRA_GD_INCLUDE" + LDGD="$EXTRA_GD_LIBDIR -lgd" + GDDEP= + using_system_gd=yes + fi +fi + + + + + + +# Check whether --with-system_freetype2 or --without-system_freetype2 was given. +if test "${with_system_freetype2+set}" = set; then + withval="$with_system_freetype2" + +fi; + + +# Check whether --with-freetype2_libdir or --without-freetype2_libdir was given. +if test "${with_freetype2_libdir+set}" = set; then + withval="$with_freetype2_libdir" + +fi; + + +# Check whether --with-freetype2_include or --without-freetype2_include was given. +if test "${with_freetype2_include+set}" = set; then + withval="$with_freetype2_include" + +fi; + +if test "$needs_freetype2" = no; then + FREETYPE2CPPFLAGS= + LDFREETYPE2= + FREETYPE2DEP= +else + EXTRA_FREETYPE2_INCLUDE= + EXTRA_FREETYPE2_LIBDIR= + + if test "$with_system_freetype2" = yes; then + if test "x$with_freetype2_libdir" != x; then + EXTRA_FREETYPE2_LIBDIR="-L$with_freetype2_libdir" + fi + if test "x$with_freetype2_include" != x; then + EXTRA_FREETYPE2_INCLUDE="-I$with_freetype2_include" + fi + fi + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_FREETYPE2_LIBDIR" + CPP="$CPP $EXTRA_FREETYPE2_INCLUDE" + + if test "$with_system_freetype2" = yes; then + +echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5 +echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6 +if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfreetype $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char _doprnt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub__doprnt) || defined (__stub____doprnt) -choke me -#else -char (*f) () = _doprnt; -#endif -#ifdef __cplusplus -} -#endif - +char FT_Init_FreeType (); int main () { -return f != _doprnt; +FT_Init_FreeType (); ; return 0; } @@ -6927,101 +6088,63 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func__doprnt=yes + ac_cv_lib_freetype_FT_Init_FreeType=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func__doprnt=no +ac_cv_lib_freetype_FT_Init_FreeType=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -echo "${ECHO_T}$ac_cv_func__doprnt" >&6 -if test $ac_cv_func__doprnt = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 +echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 +echo "${ECHO_T}$ac_cv_lib_freetype_FT_Init_FreeType" >&6 +if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBFREETYPE 1 _ACEOF -fi + LIBS="-lfreetype $LIBS" +else + { echo "$as_me:$LINENO: WARNING: Standard FreeType2 library not found. Compiling my own." >&5 +echo "$as_me: WARNING: Standard FreeType2 library not found. Compiling my own." >&2;} + with_system_freetype2=no fi -done - - - - - - - - + fi + if test "$with_system_freetype2" = yes; then -for ac_func in dup2 memset munmap pow putenv strchr strrchr strtol strstr +for ac_header in ft2build.h do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -7035,90 +6158,422 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done -if test "$enable_timing" = "yes"; then + if test "$ac_cv_header_ft2build_h" != yes; then + { echo "$as_me:$LINENO: WARNING: ft2build.h not found. Using my own freetype2 sources." >&5 +echo "$as_me: WARNING: ft2build.h not found. Using my own freetype2 sources." >&2;} + with_system_freetype2=no + fi + fi + LDFLAGS=$OLD_LDFLAGS + CPP=$OLD_CPP + LIBS=$OLD_LIBS -for ac_func in ftime gettimeofday -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + if test "$with_system_freetype2" != yes; then + FREETYPE2CPPFLAGS='-I$(FREETYPE2SRCDIR)/include' + LDFREETYPE2='$(FREETYPE2DIR)/.libs/libfreetype.a' + FREETYPE2DEP='$(FREETYPE2DIR)/.libs/libfreetype.a' + using_system_freetype2=no + else + FREETYPE2CPPFLAGS="$EXTRA_FREETYPE2_INCLUDE" + LDFREETYPE2="$EXTRA_FREETYPE2_LIBDIR -lfreetype" + FREETYPE2DEP= + using_system_freetype2=yes + fi +fi + + + + + + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +echo "$as_me:$LINENO: checking for loader (symbol LD)" >&5 +echo $ECHO_N "checking for loader (symbol LD)... $ECHO_C" >&6 +if test "${cf_cv_subst_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + +test -z "$LD" && LD=ld +cf_cv_subst_LD=$LD +fi + +LD=${cf_cv_subst_LD} +echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 + + +echo "$as_me:$LINENO: checking for archiver (symbol AR)" >&5 +echo $ECHO_N "checking for archiver (symbol AR)... $ECHO_C" >&6 +if test "${cf_cv_subst_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +test -z "$AR" && AR=ar +cf_cv_subst_AR=$AR +fi + +AR=${cf_cv_subst_AR} +echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 + + +echo "$as_me:$LINENO: checking for archiver options (symbol ARFLAGS)" >&5 +echo $ECHO_N "checking for archiver options (symbol ARFLAGS)... $ECHO_C" >&6 +if test "${cf_cv_subst_ARFLAGS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +test -z "$ARFLAGS" && ARFLAGS=rc +cf_cv_subst_ARFLAGS=$ARFLAGS +fi + +ARFLAGS=${cf_cv_subst_ARFLAGS} +echo "$as_me:$LINENO: result: $ARFLAGS" >&5 +echo "${ECHO_T}$ARFLAGS" >&6 + + + + +# Check whether --with-mktexmf-default or --without-mktexmf-default was given. +if test "${with_mktexmf_default+set}" = set; then + withval="$with_mktexmf_default" + +else + with_mktexmf_default=yes +fi; + +# Check whether --with-mktexpk-default or --without-mktexpk-default was given. +if test "${with_mktexpk_default+set}" = set; then + withval="$with_mktexpk_default" + +else + with_mktexpk_default=yes +fi; + +# Check whether --with-mktextfm-default or --without-mktextfm-default was given. +if test "${with_mktextfm_default+set}" = set; then + withval="$with_mktextfm_default" + +else + with_mktextfm_default=yes +fi; + +# Check whether --with-mkocp-default or --without-mkocp-default was given. +if test "${with_mkocp_default+set}" = set; then + withval="$with_mkocp_default" + +else + with_mkocp_default=yes +fi; + +# Check whether --with-mkofm-default or --without-mkofm-default was given. +if test "${with_mkofm_default+set}" = set; then + withval="$with_mkofm_default" + +else + with_mkofm_default=yes +fi; + +# Check whether --with-mktexfmt-default or --without-mktexfmt-default was given. +if test "${with_mktexfmt_default+set}" = set; then + withval="$with_mktexfmt_default" + +fi; + +# Check whether --with-mktextex-default or --without-mktextex-default was given. +if test "${with_mktextex_default+set}" = set; then + withval="$with_mktextex_default" + with_mktextex_default=yes +else + with_mktextex_default=no +fi; + +echo "$as_me:$LINENO: checking where the main texmf tree is located" >&5 +echo $ECHO_N "checking where the main texmf tree is located... $ECHO_C" >&6 +case $prefix in + */) prefix=`echo "$prefix" | sed 's@/*$@@'`;; +esac +texmfmain= +if test "x$datadir" != 'x${prefix}/share'; then + # First case, datadir is defined... + eval p=\"$datadir\" + # Unconditionally set the directory, but... + texmfmain=`echo "$p/texmf" | sed 's,//*,/,g'` + # ... do complain if it wasn't found. + if test -d "$texmfmain"; then + echo "$as_me:$LINENO: result: \"$texmfmain\"" >&5 +echo "${ECHO_T}\"$texmfmain\"" >&6 + else + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: WARNING: No texmf tree found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it." >&5 +echo "$as_me: WARNING: No texmf tree found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it." >&2;} + fi +else + # Second case, datadir is default... + if test "x$prefix" = "xNONE"; then + p="$ac_default_prefix" + else + eval p=\"$prefix\" + fi + for e in share/texmf lib/texmf texmf; do + if test -d "$p/$e"; then + texmfmain='${prefix}'/"$e" + break + fi + done + if test -z "$texmfmain" && test "x$prefix" = "xNONE"; then + # Still no texmfmain found, no prefix set, perhaps kpsewhich is + # installed and can help us out. + texmfmain=`kpsewhich --expand-path='$TEXMFMAIN'` 2>/dev/null + fi + texmfmain=`echo "$texmfmain" | sed 's,//*,/,g'` + if test -n "$texmfmain"; then + echo "$as_me:$LINENO: result: \"$texmfmain\"" >&5 +echo "${ECHO_T}\"$texmfmain\"" >&6 + else + eval texmfmain="$datadir/texmf" + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: WARNING: The main texmf tree was not found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * Use the --datadir option to specify its parent directory. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it by pretending $texmfmain is correct." >&5 +echo "$as_me: WARNING: The main texmf tree was not found at $texmfmain. + ***************************************************************** + * Error: The main texmf tree was not found. * + * Use the --datadir option to specify its parent directory. * + * If you do not have the files, you should be able to them from * + * the same place you got these sources from, or from one of the * + * CTAN hosts. * + ***************************************************************** + Winging it by pretending $texmfmain is correct." >&2;} + fi +fi + + + +LIBS="../kpathsea/.libs/libkpathsea.a $LIBS" +cat >>confdefs.h <<\_ACEOF +#define HAVE_KPATHSEA_KPATHSEA_H 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KPSE_ENC_FORMATS 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBKPATHSEA 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GDIMAGEPNGEX 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GD_H 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBGD 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_T1LIB_H 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBT1 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PNG_H 1 +_ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPNG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + + +echo "$as_me:$LINENO: checking for main in -lm" >&5 +echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif int main () { -return f != $ac_func; +main (); ; return 0; } @@ -7145,86 +6600,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_cv_lib_m_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +echo "${ECHO_T}$ac_cv_lib_m_main" >&6 +if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_LIBM 1 _ACEOF -fi -done + LIBS="-lm $LIBS" fi - - -for ac_func in gdImageCreateTrueColor gdImagePngEx gdImageGif FT_Library_Version -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +echo "$as_me:$LINENO: checking for basename in -lgen" >&5 +echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_basename+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - +char basename (); int main () { -return f != $ac_func; +basename (); ; return 0; } @@ -7251,248 +6674,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_cv_lib_gen_basename=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_cv_lib_gen_basename=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6 +if test $ac_cv_lib_gen_basename = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_LIBGEN 1 _ACEOF -fi -done - -if test "$ac_cv_func_gdImageGif" = "yes"; then - INSTALL_BIN_TARGET="install-dvigif" -else - INSTALL_BIN_TARGET="install-dvipng" -fi - - -# Documentation-related checks -# Extract the first word of "makeinfo", so it can be a program name with args. -set dummy makeinfo; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MAKEINFO+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAKEINFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO=":" - ;; -esac -fi -MAKEINFO=$ac_cv_path_MAKEINFO - -if test -n "$MAKEINFO"; then - echo "$as_me:$LINENO: result: $MAKEINFO" >&5 -echo "${ECHO_T}$MAKEINFO" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -for ac_macro in acronym env option; do - if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then - echo "$as_me:$LINENO: checking if $MAKEINFO understands @$ac_macro{}" >&5 -echo $ECHO_N "checking if $MAKEINFO understands @$ac_macro{}... $ECHO_C" >&6 - echo \\\\input texinfo > conftest.texi - echo @$ac_macro{test} >> conftest.texi - if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - : - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" - - fi - rm -f conftest.texi conftest.info -fi - done - - -# Extract the first word of "install-info", so it can be a program name with args. -set dummy install-info; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $INSTALL_INFO in - [\\/]* | ?:[\\/]*) - ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH /usr/sbin /sbin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" - ;; -esac -fi -INSTALL_INFO=$ac_cv_path_INSTALL_INFO + LIBS="-lgen $LIBS" -if test -n "$INSTALL_INFO"; then - echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 -echo "${ECHO_T}$INSTALL_INFO" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi -# SELFAUTO -# Check whether --enable-selfauto-set or --disable-selfauto-set was given. -if test "${enable_selfauto_set+set}" = set; then - enableval="$enable_selfauto_set" - if test "$enableval" = yes ; then - echo "$as_me:$LINENO: checking for \$SELFAUTOLOC" >&5 -echo $ECHO_N "checking for \$SELFAUTOLOC... $ECHO_C" >&6 - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTOLOC "SELFAUTOLOC=$SELFAUTOLOC" -_ACEOF - - echo "$as_me:$LINENO: result: $SELFAUTOLOC" >&5 -echo "${ECHO_T}$SELFAUTOLOC" >&6 - echo "$as_me:$LINENO: checking for \$SELFAUTODIR" >&5 -echo $ECHO_N "checking for \$SELFAUTODIR... $ECHO_C" >&6 - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTODIR "SELFAUTODIR=$SELFAUTODIR" -_ACEOF - - echo "$as_me:$LINENO: result: $SELFAUTODIR" >&5 -echo "${ECHO_T}$SELFAUTODIR" >&6 - echo "$as_me:$LINENO: checking for \$SELFAUTOPARENT" >&5 -echo $ECHO_N "checking for \$SELFAUTOPARENT... $ECHO_C" >&6 - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTOPARENT "SELFAUTOPARENT=$SELFAUTOPARENT" -_ACEOF - - echo "$as_me:$LINENO: result: $SELFAUTOPARENT" >&5 -echo "${ECHO_T}$SELFAUTOPARENT" >&6 - fi -else - echo "$as_me:$LINENO: checking for texmf.cnf" >&5 -echo $ECHO_N "checking for texmf.cnf... $ECHO_C" >&6 - TEXMF_CNF=`kpsewhich texmf.cnf` - echo "$as_me:$LINENO: result: $TEXMF_CNF" >&5 -echo "${ECHO_T}$TEXMF_CNF" >&6 - echo "$as_me:$LINENO: checking for psfonts.map" >&5 -echo $ECHO_N "checking for psfonts.map... $ECHO_C" >&6 - cp `which kpsewhich` . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - echo "$as_me:$LINENO: result: $PSFONTS_MAP" >&5 -echo "${ECHO_T}$PSFONTS_MAP" >&6 - else - echo "$as_me:$LINENO: result: not found from outside the texmf tree" >&5 -echo "${ECHO_T}not found from outside the texmf tree" >&6 - echo "$as_me:$LINENO: checking for \$SELFAUTO in texmf.cnf" >&5 -echo $ECHO_N "checking for \$SELFAUTO in texmf.cnf... $ECHO_C" >&6 - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - echo "$as_me:$LINENO: result: yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set, type ./configure --help for help. -***************************************************************" >&5 -echo "${ECHO_T}yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set, type ./configure --help for help. -***************************************************************" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi -fi; - -echo "$as_me:$LINENO: result: -** Configuration summary for $PACKAGE_STRING: - - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of - included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib -" >&5 -echo "${ECHO_T} -** Configuration summary for $PACKAGE_STRING: - - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of - included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib -" >&6 - ac_config_headers="$ac_config_headers config.h" ac_config_files="$ac_config_files Makefile" @@ -7588,6 +6792,13 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -7859,7 +7070,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by dvipng $as_me 1.8, which was +This file was extended by dvipng $as_me 1.9, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7919,7 +7130,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dvipng config.status 1.8 +dvipng config.status 1.9 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -8119,21 +7330,37 @@ s,@OBJEXT@,$OBJEXT,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@LN_S@,$LN_S,;t t s,@GS@,$GS,;t t s,@PSFONTS_O@,$PSFONTS_O,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t -s,@FT2_CONFIG@,$FT2_CONFIG,;t t -s,@FT2_CFLAGS@,$FT2_CFLAGS,;t t -s,@FT2_LIBS@,$FT2_LIBS,;t t s,@ALLOCA@,$ALLOCA,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@POW_LIB@,$POW_LIB,;t t -s,@INSTALL_BIN_TARGET@,$INSTALL_BIN_TARGET,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@MAKEINFO_MACROS@,$MAKEINFO_MACROS,;t t s,@INSTALL_INFO@,$INSTALL_INFO,;t t +s,@ZLIBCPPFLAGS@,$ZLIBCPPFLAGS,;t t +s,@LDZLIB@,$LDZLIB,;t t +s,@ZLIBDEP@,$ZLIBDEP,;t t +s,@LIBPNGCPPFLAGS@,$LIBPNGCPPFLAGS,;t t +s,@LDLIBPNG@,$LDLIBPNG,;t t +s,@LIBPNGDEP@,$LIBPNGDEP,;t t +s,@LIBT1CPPFLAGS@,$LIBT1CPPFLAGS,;t t +s,@LDLIBT1@,$LDLIBT1,;t t +s,@LIBT1DEP@,$LIBT1DEP,;t t +s,@GDCPPFLAGS@,$GDCPPFLAGS,;t t +s,@LDGD@,$LDGD,;t t +s,@GDDEP@,$GDDEP,;t t +s,@FREETYPE2CPPFLAGS@,$FREETYPE2CPPFLAGS,;t t +s,@LDFREETYPE2@,$LDFREETYPE2,;t t +s,@FREETYPE2DEP@,$FREETYPE2DEP,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@LD@,$LD,;t t +s,@AR@,$AR,;t t +s,@ARFLAGS@,$ARFLAGS,;t t +s,@texmfmain@,$texmfmain,;t t +s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/Build/source/texk/dvipng/configure.ac b/Build/source/texk/dvipng/configure.ac index bf04d46be1b..54388a02660 100644 --- a/Build/source/texk/dvipng/configure.ac +++ b/Build/source/texk/dvipng/configure.ac @@ -1,30 +1,8 @@ -# configure.ac - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# Copyright (C) 2002-2006 Jan-Åke Larsson -# -#************************************************************************ +# Thomas Esser, for teTeX. All settings here are my fault, don't blame +# the dvipng maintainers for it. # Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.8], [dvipng@nongnu.org]) +AC_INIT([dvipng], [1.9], [dvipng@nongnu.org]) AC_CONFIG_SRCDIR([dvipng.c]) AC_ARG_ENABLE(debug, @@ -39,20 +17,13 @@ AC_ARG_ENABLE(timing, [ if test "$enableval" = yes ; then AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) fi ]) -# Building inside teTeX or TeX Live? -AC_ARG_ENABLE(tetex-build, - AC_HELP_STRING([--enable-tetex-build],[build within teTeX/TeX Live]), - [ if test "$enableval" = yes ; then - AC_DEFINE(TETEX_BUILD, 1, [Define as 1 to build within teTeX/TeX Live.]) - fi ]) # Checks for programs. AC_SET_MAKE AC_PROG_CC AC_PROG_INSTALL -AC_PROG_LN_S AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Specify where GhostScript is located]), + AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), [if test "x$withval" = xno ; then GS=no else @@ -65,6 +36,21 @@ AC_ARG_WITH(gs, fi ]) AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) + + +dnl Check devices for GS +dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) +dnl +AC_DEFUN(AC_GS_HAS_DEVICE, + [AC_MSG_CHECKING([whether $GS has the $1 device]) + if $GS -h | grep $1 >/dev/null; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + $2 + fi +]) + GS_WARN="" AC_GS_HAS_DEVICE(pngalpha, [GS_WARN="Your EPS inclusions will be cropped to the @@ -77,217 +63,127 @@ if test -n "$GS_WARN"; then AC_MSG_WARN([$GS_WARN]) fi -# Checks for libraries. -AC_CHECK_LIB(m, pow) -AC_CHECK_LIB(gen, basename) - -if test "x$enable_tetex_build" = xyes; then - # In teTeX and TeX Live, LDFLAGS is passed by texk/Makefile and - # reserved for the user. Therefore we need another variable for the - # loader flags to find the local kpathsea. We use dvipng_LDFLAGS. - dvipng_LDFLAGS= - AC_SUBST(dvipng_LDFLAGS) - - if test ! -d $srcdir/../../texk/kpathsea; then - AC_MSG_ERROR([ ---enable-tetex-build was specified, but the kpathsea -directory is not in in $srcdir/../../texk/kpathsea. - fi - - CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk" - dvipng_LDFLAGS="-L\$(top_builddir)/../../texk/kpathsea/.libs" - - # Get these libraries from the sources, too. -sinclude(../../libs/zlib/withenable.ac) -sinclude(../../libs/zlib/zlib.ac) -sinclude(../../libs/libpng/withenable.ac) -sinclude(../../libs/libpng/libpng.ac) -sinclude(../../libs/t1lib/withenable.ac) -sinclude(../../libs/t1lib/t1lib.ac) -sinclude(../../libs/gd/withenable.ac) -sinclude(../../libs/gd/gd.ac) -sinclude(../../libs/freetype2/withenable.ac) -sinclude(../../libs/freetype2/gd.ac) -sinclude(../kpathsea/withenable.ac) - AC_DEFINE(HAVE_KPATHSEA_KPATHSEA_H) - AC_DEFINE(HAVE_PNG_H) - - AC_DEFINE(HAVE_T1LIB_H) - ac_cv_lib_t1_T1_InitLib=yes - - AC_DEFINE(HAVE_FT2) - ac_have_freetype2=yes - PSFONTS_O="t1.o ft.o" - - AC_DEFINE(HAVE_GD_H) - ac_cv_func_gdImageCreateTrueColor=yes - ac_cv_func_gdImagePngEx=yes - ac_cv_func_gdImageGif=yes - - # tetex/tex live build; this always has kpathsea, xbasename, etc., - # as we're building from current sources. Do this stuff at the end so - # other configure tests don't try to link with kpathsea (which doesn't - # exist at configure time). - LIBS="-lkpathsea -lm $LIBS" - AC_MSG_NOTICE([tetex build enabled, LIBS now: $LIBS]) - -else - # normal standalone build, not within teTeX/TeX Live sources. -AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, - [AC_MSG_ERROR([cannot find/use $ac_header])]) -AC_CHECK_HEADERS([t1lib.h]) -AC_CHECK_LIB(z, deflate) -AC_CHECK_LIB([gd], [gdImageCreate],, - [AC_MSG_ERROR([cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd])]) -AC_CHECK_LIB([t1], [T1_InitLib]) +ac_cv_lib_t1_T1_InitLib=yes PSFONTS_O="" if test "$ac_cv_lib_t1_T1_InitLib" = yes; then PSFONTS_O="t1.o" fi +AC_SUBST(PSFONTS_O) -AC_CHECK_LIB([kpathsea], [kpse_set_progname],, - AC_MSG_ERROR([cannot find/use libkpathsea])) -AC_CHECK_LIB([png], [png_read_image],, - [AC_MSG_ERROR([cannot find/use libpng])]) -AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" - LIBS="$FT2_LIBS $LIBS" - PSFONTS_O="$PSFONTS_O ft.o" +ac_have_freetype2="yes" # we have ft2 +if test "$ac_have_freetype2" = yes; then + # Have to set compiler and linker flags in Makefile.in, it seems. + PSFONTS_O="$PSFONTS_O sfd.o ft.o" AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) - ac_have_freetype2="yes"], - [ac_have_freetype2="no"]) -AC_CHECK_FUNCS([gdImageCreateTrueColor gdImagePngEx gdImageGif FT_Library_Version]) + AC_DEFINE(HAVE_FT_LIBRARY_VERSION) fi if test -n "$PSFONTS_O"; then PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" fi -AC_SUBST(PSFONTS_O) - -# Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME -AC_HEADER_STDBOOL -AC_CHECK_HEADERS([fcntl.h sys/time.h]) +AC_CHECK_HEADERS([inttypes.h fcntl.h sys/time.h stdbool.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T -if test "$ac_cv_header_inttypes_h" = "yes"; then + +#if test "$ac_cv_header_inttypes_h" = yes; then # Sometimes we want to use gcc -ansi -pedantic as a portability test # The typedef of int64_t is not in the system header file in that # case. Then, #define int64_t as "long long", which is non-ansi, but # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t is only used as - # typecast, and there are no problems. autoconf 2.13 equivalent: - # AC_CHECK_TYPE(int64_t, long long) - # AC_CHECK_TYPE(uint64_t, unsigned long long) - AC_CHECK_TYPE([int64_t],, - [AC_DEFINE_UNQUOTED([int64_t], [long long], - [Define to `long long' if - <inttypes.h> does not define it.])]) - AC_CHECK_TYPE([uint64_t],, - [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], - [Define to `unsigned long long' if - <inttypes.h> does not define it.])]) -fi -AC_HAS_KPSE_ENC_FORMATS + # typedef can be a problem, but in dvipng int64_t only is used as + # typecast, and there are no problems. +# MY_CHECK_TYPE(int64_t, long long) +# MY_CHECK_TYPE(uint64_t, unsigned long long) +#fi # Checks for library functions. AC_FUNC_ALLOCA -AC_FUNC_FORK -AC_FUNC_MALLOC AC_FUNC_MMAP -AC_FUNC_STRTOD AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) +AC_CHECK_FUNCS([dup2 strchr strrchr memchr memset putenv munmap strtol]) if test "$enable_timing" = "yes"; then AC_CHECK_FUNCS([ftime gettimeofday]) fi -if test "$ac_cv_func_gdImageGif" = "yes"; then - INSTALL_BIN_TARGET="install-dvigif" -else - INSTALL_BIN_TARGET="install-dvipng" + +dnl +dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACRO, +[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then + AC_MSG_CHECKING([if $MAKEINFO understands @$1{}]) + echo \\\\input texinfo > conftest.texi + echo @$1{test} >> conftest.texi + if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + rm -f conftest.texi conftest.info fi -AC_SUBST(INSTALL_BIN_TARGET) +]) + +dnl +dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACROS, +[for ac_macro in $1; do + MAKEINFO_CHECK_MACRO($ac_macro, $2, + [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" + $3])dnl + done +AC_SUBST(MAKEINFO_MACROS) +]) # Documentation-related checks AC_PATH_PROG(MAKEINFO, makeinfo, :) MAKEINFO_CHECK_MACROS(acronym env option) AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) -# SELFAUTO -AC_ARG_ENABLE(selfauto-set, - AC_HELP_STRING([--enable-selfauto-set], - [This option will make the final binary explicitly set the - $SELFAUTO... variables to make it look as dvipng is installed in the - main texmf tree, even if it isn't. This is necessary when texmf.cnf - uses $SELFAUTO... variables and dvipng is not installed in the texmf - tree. Otherwise, dvipng may not be able to find virtual fonts, or - psfonts.map.]), - [ if test "$enableval" = yes ; then - AC_MSG_CHECKING([for \$SELFAUTOLOC]) - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], - [The environment setting for $SELFAUTOLOC]) - AC_MSG_RESULT([$SELFAUTOLOC]) - AC_MSG_CHECKING([for \$SELFAUTODIR]) - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], - [The environment setting for $SELFAUTODIR]) - AC_MSG_RESULT([$SELFAUTODIR]) - AC_MSG_CHECKING([for \$SELFAUTOPARENT]) - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], - [The environment setting for $SELFAUTOPARENT]) - AC_MSG_RESULT([$SELFAUTOPARENT]) - fi ], - [AC_MSG_CHECKING([for texmf.cnf]) - TEXMF_CNF=`kpsewhich texmf.cnf` - AC_MSG_RESULT([$TEXMF_CNF]) - AC_MSG_CHECKING([for psfonts.map]) - cp `which kpsewhich` . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - AC_MSG_RESULT([$PSFONTS_MAP]) - else - AC_MSG_RESULT([not found from outside the texmf tree]) - AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - AC_MSG_RESULT([yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set, type ./configure --help for help. -***************************************************************]) - else - AC_MSG_RESULT([no]) - fi - fi]) +sinclude(../../libs/zlib/withenable.ac) +sinclude(../../libs/zlib/zlib.ac) +sinclude(../../libs/libpng/withenable.ac) +sinclude(../../libs/libpng/libpng.ac) +sinclude(../../libs/t1lib/withenable.ac) +sinclude(../../libs/t1lib/t1lib.ac) +sinclude(../../libs/gd/withenable.ac) +sinclude(../../libs/gd/gd.ac) +sinclude(../../libs/freetype2/withenable.ac) +sinclude(../../libs/freetype2/freetype2.ac) +sinclude(../kpathsea/withenable.ac) -AC_MSG_RESULT([ -** Configuration summary for $PACKAGE_STRING: +LIBS="../kpathsea/.libs/libkpathsea.a $LIBS" +AC_DEFINE(HAVE_KPATHSEA_KPATHSEA_H) +AC_DEFINE(HAVE_KPSE_ENC_FORMATS) +AC_DEFINE(HAVE_LIBKPATHSEA) - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of - included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib -]) +dnl -- gd jpeg fn not defined? AC_DEFINE(HAVE_GDIMAGECREATETRUECOLOR) +dnl then we get a warning about gdImageAlpha, but so what. +AC_DEFINE(HAVE_GDIMAGEPNGEX) +AC_DEFINE(HAVE_GD_H) +AC_DEFINE(HAVE_LIBGD) + +AC_DEFINE(HAVE_T1LIB_H) +AC_DEFINE(HAVE_LIBT1) + +AC_DEFINE(HAVE_PNG_H) +AC_DEFINE(HAVE_LIBPNG) + +AC_DEFINE(HAVE_LIBZ) + +AC_CHECK_LIB(m, main) +AC_CHECK_LIB(gen, basename) -AC_CONFIG_HEADER([config.h]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES(Makefile) AC_OUTPUT diff --git a/Build/source/texk/dvipng/draw.c b/Build/source/texk/dvipng/draw.c index 05c9d3a9394..4722ee8b751 100644 --- a/Build/source/texk/dvipng/draw.c +++ b/Build/source/texk/dvipng/draw.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/dvi.c b/Build/source/texk/dvipng/dvi.c index 596ff6e2eb7..811f8ed64f7 100644 --- a/Build/source/texk/dvipng/dvi.c +++ b/Build/source/texk/dvipng/dvi.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/dvipng.1 b/Build/source/texk/dvipng/dvipng.1 index bfb04f9ab15..bac4c46d888 100644 --- a/Build/source/texk/dvipng/dvipng.1 +++ b/Build/source/texk/dvipng/dvipng.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== @@ -25,11 +25,11 @@ .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DVIPNG 1" -.TH DVIPNG 1 "2006-03-29" "dvipng 1.8" "User commands" +.TH DVIPNG 1 "2006-11-07" "dvipng 1.9" "User commands" .SH "NAME" dvipng \- A DVI\-to\-PNG translator .SH "SYNOPSIS" @@ -152,7 +152,7 @@ makes it suitable for generating large amounts of images on\-the\-fly, as needed in preview\-latex, WeBWorK and others. .IP "\(bu" 4 It does not read the postamble, so it can be started before TeX -finishes. There is a \-\-follow switch that makes dvipng wait at +finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at end-of-file for further output, unless it finds the \s-1POST\s0 marker that indicates the end of the \s-1DVI\s0. .IP "\(bu" 4 @@ -160,8 +160,9 @@ Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change the input file through this interface. .IP "\(bu" 4 -Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, color specials -and simple PostScript inclusion specials. +Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., +as used in CJK\-LaTeX), color specials, and inclusion of PostScript, +\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. .IP "\(bu" 4 and more... .SH "OPTIONS" @@ -229,7 +230,7 @@ a web page), and for a text font height of \fIfont_px\fR pixels (in Mozilla) the correct formula is .Sp .Vb 1 -\& <dpi> = <font_px> * 72.27 / 10 [px * TeXpt/in / TeXpt] +\& <dpi> = <font_px> * 72.27 / 10 [px * TeXpt/in / TeXpt] .Ve .Sp The last division by ten is due to the standard font height 10pt in @@ -239,7 +240,7 @@ have to rescale that to pixels, using the screen resolution (default is usually 96 dpi) which means the formula is .Sp .Vb 1 -\& <font_px> = <font_pt> * 96 / 72 [pt * px/in / (pt/in)] +\& <font_px> = <font_pt> * 96 / 72 [pt * px/in / (pt/in)] .Ve .Sp On some high-res screens, the value is instead 120 dpi. Good luck! @@ -253,7 +254,7 @@ image in, e.g., web documents, where one would use (Cascading StyleSheets 1) .Sp .Vb 1 -\& <IMG SRC="<filename.png>" STYLE="vertical-align: -<depth>px"> +\& <IMG SRC="<filename.png>" STYLE="vertical\-align: \-<depth>px"> .Ve .Sp The depth is a negative offset in this case, so the minus sign is @@ -307,7 +308,7 @@ Report the height of the image. This only works reliably when the LaTeX style \fIpreview.sty\fR from preview-latex is used. It reports the number of pixels from the top of the image to the baseline of the image. The total height of the image is obtained as the -sum of the values reported from \fB\-\-height\fR and the \fB\-\-depth\fR. +sum of the values reported from \fB\-\-height\fR and \fB\-\-depth\fR. .IP "\fB\-l [=]\fR\fInum\fR" 4 .IX Item "-l [=]num" The last page printed will be the first one numbered \fInum\fR. Default @@ -421,6 +422,13 @@ this option. .IX Item "-r*" Toggle output of pages in reverse/forward order. By default, the first page in the \s-1DVI\s0 is output first. +.IP "\fB\-\-strict*\fR" 4 +.IX Item "--strict*" +The program exits when a warning occurs. Normally, dvipng will output +an image in spite of a warning, but there may be something missing in +this image. One reason to use this option would be if you have a more +complete but slower fallback converter. See the \fB\-\-picky\fR option +above for a list of when warnings occur. .IP "\fB\-T\fR \fIimage_size\fR" 4 .IX Item "-T image_size" Set the image size to \fIimage_size\fR which can be either of @@ -446,10 +454,11 @@ preferred by dvipng, and if you for some reason rather want to use T1lib, give the option \fB\-\-freetype0\fR (see above). .IP "\fB\-\-truecolor*\fR" 4 .IX Item "--truecolor*" -This will force \fBdvipng\fR to generate truecolor output. Note that +This will make \fBdvipng\fR generate truecolor output. Note that truecolor output is automatic if you include an external image in your \&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or -\&\fBgraphicx\fR package), see also the \fB\-\-palette\fR option. +\&\fBgraphicx\fR package). This switch is overridden by the +\&\fB\-\-palette\fR switch. .IP "\fB\-v*\fR" 4 .IX Item "-v*" Enable verbose operation. This will currently indicate what fonts is @@ -469,18 +478,18 @@ your \fBlibgd\fR is new enough. The default compression level is 1, which selects maximum speed at the price of slightly larger PNGs. For an older \fBlibgd\fR, the hard-soldered value 5 is used. The include file \&\fBpng.h\fR says -``Currently, valid values range from 0 \- 9, corresponding directly to -the zlib compression levels 0 \- 9 (0 \- no compression, 9 \- \*(L"maximal\*(R" +\&\*(L"Currently, valid values range from 0 \- 9, corresponding directly to +the zlib compression levels 0 \- 9 (0 \- no compression, 9 \- \*(R"maximal\*(L" compression). Note that tests have shown that zlib compression levels 3\-6 usually perform as well as level 9 for \s-1PNG\s0 images, and do considerably fewer calculations. In the future, these values may not -correspond directly to the zlib compression levels.'' +correspond directly to the zlib compression levels.\*(R" .SH "NOTES" .IX Header "NOTES" The full manual is accessible in the info format, on most systems by typing .PP .Vb 1 -\& info dvipng +\& info dvipng .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" @@ -488,4 +497,4 @@ This program is released under the \s-1GNU\s0 General Public License, see the \&\s-1COPYING\s0 file in the dvipng distribution or <\fBhttp://www.gnu.org/licenses/gpl.html\fR>. .PP -Copyright (c) 2002\-2006 Jan\-@AA{}ke Larsson +Copyright (c) 2002\-2006 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/dvipng.c b/Build/source/texk/dvipng/dvipng.c index e695b39d0cf..7dc8daff2a6 100644 --- a/Build/source/texk/dvipng/dvipng.c +++ b/Build/source/texk/dvipng/dvipng.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson @@ -54,11 +54,11 @@ int main(int argc, char ** argv) #ifdef TIMING # ifdef HAVE_GETTIMEOFDAY gettimeofday(&Tp, NULL); - timer = Tp.tv_sec + ((float)(Tp.tv_usec))/ 1000000.0; + timer = Tp.tv_sec + Tp.tv_usec / 1000000.0; # else # ifdef HAVE_FTIME ftime(&timebuffer); - timer = timebuffer.time + (float)(timebuffer.millitm) / 1000.0; + timer = timebuffer.time + timebuffer.millitm / 1000.0; # endif # endif #endif @@ -128,11 +128,11 @@ int main(int argc, char ** argv) #ifdef TIMING # ifdef HAVE_GETTIMEOFDAY gettimeofday(&Tp, NULL); - timer = (Tp.tv_sec + (float)(Tp.tv_usec)/1000000.0) - timer; + timer = Tp.tv_sec + Tp.tv_usec/1000000.0 - timer; # else # ifdef HAVE_FTIME ftime(&timebuffer); - timer = (timebuffer.time + (float)(timebuffer.millitm)/1000.0) - timer; + timer = timebuffer.time + timebuffer.millitm/1000.0 - timer; # endif # endif @@ -153,6 +153,7 @@ int main(int argc, char ** argv) ClearEncoding(); #endif #ifdef HAVE_FT2 + ClearSubfont(); if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) Fatal("an error occured during freetype destruction"); libfreetype = NULL; diff --git a/Build/source/texk/dvipng/dvipng.h b/Build/source/texk/dvipng/dvipng.h index 7d03ad91212..a8049e6f0fc 100644 --- a/Build/source/texk/dvipng/dvipng.h +++ b/Build/source/texk/dvipng/dvipng.h @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson @@ -97,6 +97,10 @@ typedef int bool; # endif #endif +#ifndef _TRUE +#define _TRUE 1 +#endif + #ifndef HAVE_VPRINTF # ifdef HAVE_DOPRNT # define vfprintf(stream, message, args) _doprnt(message, args, stream) @@ -237,6 +241,14 @@ struct encoding { char* charname[257]; }; +struct subfont { + struct subfont* next; + char* name; + char* infix; + int encoding; + int32_t charindex[256]; +}; + #ifdef HAVE_FT2_OR_LIBT1 struct psfontmap { struct psfontmap *next; @@ -245,6 +257,7 @@ struct psfontmap { #ifdef HAVE_FT2 FT_Matrix* ft_transformp; FT_Matrix ft_transform; + struct subfont* subfont; #endif #ifdef HAVE_LIBT1 T1_TMATRIX* t1_transformp; @@ -314,6 +327,8 @@ void SetFntNum(int32_t, void* /* dvi/vf */); void FreeFontNumP(struct font_num *hfontnump); #ifdef HAVE_FT2_OR_LIBT1 +char* copyword(char* orig); +struct psfontmap *NewPSFont(struct psfontmap* copyfrom); void InitPSFontMap(void); void ClearPSFontMap(void); struct psfontmap* FindPSFontMap(char*); @@ -326,6 +341,8 @@ bool ReadTFM(struct font_entry *, char*); bool InitFT(struct font_entry *); void DoneFT(struct font_entry *tfontp); void LoadFT(int32_t, struct char_entry *); +struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname); +void ClearSubfont(void); #endif #ifdef HAVE_LIBT1 diff --git a/Build/source/texk/dvipng/dvipng.texi b/Build/source/texk/dvipng/dvipng.texi index 540ba1c9fc6..352938caf8c 100644 --- a/Build/source/texk/dvipng/dvipng.texi +++ b/Build/source/texk/dvipng/dvipng.texi @@ -9,8 +9,8 @@ dvipng [options] [filename] - @c man end @end ifset -@set version 1.8 -@set month-year March 2006 +@set version 1.9 +@set month-year November 2006 @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fn cp @@ -563,6 +563,14 @@ is not the default, you can use the @samp{-t} option twice, once for the paper type, and once for @samp{landscape}. @end ignore +@item --strict* +@cindex exit on erroneous images +The program exits when a warning occurs. Normally, dvipng will output +an image in spite of a warning, but there may be something missing in +this image. One reason to use this option would be if you have a more +complete but slower fallback converter. See the @samp{--picky} option +above for a list of when warnings occur. + @item -T @var{image_size} Set the image size to @var{image_size} which can be either of @samp{bbox}, @samp{tight}, or a comma-separated pair of dimensions @@ -1453,10 +1461,10 @@ inclusion would read @end example The default size is the image size in bp (``big points'' in TeX -nomenclature or PostScript points as other people have it, 72 per -inch). That is, default resolution will be 72 dpi for included -bitmaps, which is the default size in the other drivers (dvipdfm and -PDFLaTeX). +nomenclature or PostScript points as other people have it, 72 per inch). +That is, default resolution will be 72 dpi for included bitmaps, which +is the default size in the few other bitmap-capable drivers that are +known to me (dvipdfm and PDFLaTeX). If you want 100 dpi you need to specify the width accordingly. You just divide your image width by 100: a 135 pixel wide image at 100 dpi @@ -1631,13 +1639,14 @@ bugs and suggesting improvements as the thing has evolved. These include but is perhaps not limited to (in semi-random order): Thomas Esser (te@TeX{}), Christian Schenk (MIK@TeX{}), Brian R Furry (debian package), Angus Leeming (LyX), Thomas Boutell (libgd), John Jones -(first user report), Uwe Kern (xcolor), Karl Berry (@TeX{} Live), Neal -Harmon, Alan Shutko, Reiner Stieb, Nick Alcock, Adam Buchbinder, Svend -Tollak Munkejord, James Longstreet, Bernhard Simon, Bob McElrath, -Georg Schwarz, Jason Farmer, Brian V. Smith, Samuel Hathaway, Thomas -R. Shemanske, Stephen Gibson, Christian Ridderstr@"om, Ezra Peisach, -William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin -Smith, Jason Riedy, Wolfram Krause, and Reinhard Kotucha. +(first user report), Uwe Kern (xcolor), Karl Berry (@TeX{} Live), +David Harvey (hinting in Freetype), Neal Harmon, Alan Shutko, Reiner +Stieb, Nick Alcock, Adam Buchbinder, Svend Tollak Munkejord, James +Longstreet, Bernhard Simon, Bob McElrath, Georg Schwarz, Jason Farmer, +Brian V. Smith, Samuel Hathaway, Thomas R. Shemanske, Stephen Gibson, +Christian Ridderstr@"om, Ezra Peisach, William H Wheeler, Thomas +Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, +Wolfram Krause, and Reinhard Kotucha. @ifset man @c man begin NOTES @@ -1671,7 +1680,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. @sp 2 @noindent diff --git a/Build/source/texk/dvipng/enc.c b/Build/source/texk/dvipng/enc.c index a5dd1688861..efe4ffef4d1 100644 --- a/Build/source/texk/dvipng/enc.c +++ b/Build/source/texk/dvipng/enc.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/font.c b/Build/source/texk/dvipng/font.c index 9262bfe5809..194e156453d 100644 --- a/Build/source/texk/dvipng/font.c +++ b/Build/source/texk/dvipng/font.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/fontmap.c b/Build/source/texk/dvipng/fontmap.c index cecbd75dbfa..5b77e3eb8c8 100644 --- a/Build/source/texk/dvipng/fontmap.c +++ b/Build/source/texk/dvipng/fontmap.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson @@ -25,8 +25,10 @@ #include "dvipng.h" -static char* psfont_name=NULL; static struct filemmap psfont_mmap; +#if HAVE_FT2 +static struct filemmap ttfont_mmap; +#endif static struct psfontmap *psfontmap=NULL; char* newword(char** buffer, char* end) @@ -38,11 +40,22 @@ char* newword(char** buffer, char* end) Fatal("cannot malloc space for string"); strncpy(word,*buffer,pos-*buffer); word[pos-*buffer]='\0'; - if (*pos=='"') pos++; *buffer=pos; return(word); } +char* copyword(char* orig) +{ + char *word; + + if (orig==NULL) + return(NULL); + if ((word=malloc(strlen(orig)+1))==NULL) + Fatal("cannot malloc space for string"); + strcpy(word,orig); + return(word); +} + char* find_format(char* name) { /* Cater for both new (first case) and old (second case) kpathsea */ @@ -56,33 +69,93 @@ char* find_format(char* name) void InitPSFontMap(void) { - char *pos,*end; - struct psfontmap *entry; - + char* psfont_name=NULL; + /* Prefer ps2pk.map, fonts are present more often */ psfont_name=find_format("ps2pk.map"); if (psfont_name==NULL) psfont_name=find_format("psfonts.map"); - if (psfont_name==NULL) { Warning("cannot find ps2pk.map, nor psfonts.map"); - return; + } else { + DEBUG_PRINT((DEBUG_FT|DEBUG_T1), + ("\n OPEN PSFONT MAP:\t'%s'", psfont_name)); + if (MmapFile(psfont_name,&psfont_mmap)) { + Warning("psfonts map %s could not be opened", psfont_name); + } + free(psfont_name); } - DEBUG_PRINT(DEBUG_FT,("\n OPEN PSFONT MAP:\t'%s'", psfont_name)); - if (MmapFile(psfont_name,&psfont_mmap)) { - Warning("psfonts map %s could not be opened", psfont_name); - return; +#ifdef HAVE_FT2 + psfont_name=find_format("ttfonts.map"); + if (psfont_name!=NULL) { + DEBUG_PRINT(DEBUG_FT,("\n OPEN TTFONT MAP:\t'%s'", psfont_name)); + if (MmapFile(psfont_name,&ttfont_mmap)) { + Warning("ttfonts map %s could not be opened", psfont_name); + } + free(psfont_name); } - pos = psfont_mmap.mmap; - end = psfont_mmap.mmap+psfont_mmap.size; - while(pos<end) { - while(pos < end && (*pos=='\n' || *pos==' ' || *pos=='\t' - || *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) { +#endif +} + +struct psfontmap *NewPSFont(struct psfontmap* copyfrom) +{ + struct psfontmap *newentry=NULL; + if ((newentry=malloc(sizeof(struct psfontmap)))==NULL) + Fatal("cannot malloc psfontmap space"); + if (copyfrom!=NULL) { + newentry->line = copyfrom->line; + newentry->tfmname = copyword(copyfrom->tfmname); + newentry->psfile = copyword(copyfrom->psfile); + newentry->encname = copyword(copyfrom->encname); + newentry->encoding = copyfrom->encoding; +#if HAVE_LIBT1 + newentry->t1_transformp = copyfrom->t1_transformp; +#endif +#if HAVE_FT2 + newentry->ft_transformp = copyfrom->ft_transformp; + newentry->subfont = copyfrom->subfont; +#endif + newentry->end = copyfrom->end; + } else { + newentry->line = NULL; + newentry->tfmname = NULL; + newentry->psfile = NULL; + newentry->encname = NULL; + newentry->encoding = NULL; +#if HAVE_LIBT1 + newentry->t1_transformp = NULL; +#endif +#if HAVE_FT2 + newentry->ft_transformp = NULL; + newentry->subfont = NULL; +#endif + newentry->end = NULL; + } + newentry->next=psfontmap; + psfontmap=newentry; + return(newentry); +} + +struct psfontmap *SearchPSFontMap(char* fontname, + struct filemmap* search_mmap) +{ + static char *pos=NULL,*end=NULL; + static struct filemmap* searching_mmap=NULL; + struct psfontmap *entry=NULL; + + if (pos==end && search_mmap!=searching_mmap) { + searching_mmap=search_mmap; + pos=searching_mmap->mmap; + end=searching_mmap->mmap+searching_mmap->size; + } + while(pos<end && (entry==NULL || strcmp(entry->tfmname,fontname)!=0)) { + while(pos < end + && (*pos=='\n' || *pos==' ' || *pos=='\t' + || *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) { while(pos < end && *pos!='\n') pos++; /* skip comments/empty rows */ pos++; } if (pos < end) { - if ((entry=malloc(sizeof(struct psfontmap)))==NULL) - Fatal("cannot malloc psfontmap space"); + entry=NewPSFont(NULL); entry->line = pos; /* skip <something and quoted entries */ while(pos < end && (*pos=='<' || *pos=='"')) { @@ -94,16 +167,14 @@ void InitPSFontMap(void) } /* first word is font name */ entry->tfmname = newword(&pos,end); - entry->psfile = NULL; - entry->encname = NULL; - entry->encoding = NULL; while(pos < end && *pos!='\n') pos++; entry->end = pos; - entry->next=psfontmap; - psfontmap=entry; } pos++; } + if (entry!=NULL && strcmp(entry->tfmname,fontname)!=0) + entry=NULL; + return(entry); } void ClearPSFontMap(void) @@ -121,130 +192,150 @@ void ClearPSFontMap(void) free(entry); } UnMmapFile(&psfont_mmap); - if (psfont_name != NULL) - free(psfont_name); - psfont_name=NULL; +#ifdef HAVE_FT2 + UnMmapFile(&ttfont_mmap); +#endif } -struct psfontmap* FindPSFontMap(char* fontname) +void ReadPSFontMap(struct psfontmap *entry) { - char *pos,*tfmname,*psname; - struct psfontmap *entry; - double cxx=0.0,cxy=0.0; - - entry=psfontmap; - while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) - entry=entry->next; - if (entry!=NULL && entry->psfile==NULL) { - int nameno = 0; + char *pos,*end,*psname; + int nameno = 0; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\n PSFONTMAP: %s ",fontname)); - pos=entry->line; -#if HAVE_LIBT1 - entry->t1_transformp=NULL; -#endif -#if HAVE_FT2 - entry->ft_transformp=NULL; -#endif - while(pos < entry->end) { - if (*pos=='<') { /* filename follows */ + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\n PSFONTMAP: %s ",entry->tfmname)); + pos=entry->line; + end=entry->end; + while(pos < end) { + if (*pos=='<') { /* filename follows */ + pos++; + if (pos<end && *pos=='<') { /* <<download.font */ pos++; - if (pos<entry->end && *pos=='<') { /* <<download.font */ - pos++; - entry->psfile = newword((char**)&pos,entry->end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); - } else if (pos<entry->end && *pos=='[') { /* <[encoding.file */ - pos++; - entry->encname = newword((char**)&pos,entry->end); + entry->psfile = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); + } else if (pos<end && *pos=='[') { /* <[encoding.file */ + pos++; + entry->encname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + } else { /* <some.file */ + char* word =newword((char**)&pos,end); + if (strncmp(word+strlen(word)-4,".enc",4)==0) {/* <some.enc */ + entry->encname=word; DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - } else { /* <some.file */ - char* word =newword((char**)&pos,entry->end); - if (strncmp(word+strlen(word)-4,".enc",4)==0) {/* <some.enc */ - entry->encname=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - } else { /* <font */ - entry->psfile=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); - } + } else { /* <font */ + entry->psfile=word; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); } - } else if (*pos=='"') { /* PS code: reencoding/tranformation exists */ - double val=0.0; - pos++; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\"")); - while(pos < entry->end && *pos!='"') { - val=strtod(pos,(char**)&pos); - /* Small buffer overrun risk, but we're inside double quotes */ - while(pos < entry->end && (*pos==' ' || *pos=='\t')) pos++; - if (pos<entry->end-10 && strncmp(pos,"ExtendFont",10)==0) { - cxx=val; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1), - ("%f ExtendFont ",cxx)); - } - if (pos<entry->end-9 && strncmp(pos,"SlantFont",9)==0) { - cxy=val; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1), - ("%f SlantFont ",cxy)); - } - while(pos<entry->end && *pos!=' ' && *pos!='\t' && *pos!='"') - pos++; + } + } else if (*pos=='"') { /* PS code: reencoding/tranformation exists */ + char *word; + double cxx=1.0,cxy=0.0; + pos++; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\"")); + while(pos < end && *pos!='"') { + word=newword((char**)&pos,end); + while(pos < end && (*pos==' ' || *pos=='\t')) pos++; + if (pos+10<end && strncmp(pos,"ExtendFont",10)==0) { + cxx=strtod(word,NULL); + pos+=10; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%f ExtendFont ",cxx)); + } else if (pos+9<end && strncmp(pos,"SlantFont",9)==0) { + pos+=9; + cxy=strtod(word,NULL); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%f SlantFont ",cxy)); + } else if (pos+12<end && strncmp(pos,"ReEncodeFont",12)==0) { + pos+=12; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("%s ReEncodeFont ",word)); + } else { + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(?:%s) ",word)); } + free(word); + } #if HAVE_FT2 - entry->ft_transformp=&(entry->ft_transform); - if (cxx!=0.0) - entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); - else - entry->ft_transform.xx=0x10000; - entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); - entry->ft_transform.yx=0; - entry->ft_transform.yy=0x10000; + entry->ft_transformp=&(entry->ft_transform); + entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); + entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); + entry->ft_transform.yx=0; + entry->ft_transform.yy=0x10000; #endif #if HAVE_LIBT1 - entry->t1_transformp=&(entry->t1_transform); - if (cxx!=0) - entry->t1_transform.cxx=cxx; - else - entry->t1_transform.cxx=1.0; - entry->t1_transform.cxy=cxy; - entry->t1_transform.cyx=0.0; - entry->t1_transform.cyy=1.0; + entry->t1_transformp=&(entry->t1_transform); + entry->t1_transform.cxx=cxx; + entry->t1_transform.cxy=cxy; + entry->t1_transform.cyx=0.0; + entry->t1_transform.cyy=1.0; #endif - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\" ")); - pos++; - } else { /* bare word */ - switch (++nameno) { - case 1: /* first word is tfmname and perhaps psname */ - while(pos<entry->end && *pos!=' ' && *pos!='\t') pos++; - psname=entry->tfmname; - break; - case 2: /* second word is psname */ - psname = newword((char**)&pos,entry->end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(%s) ",psname)); - free(psname); - break; - case 3: /* third word is encoding */ - entry->encname = newword((char**)&pos,entry->end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - break; - default: - Warning("more than three bare words in font map entry"); - } + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\" ")); + pos++; + } else { /* bare word */ + switch (++nameno) { + case 1: /* first word is tfmname and perhaps psname, NOT psfile */ + while(pos<end && *pos!=' ' && *pos!='\t') pos++; + psname=entry->tfmname; + break; + case 2: /* second word is psname, NOT psfile */ + psname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(%s) ",psname)); + free(psname); + break; + case 3: /* third word is encoding */ + entry->encname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + break; + default: + while(pos<end && *pos!=' ' && *pos!='\t') pos++; + Warning("more than three bare words in font map entry"); } - while(pos < entry->end && (*pos==' ' || *pos=='\t')) pos++; } - if (entry->psfile==NULL) { - /* No psfile-name given, use (free-able copy of) tfmname */ - entry->psfile=newword(&tfmname,tfmname+strlen(tfmname)); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),(" <%s ",entry->psfile)); + while(pos < end && (*pos==' ' || *pos=='\t')) pos++; + } + if (entry->psfile==NULL) { + /* No psfile-name given, use tfmname */ + entry->psfile=copyword(entry->tfmname); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),(" <%s ",entry->psfile)); + } + if (entry->encname!=NULL + && (entry->encoding=FindEncoding(entry->encname))==NULL) + Warning("unable to load font encoding '%s' for %s", + entry->encname,entry->tfmname); +} + + +struct psfontmap* FindPSFontMap(char* fontname) +{ + struct psfontmap *entry; + static struct filemmap* search_mmap_p=&psfont_mmap; + + entry=psfontmap; + while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) + entry=entry->next; + if(entry==NULL) { + entry=SearchPSFontMap(fontname,search_mmap_p); +#ifdef HAVE_FT2 + if(entry==NULL && search_mmap_p!=&ttfont_mmap) { + search_mmap_p=&ttfont_mmap; + entry=SearchPSFontMap(fontname,search_mmap_p); + } +#endif + } + if(entry==NULL) { + struct psfontmap* entry_subfont=NULL; + entry=psfontmap; + while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) { + while(entry!=NULL && strchr(entry->tfmname,'@')==NULL) + entry=entry->next; + if (entry!=NULL) { + entry_subfont=FindSubFont(entry,fontname); + if (entry_subfont!=NULL) + entry=entry_subfont; + else + entry=entry->next; + } } - if (entry->encname!=NULL - && (entry->encoding=FindEncoding(entry->encname))==NULL) - Warning("unable to load font encoding '%s' for %s", - entry->encname,entry->tfmname); } - if (entry != NULL && entry->encname!=NULL && entry->encoding==NULL) + if (entry!=NULL && entry->psfile==NULL) + ReadPSFontMap(entry); + if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) /* Encoding given but it cannot be found. Unusable font */ return(NULL); - return(entry); } - diff --git a/Build/source/texk/dvipng/ft.c b/Build/source/texk/dvipng/ft.c index 262a299f324..63610f6713b 100644 --- a/Build/source/texk/dvipng/ft.c +++ b/Build/source/texk/dvipng/ft.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson @@ -37,15 +37,23 @@ void LoadFT(int32_t c, struct char_entry * ptr) DEBUG_PRINT(DEBUG_FT,("\n LOAD FT CHAR\t%d (%d)",c,ptr->tfmw)); if (currentfont->psfontmap!=NULL - && currentfont->psfontmap->encoding != NULL) + && currentfont->psfontmap->encoding != NULL) { + DEBUG_PRINT(DEBUG_FT,(" %s",currentfont->psfontmap->encoding->charname[c])); glyph_i = FT_Get_Name_Index(currentfont->face, currentfont->psfontmap->encoding->charname[c]); - else + } else if (currentfont->psfontmap!=NULL + && currentfont->psfontmap->subfont != NULL) { + glyph_i = FT_Get_Char_Index( currentfont->face, + currentfont->psfontmap->subfont->charindex[c] ); + DEBUG_PRINT(DEBUG_FT,(" 0x%X",currentfont->psfontmap->subfont->charindex[c])); + } else glyph_i = FT_Get_Char_Index( currentfont->face, c ); - if (FT_Load_Glyph( currentfont->face, /* handle to face object */ - glyph_i, /* glyph index */ - FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT )) - /* load flags */ + if (FT_Load_Glyph( currentfont->face, glyph_i, + FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT ) + /* On some configurations (with FreeType <= 2.1.7) the above + fails, while the below works */ + && FT_Load_Glyph( currentfont->face, glyph_i, + FT_LOAD_RENDER | FT_LOAD_NO_HINTING )) Fatal("cannot load FT char %d",c); ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor; ptr->yOffset = (currentfont->face->glyph->bitmap_top-1)*shrinkfactor; @@ -96,7 +104,6 @@ bool InitFT(struct font_entry * tfontp) } # endif } - DEBUG_PRINT((DEBUG_DVI|DEBUG_FT),("\n OPEN FT FONT:\t'%s'", tfontp->name)); error = FT_New_Face( libfreetype, tfontp->name, 0, &tfontp->face ); if (error == FT_Err_Unknown_File_Format) { @@ -107,20 +114,21 @@ bool InitFT(struct font_entry * tfontp) return(false); } Message(BE_VERBOSE,"<%s>", tfontp->name); - if (tfontp->psfontmap == NULL || tfontp->psfontmap->encoding == NULL) { + if (tfontp->psfontmap != NULL && tfontp->psfontmap->subfont != NULL) + error=FT_Select_Charmap(tfontp->face, tfontp->psfontmap->subfont->encoding); + else if (tfontp->psfontmap == NULL || tfontp->psfontmap->encoding == NULL) #ifndef FT_ENCODING_ADOBE_CUSTOM # define FT_ENCODING_ADOBE_CUSTOM ft_encoding_adobe_custom # define FT_ENCODING_ADOBE_STANDARD ft_encoding_adobe_standard #endif - if (FT_Select_Charmap( tfontp->face, FT_ENCODING_ADOBE_CUSTOM )) { - Warning("unable to set font encoding FT_ENCODING_ADOBE_CUSTOM for %s", - tfontp->name); - if(FT_Select_Charmap( tfontp->face, FT_ENCODING_ADOBE_STANDARD )) { - Warning("unable to set font encoding for %s", tfontp->name); - return(false); - } + error=FT_Select_Charmap(tfontp->face, FT_ENCODING_ADOBE_CUSTOM); + if (error) { + Warning("unable to set font encoding for %s", tfontp->name); + if(FT_Select_Charmap( tfontp->face, FT_ENCODING_ADOBE_STANDARD )) { + Warning("unable to set fallback font encoding for %s", tfontp->name); + return(false); } - } + } if (FT_Set_Char_Size( tfontp->face, /* handle to face object */ 0, /* char_width in 1/64th of points */ ((int64_t)tfontp->d*64*7200)/7227/65536, diff --git a/Build/source/texk/dvipng/install.texi b/Build/source/texk/dvipng/install.texi index 1cec3dcd668..877cf5ca7d1 100644 --- a/Build/source/texk/dvipng/install.texi +++ b/Build/source/texk/dvipng/install.texi @@ -41,16 +41,26 @@ may happen that ./configure does not find it; see below. If you do not have it, download it from @uref{http://www.ctan.org} and compile it. I have no experience with this, so I cannot help much here. -@item FreeType 2 and/or T1lib - -While not strictly necessary, you may want to have FreeType 2 or T1lib -available. Their presence will enable direct support for PostScript -fonts in dvipng, rather than using @samp{gsftopk} for rendering the -fonts. If you have PostScript versons of Computer Modern installed, -there will be no need to generate bitmapped variants on disk of -these. Then, you can render images at different (and unusual) -resolutions without cluttering the disk with lots of bitmapped fonts. -If both FreeType 2 and T1lib are present, FreeType will be internally +@item The font-rendering library FreeType 2 + +While not strictly necessary, FreeType 2 is recommended since dvipng +currently will produce better-quality images with this library +available. It will also enable direct support for PostScript and +TrueType fonts, and subfont support in dvipng. That is, if you want to +render CJK-@LaTeX{} characters, you must have FreeType 2 installed. +With FreeType 2, dvipng will not need to generate bitmapped variants +on disk of the @TeX{} fonts since modern @TeX{} distributions include +PostScript versions of them. Then, you can render images at different +(and unusual) resolutions without cluttering the disk with lots of +bitmapped fonts. + +@item The font-rendering library T1lib + +An alternative to FreeType 2 is T1lib, but this will enable only +PostScript fonts in dvipng, and will not include subfont support. Also +here, you can render images at different (and unusual) resolutions +without cluttering the disk with lots of bitmapped fonts. If both +FreeType 2 and T1lib are present, FreeType will be internally preferred by dvipng, but T1lib can be chosen at runtime. @item libpng and libz @@ -62,11 +72,6 @@ any modern system, if not, download them and install them. @item The @code{texinfo} package This is needed for building the documentation. -@ignore -If you don't have this, -you may download a separate tar file with the prebuilt documentation -from Sourceforge and install it over the main unpacked tar archive. -@end ignore @end itemize @node Configure @@ -81,7 +86,7 @@ various files will be. To do so, run (Note: if you have fetched dvipng from CVS rather than a regular release, you will have to first generate @file{./configure} by running -@code{autoconf} 2.53 or later in the @file{preview} directory.) +@code{autoconf} 2.53 or later.) On many machines, you will not need to specify any options, but if @code{configure} cannot determine something on its own, you'll need to diff --git a/Build/source/texk/dvipng/macros.texi b/Build/source/texk/dvipng/macros.texi index 4d5aafbbd0a..88f746d1b85 100644 --- a/Build/source/texk/dvipng/macros.texi +++ b/Build/source/texk/dvipng/macros.texi @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson @end ignore diff --git a/Build/source/texk/dvipng/miktex.h b/Build/source/texk/dvipng/miktex.h index ef655cf76d3..116ac294860 100644 --- a/Build/source/texk/dvipng/miktex.h +++ b/Build/source/texk/dvipng/miktex.h @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/miktex.mak b/Build/source/texk/dvipng/miktex.mak index 5a0ea6795ef..b291ba67207 100644 --- a/Build/source/texk/dvipng/miktex.mak +++ b/Build/source/texk/dvipng/miktex.mak @@ -14,8 +14,8 @@ ## ## You should have received a copy of the GNU General Public License ## along with this file; if not, write to the Free Software -## Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -## USA. +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +## 02110-1301 USA. miktex_cc_no_warnings = 1 miktex_cc_disable_optimization = 1 diff --git a/Build/source/texk/dvipng/misc.c b/Build/source/texk/dvipng/misc.c index 0ce426b0246..cb2fc342767 100644 --- a/Build/source/texk/dvipng/misc.c +++ b/Build/source/texk/dvipng/misc.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/papersiz.c b/Build/source/texk/dvipng/papersiz.c index 1ee322325da..e8f2d0238d1 100644 --- a/Build/source/texk/dvipng/papersiz.c +++ b/Build/source/texk/dvipng/papersiz.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/pk.c b/Build/source/texk/dvipng/pk.c index 618679b8a97..4ff254172f7 100644 --- a/Build/source/texk/dvipng/pk.c +++ b/Build/source/texk/dvipng/pk.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/ppagelist.c b/Build/source/texk/dvipng/ppagelist.c index ac93b7dba20..6f3aa2680fd 100644 --- a/Build/source/texk/dvipng/ppagelist.c +++ b/Build/source/texk/dvipng/ppagelist.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/readme.texi b/Build/source/texk/dvipng/readme.texi index 5ac863c1a4d..26ba616d3b7 100644 --- a/Build/source/texk/dvipng/readme.texi +++ b/Build/source/texk/dvipng/readme.texi @@ -24,7 +24,7 @@ as is possible. The target audience is people who need to generate and regenerate many images again and again. The primary target is the @previewlatex{} (X)Emacs package, a package to preview formulas from within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see @url{http://preview-latex.sf.net}. +buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. Another example is WeBWorK, an internet-based method for delivering homework problems to students over the internet, giving students @@ -49,7 +49,7 @@ as needed in @previewlatex{}, WeBWorK and others. @item It does not read the postamble, so it can be started before @TeX{} -finishes. There is a --follow switch that makes dvipng wait at +finishes. There is a @samp{--follow} switch that makes dvipng wait at end-of-file for further output, unless it finds the POST marker that indicates the end of the DVI. @@ -59,8 +59,9 @@ through stdin, and all options are usable. It is even possible to change the input file through this interface. @item -Supports PK, VF, PostScript Type1, and TrueType fonts, color specials -and simple PostScript inclusion specials. +Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., +as used in CJK-@LaTeX{}), color specials, and inclusion of PostScript, +PNG, JPEG or GIF images. @item and more... @@ -127,11 +128,8 @@ Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson @section Todo @itemize @bullet -@item -Support for CJK-@LaTeX{} (Chinese, Japanese, Korean), that is: subfonts. - @item -Fix T1 and PK rendering so it is on par with Freetype. +Fix T1lib and PK rendering so it is on par with Freetype. @item Further speed improvements. @@ -139,9 +137,8 @@ Further speed improvements. @item Other output specials and source specials. -@item -Remove kpathsea dependence, use dvips' environment variables (this is -maybe less of an issue now with working MiKTeX support). +@item +Clean internal structures. Overhaul file handling. @end itemize diff --git a/Build/source/texk/dvipng/set.c b/Build/source/texk/dvipng/set.c index a6fa3945e49..c8c95eee094 100644 --- a/Build/source/texk/dvipng/set.c +++ b/Build/source/texk/dvipng/set.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/sfd.c b/Build/source/texk/dvipng/sfd.c new file mode 100644 index 00000000000..da9bd40c0a1 --- /dev/null +++ b/Build/source/texk/dvipng/sfd.c @@ -0,0 +1,171 @@ +/* sfd.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Copyright (C) 2006 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +struct subfont* subfontp=NULL; + +struct subfont* ReadSubfont(char* sfdname, char *infix) +{ + char *pos,*max,*sfdfile=NULL; + struct subfont* sfdp=NULL; + struct filemmap fmmap; + + /* OK, find subfont and look for correct infix */ +#ifdef HAVE_KPSE_ENC_FORMATS + TEMPSTR(sfdfile,kpse_find_file(sfdname,kpse_sfd_format,false)); +#endif + if (sfdfile == NULL) { + Warning("subfont file %s could not be found",sfdname); + return(NULL); + } + DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN SUBFONT:\t'%s'", sfdfile)); + if (MmapFile(sfdfile,&fmmap)) return(NULL); + pos=fmmap.mmap; + max=fmmap.mmap+fmmap.size; + while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++; + while (pos<max && *pos=='#') { + while(pos<max && *pos!='\n') pos++; + while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++; + } + while(pos+strlen(infix)<max + && (strncmp(pos,infix,strlen(infix))!=0 + || (pos[strlen(infix)]!=' ' && pos[strlen(infix)]!='\t'))) { + while(pos+1<max && (*(pos+1)!='\n' || *pos=='\\')) + pos++; + pos++; + while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++; + while (pos<max && *pos=='#') { + while(pos<max && *pos!='\n') pos++; + while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++; + } + } + pos=pos+strlen(infix); + if (pos<max) { + int number,range,codepoint=0; + + if ((sfdp = calloc(sizeof(struct subfont)+strlen(sfdname)+1 + +strlen(infix)+1,1))==NULL) { + Warning("cannot alloc space for subfont",sfdfile); + UnMmapFile(&fmmap); + return(NULL); + } + sfdp->name=(char*)sfdp+sizeof(struct subfont); + strcpy(sfdp->name,sfdname); + sfdp->infix=(char*)sfdp+sizeof(struct subfont)+strlen(sfdname)+1; + strcpy(sfdp->infix,infix); + sfdp->encoding=FT_ENCODING_UNICODE; + while (pos<max && *pos != '\n') { + number=strtol(pos,&pos,0); + while(pos<max && (*pos==' ' || *pos=='\t')) pos++; + switch(*pos) { + case ':': + codepoint=number; + pos++; + break; + case '_': + range=strtol(pos+1,&pos,0); + while(codepoint<256 && number<range) { + sfdp->charindex[codepoint]=number; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + number++; + codepoint++; + } + default: + if (codepoint<256) + sfdp->charindex[codepoint]=number; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + } + while(pos<max && (*pos==' ' || *pos=='\t')) pos++; + while(pos<max && *pos=='\\' && pos+1<max && *(pos+1)=='\n') { + pos+=2; + while(pos<max && (*pos==' ' || *pos=='\t')) pos++; + } + } + } + return (sfdp); +} + +struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname) +{ + struct subfont *temp=subfontp; + char *sfdspec=entry->tfmname,*sfdwant=fontname, + *sfdname,*infix,*postfix; + + while (*sfdspec!='\0' && *sfdspec==*sfdwant) { + sfdspec++; + sfdwant++; + } + /* Find delimiter */ + if (*sfdspec!='@') + return(NULL); + sfdspec++; + postfix=sfdspec; + while (*postfix!='\0' && *postfix!='@') + postfix++; + if (*postfix!='@') + return(NULL); + /* Extract subfont name */ + sfdname=alloca(postfix-sfdspec+1); + strncpy(sfdname,sfdspec,postfix-sfdspec); + sfdname[postfix-sfdspec]='\0'; + /* Check postfix */ + postfix++; + if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0) + return(NULL); + /* Extract infix */ + infix=alloca(strlen(sfdwant)-strlen(postfix)+1); + strncpy(infix,sfdwant,strlen(sfdwant)-strlen(postfix)); + infix[strlen(sfdwant)-strlen(postfix)]='\0'; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT %s %s %s",fontname,sfdname,infix)); + /* Find subfont */ + while(temp!=NULL + && (strcmp(sfdname,temp->name)!=0 || strcmp(infix,temp->infix)!=0)) + temp=temp->next; + if (temp==NULL) { + temp=ReadSubfont(sfdname,infix); + if (temp!=NULL) { + temp->next=subfontp; + subfontp=temp; + } + } + entry=NewPSFont(entry); + if (entry!=NULL) { + entry->tfmname=copyword(fontname); + entry->subfont=temp; + } + return(entry); +} + +void ClearSubfont(void) +{ + struct subfont *temp=subfontp; + + while(temp!=NULL) { + subfontp=subfontp->next; + free(temp); + temp=subfontp; + } +} + diff --git a/Build/source/texk/dvipng/special.c b/Build/source/texk/dvipng/special.c index 0b0b194d498..cffcf30f63f 100644 --- a/Build/source/texk/dvipng/special.c +++ b/Build/source/texk/dvipng/special.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2006 Jan-Åke Larsson @@ -32,8 +32,8 @@ #define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ gdImagePtr -ps2png(const char *psfile, char *device, int hresolution, int vresolution, - int llx, int lly, int urx, int ury) +ps2png(FILE *psfilestream, char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) { #ifndef MIKTEX int downpipe[2], uppipe[2]; @@ -52,8 +52,9 @@ ps2png(const char *psfile, char *device, int hresolution, int vresolution, char resolution[STRSIZE]; /* char devicesize[STRSIZE]; */ gdImagePtr psimage=NULL; - static char* showpage=""; + static bool showpage=false; + fseek(psfilestream,0,SEEK_SET); sprintf(resolution, "-r%dx%d",hresolution,vresolution); /* Future extension for \rotatebox status=sprintf(devicesize, "-g%dx%d", @@ -129,18 +130,27 @@ ps2png(const char *psfile, char *device, int hresolution, int vresolution, } #endif if (psstream) { + int pschar; DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice", urx - llx, ury - lly,llx,lly)); fprintf(psstream, "<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice\n", urx - llx, ury - lly,llx,lly); - if ( cstack[0].red < 255 || cstack[0].green < 255 || cstack[0].blue < 255 ) { + if ( bgred < 255 || bggreen < 255 || bgblue < 255 ) { DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tgsave %f %f %f setrgbcolor clippath fill grestore", - cstack[0].red/255.0, cstack[0].green/255.0, cstack[0].blue/255.0)); + bgred/255.0, bggreen/255.0, bgblue/255.0)); fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore", - cstack[0].red/255.0, cstack[0].green/255.0, cstack[0].blue/255.0); + bgred/255.0, bggreen/255.0, bgblue/255.0); + } + DEBUG_PRINT(DEBUG_GS,("\n PS DATA:\t...")); + pschar=getc(psfilestream); + while(pschar!=EOF) { + putc(pschar,psstream); + pschar=getc(psfilestream); + } + if (showpage) { + DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage")); + fprintf(psstream, " showpage "); } - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t(%s) run %s quit ", psfile, showpage)); - fprintf(psstream, "(%s) run %s quit ", psfile, showpage); fclose(psstream); } if (pngstream) { @@ -152,11 +162,12 @@ ps2png(const char *psfile, char *device, int hresolution, int vresolution, #endif if (psimage == NULL) { DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE ")); - if (!(*showpage)) { - showpage="showpage"; - DEBUG_PRINT(DEBUG_GS,("(will try adding \"%s\") ",showpage)); - psimage=ps2png(psfile, device, hresolution, vresolution, llx, lly, urx, ury); - showpage=""; + if (!showpage) { + showpage=true; + DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") ")); + psimage=ps2png(psfilestream, device, hresolution, vresolution, llx, lly, urx, ury, + bgred,bggreen,bgblue); + showpage=false; } #ifdef DEBUG } else { @@ -339,7 +350,6 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE PNG \t%s",psfile)); fseek(psstream,0,SEEK_SET); psimage=gdImageCreateFromPng(psstream); - fclose(psstream); break; case 'G': /* GIF magic: "GIF87" or "GIF89" */ DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE GIF \t%s",psfile)); @@ -349,7 +359,6 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) #else DEBUG_PRINT(DEBUG_DVI,(" (NO GIF DECODER)")); #endif - fclose(psstream); break; case 0xff: /* JPEG magic: 0xffd8 */ DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE JPEG \t%s",psfile)); @@ -359,10 +368,8 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) #else DEBUG_PRINT(DEBUG_DVI,(" (NO JPEG DECODER)")); #endif - fclose(psstream); break; default: /* Default, PostScript magic: "%!PS-Adobe" */ - fclose(psstream); if (flags & NO_GHOSTSCRIPT) { Warning("GhostScript calls disallowed by --noghostscript", psfile ); flags |= PAGE_GAVE_WARN; @@ -378,28 +385,30 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) Warning("Palette output, opaque image inclusion"); #ifdef HAVE_GDIMAGEPNGEX else if (psimage==NULL) { - DEBUG_PRINT(DEBUG_DVI,("\n RENDER PNGALPHA POSTSCRIPT \t%s", - psfile)); + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), + ("\n GS RENDER \t%s -> pngalpha ",psfile)); if (clip) { - DEBUG_PRINT(DEBUG_DVI,(", CLIPPED TO BBOX")); - psimage = ps2png(psfile, "-sDEVICE=pngalpha", + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS),(", CLIPPED TO BBOX")); + psimage = ps2png(psstream, "-sDEVICE=pngalpha", hresolution, vresolution, - llx, lly, urx, ury); + llx, lly, urx, ury, + 255,255,255); } else { /* Render across the whole image */ - DEBUG_PRINT(DEBUG_DVI, + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), ("\n EXPAND BBOX \t%d %d %d %d -> %d %d %d %d", llx,lly,urx,ury, llx-(hh+1)*72/hresolution, lly-(gdImageSY(page_imagep)-vv-1)*72/vresolution, llx+(gdImageSX(page_imagep)-hh)*72/hresolution, lly+(vv+1)*72/vresolution)); - psimage = ps2png(psfile, "-sDEVICE=pngalpha", + psimage = ps2png(psstream, "-sDEVICE=pngalpha", hresolution, vresolution, llx-(hh+1)*72/hresolution, lly-(gdImageSY(page_imagep)-vv-1)*72/vresolution, llx+(gdImageSX(page_imagep)-hh)*72/hresolution, - lly+(vv+1)*72/vresolution); + lly+(vv+1)*72/vresolution, + 255,255,255); if (psimage!=NULL) { hh=0; vv=gdImageSY(page_imagep)-1; @@ -414,16 +423,19 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) #endif if (psimage==NULL) { /* png256 gives inferior result */ - DEBUG_PRINT(DEBUG_DVI,("\n RENDER POSTSCRIPT \t%s", psfile)); - psimage = ps2png(psfile, "-sDEVICE=png16m", + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), + ("\n GS RENDER \t%s -> png16m", psfile)); + psimage = ps2png(psstream, "-sDEVICE=png16m", hresolution, vresolution, - llx, lly, urx, ury); + llx, lly, urx, ury, + cstack[0].red,cstack[0].green,cstack[0].blue); flags |= PAGE_GAVE_WARN; } if (flags & CACHE_IMAGES && cacheimage==NULL) storecache(psname,psimage); } } + fclose(psstream); if (psimage!=NULL) { /* Rescale, but ignore (one-pixel) rounding errors */ if (gdImageSX(psimage)!=pngwidth diff --git a/Build/source/texk/dvipng/t1.c b/Build/source/texk/dvipng/t1.c index 7985e9fb352..ba8a4a17d9a 100644 --- a/Build/source/texk/dvipng/t1.c +++ b/Build/source/texk/dvipng/t1.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/test_dvipng.tex b/Build/source/texk/dvipng/test_dvipng.tex index 86fcf388297..c9251746a56 100644 --- a/Build/source/texk/dvipng/test_dvipng.tex +++ b/Build/source/texk/dvipng/test_dvipng.tex @@ -14,7 +14,8 @@ % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software -% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +% 02110-1301 USA. % % Copyright (C) 2002-2005 Jan-\AA{}ke Larsson @@ -33,16 +34,12 @@ $\int dx$ \newpage $\sqrt2+1=\frac1{\sqrt2-1}$ \newpage -$\frac23$ -\newpage -\ +\framebox{\textbackslash\ttfamily framebox} \newpage \( \begin{array}{|r|} \hline a \cr \hline \end{array} \) \newpage fig, pig, flask, efficiency, effluent \newpage -\special{fail}a failing special -\newpage \Huge A \LARGE A \Large A \large A \normalsize A \small A \footnotesize A \scriptsize A \tiny A \newpage diff --git a/Build/source/texk/dvipng/tfm.c b/Build/source/texk/dvipng/tfm.c index 6c408895491..13215dc4b93 100644 --- a/Build/source/texk/dvipng/tfm.c +++ b/Build/source/texk/dvipng/tfm.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson diff --git a/Build/source/texk/dvipng/vf.c b/Build/source/texk/dvipng/vf.c index c61d05c6746..0d0f74298b0 100644 --- a/Build/source/texk/dvipng/vf.c +++ b/Build/source/texk/dvipng/vf.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. Copyright (C) 2002-2005 Jan-Åke Larsson |