diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-24 21:19:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-24 21:19:46 +0000 |
commit | 9ff01d9320cfcd3a7309de56431b2fe981bd288c (patch) | |
tree | d857f7e7bd844672c8c67c351a4f7dd9dd289504 /Build | |
parent | e2cc8329f876fc8d761568fa2df397189e18a936 (diff) |
missed checkin
git-svn-id: svn://tug.org/texlive/trunk@2009 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
31 files changed, 9199 insertions, 4676 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl index e977731be0c..140616cafa0 100755 --- a/Build/cdbuild/ctan2tds.pl +++ b/Build/cdbuild/ctan2tds.pl @@ -67,7 +67,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'ae', "&MAKEae", 'allrunes', "&MAKEflatten", 'alphabib', "print shell script, and no doc source?", - 'amslatex', "&MAKEflatten", + 'amslatex', "&MAKEcopy", # we use latex-tds/amslatex.zip 'amsldoc-vn', "&MAKEflatten", 'antomega', "&MAKEflatten", 'antt', "&MAKEflatten", @@ -77,7 +77,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'ascii', "&MAKEflatten", 'augie', "&MAKEaugie", 'aurical', "&MAKEaurical", - 'babel', "&MAKEbabel", + 'babel', "&MAKEcopy", # we use latex-tds/babel.zip 'bangtex', "&MAKEflatten", 'bardiag', "&MAKEbardiag", 'barr', "&MAKEbarr", @@ -108,6 +108,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'corridx', "print \"Not installing corridx as it is Pascal source\n\"", 'ctib', "&MAKEflatten", 'cweb', "print \"Not installing cweb as it is weird\n\"", + 'cyrillic', "&MAKEcopy", # we use latex-tds/cyrillic.zip 'devanagr', "&MAKEdevanagr", 'diagnose', "&MAKEflatten", 'dictsym', "&MAKEunzipandflatten", @@ -144,6 +145,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'frankenstein',"print \"Not installing frankenstein, to be replaced\n\"", 'frcursive', "&MAKEflatten", 'germbib', "&MAKEflatten", + 'graphics', "&MAKEcopy", # we use latex-tds/graphics.zip 'hfbright', "&MAKEflatten", 'hfoldsty', "&MAKEflatten", 'hyperref', "&MAKEhyperref", @@ -154,6 +156,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'koma-script', "&MAKEkoma", 'kuvio', "&MAKEkuvio", 'latexmp', "&MAKEflatten", + 'latex-tds', "&MAKEcopy", # we use latex-tds/source.zip 'leawood', "&MAKEflatten", 'lettre', "&MAKEflatten", 'lettrine', "&MAKEflatten", @@ -213,7 +216,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'prosper', '&MAKEflatten', 'psfragx', "&MAKEflatten", 'pslatex', "&MAKEpslatex", - 'psnfss', "&MAKEpsnfss", + 'psnfss', "&MAKEcopy", # we use latex-tds/psnfss.zip 'psnfss-addons', "print \"Not installing psnfss-addons \n\"", 'psnfssx', "&MAKEflatten", 'pst-3dplot', "&MAKEpst", @@ -265,6 +268,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'tipa', "&MAKEtipa", 'titlepage-uni-dortmund', "print \"needs graphics (too short names) in .\n\"", 'tpcmfont', "print \"Not installing tpcmfont\n\"", + 'tools', "&MAKEcopy", # we use latex-tds/tools.zip 'tugboat', "&MAKEtugboat", # both plain and latex 'txfonts', "&MAKEflatten", 'ucs', "&MAKEucs", @@ -1007,6 +1011,8 @@ sub xchdir sub MAKEcopy { my $dest = $_[0] || $DEST; + print "\t COPY from $packagedir to $dest\n"; + chdir ($packagedir) || die "chdir($packagedir) failed: $!"; &SYSTEM ("mkdir -p $dest"); @@ -1510,12 +1516,13 @@ sub MAKEbabel { &setup; &buildfilelist; &donormal; + # maybe also remove bulgarian? print "\t SPECIAL $package: remove old lahyph.tex\n"; # since braams hasn't &SYSTEM("rm -f $DEST/doc/generic/$package/lahyph.tex"); my $files = "icehyph.tex iahyphen.tex "; print "\t SPECIAL move to /tmp: $files\n"; # since not separate on CTAN &SYSTEM("cd $DEST/doc/generic/$package && mv $files /tmp"); - print "\t YOU-MUST-DO check against texmf/tex/generic/hyphen\n"; + print "\t YOU-MUST-DO check those against texmf/tex/generic/hyphen\n"; } sub MAKEbbm { diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog index ebb1afbb4e8..e180f5fd999 100644 --- a/Build/source/texk/dvipng/ChangeLog +++ b/Build/source/texk/dvipng/ChangeLog @@ -1,5 +1,128 @@ +2006-03-27 Jan-Ake Larsson <jalar@mai.liu.se> + + * ft.c: Change to FT_LOAD_TARGET_LIGHT + + * draw.c: Fix segfault in debug mode + + * aclocal.m4: Make sure the kpse_enc_format test fails for the + right reason only + +2006-02-27 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Use gs' pngalpha device, render without clipping, + adjust image position + + * set.c: Simplify code, make color cache (page-)persistent + + * draw.c: Reset new flag + + * misc.c: New switch, remove some old switches from fast-help, use + new flag name + + * dvipng.h: New flags + + * configure.ac: + * config.h.in: Simplify gd tests + + * configure.ac: + * aclocal.m4: Check gs devices + +2006-02-10 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Use execlp for gs call + +2006-02-03 Jan-Ake Larsson <jalar@mai.liu.se> + * special.c: + Revert message about file type, debug information is enough + + * special.c: Warn for nonexistent image decoder + +2006-02-01 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Warn with file type when unable to load included image + + * special.c: Read the first byte of file to be included and + compare with magic number + +2006-01-31 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: + Temporary version, just try the different image decoders and see + + * special.c: Use correct variables + +2006-01-29 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Add code to check image access permission + +2006-01-28 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Simplify some code + + * papersiz.c: Fix rounding error for length calculation + +2006-01-26 Jan-Ake Larsson <jalar@mai.liu.se> + + * color.c: Fix typo that gave a segfault + + * config.h.in: Remove unneeded function check + + * configure.ac: Update for 1.8, remove unneeded function check + + * dvipng.h: Switch debug numbers to coincide with the manual + + * misc.c: Remove isdigit + + * special.c: Add code to include PNG, JPEG and GIF images + +2006-01-12 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Add a space in message + + * misc.c: Do more tests for numeric-parameter options + + * dvi.c: Outfilename: only remove .dvi extension, not others + +2005-10-11 Jan-Ake Larsson <jalar@mai.liu.se> + + * Release 1.7 + + * INSTALL: Typographic changes + + * README: + * RELEASE: + * configure.ac: + * dvipng.1: + * dvipng.texi: Adjust for 1.7 + + * install.texi: Insert space + + * miktex.h: Adjust for 1.7, I am uncertain which of the new calls + are available in the MIKTeX environment + + * readme.texi: Remove reference to my old laptop + +2005-09-30 Jan-Ake Larsson <jalar@mai.liu.se> + + * config.h.in, configure.ac, ft.c: + Only use FT_Library_Version if available + +2005-07-05 jalar <jalar@mai.liu.se> + + * Makefile.in: Enable srcdir != builddir + +2005-07-04 jalar <jalar@mai.liu.se> + + * font.c: Add length check for font name + +2005-06-28 Jan-Ake Larsson <jalar@mai.liu.se> + + * special.c: Read preview-latex version + 2005-06-27 Jan-Ake Larsson <jalar@mai.liu.se> + * Release 1.6 + * RELEASE: Report what fixes have been done * dvipng.texi: Document xcolor adaptations diff --git a/Build/source/texk/dvipng/INSTALL b/Build/source/texk/dvipng/INSTALL index 2fd46254d2e..a97a5713987 100644 --- a/Build/source/texk/dvipng/INSTALL +++ b/Build/source/texk/dvipng/INSTALL @@ -50,7 +50,7 @@ Prerequisites Configure ========= - The first step is to configure the source code, telling it where +The first step is to configure the source code, telling it where various files will be. To do so, run ./configure OPTIONS @@ -101,7 +101,7 @@ where the backslash denotes a continuation of the line. Build/install ============= - Once `configure' has been run, simply enter +Once `configure' has been run, simply enter make @@ -116,19 +116,19 @@ into system directories. Installation outside the texmf tree =================================== - In some cases, a dvipng binary installed outside the texmf tree will +In some cases, a dvipng binary installed outside the texmf tree will not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because *only* $SELFAUTOLOC, +(normally used by dvips). This may be because _only_ $SELFAUTOLOC, $SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree configuration file `texmf.cnf'. If so, give the switch `--enable-selfauto-set' to `./configure'. This will make dvipng adjust -these three internally so that kpathsea thinks that dvipng *is* +these three internally so that kpathsea thinks that dvipng _is_ installed in the texmf tree. Installation for non-privileged users ===================================== - Often people without system administration privileges want to install +Often people without system administration privileges want to install software for their private use. In that case you need to specify more options to the `configure' script, usually this is done by using the `--prefix' option to the `configure' script, and let it point to the @@ -140,14 +140,15 @@ supported by most `configure' scripts. You'll have to add something like `/home/myself/bin' to your `PATH' shell variable, if it isn't there already, and similarly set the -`INFOPATH' variable to be able to access the documentation. +`INFOPATH' and `MANPATH' variables to be able to access the +documentation. Copying ======= - This program is released under the GNU General Public License, see -the COPYING file in the dvipng distribution or +This program is released under the GNU General Public License, see the +COPYING file in the dvipng distribution or `http://www.gnu.org/licenses/gpl.html'. - Copyright (C) 2002-2005 Jan-AAke Larsson + Copyright (C) 2002-2006 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in index 213891cb9e5..bf5689b5a47 100644 --- a/Build/source/texk/dvipng/Makefile.in +++ b/Build/source/texk/dvipng/Makefile.in @@ -1,114 +1,163 @@ -# Thomas Esser, for teTeX. All settings here are my fault, don't blame -# the dvipng maintainers for it. - -kpse_include ../make/paths.mk -kpse_include ../make/common.mk -kpse_include ../make/programs.mk -kpse_include ../make/cross.mk - -ZLIBDIR = ../../libs/zlib -ZLIBSRCDIR = $(srcdir)/$(ZLIBDIR) -ZLIBDEP = @ZLIBDEP@ -LDZLIB = @LDZLIB@ - -LIBPNGDIR = ../../libs/libpng -LIBPNGSRCDIR = $(srcdir)/$(LIBPNGDIR) -LIBPNGDEP = @LIBPNGDEP@ -LDLIBPNG = @LDLIBPNG@ - -GDDIR = ../../libs/gd -GDSRCDIR = $(srcdir)/$(GDDIR) -GDDEP = @GDDEP@ -LDGD = @LDGD@ - -LDLIBT1=@LDLIBT1@ -LIBT1CPPFLAGS=@LIBT1CPPFLAGS@ -LIBT1DEP=@LIBT1DEP@ -LIBT1DIR = ../../libs/t1lib -LIBTYPE1DIR = $(LIBT1DIR)/../type1 -LIBT1SRCDIR = $(srcdir)/$(LIBT1DIR) - -LD_ALL_LIBS = $(LDGD) $(LDLIBT1) $(LDLIBPNG) $(LDZLIB) -ALL_LIBS_DEP = $(ZLIBDEP) $(LIBPNGDEP) $(GDDEP) $(LIBT1DEP) - -program = dvipng -programs = $(program) -default all: $(programs) - -prog_cflags = -DHAVE_KPSE_ENC_FORMATS -DHAVE_PNG_H \ - -DHAVE_T1LIB_H -DHAVE_LIBKPATHSEA -DHAVE_LIBT1 -DHAVE_GD_H \ - -DHAVE_LIBGD -DHAVE_GDIMAGEPNGEX -DHAVE_GDIMAGECREATETRUECOLOR \ - -DHAVE_GDIMAGETRUECOLORTOPALETTE @LIBPNGCPPFLAGS@ @ZLIBCPPFLAGS@ \ - -DDEBUG=1 -DHAVE_GDIMAGEGIF \ - $(LIBT1CPPFLAGS) @GDCPPFLAGS@ - -objects=dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \ - set.o special.o papersiz.o ppagelist.o \ - vf.o @PSFONTS_O@ -$(program): $(objects) $(kpathsea) $(ALL_LIBS_DEP) - $(kpathsea_link) $(objects) $(LD_ALL_LIBS) $(LOADLIBES) - -$(LIBPNGDIR)/libpng.a: - cd $(LIBPNGDIR); $(MAKE) - -$(ZLIBDIR)/libz.a: - cd $(ZLIBDIR); $(MAKE) - -$(GDDIR)/libgd.a: - cd $(GDDIR); $(MAKE) - -$(LIBT1DIR)/libt1.a: - cd $(LIBT1DIR); $(MAKE) $(makeargs) libt1.a - -$(LIBTYPE1DIR)/libtype1.a: - cd $(LIBTYPE1DIR); $(MAKE) $(makeargs) libtype1.a +# Makefile is generated by 'configure' from Makefile.in + +#************************************************************************ +# +# 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-2005 Jan-Åke Larsson +# +#************************************************************************ + +PACKAGE_STRING="@PACKAGE_STRING@" + +CC = @CC@ +CFLAGS = @CFLAGS@ -Wall +CPPFLAGS = @CPPFLAGS@ -I. +LN_S = @LN_S@ + +LIBS = @LIBS@ +LDFLAGS = @LDFLAGS@ + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +infodir = @infodir@ +mandir = @mandir@ +DESTDIR= +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = ./mkinstalldirs + +MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@ +INSTALL_INFO=@INSTALL_INFO@ +TEX=tex +TEXIDVI=texi2dvi +TEXIHTML=texi2html +DVIPS=dvips +TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help + +objects = dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \ + set.o special.o papersiz.o ppagelist.o \ + vf.o @PSFONTS_O@ + +all: dvipng docs + +install: @INSTALL_BIN_TARGET@ @INSTALL_BIN_TARGET@-docs + +####################################### The program + +dvipng: $(objects) + $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) + +$(objects): dvipng.h commands.h config.h + +install-dvipng: dvipng + -$(MKINSTALLDIRS) $(DESTDIR)$(bindir) + $(INSTALL) dvipng $(DESTDIR)$(bindir) + +install-dvigif: install-dvipng + (cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif) + +####################################### The documentation + +docs: dvipng.dvi dvipng.info + +dvipng.dvi: $(TEXIFILES) + -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi + +dvipng.ps: dvipng.dvi + $(DVIPS) -Ppdf dvipng.dvi + +dvipng.info: $(TEXIFILES) dvipng.help + -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi dvipng.help: dvipng -./dvipng > dvipng.tmp - (test -r $(srcdir)/dvipng.help \ - && diff dvipng.tmp $(srcdir)/dvipng.help) \ - || cp dvipng.tmp $(srcdir)/dvipng.help + ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ + || cp dvipng.tmp dvipng.help rm -f dvipng.tmp +dvipng.html: $(TEXIFILES) dvipng.help + texi2html -I $(srcdir) $(srcdir)/dvipng.texi -install: install-exec install-data -uninstall: uninstall-exec uninstall-data +dvipng_mono.html: $(TEXIFILES) dvipng.help + texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ + -I $(srcdir) $(srcdir)/dvipng.texi -distclean:: - $(RM) config.h +INSTALL: install.texi + -$(MAKEINFO) -D rawfile --no-headers --no-validate \ + --no-number-sections \ + -I$(srcdir) $(srcdir)/install.texi --output INSTALL -install-exec: - $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir) - $(INSTALL_LIBTOOL_PROG) $(program) $(bindir) - (cd $(bindir) && rm -f dvigif && ln -s $(program) dvigif) +README: readme.texi + -$(MAKEINFO) -D rawfile --no-headers --no-validate \ + --no-number-sections \ + -I$(srcdir) $(srcdir)/readme.texi --output README -uninstall-exec: - cd $(bindir); rm -f $(programs) +dvipng.1: dvipng.texi readme.texi + texi2pod.pl -D man $(srcdir)/dvipng.texi > dvipng.pod + pod2man --center="User commands" --release=$(PACKAGE_STRING)\ + dvipng.pod > dvipng.1 + rm dvipng.pod -install-data: - $(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir) $(infodir) - $(INSTALL_DATA) $(srcdir)/$(program).1 $(man1dir)/$(program).$(manext) - cd $(srcdir) && for i in $(program).i*; do \ - $(INSTALL_DATA) $$i $(infodir)/$$i; done - $(POST_INSTALL) - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --info-dir=$(infodir) $(infodir)/$(program).info; \ - else true; fi +install-docs: docs + -$(MKINSTALLDIRS) $(DESTDIR)$(infodir) + for x in dvipng.info* ; do \ + $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \ + done + -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info + -$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 + $(INSTALL_DATA) dvipng.1 $(DESTDIR)$(mandir)/man1 -uninstall-data: - $(PRE_UNINSTALL) - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --delete --info-dir=$(infodir) $(infodir)/$(program).info ; \ - else true; fi - $(NORMAL_UNINSTALL) - rm -f $(man1dir)/dvipng.$(manext) - rm -f $(infodir)/$(program).i* +install-dvipng-docs: install-docs -kpse_include ../make/config.mk +install-dvigif-docs: install-docs + (cd $(DESTDIR)$(mandir)/man1 && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1) -info dvi check: +####################################### 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 + echo View the result e.g. with xv test_dvipng\*.png + +test_dvipng.dvi: test_dvipng.tex + latex $(srcdir)/test_dvipng.tex + +####################################### The cleaning up + +clean: + rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log + rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \ + *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ + *.fns *.vrs *.pgs *.html *.tmp + +distclean: clean INSTALL README dvipng.1 + rm -f Makefile + rm -f config.status config.log config.cache c-auto.h + + +# SunOS make suffix rule wierdness +.cps.h: -kpse_include ../make/clean.mk -kpse_include ../make/tkpathsea.mk -kpse_include ../make/rdepend.mk -kpse_include depend.mk diff --git a/Build/source/texk/dvipng/README b/Build/source/texk/dvipng/README index 55ec5e55329..bef995e219d 100644 --- a/Build/source/texk/dvipng/README +++ b/Build/source/texk/dvipng/README @@ -27,16 +27,14 @@ Benefits of dvipng The benefits of `dvipng'/`dvigif' include - * Speed. It is a very fast bitmap-rendering code for DVI files. On a - fairly low-end laptop, it takes less than a second to generate 150 - one-formula images. This makes dvipng suitable for generating large - amounts of images on-the-fly, as needed in preview-latex, WeBWorK - and others. + * Speed. It is a very fast bitmap-rendering code for DVI files, which + makes it suitable for generating large amounts of images + 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 EOF - for further output, unless it finds the POST marker that indicates - the end of the DVI. + 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. * Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to @@ -47,15 +45,16 @@ Benefits of dvipng * and more... + Installation ============ - Read `INSTALL', included in the distribution. +Read `INSTALL', included in the distribution. Usage ===== - To use dvipng at its simplest, simply type +To use dvipng at its simplest, simply type dvipng foo @@ -72,15 +71,16 @@ summary of available options, just type Availability ============ - The dvipng package is available at Savannah, from the project page of -dvipng `http://savannah.nongnu.org/projects/dvipng'. Instructions for -anonymous CVS access can be found at +The dvipng package is available at Savannah, the GNU project site. Since +dvipng is not part of the GNU project, although released under the GNU +GPL, the web address is `http://savannah.nongnu.org/projects/dvipng'. +Instructions for anonymous CVS access can be found at `http://savannah.nongnu.org/cvs/?group=dvipng'. Contacts ======== - Bug reports should be sent to <dvipng@nongnu.org>. +Bug reports should be sent to <dvipng@nongnu.org>. Questions, suggestions for new features, pleas for help, and/or praise should go to <dvipng@nongnu.org>. For more information on this @@ -94,16 +94,19 @@ developer access, ask on <dvipng@nongnu.org>. Copying ======= - This program is released under the GNU General Public License, see -the COPYING file in the dvipng distribution or +This program is released under the GNU General Public License, see the +COPYING file in the dvipng distribution or `http://www.gnu.org/licenses/gpl.html'. - Copyright (C) 2002-2005 Jan-AAke Larsson + Copyright (C) 2002-2006 Jan-AAke Larsson Todo ==== - * Test the FreeType interface so that TrueType fonts work properly. + * Support for CJK-LaTeX (Chinese, Japanese, Korean), that is: + subfonts. + + * Fix T1 and PK rendering so it is on par with Freetype. * Further speed improvements. diff --git a/Build/source/texk/dvipng/RELEASE b/Build/source/texk/dvipng/RELEASE index ab132f80edf..f4bdbfff9b4 100644 --- a/Build/source/texk/dvipng/RELEASE +++ b/Build/source/texk/dvipng/RELEASE @@ -1,13 +1,27 @@ -Release notes for version 1.6 of the dvipng package: +Release notes for version 1.8 of the dvipng package: This program makes PNG graphics from DVI files as obtained from TeX and its relatives. -The 1.6 release adds proper alpha channel support and xcolor support. -It also reestablishes identification of preview-latex' tightpage mode -option. +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 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). -It has been tested to a fair degree. Note the disclaimer in the -COPYING file. Report any bugs you find, see README for instructions. +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. + + +Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/acconfig.h b/Build/source/texk/dvipng/acconfig.h deleted file mode 100644 index f9c72de53f6..00000000000 --- a/Build/source/texk/dvipng/acconfig.h +++ /dev/null @@ -1,17 +0,0 @@ -/* ... */ -#undef PACKAGE_NAME - -/* ... */ -#undef PACKAGE_VERSION - -/* ... */ -#undef PACKAGE_STRING - -/* ... */ -#undef int64_t - -/* ... */ -#undef uint64_t - -/* Define to 1 if you have the <kpathsea/kpathsea.h> header file. */ -#undef HAVE_KPATHSEA_KPATHSEA_H diff --git a/Build/source/texk/dvipng/aclocal.m4 b/Build/source/texk/dvipng/aclocal.m4 index f35e7fa0df6..332367171d1 100644 --- a/Build/source/texk/dvipng/aclocal.m4 +++ b/Build/source/texk/dvipng/aclocal.m4 @@ -197,9 +197,24 @@ 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/tex-file.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)])]) + + +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 fe0bb66c86e..3fe46a2f7c5 100644 --- a/Build/source/texk/dvipng/color.c +++ b/Build/source/texk/dvipng/color.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -136,7 +136,7 @@ struct colorname* LoadColornameFile(char* filename, bool should_exist) pos++; values=pos; FINDVALEND(pos,nvalues); - NewColor(name,nname,model,nmodel,values,nvalues); + tmp=NewColor(name,nname,model,nmodel,values,nvalues); tmp->next=list; list=tmp; FINDWORD(pos); diff --git a/Build/source/texk/dvipng/config.h.in b/Build/source/texk/dvipng/config.h.in index 9206914889e..81a3bb3024d 100644 --- a/Build/source/texk/dvipng/config.h.in +++ b/Build/source/texk/dvipng/config.h.in @@ -1,132 +1,241 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.h.in. Generated from configure.ac by autoheader. */ -/* Define if using alloca.c. */ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA -/* Define to empty if the keyword does not work. */ -#undef const +/* Define as 1 to get the debug (-d) option. */ +#undef DEBUG -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END +/* The environment setting for $SELFAUTODIR */ +#undef ENV_SELFAUTODIR -/* Define if you have alloca, as a function or macro. */ +/* The environment setting for $SELFAUTOLOC */ +#undef ENV_SELFAUTOLOC + +/* The environment setting for $SELFAUTOPARENT */ +#undef ENV_SELFAUTOPARENT + +/* Define as the path to GhostScript. */ +#undef GS_PATH + +/* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). + */ #undef HAVE_ALLOCA_H -/* Define if you don't have vprintf but do have _doprnt. */ +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP +/* Define to 1 if you have the `dup2' function. */ +#undef HAVE_DUP2 -/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK -/* Define to `int' if <sys/types.h> doesn't define. */ -#undef pid_t +/* Define to 1 if you have freetype2 */ +#undef HAVE_FT2 -/* Define to `unsigned' if <sys/types.h> doesn't define. */ -#undef size_t +/* Define to 1 if you have the `ftime' function. */ +#undef HAVE_FTIME -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION +/* Define to 1 if you have the `FT_Library_Version' function. */ +#undef HAVE_FT_LIBRARY_VERSION -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define to 1 if you have the `gdImageCreateTrueColor' function. */ +#undef HAVE_GDIMAGECREATETRUECOLOR -/* Define if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME +/* Define to 1 if you have the `gdImageGif' function. */ +#undef HAVE_GDIMAGEGIF -/* ... */ -#undef PACKAGE_NAME +/* Define to 1 if you have the `gdImagePngEx' function. */ +#undef HAVE_GDIMAGEPNGEX -/* ... */ -#undef PACKAGE_VERSION +/* Define to 1 if you have the <gd.h> header file. */ +#undef HAVE_GD_H -/* ... */ -#undef PACKAGE_STRING +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H /* Define to 1 if you have the <kpathsea/kpathsea.h> header file. */ #undef HAVE_KPATHSEA_KPATHSEA_H -/* Define if you have the dup2 function. */ -#undef HAVE_DUP2 +/* Define to 1 if your kpathsea has kpse_enc_format */ +#undef HAVE_KPSE_ENC_FORMATS -/* Define if you have the ftime function. */ -#undef HAVE_FTIME +/* Define to 1 if you have the `gd' library (-lgd). */ +#undef HAVE_LIBGD -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE +/* Define to 1 if you have the `gen' library (-lgen). */ +#undef HAVE_LIBGEN -/* Define if you have the gettimeofday function. */ -#undef HAVE_GETTIMEOFDAY +/* Define to 1 if you have the `kpathsea' library (-lkpathsea). */ +#undef HAVE_LIBKPATHSEA + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `png' library (-lpng). */ +#undef HAVE_LIBPNG + +/* Define to 1 if you have the `t1' library (-lt1). */ +#undef HAVE_LIBT1 + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC -/* Define if you have the memchr function. */ -#undef HAVE_MEMCHR +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the memset function. */ +/* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define if you have the munmap function. */ +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP -/* Define if you have the putenv function. */ +/* Define to 1 if you have the <png.h> header file. */ +#undef HAVE_PNG_H + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV -/* Define if you have the strchr function. */ +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define if you have the strrchr function. */ +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR -/* Define if you have the strtol function. */ +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H -/* Define if you have the <gd.h> header file. */ -#undef HAVE_GD_H +/* Define to 1 if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H -/* Define if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H -/* Define if you have the <stdbool.h> header file. */ -#undef HAVE_STDBOOL_H +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H -/* Define if you have the <sys/time.h> header file. */ -#undef HAVE_SYS_TIME_H +/* Define to 1 if you have the <t1lib.h> header file. */ +#undef HAVE_T1LIB_H -/* Define if you have the <unistd.h> header file. */ +/* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the <zlib.h> header file. */ -#undef HAVE_ZLIB_H +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK -/* Define if you have the gd library (-lgd). */ -#undef HAVE_LIBGD +/* Define to 1 if you have the <vfork.h> header file. */ +#undef HAVE_VFORK_H -/* Define if you have the gen library (-lgen). */ -#undef HAVE_LIBGEN +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF -/* Define if you have the m library (-lm). */ -#undef HAVE_LIBM +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK -/* Define if you have the z library (-lz). */ -#undef HAVE_LIBZ +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK -/* Define as the path to GhostScript. */ -#undef GS_PATH +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define as 1 to get execution time output. */ +#undef TIMING + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long long' if <inttypes.h> does not define it. */ +#undef int64_t + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `int' if <sys/types.h> does not define. */ +#undef pid_t + +/* Define to `unsigned' if <sys/types.h> does not define. */ +#undef size_t + +/* Define to `unsigned long long' if <inttypes.h> does not define it. */ +#undef uint64_t +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure index fd6f130788c..a6fba6bad1f 100755 --- a/Build/source/texk/dvipng/configure +++ b/Build/source/texk/dvipng/configure @@ -1,75 +1,327 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.59 for dvipng 1.8. +# +# Report bugs to <dvipng@nongnu.org>. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -# Defaults: -ac_help= + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-system-zlib use installed zlib library" -ac_help="$ac_help - --with-zlib-libdir=DIR - Specify directory where the zlib.a resides." -ac_help="$ac_help - --with-zlib-include=DIR - Specify the zlib header files location." -ac_help="$ac_help - --with-system-pnglib use installed pnglib library" -ac_help="$ac_help - --with-pnglib-libdir=DIR - Specify directory where the png library (libpng.a) resides." -ac_help="$ac_help - --with-pnglib-include=DIR - Specify the pnglib header files location." -ac_help="$ac_help - --with-system-t1lib Use installed T1lib" -ac_help="$ac_help - --with-t1lib-libdir=DIR - Specify the location of T1lib library files (libt1.a)" -ac_help="$ac_help - --with-t1lib-include=DIR - Specify the location of T1lib header files" -ac_help="$ac_help - --with-system-gd use installed gd library" -ac_help="$ac_help - --with-gd-libdir=DIR - Specify directory where the gd library resides." -ac_help="$ac_help - --with-gd-include=DIR - Specify the gd header files location." -ac_help="$ac_help - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer" -ac_help="$ac_help - --without-mktexmf-default do not run mktexmf if MF source missing" -ac_help="$ac_help - --without-mktexpk-default do not run mktexpk if PK font missing" -ac_help="$ac_help - --without-mktextfm-default do not run mktextfm if TFM file missing" -ac_help="$ac_help - --without-mkocp-default do not run mkocp if OCP file missing" -ac_help="$ac_help - --without-mkofm-default do not run mkofm if OFM file missing" -ac_help="$ac_help - --with-mktexfmt-default run mktexfmt if format file missing" -ac_help="$ac_help - --with-mktextex-default run mktextex if TeX source missing" +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='dvipng' +PACKAGE_TARNAME='dvipng' +PACKAGE_VERSION='1.8' +PACKAGE_STRING='dvipng 1.8' +PACKAGE_BUGREPORT='dvipng@nongnu.org' + +ac_unique_file="dvipng.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif +#if HAVE_UNISTD_H +# 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_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -78,10 +330,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -95,18 +352,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -ac_config_files= -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -114,59 +362,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -175,95 +423,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # 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 << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -272,19 +472,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -298,26 +498,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -334,7 +534,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -344,7 +544,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -355,58 +555,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -417,109 +616,110 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then - { echo "configure: error: invalid variable name: $ac_envvar" 1>&2; exit 1; } - fi + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=dvipng.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -529,13 +729,483 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +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. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of dvipng 1.8:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --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. + +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) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have + headers in a nonstandard directory <include dir> + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <dvipng@nongnu.org>. +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +dvipng configure 1.8 +generated by GNU Autoconf 2.59 + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +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 +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -546,293 +1216,828 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + -cat >> confdefs.h <<\EOF -#define PACKAGE_NAME "dvipng" -EOF -cat >> confdefs.h <<\EOF -#define PACKAGE_VERSION "1.6" -EOF -cat >> confdefs.h <<\EOF -#define PACKAGE_STRING "dvipng 1.6" -EOF +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if test "$enableval" = yes ; then +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + + fi +else + enable_debug="yes"; + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + +fi; +# Check whether --enable-timing or --disable-timing was given. +if test "${enable_timing+set}" = set; then + enableval="$enable_timing" + if test "$enableval" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define TIMING 1 +_ACEOF + + fi +fi; # Checks for programs. -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:600: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftestmake <<\EOF + cat >conftest.make <<\_ACEOF all: - @echo 'ac_maketemp="${MAKE}"' -EOF + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi -rm -f conftestmake +rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi -# Extract the first word of "gcc", so it can be a program name with args. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; 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_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:629: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; 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_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_x $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +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_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; 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_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:660: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_x $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:712: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_x $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +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_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + test -n "$ac_ct_CC" && break +done -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 756 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (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 + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +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); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:792: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +int +main () +{ -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - GCC= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:820: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + 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_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+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. */ + +int +main () +{ + + ; + 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_prog_cc_g=yes else - ac_cv_prog_cc_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -846,31 +2051,294 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + 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_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_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 + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include <stdlib.h> +int +main () +{ +exit (42); + ; + 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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + 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 + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then - case $ac_dir in - /*|[A-z]:/*) ac_aux_dir=$ac_dir;; - *) ac_aux_dir=`pwd`/$ac_dir;; - esac + ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then - case $ac_dir in - /*|[A-z]:/*) ac_aux_dir=$ac_dir;; - *) ac_aux_dir=`pwd`/$ac_dir;; - esac + ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -879,56 +2347,69 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:888: checking for a BSD compatible install" >&5 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - # Hack for MSDOS and descendants. - if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test $ac_x $ac_dir/$ac_prog; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done - ;; - esac - done - IFS="$ac_save_IFS" + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -938,178 +2419,1004 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Extract the first word of "gs", so it can be a program name with args. -set dummy gs; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:945: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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 - case "$GS" in - /*|[A-z]:/*) + 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 + withval="$with_gs" + if test "x$withval" = xno ; then + GS=no + else + # Extract the first word of ""$withval"", so it can be a program name with args. +set dummy "$withval"; 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_GS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GS in + [\\/]* | ?:[\\/]*) ac_cv_path_GS="$GS" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_GS="$GS" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - if test -z "$COMSPEC"; then ac_x=-f; else ac_x=-x; fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_x $ac_dir/$ac_word; then - ac_cv_path_GS="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GS" && ac_cv_path_GS=":" + 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_GS="$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 + ;; esac fi -GS="$ac_cv_path_GS" +GS=$ac_cv_path_GS + if test -n "$GS"; then - echo "$ac_t""$GS" 1>&6 + echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -cat >> confdefs.h <<EOF + fi +else + # Extract the first word of "gs", so it can be a program name with args. +set dummy gs; 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_prog_GS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$GS"; then + ac_cv_prog_GS="$GS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GS="gs" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +GS=$ac_cv_prog_GS +if test -n "$GS"; then + echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -z "$GS"; then + GS="gs" + { echo "$as_me:$LINENO: WARNING: Cannot find GhostScript in your PATH" >&5 +echo "$as_me: WARNING: Cannot find GhostScript in your PATH" >&2;} + fi + +fi; + +cat >>confdefs.h <<_ACEOF #define GS_PATH "$GS" -EOF +_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 + if $GS -h | grep pngalpha >/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 + GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + echo "$as_me:$LINENO: checking whether $GS has the png16m device" >&5 +echo $ECHO_N "checking whether $GS has the png16m device... $ECHO_C" >&6 + if $GS -h | grep png16m >/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 + GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this." + fi + + fi + +if test -n "$GS_WARN"; then + { echo "$as_me:$LINENO: WARNING: $GS_WARN" >&5 +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 -ac_cv_lib_t1_T1_InitLib=yes +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; }; } +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. */ + +/* 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; +} +_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 +_ACEOF + + LIBS="-lt1 $LIBS" + +fi + PSFONTS_O="" if test "$ac_cv_lib_t1_T1_InitLib" = yes; then PSFONTS_O="t1.o" fi -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:995: checking how to run the C preprocessor" >&5 +# Checks for header files. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <<EOF -#line 1010 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_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 - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <<EOF -#line 1027 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <<EOF -#line 1044 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_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 - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_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 - CPP="$ac_cv_prog_CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - ac_cv_prog_CPP="$CPP" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -echo "$ac_t""$CPP" 1>&6 +rm -f conftest.err conftest.$ac_ext -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1075: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : else - cat > conftest.$ac_ext <<EOF -#line 1080 "configure" -#include "confdefs.h" + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+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 <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +int +main () +{ + + ; + 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_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1105 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <string.h> -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1118,16 +3425,19 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1123 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1136,368 +3446,1639 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <<EOF -#line 1144 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ctype.h> -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + 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_header_stdc=no fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_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; + } +} -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1179: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +_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 - cat > conftest.$ac_ext <<EOF -#line 1184 "configure" -#include "confdefs.h" + 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 + 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 <sys/types.h> #include <sys/wait.h> #ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + 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_sys_wait_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_sys_wait_h=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 -EOF +_ACEOF fi -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1221: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <<EOF -#line 1226 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/time.h> #include <time.h> -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +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_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 -EOF +_ACEOF fi -for ac_hdr in inttypes.h fcntl.h sys/time.h stdbool.h +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. */ + +#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 + 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 ((_Bool *) 0) + return 0; +if (sizeof (_Bool)) + 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__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type__Bool=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 +_ACEOF + + +fi + +if test $ac_cv_header_stdbool_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDBOOL_H 1 +_ACEOF + +fi + + + +for ac_header in fcntl.h sys/time.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1259: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1264 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +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 -rm -f conftest* +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 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - +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 - echo "$ac_t""no" 1>&6 + 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 # Checks for typedefs, structures, and compiler characteristics. -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1298: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1303 "configure" -#include "confdefs.h" - -int main() { - -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; -} -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+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. */ -; return 0; } -EOF -if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + 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_c_const=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1373: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <<EOF -#line 1378 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#include <stddef.h> -#endif -#if HAVE_STDINT_H -#include <stdint.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* + 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 ((pid_t *) 0) + return 0; +if (sizeof (pid_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_pid_t=yes else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type_pid_t=no fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define pid_t int -EOF +_ACEOF fi -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1409: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <<EOF -#line 1414 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#include <stddef.h> -#endif -#if HAVE_STDINT_H -#include <stdint.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* + 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 ((size_t *) 0) + return 0; +if (sizeof (size_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_size_t=yes else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type_size_t=no fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define size_t unsigned -EOF +_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 only is used as - # typecast, and there are no problems. + # 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 -# 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 # for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1461: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1466 "configure" -#include "confdefs.h" +echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_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. */ #include <alloca.h> -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + ; + 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_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_working_alloca_h=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 -EOF +_ACEOF fi -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1494: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <<EOF -#line 1499 "configure" -#include "confdefs.h" - + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else @@ -1519,137 +5100,217 @@ char *alloca (); # endif #endif -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +int +main () +{ +char *p = (char *) alloca (1); + ; + 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_alloca_works=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_alloca_works=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF -if test $ac_cv_func_alloca_works = no; then +else # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - cat >> confdefs.h <<\EOF +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 -EOF +_ACEOF -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1559: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <<EOF -#line 1564 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else - rm -rf conftest* ac_cv_os_cray=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1589: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1594 "configure" -#include "confdefs.h" + for ac_func in _getb67 GETB67 getb67; 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. */ +/* 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. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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(); + 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. */ -int main() { +#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 -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<EOF +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 CRAY_STACKSEG_END $ac_func -EOF +_ACEOF - break -else - echo "$ac_t""no" 1>&6 + break fi -done + done fi -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1644: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else - cat > conftest.$ac_ext <<EOF -#line 1652 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int find_stack_direction () { static char *addr = 0; @@ -1662,138 +5323,1032 @@ find_stack_direction () else return (&dummy > addr) ? 1 : -1; } + +int main () { - exit (find_stack_direction() < 0); + exit (find_stack_direction () < 0); } -EOF -if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_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 ac_cv_c_stack_direction=1 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 + 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_c_stack_direction=-1 fi -rm -fr conftest* +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_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction -EOF +_ACEOF + fi -for ac_hdr in unistd.h + + +for ac_header in unistd.h vfork.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1696: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1701 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +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 -rm -f conftest* +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 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - +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 - echo "$ac_t""no" 1>&6 + 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 -for ac_func in getpagesize + + +for ac_func in fork vfork do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1735: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1740 "configure" -#include "confdefs.h" +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. */ +/* 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. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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(); + 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. */ -int main() { +#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 -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 +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 $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + if test "$cross_compiling" = yes; then + ac_cv_func_fork_works=cross +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); + } +_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 + ac_cv_func_fork_works=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 +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 + +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 -rm -f conftest* +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 + 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> +#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 +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +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 + ); + } +} +_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 + ac_cv_func_vfork_works=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_vfork_works=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_vfork_works" >&5 +echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 + +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 + +if test "x$ac_cv_func_vfork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_VFORK 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define vfork fork +_ACEOF + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_FORK 1 +_ACEOF + fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - + +for ac_header in stdlib.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 "$ac_t""no" 1>&6 + 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 -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:1788: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_malloc_0_nonnull=no +else + 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 + +int +main () +{ +exit (malloc (0) ? 0 : 1); + ; + 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 + ac_cv_func_malloc_0_nonnull=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_malloc_0_nonnull=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_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 +_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 + +fi + + + + + +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 + 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 + + +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 + 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 $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 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 +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 <<EOF -#line 1796 "configure" -#include "confdefs.h" + 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: @@ -1807,34 +6362,34 @@ else 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 filesystem buffer cache + 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 - propogated back to all the places they're supposed to be. + 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 <sys/types.h> + #include <fcntl.h> #include <sys/mman.h> -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include <unistd.h> -# endif +#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. */ -# ifndef 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 */ -# ifdef HAVE_SYS_PARAM_H +# if HAVE_SYS_PARAM_H # include <sys/param.h> # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE @@ -1861,1785 +6416,2213 @@ else #endif /* no HAVE_GETPAGESIZE */ -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - int -main() +main () { - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 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("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) 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 = 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); - unlink("conftestmmap"); - exit(0); + 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); } - -EOF -if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_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 ac_cv_func_mmap_fixed_mapped=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no + 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_mmap_fixed_mapped=no fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&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 <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 -EOF +_ACEOF fi +rm -f conftest.mmap -echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1959: checking for vprintf" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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 else - cat > conftest.$ac_ext <<EOF -#line 1964 "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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); +} + +_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 + ac_cv_func_strtod=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_strtod=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_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 + 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 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 vprintf(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char vprintf(); + 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 -int main() { +#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_vprintf) || defined (__stub___vprintf) +#if defined (__stub_pow) || defined (__stub___pow) choke me #else -vprintf(); +char (*f) () = pow; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vprintf=yes" +int +main () +{ +return f != 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_func_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_pow=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 +echo "${ECHO_T}$ac_cv_func_pow" >&6 + +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 $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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_vprintf=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_pow=no fi -rm -f conftest* +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 -if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_VPRINTF 1 -EOF +fi -else - echo "$ac_t""no" 1>&6 fi -if test "$ac_cv_func_vprintf" != yes; then -echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2011: checking for _doprnt" >&5 -if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2016 "configure" -#include "confdefs.h" + +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 + 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 _doprnt(); below. */ -#include <assert.h> + 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 _doprnt(); + 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() { +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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: 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 +/* 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 -_doprnt(); +char (*f) () = _doprnt; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func__doprnt=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func__doprnt=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF +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 +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 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi fi +done + + + + + + + + + -for ac_func in dup2 strchr strrchr memchr memset putenv munmap strtol + +for ac_func in dup2 memset munmap pow putenv strchr strrchr strtol strstr do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2066: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2071 "configure" -#include "confdefs.h" +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. */ +/* 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. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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(); + 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 -int main() { +#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 -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 fi done if test "$enable_timing" = "yes"; then - for ac_func in ftime gettimeofday + + +for ac_func in ftime gettimeofday do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2122: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2127 "configure" -#include "confdefs.h" +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. */ +/* 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. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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(); + 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. */ -int main() { +#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 -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 fi done 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= +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 $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 $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 - 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 +/* 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. */ - OLD_LDFLAGS=$LDFLAGS - OLD_CPP=$CPP - OLD_LIBS=$LIBS +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif - LDFLAGS="$LDFLAGS $EXTRA_ZLIB_LIBDIR" - CPP="$CPP $EXTRA_ZLIB_INCLUDE" +#undef $ac_func - if test "$with_system_zlib" = yes; then - echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:2223: checking for inflate in -lz" >&5 -ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lz $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2231 "configure" -#include "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 inflate(); - -int main() { -inflate() -; return 0; } -EOF -if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF + 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 - LIBS="-lz $LIBS" +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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: `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 -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Standard ZLIB library not found. Compiling my own." 1>&2 - with_system_zlib=no fi +done - fi - - if test "$with_system_zlib" = yes; then - for ac_hdr in zlib.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2278: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2283 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - +if test "$ac_cv_func_gdImageGif" = "yes"; then + INSTALL_BIN_TARGET="install-dvigif" else - echo "$ac_t""no" 1>&6 + INSTALL_BIN_TARGET="install-dvipng" fi -done - if test "$ac_cv_header_zlib_h" != yes; then - echo "configure: warning: zlib.h not found. Using my own zlib sources." 1>&2 - with_system_zlib=no - fi - fi - - 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 +# 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 -fi - - - - +done +done -# Check whether --with-system-pnglib or --without-system-pnglib was given. -if test "${with_system_pnglib+set}" = set; then - withval="$with_system_pnglib" - : + test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO=":" + ;; +esac fi +MAKEINFO=$ac_cv_path_MAKEINFO - -# Check whether --with-pnglib_libdir or --without-pnglib_libdir was given. -if test "${with_pnglib_libdir+set}" = set; then - withval="$with_pnglib_libdir" - : +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" -# Check whether --with-pnglib_include or --without-pnglib_include was given. -if test "${with_pnglib_include+set}" = set; then - withval="$with_pnglib_include" - : + fi + rm -f conftest.texi conftest.info fi + done -if test "$needs_pnglib" = no; then - LIBPNGCPPFLAGS= - LDLIBPNG= - LIBPNGDEP= +# 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 - 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 + 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 - 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 $ac_n "checking for png_set_read_fn in -lpng""... $ac_c" 1>&6 -echo "configure:2388: checking for png_set_read_fn in -lpng" >&5 -ac_lib_var=`echo png'_'png_set_read_fn | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpng -lz -lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2396 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char png_set_read_fn(); - -int main() { -png_set_read_fn() -; return 0; } -EOF -if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" + ;; +esac fi -rm -f conftest* -LIBS="$ac_save_LIBS" +INSTALL_INFO=$ac_cv_path_INSTALL_INFO -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - pnglib=-lpng +if test -n "$INSTALL_INFO"; then + echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 +echo "${ECHO_T}$INSTALL_INFO" >&6 else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Standard PNG library not found. Compiling my own." 1>&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 + 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` -# Check whether --with-system-t1lib or --without-system-t1lib was given. -if test "${with_system_t1lib+set}" = set; then - withval="$with_system_t1lib" - : -fi - - -# Check whether --with-t1lib_libdir or --without-t1lib_libdir was given. -if test "${with_t1lib_libdir+set}" = set; then - withval="$with_t1lib_libdir" - : -fi - - -# Check whether --with-t1lib_include or --without-t1lib_include was given. -if test "${with_t1lib_include+set}" = set; then - withval="$with_t1lib_include" - : -fi +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` -if test "$needs_libt1" = no; then - LIBT1CPPFLAGS= - LDLIBT1= - LIBT1DEP= -else - EXTRA_LIBT1_INCLUDE= - EXTRA_LIBT1_LIBDIR= +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTOPARENT "SELFAUTOPARENT=$SELFAUTOPARENT" +_ACEOF - if test "$with_system_t1lib" = yes; then - if test "x$with_t1lib_libdir" != x; then - EXTRA_LIBT1_LIBDIR="-L$with_t1lib_libdir" + echo "$as_me:$LINENO: result: $SELFAUTOPARENT" >&5 +echo "${ECHO_T}$SELFAUTOPARENT" >&6 fi - if test "x$with_t1lib_include" != x; then - EXTRA_LIBT1_INCLUDE="-I$with_t1lib_include" +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" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. - 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 $ac_n "checking for T1_AddFont in -lt1""... $ac_c" 1>&6 -echo "configure:2501: checking for T1_AddFont in -lt1" >&5 -ac_lib_var=`echo t1'_'T1_AddFont | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lt1 -lz -lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2509 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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; } -EOF -if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - t1lib=-lt1 -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Standard T1 library not found. Compiling my own." 1>&2 - with_system_t1lib=no -fi +_ACEOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" fi - - LIBS="-lt1 -lm $LIBS" - if test "$with_system_t1lib" = yes; then - echo $ac_n "checking whether installed T1 lib is >= v 5.0.0 ""... $ac_c" 1>&6 -echo "configure:2547: checking whether installed T1 lib is >= v 5.0.0 " >&5 - if test "$cross_compiling" = yes; then - ac_compile_t1lib=1 - ] -else - cat > conftest.$ac_ext <<EOF -#line 2553 "configure" -#include "confdefs.h" - -#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); -} - -EOF -if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_compile_t1lib=0 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_compile_t1lib=1 -fi -rm -fr conftest* fi +rm -f confcache - if test $ac_compile_t1lib = 0; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no, will compile my own version" 1>&6 - with_system_t1lib=no - fi - fi - - LDFLAGS=$OLD_LDFLAGS - CPP=$OLD_CPP - CPPFLAGS=$OLDCPPFLAGS - LIBS=$OLD_LIBS +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - 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 +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi +DEFS=-DHAVE_CONFIG_H +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs +LTLIBOBJS=$ac_ltlibobjs -# Check whether --with-system_gd or --without-system_gd was given. -if test "${with_system_gd+set}" = set; then - withval="$with_system_gd" - : -fi +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. -# Check whether --with-gd_libdir or --without-gd_libdir was given. -if test "${with_gd_libdir+set}" = set; then - withval="$with_gd_libdir" - : -fi +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Check whether --with-gd_include or --without-gd_include was given. -if test "${with_gd_include+set}" = set; then - withval="$with_gd_include" - : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh - -if test "$needs_gd" = no; then - GDCPPFLAGS= - LDGD= - GDDEP= +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - EXTRA_GD_INCLUDE= - EXTRA_GD_LIBDIR= + as_unset=false +fi - 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 +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' - LDFLAGS="$LDFLAGS $EXTRA_GD_LIBDIR" - CPP="$CPP $EXTRA_GD_INCLUDE" +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done - if test "$with_system_gd" = yes; then - echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6 -echo "configure:2674: checking for gdImageCreateFromPng in -lgd" >&5 -ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2682 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gdImageCreateFromPng(); - -int main() { -gdImageCreateFromPng() -; return 0; } -EOF -if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + as_expr=false fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lgd $LIBS" +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Standard gd library not found. Compiling my own." 1>&2 - with_system_gd=no + as_basename=false fi - fi - if test "$with_system_gd" = yes; then - echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6 -echo "configure:2726: checking for gdImageGif in -lgd" >&5 -ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2734 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gdImageGif(); - -int main() { -gdImageGif() -; return 0; } -EOF -if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - LIBS="-lgd $LIBS" +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: gd library does not have the necessary gif support. Compiling my own." 1>&2 - with_system_gd=no +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi - fi - if test "$with_system_gd" = yes; then - for ac_hdr in gd.h + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2781: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2786 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done - if test "$ac_cv_header_gd_h" != yes; then - echo "configure: warning: gd.h not found. Using my own gd sources." 1>&2 - with_system_gd=no - fi + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 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 + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } fi -fi - - + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2846: checking whether to enable maintainer-specific portions of Makefiles" >&5 - # 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 +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - USE_MAINTAINER_MODE=no + as_expr=false fi - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 - if test "x$USE_MAINTAINER_MODE" = xyes; then - MAINT= +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - MAINT='#M#' + as_ln_s='ln -s' fi - - - -echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6 -echo "configure:2865: checking for loader (symbol LD)" >&5 -if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else - -test -z "$LD" && LD=ld -cf_cv_subst_LD=$LD + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.file -LD=${cf_cv_subst_LD} -echo "$ac_t""$LD" 1>&6 - - -echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6 -echo "configure:2879: checking for archiver (symbol AR)" >&5 -if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - -test -z "$AR" && AR=ar -cf_cv_subst_AR=$AR + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -AR=${cf_cv_subst_AR} -echo "$ac_t""$AR" 1>&6 +as_executable_p="test -f" +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -echo $ac_n "checking for archiver options (symbol ARFLAGS)""... $ac_c" 1>&6 -echo "configure:2893: checking for archiver options (symbol ARFLAGS)" >&5 -if eval "test \"`echo '$''{'cf_cv_subst_ARFLAGS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -test -z "$ARFLAGS" && ARFLAGS=rc -cf_cv_subst_ARFLAGS=$ARFLAGS -fi +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -ARFLAGS=${cf_cv_subst_ARFLAGS} -echo "$ac_t""$ARFLAGS" 1>&6 +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" +# CDPATH. +$as_unset CDPATH -# 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 +exec 6>&1 -# 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 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF -# 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 +This file was extended by dvipng $as_me 1.8, which was +generated by GNU Autoconf 2.59. Invocation command line was -# 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 + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ -# 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 +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF -# Check whether --with-mktexfmt-default or --without-mktexfmt-default was given. -if test "${with_mktexfmt_default+set}" = set; then - withval="$with_mktexfmt_default" - : +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS 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 +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi -echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6 -echo "configure:2963: checking where the main texmf tree is located" >&5 -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 "$ac_t"""$texmfmain"" 1>&6 - else - echo "$ac_t""not found" 1>&6 - echo "configure: 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." 1>&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 "$ac_t"""$texmfmain"" 1>&6 - else - eval texmfmain="$datadir/texmf" - echo "$ac_t""not found" 1>&6 - echo "configure: 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." 1>&2 - fi +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. -cat >> confdefs.h <<\EOF -#define HAVE_KPATHSEA_KPATHSEA_H 1 -EOF +Usage: $0 [OPTIONS] [FILE]... + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE -echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:3031: checking for main in -lm" >&5 -ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 3039 "configure" -#include "confdefs.h" +Configuration files: +$config_files -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +Configuration headers: +$config_headers -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF +Report bugs to <bug-autoconf@gnu.org>." +_ACEOF - LIBS="-lm $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +dvipng config.status 1.8 +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -echo $ac_n "checking for basename in -lgen""... $ac_c" 1>&6 -echo "configure:3074: checking for basename in -lgen" >&5 -ac_lib_var=`echo gen'_'basename | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgen $LIBS" -cat > conftest.$ac_ext <<EOF -#line 3082 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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; } -EOF -if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac - LIBS="-lgen $LIBS" + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; -else - echo "$ac_t""no" 1>&6 -fi + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + *) ac_config_targets="$ac_config_targets $1" ;; + esac + shift +done -ac_config_files="$ac_config_files Makefile" +ac_configure_extra_args= -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +_ACEOF -DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} -trap 'rm -fr `echo "$ac_config_files config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF +# Create a (secure) tmp directory for tmp files. -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@SET_MAKE@%$SET_MAKE%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@GS@%$GS%g -s%@PSFONTS_O@%$PSFONTS_O%g -s%@CPP@%$CPP%g -s%@ALLOCA@%$ALLOCA%g -s%@ZLIBCPPFLAGS@%$ZLIBCPPFLAGS%g -s%@LDZLIB@%$LDZLIB%g -s%@ZLIBDEP@%$ZLIBDEP%g -s%@LIBPNGCPPFLAGS@%$LIBPNGCPPFLAGS%g -s%@LDLIBPNG@%$LDLIBPNG%g -s%@LIBPNGDEP@%$LIBPNGDEP%g -s%@LIBT1CPPFLAGS@%$LIBT1CPPFLAGS%g -s%@LDLIBT1@%$LDLIBT1%g -s%@LIBT1DEP@%$LIBT1DEP%g -s%@GDCPPFLAGS@%$GDCPPFLAGS%g -s%@LDGD@%$LDGD%g -s%@GDDEP@%$GDDEP%g -s%@MAINT@%$MAINT%g -s%@LD@%$LD%g -s%@AR@%$AR%g -s%@ARFLAGS@%$ARFLAGS%g -s%@texmfmain@%$texmfmain%g +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +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,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF +fi # test -n "$CONFIG_FILES" -CONFIG_FILES=\${CONFIG_FILES-"$ac_config_files"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*|[A-z]:/*) # Absolute path. - srcdir="$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_given_srcdir" ;; + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case "$ac_given_INSTALL" in - "") ;; - [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac - rm -f conftest.in - ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"` - cat $ac_file_inputs > conftest.in - # - # Replace lines of the form ac_include foo with the contents of foo: - # first, from the ac_include lines construct a list of file names. - # From that list, we construct a second list of those files that exist. - # Then we construct lists of sed commands for including those files, - # and a sed command that removes the ac_include lines. We don't attempt - # to read non-existent files because some (buggy) versions of sed choke - # on this. Have to use sed because old (Ultrix, SunOS) awk does not support - # getline or system. (Anyway, configure scripts aren't supposed to use awk.) - # Can't use only one -e and commands {dr foo} because foo has to be last. - # Be careful, because the filename may contain /. Be careful with - # whitespace; we need to use echo. - # - file_substs=`sed -n '/^ac_include/s%ac_include[ ]*\(.*\)%\1%p' conftest.in` - # Create the sed command line ... - if test -n "$file_substs"; then - echo "configure: warning: ac_include is obsolete; instead use kpse_include" 1>&2 - file_subst_cmd="sed -e 's/^ac_include/kpse_include/'" + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= else - file_subst_cmd='sed' + configure_input="$ac_file. " fi - kpse_substs=`sed -n '/^kpse_include/s%kpse_include[ ]*\(.*\)%\1%p' conftest.in` - for ac_inc in $file_substs $kpse_substs; do - if test -f "$ac_given_srcdir/$ac_inc"; then - ac_mung=`echo $ac_inc | sed 's,/,%,g'` - file_subst_cmd="$file_subst_cmd -e '/^kpse_include $ac_mung$/r $ac_given_srcdir/$ac_inc'" - fi - done - file_subst_cmd="$file_subst_cmd -e '/^kpse_include/d'" - # ... and fix the whitespace and escaped slashes. - file_subst_cmd=`echo "$file_subst_cmd" | sed -e 's,%,\\\/,g' \ --e 's/kpse_include /kpse_include[ ]*/g'` - # I can't find any way to do variable substitution in the sed commands - # (so the user could have, e.g., $top_srcdir in their ac_include line). - (eval $file_subst_cmd conftest.in) \ - | sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* conftest.in + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ].*$%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <<EOF - CONFIG_HEADERS=" config.h" -EOF -cat >> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.undefs >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi -fi; done - -EOF -cat >> $CONFIG_STATUS <<EOF - - - -EOF -cat >> $CONFIG_STATUS <<\EOF - - - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in : $subdirs; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*|[A-z]:/*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f ./configure; then - ac_sub_configure=./configure - elif test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF - # The recursion is here. - if test -n "$ac_sub_configure"; then +cat >>$CONFIG_STATUS <<\_ACEOF - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*|[A-z]:/*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - case "$ac_given_INSTALL" in - "") ;; - [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } fi diff --git a/Build/source/texk/dvipng/configure.ac b/Build/source/texk/dvipng/configure.ac new file mode 100644 index 00000000000..bf04d46be1b --- /dev/null +++ b/Build/source/texk/dvipng/configure.ac @@ -0,0 +1,293 @@ +# 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 +# +#************************************************************************ + +# Process this file with autoconf to produce a configure script. +AC_INIT([dvipng], [1.8], [dvipng@nongnu.org]) +AC_CONFIG_SRCDIR([dvipng.c]) + +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), + [ if test "$enableval" = yes ; then + AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) + fi ], + [ enable_debug="yes"; + AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) +AC_ARG_ENABLE(timing, + AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), + [ 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]), + [if test "x$withval" = xno ; then + GS=no + else + AC_PATH_PROG(GS,["$withval"]) + fi], + [AC_CHECK_PROG(GS,gs,gs) + if test -z "$GS"; then + GS="gs" + AC_MSG_WARN([Cannot find GhostScript in your PATH]) + fi +]) +AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) +GS_WARN="" +AC_GS_HAS_DEVICE(pngalpha, + [GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + AC_GS_HAS_DEVICE(png16m, + [GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this."])]) +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]) +PSFONTS_O="" +if test "$ac_cv_lib_t1_T1_InitLib" = yes; then + PSFONTS_O="t1.o" +fi + +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_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]) +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]) + +# 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 + # 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 + + +# 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]) +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" +fi +AC_SUBST(INSTALL_BIN_TARGET) + +# 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]) + +AC_MSG_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 +]) + +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/Build/source/texk/dvipng/configure.in b/Build/source/texk/dvipng/configure.in deleted file mode 100644 index ff7aed99499..00000000000 --- a/Build/source/texk/dvipng/configure.in +++ /dev/null @@ -1,75 +0,0 @@ -# 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.c) -AC_DEFINE(PACKAGE_NAME, ["dvipng"]) -AC_DEFINE(PACKAGE_VERSION, ["1.6"]) -AC_DEFINE(PACKAGE_STRING, ["dvipng 1.6"]) - -# Checks for programs. -AC_SET_MAKE -AC_PROG_CC -AC_PROG_INSTALL -AC_PATH_PROG(GS, gs, :) -AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) - -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) - -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_HEADER_TIME -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 - # 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 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_MMAP -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 strchr strrchr memchr memset putenv munmap strtol]) -if test "$enable_timing" = "yes"; then - AC_CHECK_FUNCS([ftime gettimeofday]) -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(../kpathsea/withenable.ac) - -AC_DEFINE(HAVE_KPATHSEA_KPATHSEA_H) - -AC_CHECK_LIB(m, main) -AC_CHECK_LIB(gen, basename) - -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 14eaadaf80f..05c9d3a9394 100644 --- a/Build/source/texk/dvipng/draw.c +++ b/Build/source/texk/dvipng/draw.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -106,10 +106,11 @@ dviunits SetChar(int32_t c) case FONT_TYPE_PK: DEBUG_PRINT(DEBUG_DVI,("\n PK CHAR:\t")); break; case FONT_TYPE_T1: DEBUG_PRINT(DEBUG_DVI,("\n T1 CHAR:\t")); break; case FONT_TYPE_FT: DEBUG_PRINT(DEBUG_DVI,("\n FT CHAR:\t")); break; + default: DEBUG_PRINT(DEBUG_DVI,("\n NO CHAR:\t")) } if (isprint(c)) DEBUG_PRINT(DEBUG_DVI,("'%c' ",c)); - DEBUG_PRINT(DEBUG_DVI,("%d at (%d,%d) tfmw %d", c,hh,vv,ptr->tfmw)); + DEBUG_PRINT(DEBUG_DVI,("%d at (%d,%d) tfmw %d", c,hh,vv,ptr?ptr->tfmw:0)); #endif if (currentfont->type==FONT_TYPE_VF) { return(SetVF(c)); @@ -425,7 +426,7 @@ void DrawPages(void) } Message(BE_NONQUIET,"] "); fflush(stdout); - flags &= ~PAGE_GAVE_WARN; + flags &= ~(PAGE_GAVE_WARN | PAGE_TRUECOLOR); dvi_pos=NextPPage(dvi,dvi_pos); } Message(BE_NONQUIET,"\n"); diff --git a/Build/source/texk/dvipng/dvi.c b/Build/source/texk/dvipng/dvi.c index 26ae6f0ed03..596ff6e2eb7 100644 --- a/Build/source/texk/dvipng/dvi.c +++ b/Build/source/texk/dvipng/dvi.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -124,7 +124,7 @@ struct dvi_data* DVIOpen(char* dviname,char* outname) } strcpy(dvi->outname,basename(dviname)); tmpstring = strrchr(dvi->outname, '.'); - if (tmpstring != NULL) + if (tmpstring != NULL && strcmp(tmpstring,".dvi") == 0) *tmpstring = '\0'; strcat(dvi->outname, "%d.png"); } else { diff --git a/Build/source/texk/dvipng/dvipng.1 b/Build/source/texk/dvipng/dvipng.1 index a0862bd5abe..bfb04f9ab15 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.14 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13 .\" .\" Standard preamble: .\" ======================================================================== @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DVIPNG 1" -.TH DVIPNG 1 "2005-04-04" "dvipng 1.6" "User commands" +.TH DVIPNG 1 "2006-03-29" "dvipng 1.8" "User commands" .SH "NAME" dvipng \- A DVI\-to\-PNG translator .SH "SYNOPSIS" @@ -147,16 +147,14 @@ If \s-1GIF\s0 support is enabled, \s-1GIF\s0 output is chosen by using the .PP The benefits of \fBdvipng\fR/\fBdvigif\fR include .IP "\(bu" 4 -Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files. On a -fairly low-end laptop, it takes less than a second to generate 150 -one-formula images. This makes dvipng suitable for generating large -amounts of images on\-the\-fly, as needed in preview\-latex, WeBWorK and -others. +Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files, which +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 \s-1EOF\s0 for -further output, unless it finds the \s-1POST\s0 marker that indicates the end -of the \s-1DVI\s0. +finishes. There is a \-\-follow 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 Interactive query of options. dvipng can read options interactively through stdin, and all options are usable. It is even possible to change @@ -218,7 +216,7 @@ both variants will use the latter behaviour. .IP "\fB\-d\fR \fInum\fR" 4 .IX Item "-d num" Set the debug flags, showing what dvipng (thinks it) is doing. This will -work unless dvipng has been compiled without the \fB\s-1DEBUG\s0\fR option +work unless dvipng has been compiled without the \f(CW\*(C`DEBUG\*(C'\fR option (not recommended). Set the flags as you need them, use \fB\-d \-1\fR as the first option for maximum output. .IP "\fB\-D\fR \fInum\fR" 4 @@ -248,14 +246,14 @@ On some high-res screens, the value is instead 120 dpi. Good luck! .IP "\fB\-\-depth*\fR" 4 .IX Item "--depth*" Report the depth of the image. This only works reliably when the -LaTeX style \fBpreview.sty\fR from preview-latex is used. It +LaTeX style \fIpreview.sty\fR from preview-latex is used. It reports the number of pixels from the bottom of the image to the baseline of the image. This can be used for vertical positioning of the 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 @@ -271,11 +269,11 @@ there is a foreground color \especial in the \s-1DVI\s0. The color spec should be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. .IP "\fB\-\-follow*\fR" 4 .IX Item "--follow*" -Enable follow mode. One of the benefits of dvipng is that it does not -read the postamble, so it can be started before TeX finishes. This -switch makes dvipng wait at \s-1EOF\s0 for further output, unless it finds the -\&\s-1POST\s0 marker that indicates the end of the \s-1DVI\s0. This is similar to -\&\fBtail \-f\fR but for DVI-to-PNG conversion. +Wait for data at end\-of\-file. One of the benefits of dvipng is that it +does not read the postamble, so it can be started before TeX +finishes. This switch 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. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. .IP "\fB\-\-freetype*\fR" 4 .IX Item "--freetype*" Enable/disable FreeType font rendering (default on). This option is @@ -297,17 +295,19 @@ fonts will be lighter (more like the background), and for \fInum\fR > 1, the fonts will be darker (more like the foreground). .IP "\fB\-\-gif*\fR" 4 .IX Item "--gif*" -The images are output in the \s-1GIF\s0 format, if \s-1GIF\s0 support is -enabled. This is the default for the \fBdvigif\fR binary, which only -will be available when \s-1GIF\s0 support is enabled. See also the -\&\fB\-\-png\fR option. +The images are output in the \s-1GIF\s0 format, if \s-1GIF\s0 support is enabled. +This is the default for the \fBdvigif\fR binary, which only will be +available when \s-1GIF\s0 support is enabled. \s-1GIF\s0 images are palette images +(see the \fB\-\-palette\fR option) and does not support true alpha +channels (see the \fB\-\-bg\fR option). See also the \fB\-\-png\fR +option. .IP "\fB\-\-height*\fR" 4 .IX Item "--height*" Report the height of the image. This only works reliably when the -LaTeX style \fBpreview.sty\fR from preview-latex is used. It +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 \-\-height and the \-\-depth. +sum of the values reported from \fB\-\-height\fR and the \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 @@ -337,7 +337,7 @@ PostScript specials. \fB\-\-noghostscript0\fR turns the call back on. .IX Item "--nogssafer*" Normally, if GhostScript is used to render PostScript specials, the GhostScript interpreter is run with the option \fB\-dSAFER\fR. The -\&\fB\-nogssafer\fR option runs GhostScript without \fB\-dSAFER\fR. The +\&\fB\-\-nogssafer\fR option runs GhostScript without \fB\-dSAFER\fR. The \&\fB\-dSAFER\fR option in Ghostscript disables PostScript operators such as deletefile, to prevent possibly malicious PostScript programs from having any effect. @@ -364,6 +364,16 @@ specified) is treated as a physical (absolute) page number, rather than a value to compare with the TeX \fB\ecount0\fR values stored in the \&\s-1DVI\s0 file. Thus, using \fB\-p =3\fR will start with the third page of the document, no matter what the pages are actually numbered. +.IP "\fB\-\-palette*\fR" 4 +.IX Item "--palette*" +Starting from \fBdvipng\fR 1.8, the output \s-1PNG\s0 will be a truecolor +png when an external image is included, to avoid unnecessary delay and +quality reduction, and enable the \s-1EPS\s0 translator to draw on a +transparent background and outside of the boundingbox. This switch +will force palette (256\-color) output and make \fBdvipng\fR revert to +the old behaviour, where included images were opaque and always +clipped to the boundingbox. This will also override the +\&\fB\-\-truecolor\fR switch if present. .IP "\fB\-\-picky*\fR" 4 .IX Item "--picky*" No images are output when a warning occurs. Normally, dvipng will @@ -403,8 +413,8 @@ output; report no warnings (only errors) to standard error. .IP "\fB\-Q\fR \fInum\fR" 4 .IX Item "-Q num" Set the quality to \fInum\fR. That is, choose the number of antialiasing -levels for \s-1PK\s0 and T1lib rendering to be \fInum\fR*\fInum\fR. The default -value is 4 which gives 16 levels of antialiasing for antialiased fonts +levels for \s-1PK\s0 and T1lib rendering to be \fInum\fR*\fInum\fR+1. The default +value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. .IP "\fB\-r*\fR" 4 @@ -421,7 +431,6 @@ and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value \fBtight\fR will make dvipng only include all ink put on the page, producing neat images. -This option overrides any papersize special in the \s-1DVI\s0 file. .IP "\fB\-\-t1lib*\fR" 4 .IX Item "--t1lib*" Enable/disable T1lib font rendering (default on). This option is @@ -437,11 +446,10 @@ 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*" -On systems with a fairly new \fBlibgd\fR, one can choose to generate -truecolor output. This will not be necessary in general unless you -include truecolor images via a PostScript special (i.e., the -\&\fBgraphics\fR or \fBgraphicx\fR package). It will lead to longer -execution time, mostly because more data is written to disk. +This will force \fBdvipng\fR to 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. .IP "\fB\-v*\fR" 4 .IX Item "-v*" Enable verbose operation. This will currently indicate what fonts is @@ -480,4 +488,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\-2005 Jan\-Ake Larsson +Copyright (c) 2002\-2006 Jan\-@AA{}ke Larsson diff --git a/Build/source/texk/dvipng/dvipng.h b/Build/source/texk/dvipng/dvipng.h index 81c8556f6af..7d03ad91212 100644 --- a/Build/source/texk/dvipng/dvipng.h +++ b/Build/source/texk/dvipng/dvipng.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -83,23 +83,17 @@ typedef unsigned long long uint64_t; #include <t1lib.h> #endif -#ifdef HAVE_KPATHSEA_KPATHSEA_H +#ifdef HAVE_STDBOOL_H +# include <stdbool.h> +#else +# ifdef HAVE_KPATHSEA_KPATHSEA_H /* boolean is an enum type from kpathsea/types.h loaded in kpathsea/kpathsea.h, use it as fallback */ # define bool boolean -#else -# ifdef HAVE_STDBOOL_H -# include <stdbool.h> # else typedef int bool; -# ifndef true -# define true ((bool) 1) -# define false ((bool) 0) -# endif -# ifndef TRUE -# define TRUE true -# define FALSE false -# endif +# define true (bool) 1 +# define false (bool) 0 # endif #endif @@ -422,7 +416,7 @@ EXTERN struct internal_state { #define EXPAND_BBOX (1<<3) #define TIGHT_BBOX (1<<4) #define CACHE_IMAGES (1<<5) -#define RENDER_TRUECOLOR (1<<6) +#define FORCE_TRUECOLOR (1<<6) #define USE_FREETYPE (1<<7) #define USE_LIBT1 (1<<8) #define REPORT_HEIGHT (1<<9) @@ -437,6 +431,8 @@ EXTERN struct internal_state { #define NO_GSSAFER (1<<18) #define BG_TRANSPARENT (1<<19) #define BG_TRANSPARENT_ALPHA (1<<20) +#define PAGE_TRUECOLOR (1<<21) +#define FORCE_PALETTE (1<<22) EXTERN uint32_t flags INIT(BE_NONQUIET | USE_FREETYPE | USE_LIBT1); #ifdef DEBUG @@ -450,9 +446,9 @@ EXTERN unsigned int debug INIT(0); #define DEBUG_FT (1<<5) #define DEBUG_ENC (1<<6) #define DEBUG_COLOR (1<<7) -#define DEBUG_T1 (1<<8) -#define DEBUG_GS (1<<9) -#define LASTDEBUG DEBUG_GS +#define DEBUG_GS (1<<8) +#define DEBUG_T1 (1<<9) +#define LASTDEBUG DEBUG_T1 #define DEBUG_DEFAULT DEBUG_DVI #else #define DEBUG_PRINT(a,b) @@ -476,16 +472,16 @@ EXTERN int ndone INIT(0); /* number of pages converted */ # ifdef HAVE_GETTIMEOFDAY EXTERN struct timeval Tp; # define TIC { gettimeofday(&Tp, NULL); \ - my_tic= (float)Tp.tv_sec + ((float)(Tp.tv_usec))/ 1000000.0;} + my_tic= Tp.tv_sec + Tp.tv_usec/1000000.0;} # define TOC { gettimeofday(&Tp, NULL); \ - my_toc += ((float)Tp.tv_sec + ((float)(Tp.tv_usec))/ 1000000.0) - my_tic;} + my_toc += Tp.tv_sec + Tp.tv_usec/1000000.0 - my_tic;} # else # ifdef HAVE_FTIME EXTERN struct timeb timebuffer; # define TIC() { ftime(&timebuffer); \ - my_tic= timebuffer.time + (float)(timebuffer.millitm) / 1000.0; -# define TOC() { gettimeofday(&Tp, NULL); \ - my_toc += (timebuffer.time + (float)(timebuffer.millitm) / 1000.0) - my_tic;} + my_tic= timebuffer.time + timebuffer.millitm/1000.0; +# define TOC() { ftime(&timebuffer); \ + my_toc += timebuffer.time + timebuffer.millitm/1000.0 - my_tic;} # else # define TIC() # define TOC() diff --git a/Build/source/texk/dvipng/dvipng.help b/Build/source/texk/dvipng/dvipng.help deleted file mode 100644 index 3e5983e4a17..00000000000 --- a/Build/source/texk/dvipng/dvipng.help +++ /dev/null @@ -1,45 +0,0 @@ -This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson - -Usage: dvipng [OPTION]... FILENAME[.dvi] -Options are chosen to be similar to dvips' options where possible: - -d # Debug (# is the debug bitmap, 1 if not given) - -D # Output resolution - -l # Last page to be output - --mode s MetaFont mode (default 'cx') - -M* Don't make PK fonts - -o f Output file, '%d' is pagenumber - -O c Image offset - -p # First page to be output - -pp #,#.. Page list to be output - -q* Quiet operation - -r* Reverse order of pages - -T c Image size (also accepts '-T bbox' and '-T tight') - -v* Verbose operation - -x # Override dvi magnification - - Interactive query of options - -These do not correspond to dvips options: - -bd # Transparent border width in dots - -bd s Transparent border fallback color (TeX-style color) - --bdpi # Set the base (Metafont) resolution - -bg s Background color (TeX-style color or 'Transparent') - --depth* Output the image depth on stdout - --dvinum* Use TeX page numbers in output filenames - -fg s Foreground color (TeX-style color) - --follow* Follow mode - --gamma # Control color interpolation - --gif Output GIF images (dvigif default) - --height* Output the image height on stdout - --noghostscript* Don't use ghostscript for PostScript specials - --nogssafer* Don't use -dSAFER in ghostscript calls - --picky When a warning occurs, don't output image - --png Output PNG images (dvipng default) - --strict When a warning occurs, exit - --t1lib* T1lib font rendering (default on) - --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) - -z # PNG compression level - - # = number f = file s = string * = suffix, '0' to turn off - c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) - diff --git a/Build/source/texk/dvipng/dvipng.info b/Build/source/texk/dvipng/dvipng.info deleted file mode 100644 index a575c11a9fd..00000000000 --- a/Build/source/texk/dvipng/dvipng.info +++ /dev/null @@ -1,977 +0,0 @@ -This is dvipng.info, produced by makeinfo version 4.8 from dvipng.texi. - -INFO-DIR-SECTION TeX -START-INFO-DIR-ENTRY -* DVI-to-PNG: (dvipng). Translating TeX DVI files to Portable Network Graphics (PNG). -* dvipng: (dvipng). A DVI-to-PNG translator. -END-INFO-DIR-ENTRY - - -File: dvipng.info, Node: Top, Next: Introduction, Up: (dir) - -dvipng -****** - -This manual documents dvipng, a program to translate a DVI (DeVice -Independent) file into PNG (Portable Network Graphics). - - This file documents dvipng version 1.6 - - Corrections or perhaps rewrites of sections are _very welcome_. - - Jan-AAke Larsson - -* Menu: - -* Introduction:: Introduction -* Installation:: How to compile and install dvipng -* Basic usage:: First things first -* Command-line options:: Advanced usage -* Diagnosing problems:: Problems? -* Color:: Using color with dvipng -* Copying:: GNU General Public License -* Credits:: People who have contributed -* Index:: General index - - -File: dvipng.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top - -1 Introduction -************** - -This program makes PNG and/or GIF graphics from DVI files as obtained -from TeX and its relatives. - - If GIF support is enabled, GIF output is chosen by using the -`dvigif' binary or with the `--gif' option. - - It is intended to produce anti-aliased screen-resolution images as -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'. - - Another example is WeBWorK, an internet-based method for delivering -homework problems to students over the internet, giving students -instant feedback as to whether or not their answers are correct, see -`http://webwork.math.rochester.edu'. - - Other applications may also benefit, like web applications as -latex2html and WYSIWYG editors like LyX. - - The benefits of `dvipng'/`dvigif' include - - * Speed. It is a very fast bitmap-rendering code for DVI files. On a - fairly low-end laptop, it takes less than a second to generate 150 - one-formula images. This makes dvipng suitable for generating large - amounts of images 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 EOF - for further output, unless it finds the POST marker that indicates - the end of the DVI. - - * 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. - - * Supports PK, VF, PostScript Type1, and TrueType fonts, color - specials and simple PostScript inclusion specials. - - * and more... - - - -File: dvipng.info, Node: Installation, Next: Basic usage, Prev: Introduction, Up: Top - -2 Installation -************** - -Installing dvipng should be simple: merely `./configure', `make', and -`make install'. - -* Menu: - -* Prerequisites:: -* Configure:: -* Build/install:: -* Installation outside the texmf tree:: -* Advice for non-privileged users:: - - -File: dvipng.info, Node: Prerequisites, Next: Configure, Up: Installation - -2.1 Prerequisites -================= - - * The GD Graphics Draw library, libgd - - The drawing library `libgd' is necessary, and is downloadable at - `http://www.boutell.com/gd', and there are binary packages for - most operating systems from their respective distributors. In any - case, the latest version of the library installs using `autoconf' - so it should not be difficult for you to install it from source, - and then proceed with installing dvipng. - - * The path-searching library kpathsea - - Kpathsea is most likely included in your LaTeX installation, but it - may happen that ./configure does not find it; see below. If you do - 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. - - * libpng and libz - - To be able to compress and write PNG files to disk, dvipng (or - really libgd) uses libpng which in turn uses libz. These should be - available on any modern system, if not, download them and install - them. - - * The `texinfo' package - - This is needed for building the documentation. - - -File: dvipng.info, Node: Configure, Next: Build/install, Prev: Prerequisites, Up: Installation - -2.2 Configure -============= - -The first step is to configure the source code, telling it where -various files will be. To do so, run - - ./configure OPTIONS - - (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.) - - 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 -it out. For a list of the options type - - ./configure --help - - On some machines, the libraries will be installed in directories that -are not in the linker's search path. This will generate an error when -running `./configure', indicating that it cannot find libgd or -libkpathsea (most likely). You then need to specify the path to the -respective library's object files. They are typically called e.g., -`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', -do - - ./configure LDFLAGS=-L/sw/local/lib - - If the library is available as a shared object file (`.so'), the -runtime linker may also need to be told where to find the library, then -use - - ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' - - When either of these is necessary, it is likely that the C header -files are also installed in directories that are not in the C -preprocessor's search path. This will also generate an error when -running `./configure', indicating that it cannot find e.g., `gd.h' or -`kpathsea.h' (most likely). You then need to specify the path to the -respective library's C header files. If they are located in e.g., -`/sw/local/include', do - - ./configure CPPFLAGS=-I/sw/local/include - - On my SUN Solaris workstation, I had to combine this into - - ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ - LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' - -where the backslash denotes a continuation of the line. - - -File: dvipng.info, Node: Build/install, Next: Installation outside the texmf tree, Prev: Configure, Up: Installation - -2.3 Build/install -================= - -Once `configure' has been run, simply enter - - make - at the prompt to compile the C code, and build the documentation -files. To install the files into the locations chosen earlier, type - - make install - -You may need special privileges to install, e.g., if you are installing -into system directories. - - -File: dvipng.info, Node: Installation outside the texmf tree, Next: Advice for non-privileged users, Prev: Build/install, Up: Installation - -2.4 Installation outside the texmf tree -======================================= - -In some cases, a dvipng binary installed outside the texmf tree will -not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because _only_ $SELFAUTOLOC, -$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree -configuration file `texmf.cnf'. If so, give the switch -`--enable-selfauto-set' to `./configure'. This will make dvipng adjust -these three internally so that kpathsea thinks that dvipng _is_ -installed in the texmf tree. - - -File: dvipng.info, Node: Advice for non-privileged users, Prev: Installation outside the texmf tree, Up: Installation - -2.5 Installation for non-privileged users -========================================= - -Often people without system administration privileges want to install -software for their private use. In that case you need to specify more -options to the `configure' script, usually this is done by using the -`--prefix' option to the `configure' script, and let it point to the -personal home directory. In that way, resulting binaries will be -installed under the `bin' subdirectory of your home directory, manual -pages under `man' and so on. That way, it is reasonably easy to -maintain a bunch of additional packages, since the prefix argument is -supported by most `configure' scripts. - - You'll have to add something like `/home/myself/bin' to your `PATH' -shell variable, if it isn't there already, and similarly set the -`INFOPATH' variable to be able to access the documentation. - - -File: dvipng.info, Node: Basic usage, Next: Command-line options, Prev: Installation, Up: Top - -3 Basic usage of dvipng -*********************** - -To use dvipng at its simplest, simply type - - dvipng foo - -where `foo.dvi' is the output of TeX that you want to convert to PNG -format. If there are four pages in `foo.dvi', those pages will be -output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', -respectively. - - If you have enabled the PostScript font support (via FreeType or -T1lib), fonts will be rendered as they are needed. Otherwise, if you -use fonts that have not been used on your system before, they may be -automatically generated; this process can take a few minutes, so -progress reports appear by default. The next time the same font is -used, it will have been saved on disk, so rendering will go much -faster. (If dvipng tries to endlessly generate the same fonts over and -over again, something is wrong. *Note Unable to generate fonts: -(kpathsea)Unable to generate fonts.) - - Many options are available (see the next section). For a brief -summary of available options, just type - - dvipng --help - - -File: dvipng.info, Node: Command-line options, Next: Diagnosing problems, Prev: Basic usage, Up: Top - -4 Command-line options -********************** - -dvipng has a plethora of command line options. Reading through this -section will give a good idea of the capabilities of the driver. - -* Menu: - -* Option summary:: Quick listing, from dvipng --help. -* Option details:: More information about each option. - - -File: dvipng.info, Node: Option summary, Next: Option details, Up: Command-line options - -4.1 Option summary -================== - -Here is a handy summary of the options; it is printed out when you run -dvipng with no arguments or with the standard `--help' option. - - This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson - - Usage: dvipng [OPTION]... FILENAME[.dvi] - Options are chosen to be similar to dvips' options where possible: - -d # Debug (# is the debug bitmap, 1 if not given) - -D # Output resolution - -l # Last page to be output - --mode s MetaFont mode (default 'cx') - -M* Don't make PK fonts - -o f Output file, '%d' is pagenumber - -O c Image offset - -p # First page to be output - -pp #,#.. Page list to be output - -q* Quiet operation - -r* Reverse order of pages - -T c Image size (also accepts '-T bbox' and '-T tight') - -v* Verbose operation - -x # Override dvi magnification - - Interactive query of options - - These do not correspond to dvips options: - -bd # Transparent border width in dots - -bd s Transparent border fallback color (TeX-style color) - --bdpi # Set the base (Metafont) resolution - -bg s Background color (TeX-style color or 'Transparent') - --depth* Output the image depth on stdout - --dvinum* Use TeX page numbers in output filenames - -fg s Foreground color (TeX-style color) - --follow* Follow mode - --gamma # Control color interpolation - --gif Output GIF images (dvigif default) - --height* Output the image height on stdout - --noghostscript* Don't use ghostscript for PostScript specials - --nogssafer* Don't use -dSAFER in ghostscript calls - --picky When a warning occurs, don't output image - --png Output PNG images (dvipng default) - --strict When a warning occurs, exit - --t1lib* T1lib font rendering (default on) - --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) - -z # PNG compression level - - # = number f = file s = string * = suffix, '0' to turn off - c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) - - -File: dvipng.info, Node: Option details, Prev: Option summary, Up: Command-line options - -4.2 Option details -================== - -Many of the parameterless options listed here can be turned off by -suffixing the option with a zero (`0'); for instance, to turn off page -reversal, use `-r0'. Such options are marked with a trailing `*'. - -`-' - Read additional options from standard input after processing the - command line. - -`--help' - Print a usage message and exit. - -`--version' - Print the version number and exit. - -`-bd NUM' - -`-bd COLOR_SPEC' - -`-bd 'NUM COLOR_SPEC'' - Set the pixel width of the transparent border (default 0). Using - this option will make the image edges transparent, but it only - affects pixels with the background color. Giving a COLOR_SPEC will - set the fallback color, to be used in viewers that cannot handle - transparency (the default is the background color). The color spec - should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. - Setting the fallback color makes the default border width 1 px. - *Note Color::. - -`--bdpi NUM' - Set the base (Metafont) resolution, both horizontal and vertical, - to NUM dpi (dots per inch). This option is necessary when manually - selecting Metafont mode with the -mode option (see below). - -`-bg COLOR_SPEC' - Choose background color for the images. This option will be - ignored if there is a background color \special in the DVI. The - color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 - 0.0 0.0'. You can also specify 'Transparent' or 'transparent' - which will give you a transparent background with the normal - background as a fallback color. A capitalized 'Transparent' will - give a full-alpha transparency, while an all-lowercase - 'transparent' will give a simple fully transparent background with - non-transparent antialiased pixels. The latter would be suitable - for viewers who cannot cope with a true alpha channel. GIF images - do not support full alpha transparency, so in case of GIF output, - both variants will use the latter behaviour. *Note Color::. - -`-d NUM' - Set the debug flags, showing what dvipng (thinks it) is doing. - This will work unless dvipng has been compiled without the `DEBUG' - option (not recommended). Set the flags as you need them, use `-d - -1' as the first option for maximum output. *Note Debug options::. - -`-D NUM' - Set the output resolution, both horizontal and vertical, to NUM - dpi (dots per inch). - - One may want to adjust this to fit a certain text font size (e.g., - on a web page), and for a text font height of FONT_PX pixels (in - Mozilla) the correct formula is - DPI = FONT_PX * 72.27 / 10 [px * TeXpt/in / TeXpt] - The last division by ten is due to the standard font height 10pt in - your document, if you use 12pt, divide by 12. Unfortunately, some - proprietary browsers have font height in pt (points), not pixels. - You have to rescale that to pixels, using the screen resolution - (default is usually 96 dpi) which means the formula is - FONT_PX = FONT_PT * 96 / 72 [pt * px/in / (pt/in)] - On some high-res screens, the value is instead 120 dpi. Good luck! - -`--depth*' - Report the depth of the image. This only works reliably when the - LaTeX style `preview.sty' from preview-latex is used. It reports - the number of pixels from the bottom of the image to the baseline - of the image. This can be used for vertical positioning of the - image in, e.g., web documents, where one would use (Cascading - StyleSheets 1) - <IMG SRC="FILENAME.PNG" STYLE="vertical-align: -DEPTHpx"> - The depth is a negative offset in this case, so the minus sign is - necessary, and the unit is pixels (px). - -`--dvinum*' - Set this option to make the output page number be the TeX page - numbers rather than the physical page number. See the `-o' switch. - -`-fg COLOR_SPEC' - Choose foreground color for the images. This option will be - ignored if there is a foreground color \special in the DVI. The - color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 - 0.0 0.0'. *Note Color::. - -`--follow*' - Enable follow mode. One of the benefits of dvipng is that it does - not read the postamble, so it can be started before TeX finishes. - This switch makes dvipng wait at EOF for further output, unless it - finds the POST marker that indicates the end of the DVI. This is - similar to `tail -f' but for DVI-to-PNG conversion. - -`--freetype*' - Enable/disable FreeType font rendering (default on). This option is - available if the FreeType2 font library was present at compilation - time. If this is the case, dvipng will have direct support for - PostScript Type1 and TrueType fonts internally, rather than using - `gsftopk' for rendering the fonts. If you have PostScript versions - 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. Note that if you have both FreeType - and T1lib on your system, FreeType will be preferred by dvipng. If - you for some reason would want to use T1lib rendering, use this - option. - -`--gamma NUM' - Control the interpolation of colors in the greyscale anti-aliasing - color palette. Default value is 1.0. For 0 < NUM < 1, the fonts - will be lighter (more like the background), and for NUM > 1, the - fonts will be darker (more like the foreground). - -`--gif*' - The images are output in the GIF format, if GIF support is - enabled. This is the default for the `dvigif' binary, which only - will be available when GIF support is enabled. See also the - `--png' option. - -`--height*' - Report the height of the image. This only works reliably when the - LaTeX style `preview.sty' 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 -height and the -depth. - -`-l [=]NUM' - The last page printed will be the first one numbered NUM. Default - is the last page in the document. If NUM is prefixed by an equals - sign, then it (and the argument to the `-p' option, if specified) - is treated as a physical (absolute) page number, rather than a - value to compare with the TeX `\count0' values stored in the DVI - file. Thus, using `-l =9' will end with the ninth page of the - document, no matter what the pages are actually numbered. - -`--mode MODE' - Use MODE as the Metafont device name for the PK fonts (both for - path searching and font generation). This needs to be augmented - with the base device resolution, given with the `--bdpi' option. - See the file `ftp://ftp.tug.org/tex/modes.mf' for a list of - resolutions and mode names for most devices. *Note Unable to - generate fonts: (kpathsea)Unable to generate fonts. - -`-M*' - Turns off automatic PK font generation (`mktexpk'). This will have - no effect when using PostScript fonts, since no PK font generation - will be done anyway. - -`--noghostscript*' - This switch prohibits the internal call to GhostScript for - displaying PostScript specials. `--noghostscript0' turns the call - back on. - -`--nogssafer*' - Normally, if GhostScript is used to render PostScript specials, the - GhostScript interpreter is run with the option `-dSAFER'. The - `-nogssafer' option runs GhostScript without `-dSAFER'. The - `-dSAFER' option in Ghostscript disables PostScript operators such - as deletefile, to prevent possibly malicious PostScript programs - from having any effect. - -`-o NAME' - Send output to the file NAME. A single occurrence of `%d' or - `%01d', ..., `%09d' will be exchanged for the physical page number - (this can be changed, see the `--dvinum' switch). The default - output filename is `FILE%d.png' where the input DVI file was - `FILE.dvi'. - -`-O X-OFFSET,Y-OFFSET' - Move the origin by X-OFFSET,Y-OFFSET, a comma-separated pair of - dimensions such as `.1in,-.3cm'. The origin of the page is - shifted from the default position (of one inch down, one inch to - the right from the upper left corner of the paper) by this amount. - -`-p [=]NUM' - The first page printed will be the first one numbered NUM. Default - is the first page in the document. If NUM is prefixed by an - equals sign, then it (and the argument to the `-l' option, if - specified) is treated as a physical (absolute) page number, rather - than a value to compare with the TeX `\count0' values stored in the - DVI file. Thus, using `-p =3' will start with the third page of - the document, no matter what the pages are actually numbered. - -`--picky*' - No images are output 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. Mainly, - this is useful for failed figure inclusion and unknown \special - occurrences, but warnings will also occur for missing or unknown - color specs and missing PK fonts. - -`--png*' - The images are output in the PNG format. This is the default for - the `dvipng' binary. See also the `--gif' option. - -`-pp FIRSTPAGE-LASTPAGE' - Print pages FIRSTPAGE through LASTPAGE; but not quite equivalent - to `-p FIRSTPAGE -l LASTPAGE'. For example, when rendering a book, - there may be several instances of a page in the DVI file (one in - `\frontmatter', one in `\mainmatter', and one in `\backmatter'). - In case of several pages matching, `-pp FIRSTPAGE-LASTPAGE' will - render _all_ pages that matches the specified range, while `-p - FIRSTPAGE -l LASTPAGE' will render the pages from the _first_ - occurrence of FIRSTPAGE to the _first_ occurrence of LASTPAGE. - This is the (undocumented) behaviour of dvips. In dvipng you can - give both kinds of options, in which case you get all pages that - matches the range in `-pp' between the pages from `-p' to `-l'. - Also multiple `-pp' options accumulate, unlike `-p' and `-l'. The - `-' separator can also be `:'. Note that `-pp -1' will be - interpreted as "all pages up to and including 1", if you want a - page numbered -1 (only the table of contents, say) put `-pp -1--1', - or more readable, `-pp -1:-1'. - -`-q*' - Run quietly. Don't chatter about pages converted, etc. to standard - output; report no warnings (only errors) to standard error. - -`-Q NUM' - Set the quality to NUM. That is, choose the number of antialiasing - levels for PK and T1lib rendering to be NUM*NUM. The default value - is 4 which gives 16 levels of antialiasing for antialiased fonts - from these two. If FreeType is available, its rendering is - unaffected by this option. - -`-r*' - Toggle output of pages in reverse/forward order. By default, the - first page in the DVI is output first. - -`-T IMAGE_SIZE' - Set the image size to IMAGE_SIZE which can be either of `bbox', - `tight', or a comma-separated pair of dimensions HSIZE,VSIZE such - as `.1in,.3cm'. The default is `bbox' which produces a PNG that - includes all ink put on the page and in addition the DVI origin, - located 1in from the top and 1in from the left edge of the paper. - This usually gives whitespace above and to the left in the - produced image. The value `tight' will make dvipng only include - all ink put on the page, producing neat images. This option - overrides any papersize special in the DVI file. - -`--t1lib*' - Enable/disable T1lib font rendering (default on). This option is - available if the T1lib font library was present at compilation - time. If this is the case, dvipng will have direct support for - PostScript Type1 fonts internally, rather than using `gsftopk' for - rendering the fonts. If you have PostScript versions 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. Note that if you have both FreeType - and T1lib on your system FreeType will be preferred by dvipng, and - if you for some reason rather want to use T1lib, give the option - `--freetype0' (see above). - -`--truecolor*' - On systems with a fairly new `libgd', one can choose to generate - truecolor output. This will not be necessary in general unless you - include truecolor images via a PostScript special (i.e., the - `graphics' or `graphicx' package). It will lead to longer - execution time, mostly because more data is written to disk. - -`-v*' - Enable verbose operation. This will currently indicate what fonts - is used, in addition to the usual output. - -`-x NUM' - Set the x magnification ratio to NUM/1000. Overrides the - magnification specified in the DVI file. Must be between 10 and - 100000. It is recommended that you use standard magstep values - (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help - reduce the total number of PK files generated. NUM may be a real - number, not an integer, for increased precision. - -`-z NUM' - Set the PNG compression level to NUM. This option is enabled if - your `libgd' is new enough. The default compression level is 1, - which selects maximum speed at the price of slightly larger PNGs. - For an older `libgd', the hard-soldered value 5 is used. The - include file `png.h' says - - Currently, valid values range from 0 - 9, corresponding - directly to the zlib compression levels 0 - 9 (0 - no - compression, 9 - "maximal" compression). Note that tests have - shown that zlib compression levels 3-6 usually perform as - well as level 9 for PNG images, and do considerably fewer - calculations. In the future, these values may not correspond - directly to the zlib compression levels. - - -File: dvipng.info, Node: Diagnosing problems, Next: Color, Prev: Command-line options, Up: Top - -5 Diagnosing problems -********************* - -You've gone through all the trouble of installing dvipng, carefully read -all the instructions in this manual, and still can't get something to -work. The following sections provide some helpful hints if you find -yourself in such a situation. - - Bug reports should be sent to <dvipng@nongnu.org>. - - Questions, suggestions for new features, pleas for help, and/or -praise should go to <dvipng@nongnu.org>. For more information on this -mailing list, send a message with just the word `help' as subject or -body to <dvipng-request@nongnu.org> or look at -`http://lists.nongnu.org/mailman/listinfo/dvipng'. - - Offers to support further development will be appreciated. For -developer access, ask on <dvipng@nongnu.org>. - - For details on the TeX path-searching library, and `mktexpk' -problems, *note Common problems: (kpathsea)Common problems. - -* Menu: - -* Debug options:: Getting diagnostics. -* Included graphics problems:: Figures are wrongly rendered. - - -File: dvipng.info, Node: Debug options, Next: Included graphics problems, Up: Diagnosing problems - -5.1 Debug options -================= - -The `-d' flag to dvipng helps in tracking down certain errors. The -parameter to this flag is an integer that tells what errors are -currently being tracked. To track a certain class of debug messages, -simply provide the appropriate number given below; if you wish to track -multiple classes, sum the numbers of the classes you wish to track. To -track all classes, you can use `-1'. - - Some of these debugging options are actually provided by Kpathsea -(*note Debugging: (kpathsea)Debugging.). - - The classes are: -1 - Normal dvi op-codes - -2 - Virtual fonts - -4 - PK fonts - -8 - TFM files - -16 - Glyph rendering - -32 - FreeType calls - -64 - Encoding loads - -128 - Color specials - -256 - GhostScript specials - -512 - T1lib calls - -1024 - Kpathsea `stat' calls - -2048 - Kpathsea hash table lookups - -4096 - Kpathsea path element expansion - -8192 - Kpathsea path searches - - - -File: dvipng.info, Node: Included graphics problems, Prev: Debug options, Up: Diagnosing problems - -5.2 Included graphics problems -============================== - -The most common problem with including graphics is an incorrect bounding -box. Complain to whoever wrote the software that generated the file if -the bounding box is indeed incorrect. - - An additional problem is that the image in dvipng is always clipped -to the bounding box. This is because the image is rendered by -GhostScript by an internal call and then copied to the dvipng image. At -present no workaround is known, but there may be one for a future -GhostScript. We'll see. - - -File: dvipng.info, Node: Color, Next: Copying, Prev: Diagnosing problems, Up: Top - -6 Color -******* - -To support color, dvipng recognizes a certain set of specials. These -specials start with the keyword `color' or the keyword `background', -followed by a color specification. - -* Menu: - -* Color specifications:: -* Color specials:: - - -File: dvipng.info, Node: Color specifications, Next: Color specials, Up: Color - -6.1 Color specifications -======================== - -The color specification supported by dvipng is by-value or by-name. The -by-value spec starts with the name of a color model (one of `rgb', -`hsb', `cmy', `cmyk', or `gray') followed by the appropriate number of -parameters. Thus, the color specification `rgb 0.3 0.4 0.5' would -correspond to the color that is `0.3 0.4 0.5' in its red, blue and -green values. The color used internally in dvipng is `RGB' (discretized -to 256 levels), for details on the formulas used in conversion, see the -`xcolor' documentation. - - By-name color specifications are single (case-dependent) words and -are compared with color names defined in `dvipsnam.def' (from the -`graphics' bundle), `svgnam.def' and `xcolor.sty' (from the `xcolor' -bundle). - - On the command-line, the name `Transparent' can also be used in as -an argument to `--bg' to choose transparent background. *Note Option -details::. - - -File: dvipng.info, Node: Color specials, Prev: Color specifications, Up: Color - -6.2 Color specials -================== - -We will describe `background' first, since it is the simplest. The -`background' keyword must be followed by a color specification. That -color specification is used as a fill color for the background. The -last `background' special on a page is the one that gets used, and is -used for the whole of the page image. (This is possible because the -prescan phase of dvipng notices all of the color specials so that the -appropriate information can be written out during the second phase.) - - The `color' special itself has three forms. The first is just -`color' followed by a color specification. In this case, the current -global color is set to that color; the color stack must be empty when -such a command is executed. - - The second form is `color push' followed by a color specification. -This saves the current color on the color stack and sets the color to be -that given by the color specification. This is the most common way to -set a color. - - The final version of the `color' special is just `color pop', with -no color specification; this says to pop the color last pushed on the -color stack from the color stack and set the current color to be that -color. - - dvipng correctly handles these color specials across pages, even when -the pages are rendered repeatedly or in reverse order. - - -File: dvipng.info, Node: Credits, Next: Index, Prev: Copying, Up: Top - -7 Credits -********* - -A number of persons have contributed, if I forget to mention someone, I -apologize. First and foremost we have David Kastrup whose preview-latex -project provided the incentive to write this program. There is also a -number of people who have contributed by reporting bugs and suggesting -improvements as the thing has evolved. These include but is perhaps not -limited to (in semi-random order): Thomas Esser (teTeX), Christian -Schenk (MIKTeX), Brian R Furry (debian package), Angus Leeming (LyX), -Thomas Boutell (libgd), John Jones (first user report), Uwe Kern -(xcolor), 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 Ridderstro"m, Ezra Peisach, -William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin -Smith, and Jason Riedy. - - -File: dvipng.info, Node: Copying, Next: Credits, Prev: Color, Up: Top - -8 Copying -********* - -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-2005 Jan-AAke Larsson - - -File: dvipng.info, Node: Index, Prev: Credits, Up: Top - -Index -***** - - -* Menu: - -* -dSAFER: Option details. (line 164) -* absolute page number, and -l: Option details. (line 137) -* absolute page number, and -p: Option details. (line 185) -* antialiasing levels, number of: Option details. (line 229) -* background color (option): Option details. (line 40) -* base resolution, setting: Option details. (line 35) -* baseline reporting: Option details. (line 76) -* color specifications: Color specifications. - (line 6) -* command-line options: Command-line options. - (line 6) -* compilation: Installation. (line 6) -* compression: Option details. (line 284) -* configuration, of dvipng: Installation. (line 6) -* dark fonts: Option details. (line 118) -* debugging <1>: Diagnosing problems. (line 6) -* debugging: Option details. (line 54) -* debugging options: Debug options. (line 6) -* depth reporting: Option details. (line 76) -* first page printed: Option details. (line 185) -* follow mode: Option details. (line 97) -* font generation, avoiding: Option details. (line 154) -* foreground color (option): Option details. (line 91) -* FreeType font rendering: Option details. (line 104) -* fuzzy images: Option details. (line 118) -* gamma: Option details. (line 118) -* GhostScript and -dSAFER: Option details. (line 164) -* GhostScript, turning off: Option details. (line 159) -* GIF image format: Option details. (line 124) -* graphics inclusion problems: Included graphics problems. - (line 6) -* height reporting: Option details. (line 130) -* installation, of dvipng: Installation. (line 6) -* invoking dvipng: Basic usage. (line 6) -* last page printed: Option details. (line 137) -* light fonts: Option details. (line 118) -* magnification, overriding DVI: Option details. (line 276) -* Metafont mode, specifying: Option details. (line 146) -* mktexpk, avoiding: Option details. (line 154) -* mode name, specifying: Option details. (line 146) -* no erroneous images: Option details. (line 194) -* offset pages: Option details. (line 179) -* option, details of: Option details. (line 6) -* options, debugging: Debug options. (line 6) -* options, dvipng: Command-line options. - (line 6) -* options, reading from standard input: Option details. (line 11) -* options, summary: Option summary. (line 6) -* output resolution, setting: Option details. (line 60) -* output, redirecting: Option details. (line 172) -* page range: Option details. (line 207) -* page, first printed: Option details. (line 185) -* page, last printed: Option details. (line 137) -* physical page number, and -l: Option details. (line 137) -* physical page number, and -p: Option details. (line 185) -* PNG image format: Option details. (line 203) -* problems: Diagnosing problems. (line 6) -* quality: Option details. (line 229) -* quiet operation: Option details. (line 225) -* reverse pagination: Option details. (line 236) -* silent operation: Option details. (line 225) -* standard input, reading options from: Option details. (line 11) -* standard output, output to: Option details. (line 172) -* T1lib font rendering: Option details. (line 251) -* transparent border fallback color: Option details. (line 25) -* transparent border width: Option details. (line 25) -* trouble: Diagnosing problems. (line 6) -* truecolor output: Option details. (line 265) -* warnings, suppressing: Option details. (line 225) - - - -Tag Table: -Node: Top296 -Node: Introduction1115 -Node: Installation3107 -Node: Prerequisites3454 -Node: Configure5337 -Node: Build/install7403 -Node: Installation outside the texmf tree7874 -Node: Advice for non-privileged users8581 -Node: Basic usage9574 -Node: Command-line options10701 -Node: Option summary11136 -Node: Option details13559 -Node: Diagnosing problems27947 -Node: Debug options29059 -Node: Included graphics problems30101 -Node: Color30749 -Node: Color specifications31083 -Node: Color specials32098 -Node: Credits33513 -Node: Copying34542 -Node: Index35369 - -End Tag Table diff --git a/Build/source/texk/dvipng/dvipng.texi b/Build/source/texk/dvipng/dvipng.texi index 3a000ef78fc..540ba1c9fc6 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.6 -@set month-year June 2005 +@set version 1.8 +@set month-year March 2006 @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fn cp @@ -39,7 +39,7 @@ dvipng [options] [filename] - @author by Jan-@AA{}ke Larsson. @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -88,10 +88,11 @@ Jan-@AA{}ke Larsson * Installation:: How to compile and install dvipng * Basic usage:: First things first * Command-line options:: Advanced usage -* Diagnosing problems:: Problems? +* Graphics:: Including PostScript and/or bitmaps * Color:: Using color with dvipng -* Copying:: GNU General Public License +* Diagnosing problems:: Problems? * Credits:: People who have contributed +* Copying:: GNU General Public License * Index:: General index @end menu @@ -233,7 +234,7 @@ both variants will use the latter behaviour. @xref{Color}. @item -d @var{num} @cindex debugging Set the debug flags, showing what dvipng (thinks it) is doing. This will -work unless dvipng has been compiled without the @samp{DEBUG} option +work unless dvipng has been compiled without the @code{DEBUG} option (not recommended). Set the flags as you need them, use @samp{-d -1} as the first option for maximum output. @xref{Debug options}. @@ -262,7 +263,7 @@ On some high-res screens, the value is instead 120 dpi. Good luck! @cindex baseline reporting @cindex depth reporting Report the depth of the image. This only works reliably when the -@LaTeX{} style @samp{preview.sty} from @previewlatex{} is used. It +@LaTeX{} style @file{preview.sty} from @previewlatex{} is used. It reports the number of pixels from the bottom of the image to the baseline of the image. This can be used for vertical positioning of the image in, e.g., web documents, where one would use (Cascading @@ -326,11 +327,11 @@ be in @TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. @item --follow* @cindex follow mode -Enable follow mode. One of the benefits of dvipng is that it does not -read the postamble, so it can be started before @TeX{} finishes. This -switch makes dvipng wait at EOF for further output, unless it finds the -POST marker that indicates the end of the DVI. This is similar to -@samp{tail -f} but for DVI-to-PNG conversion. +Wait for data at end-of-file. One of the benefits of dvipng is that it +does not read the postamble, so it can be started before @TeX{} +finishes. This switch makes dvipng wait at end-of-file for further +output, unless it finds the POST marker that indicates the end of the +DVI. This is similar to @samp{tail -f} but for DVI-to-PNG conversion. @item --freetype* @cindex FreeType font rendering @@ -358,19 +359,21 @@ fonts will be lighter (more like the background), and for @var{num} > @item --gif* @cindex GIF image format -The images are output in the GIF format, if GIF support is -enabled. This is the default for the @samp{dvigif} binary, which only -will be available when GIF support is enabled. See also the -@samp{--png} option. +The images are output in the GIF format, if GIF support is enabled. +This is the default for the @samp{dvigif} binary, which only will be +available when GIF support is enabled. GIF images are palette images +(see the @samp{--palette} option) and does not support true alpha +channels (see the @samp{--bg} option). See also the @samp{--png} +option. @item --height* @cindex baseline reporting @cindex height reporting Report the height of the image. This only works reliably when the -@LaTeX{} style @samp{preview.sty} from @previewlatex{} is used. It +@LaTeX{} style @file{preview.sty} from @previewlatex{} 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 --height and the --depth. +sum of the values reported from @samp{--height} and @samp{--depth}. @item -l [=]@var{num} @cindex last page printed @@ -427,7 +430,7 @@ PostScript specials. @samp{--noghostscript0} turns the call back on. @cindex -dSAFER Normally, if GhostScript is used to render PostScript specials, the GhostScript interpreter is run with the option @samp{-dSAFER}. The -@samp{-nogssafer} option runs GhostScript without @samp{-dSAFER}. The +@samp{--nogssafer} option runs GhostScript without @samp{-dSAFER}. The @samp{-dSAFER} option in Ghostscript disables PostScript operators such as deletefile, to prevent possibly malicious PostScript programs from having any effect. @@ -463,6 +466,17 @@ a value to compare with the @TeX{} @samp{\count0} values stored in the DVI file. Thus, using @samp{-p =3} will start with the third page of the document, no matter what the pages are actually numbered. +@item --palette* +@cindex forcing palette output +Starting from @samp{dvipng} 1.8, the output PNG will be a truecolor +png when an external image is included, to avoid unnecessary delay and +quality reduction, and enable the EPS translator to draw on a +transparent background and outside of the boundingbox. This switch +will force palette (256-color) output and make @samp{dvipng} revert to +the old behaviour, where included images were opaque and always +clipped to the boundingbox. This will also override the +@samp{--truecolor} switch if present. + @item --picky* @cindex no erroneous images No images are output when a warning occurs. Normally, dvipng will @@ -509,8 +523,8 @@ output; report no warnings (only errors) to standard error. @cindex antialiasing levels@r{, number of} @cindex quality Set the quality to @var{num}. That is, choose the number of antialiasing -levels for PK and T1lib rendering to be @var{num}*@var{num}. The default -value is 4 which gives 16 levels of antialiasing for antialiased fonts +levels for PK and T1lib rendering to be @var{num}*@var{num}+1. The default +value is 4 which gives 17 levels of antialiasing for antialiased fonts from these two. If FreeType is available, its rendering is unaffected by this option. @@ -559,7 +573,7 @@ the left edge of the paper. This usually gives whitespace above and to the left in the produced image. The value @samp{tight} will make dvipng only include all ink put on the page, producing neat images. @c (@pxref{papersize special}). -This option overrides any papersize special in the DVI file. +@c This option overrides any papersize special in the DVI file. @item --t1lib* @cindex T1lib font rendering @@ -577,11 +591,11 @@ T1lib, give the option @samp{--freetype0} (see above). @item --truecolor* @cindex truecolor output -On systems with a fairly new @samp{libgd}, one can choose to generate -truecolor output. This will not be necessary in general unless you -include truecolor images via a PostScript special (i.e., the -@samp{graphics} or @samp{graphicx} package). It will lead to longer -execution time, mostly because more data is written to disk. +This will make @samp{dvipng} generate truecolor output. Note that +truecolor output is automatic if you include an external image in your +DVI, e.g., via a PostScript special (i.e., the @samp{graphics} or +@samp{graphicx} package). This switch is overridden by the +@samp{--palette} switch. @item -v* Enable verbose operation. This will currently indicate what fonts is @@ -1379,6 +1393,148 @@ when header files are included. @end ignore +@node Graphics +@chapter Graphics + +@samp{dvipng} attempts to handle graphics as included by the +@samp{graphicx} and @samp{graphics} packages, without the need of +specifying a driver to these packages. This means that it recognizes +the encapsulated postscript inclusion meant for @samp{dvips}, but is +also able (from version 1.8) to include bitmapped graphics, see the +details below. + +@menu +* Encapsulated PostScript:: An internal call to GhostScript +* Bitmapped graphics:: PNG, JPEG and GIF +@end menu + +@node Encapsulated PostScript +@section Encapsulated PostScript + +When an EPS file is included, a call to GhostScript is performed to +produce a bitmapped image that can be included. The default is to +produce an image with transparent background, at the same size as the +DVI page currently being converted to PNG, and include that as +foreground on the PNG. Of course, if the image is to be cropped, that +is done. The included image will be a truecolor image, so for maximum +performance the output PNG will be in truecolor mode as well. + +This conversion needs the @samp{pngalpha} output device to be present +in your copy of GhostScript. If that device is not present, or you use +the @samp{--palette} switch or request GIF output, the fallback is to +use the @samp{png16m} device to produce a cropped opaque image for +inclusion. Other relevant switches are @samp{--noghostscript} and +@samp{--nogssafer}. @xref{Option details}. + +@cindex PostScript inclusion problems +The most common problem with including graphics is an incorrect +bounding box. Complain to whoever wrote the software that generated +the file if the bounding box is indeed incorrect. An adjusted +boundingbox can be specified in the @samp{\includegraphics} call, as +in this example (using @samp{graphicx}): + +@example +\includegraphics[bb=10 20 100 200]@{imagename.eps@} +@end example + + +@node Bitmapped graphics +@section Bitmapped graphics + +dvipng can include PNG, JPEG and GIF graphics. When including such +images via @samp{\includegraphics} you need to specify the bounding +box since @TeX{} itself cannot read them from the files in question. +The bounding box size should be given as @samp{0 0 w h} in pixels, +e.g., if the file @samp{imagename.png} is 300x400 pixels, the +inclusion would read + +@example +\includegraphics[bb=0 0 300 400]@{imagename.png@} +@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). + +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 +will take up 1.35 inches. If you want 200 dpi you divide by 200, and +so on. Simple, eh? The example above at 200 dpi would be 1.5 inches +wide: + +@example +\includegraphics[bb=0 0 300 400,witdh=1.5in]@{imagename.png@} +@end example + +@node Color +@chapter Color + +To support color, dvipng recognizes a certain set of specials. These +specials start with the keyword @samp{color} or the keyword +@samp{background}, followed by a color specification. + +@menu +* Color specifications:: +* Color specials:: +@end menu + + +@node Color specifications +@section Color specifications + +@cindex color specifications + +The color specification supported by dvipng is by-value or by-name. The +by-value spec starts with the name of a color model (one of @samp{rgb}, +@samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the +appropriate number of parameters. Thus, the color specification +@samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 +0.4 0.5} in its red, blue and green values. The color model used +internally in dvipng is @samp{RGB} (discretized to 256 levels), for +details on the formulas used in conversion, see the @samp{xcolor} +documentation. + +By-name color specifications are single (case-dependent) words and are +compared with color names defined in @samp{dvipsnam.def} (from the +@samp{graphics} bundle), @samp{svgnam.def} and @samp{xcolor.sty} (from +the @samp{xcolor} bundle). See the @samp{xcolor} documentation for a +list of names and the corresponding colors. + +On the command-line, the name @samp{Transparent} can also be used as +an argument to @samp{--bg} to choose transparent background. +@xref{Option details}. + +@node Color specials +@section Color specials + +We will describe @samp{background} first, since it is the simplest. The +@samp{background} keyword must be followed by a color specification. +That color specification is used as a fill color for the background. The +last @samp{background} special on a page is the one that gets used, and +is used for the whole of the page image. (This is possible because the +prescan phase of dvipng notices all of the color specials so that the +appropriate information can be written out during the second phase.) + +The @samp{color} special itself has three forms. The first is just +@samp{color} followed by a color specification. In this case, the +current global color is set to that color; the color stack must be empty +when such a command is executed. + +The second form is @samp{color push} followed by a color specification. +This saves the current color on the color stack and sets the color to be +that given by the color specification. This is the most common way to +set a color. + +The final form of the @samp{color} special is just @samp{color pop}, +with no color specification; this says to pop the color last pushed on +the color stack from the color stack and set the current color to be +that color. + +dvipng correctly handles these color specials across pages, even when +the pages are rendered repeatedly or in reverse order. + @node Diagnosing problems @chapter Diagnosing problems @@ -1391,6 +1547,14 @@ all the instructions in this manual, and still can't get something to work. The following sections provide some helpful hints if you find yourself in such a situation. +@menu +* Contact information:: Who to ask. +* Debug options:: Getting diagnostics. +@end menu + +@node Contact information +@section Contact information + Bug reports should be sent to @email{dvipng@@nongnu.org}. @@ -1406,18 +1570,10 @@ access, ask on @email{dvipng@@nongnu.org}. For details on the @TeX{} path-searching library, and @code{mktexpk} problems, @pxref{Common problems,,, kpathsea, Kpathsea}. -@menu -* Debug options:: Getting diagnostics. -* Included graphics problems:: Figures are wrongly rendered. -@end menu - @node Debug options @section Debug options -@cindex debugging options -@cindex options, debugging - The @samp{-d} flag to dvipng helps in tracking down certain errors. The parameter to this flag is an integer that tells what errors are currently being tracked. To track a certain class of debug messages, @@ -1464,121 +1620,24 @@ Kpathsea path searches @end table -@node Included graphics problems -@section Included graphics problems - -@cindex graphics inclusion problems - -The most common problem with including graphics is an incorrect bounding -box. -@c (@pxref{Bounding box}). -Complain to whoever wrote the software that generated the file if the -bounding box is indeed incorrect. - -An additional problem is that the image in dvipng is always clipped to -the bounding box. This is because the image is rendered by GhostScript -by an internal call and then copied to the dvipng image. At present no -workaround is known, but there may be one for a future GhostScript. -We'll see. - -@ignore -@cindex Illustrator, workaround for -Another possible problem is that the figure you are trying to include -does not nest properly; there are certain rules PostScript applications -must follow when generating files to be included. The dvipng program -includes work-arounds for such errors in Adobe Illustrator and other -programs, but there are certainly applications that haven't been tested. - -One possible thing to try is the @samp{-K} flag which strips the comments -from an included figure. This might be necessary if the PostScript -spooling software does not read the structured comments correctly. Use -of this flag will break graphics from some applications, though, since -some applications read the PostScript file from the input stream, -looking for a particular comment. -@end ignore - -@node Color -@chapter Color - -To support color, dvipng recognizes a certain set of specials. These -specials start with the keyword @samp{color} or the keyword -@samp{background}, followed by a color specification. - -@menu -* Color specifications:: -* Color specials:: -@end menu - - -@node Color specifications -@section Color specifications - -@cindex color specifications - -The color specification supported by dvipng is by-value or by-name. The -by-value spec starts with the name of a color model (one of @samp{rgb}, -@samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the -appropriate number of parameters. Thus, the color specification -@samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 -0.4 0.5} in its red, blue and green values. The color used internally in -dvipng is @samp{RGB} (discretized to 256 levels), for details on the -formulas used in conversion, see the @samp{xcolor} documentation. - -By-name color specifications are single (case-dependent) words and are -compared with color names defined in @samp{dvipsnam.def} (from the -@samp{graphics} bundle), @samp{svgnam.def} and @samp{xcolor.sty} (from -the @samp{xcolor} bundle). - -On the command-line, the name @samp{Transparent} can also be used in as -an argument to @samp{--bg} to choose transparent background. -@xref{Option details}. - -@node Color specials -@section Color specials - -We will describe @samp{background} first, since it is the simplest. The -@samp{background} keyword must be followed by a color specification. -That color specification is used as a fill color for the background. The -last @samp{background} special on a page is the one that gets used, and -is used for the whole of the page image. (This is possible because the -prescan phase of dvipng notices all of the color specials so that the -appropriate information can be written out during the second phase.) - -The @samp{color} special itself has three forms. The first is just -@samp{color} followed by a color specification. In this case, the -current global color is set to that color; the color stack must be empty -when such a command is executed. - -The second form is @samp{color push} followed by a color specification. -This saves the current color on the color stack and sets the color to be -that given by the color specification. This is the most common way to -set a color. - -The final version of the @samp{color} special is just @samp{color pop}, -with no color specification; this says to pop the color last pushed on -the color stack from the color stack and set the current color to be -that color. - -dvipng correctly handles these color specials across pages, even when -the pages are rendered repeatedly or in reverse order. - @node Credits @chapter Credits -A number of persons have contributed, if I forget to mention someone, I -apologize. First and foremost we have David Kastrup whose +A number of persons have contributed, if I forget to mention someone, +I apologize. First and foremost we have David Kastrup whose @previewlatex{} project provided the incentive to write this program. -There is also a number of people who have contributed by reporting 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), 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, and Jason Riedy. +There is also a number of people who have contributed by reporting +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. @ifset man @c man begin NOTES @@ -1592,7 +1651,7 @@ This program is released under the GNU General Public License, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/gpl.html}. -Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson @c man end @end ifset @@ -1616,7 +1675,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @sp 2 @noindent -Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson @node Index @unnumbered Index diff --git a/Build/source/texk/dvipng/font.c b/Build/source/texk/dvipng/font.c index 82079549a48..9262bfe5809 100644 --- a/Build/source/texk/dvipng/font.c +++ b/Build/source/texk/dvipng/font.c @@ -118,6 +118,7 @@ void FontDef(unsigned char* command, void* parent) if (tfontnump!=NULL && tfontnump->fontp->s == s && tfontnump->fontp->d == d + && strlen(tfontnump->fontp->n) == a+l && strncmp(tfontnump->fontp->n,(char*)current+14,a+l) == 0) { DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found",k)); return; @@ -143,6 +144,7 @@ void FontDef(unsigned char* command, void* parent) while (tfontptr != NULL && (tfontptr->s != s || tfontptr->d != d + || strlen(tfontptr->n) != a+l || strncmp(tfontptr->n,(char*)current+14,a+l) != 0 ) ) { tfontptr = tfontptr->next; } diff --git a/Build/source/texk/dvipng/ft.c b/Build/source/texk/dvipng/ft.c index d23017a93ba..262a299f324 100644 --- a/Build/source/texk/dvipng/ft.c +++ b/Build/source/texk/dvipng/ft.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -44,7 +44,7 @@ void LoadFT(int32_t c, struct char_entry * ptr) 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_NO_HINTING )) + FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT )) /* load flags */ Fatal("cannot load FT char %d",c); ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor; @@ -84,11 +84,15 @@ bool InitFT(struct font_entry * tfontp) } # ifdef DEBUG else { +# ifdef HAVE_FT_LIBRARY_VERSION FT_Int amajor, aminor, apatch; - + FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); - DEBUG_PRINT(DEBUG_FT,("\n FREETYPE VERSION: FreeType %d.%d.%d", + DEBUG_PRINT(DEBUG_FT,("\n LIBFT VERSION: %d.%d.%d", amajor, aminor, apatch)); +# endif + DEBUG_PRINT(DEBUG_FT,("\n FREETYPE VERSION: %d.%d.%d", + FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH)); } # endif } diff --git a/Build/source/texk/dvipng/install.texi b/Build/source/texk/dvipng/install.texi index e43cbf19200..1cec3dcd668 100644 --- a/Build/source/texk/dvipng/install.texi +++ b/Build/source/texk/dvipng/install.texi @@ -141,6 +141,7 @@ Once @file{configure} has been run, simply enter @example make @end example + @noindent at the prompt to compile the C code, and build the documentation files. To install the files into the locations chosen earlier, type @@ -179,8 +180,9 @@ reasonably easy to maintain a bunch of additional packages, since the prefix argument is supported by most @file{configure} scripts. You'll have to add something like @file{/home/myself/bin} to your -@code{PATH} shell variable, if it isn't there already, and similarly set -the @code{INFOPATH} variable to be able to access the documentation. +@code{PATH} shell variable, if it isn't there already, and similarly +set the @code{INFOPATH} and @code{MANPATH} variables to be able to +access the documentation. @ifset rawfile @section Copying @@ -189,5 +191,5 @@ This program is released under the GNU General Public License, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/gpl.html}. -Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson @end ifset diff --git a/Build/source/texk/dvipng/miktex.h b/Build/source/texk/dvipng/miktex.h index ed47faac283..ef655cf76d3 100644 --- a/Build/source/texk/dvipng/miktex.h +++ b/Build/source/texk/dvipng/miktex.h @@ -71,6 +71,15 @@ /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME +/* Define to 1 if you have the `FT_Library_Version' function. */ +#undef HAVE_FT_LIBRARY_VERSION + +/* Define to 1 if you have the `gdImageAlphaBlending' function. */ +#undef HAVE_GDIMAGEALPHABLENDING + +/* Define to 1 if you have the `gdImageColorResolveAlpha' function. */ +#undef HAVE_GDIMAGECOLORRESOLVEALPHA + /* Define to 1 if you have the `gdImageCreateTrueColor' function. */ #define HAVE_GDIMAGECREATETRUECOLOR 1 @@ -119,13 +128,13 @@ /* Define to 1 if you have the `t1' library (-lt1). */ #undef HAVE_LIBT1 +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -141,6 +150,9 @@ /* Define to 1 if you have the <png.h> header file. */ #define HAVE_PNG_H 1 +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV @@ -165,6 +177,12 @@ /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 @@ -208,13 +226,13 @@ #define PACKAGE_NAME "dvipng" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "dvipng 1.6" +#define PACKAGE_STRING "dvipng 1.7" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "dvipng" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.6" +#define PACKAGE_VERSION "1.7" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -236,11 +254,8 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -#ifndef __cplusplus -#undef inline -#endif +/* Define to `long long' if <inttypes.h> does not define it. */ +#undef int64_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc @@ -248,5 +263,11 @@ /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t +/* Define to `unsigned' if <sys/types.h> does not define. */ +#undef size_t + +/* Define to `unsigned long long' if <inttypes.h> does not define it. */ +#undef uint64_t + /* Define as `fork' if `vfork' does not work. */ #undef vfork diff --git a/Build/source/texk/dvipng/misc.c b/Build/source/texk/dvipng/misc.c index 69f3d04ac21..0ce426b0246 100644 --- a/Build/source/texk/dvipng/misc.c +++ b/Build/source/texk/dvipng/misc.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -44,7 +44,8 @@ static char *programname; bool DecodeArgs(int argc, char ** argv) { int i; /* argument index for options */ - bool ppused=false; /* Flag when -pp is used */ + bool ppused=false; /* Flag when -pp is used */ + int32_t number; /* Temporary storage for numeric parameter */ char *dviname=NULL; /* Name of dvi file */ char *outname=NULL; /* Name of output file */ @@ -62,7 +63,7 @@ bool DecodeArgs(int argc, char ** argv) Message(BE_NONQUIET,"This is %s",programname); if (strcmp(basename(programname),PACKAGE_NAME)!=0) Message(BE_NONQUIET," (%s)", PACKAGE_NAME); - Message(BE_NONQUIET," %s Copyright 2002-2005 Jan-Ake Larsson\n", + Message(BE_NONQUIET," %s Copyright 2002-2006 Jan-Ake Larsson\n", PACKAGE_VERSION); } @@ -136,6 +137,7 @@ bool DecodeArgs(int argc, char ** argv) else Message(PARSE_STDIN,"MakeTeXPK disabled\n"); break; +#endif /* MAKETEXPK */ case 'm': if (strcmp(p,"ode") == 0 ) { if (argv[i+1]) @@ -158,7 +160,6 @@ bool DecodeArgs(int argc, char ** argv) break; } goto DEFAULT; -#endif /* MAKETEXPK */ case 'O' : /* Offset */ if (*p == 0 && argv[i+1]) p = argv[++i] ; @@ -199,10 +200,10 @@ bool DecodeArgs(int argc, char ** argv) /* Truecolor */ if (strncmp(p,"ruecolor",8)==0) { if (p[8] != '0') { - flags |= RENDER_TRUECOLOR; + flags |= FORCE_TRUECOLOR; Message(PARSE_STDIN,"Truecolor mode on\n",p); } else { - flags &= ~RENDER_TRUECOLOR; + flags &= ~FORCE_TRUECOLOR; Message(PARSE_STDIN,"Truecolor mode off\n"); } } else @@ -268,11 +269,14 @@ bool DecodeArgs(int argc, char ** argv) } else if (strcmp(p, "dpi")==0) { p+=3; if (*p == 0 && argv[i+1]) - p = argv[++i] ; - user_bdpi = atoi(p); - if (user_bdpi < 10 || user_bdpi > 10000) - Fatal("bad --bdpi parameter") ; - Message(PARSE_STDIN,"Bdpi: %d\n",user_bdpi); + p = argv[++i]; + number = atoi(p); + if (number < 10 || number > 10000) + Warning("Bad --bdpi parameter, ignored"); + else { + user_bdpi=number; + Message(PARSE_STDIN,"Bdpi: %d\n",user_bdpi); + } break; } else if ( *p == 'd' ) { /* -bd border width */ int tmpi; @@ -329,11 +333,14 @@ bool DecodeArgs(int argc, char ** argv) case 'x' : case 'y' : if (*p == 0 && argv[i+1]) p = argv[++i] ; - usermag = atoi(p); - if (usermag < 1 || usermag > 1000000) - Fatal("bad magnification parameter (-x or -y)") ; - Message(PARSE_STDIN,"Magstep: %d\n",usermag); + number = atoi(p); + if (number < 1 || number > 1000000) + Warning("Bad magnification parameter (-x or -y), ignored"); + else { + usermag=number; + Message(PARSE_STDIN,"Magstep: %d\n",usermag); /*overridemag = (c == 'x' ? 1 : -1) ;*/ + } break ; case 'g' : if (strncmp(p,"amma",4)==0) { /* --gamma correction */ @@ -379,6 +386,14 @@ bool DecodeArgs(int argc, char ** argv) flags &= ~MODE_PICKY; Message(PARSE_STDIN,"Images output even for pages with warnings\n"); } + } else if (strncmp(p,"alette",6)==0) { + if (p[6] != '0') { + flags |= FORCE_PALETTE; + Message(PARSE_STDIN,"Forcing 256-color PNG output\n",p); + } else { + flags &= ~FORCE_PALETTE; + Message(PARSE_STDIN,"Allows truecolor PNG output\n"); + } } else { /* a -p specifier for first page */ int32_t firstpage; bool abspage=false; @@ -389,9 +404,12 @@ bool DecodeArgs(int argc, char ** argv) abspage=true; p++ ; } - firstpage = atoi(p); - FirstPage(firstpage,abspage); - Message(PARSE_STDIN,"First page: %d\n",firstpage); + if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { + firstpage = atoi(p); + FirstPage(firstpage,abspage); + Message(PARSE_STDIN,"First page: %d\n",firstpage); + } else + Warning("Bad firstpage (-p) parameter, ignored"); } break ; case 's' : @@ -437,9 +455,12 @@ bool DecodeArgs(int argc, char ** argv) abspage=true; p++ ; } - lastpage = atoi(p); - LastPage(lastpage,abspage); - Message(PARSE_STDIN,"Last page: %d\n",lastpage); + if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { + lastpage = atoi(p); + LastPage(lastpage,abspage); + Message(PARSE_STDIN,"Last page: %d\n",lastpage); + } else + Warning("Bad lastpage (-l) parameter, ignored"); } break ; case 'q': /* quiet operation */ @@ -482,22 +503,35 @@ named COPYING and dvipng.c."); case 'D' : if (*p == 0 && argv[i+1]) p = argv[++i] ; - dpi = atoi(p); - if (dpi < 10 || dpi > 10000) - Fatal("bad -D parameter") ; - Message(PARSE_STDIN,"Dpi: %d\n",dpi); + number = atoi(p); + if (number < 10 || number > 10000) + Warning("Bad resolution (-D) parameter, ignored") ; + else { + dpi=number; + Message(PARSE_STDIN,"Dpi: %d\n",dpi); + } break; case 'Q': /* quality (= shrinkfactor) */ if (*p == 0 && argv[i+1]) - p = argv[++i] ; - shrinkfactor = atoi(p); - Message(PARSE_STDIN,"Quality: %d\n",shrinkfactor); + p = argv[++i]; + if (*p>='0'&&*p<='9') { + shrinkfactor = atoi(p); + Message(PARSE_STDIN,"Quality: %d\n",shrinkfactor); + } else { + Warning("Non-numeric quality (-Q) value, ignored"); + } break; #ifdef HAVE_GDIMAGEPNGEX case 'z': if (*p == 0 && argv[i+1]) p = argv[++i]; - compression = atoi(p); + number = atoi(p); + if (number<1 || number>9) + Warning("Bad compression (-z) value, ignored"); + else { + compression=number; + Message(PARSE_STDIN,"Compression: %d\n",shrinkfactor); + } break; #endif case '\0': @@ -524,28 +558,22 @@ named COPYING and dvipng.c."); #endif fprintf(stdout," -D # Output resolution\n"); fprintf(stdout," -l # Last page to be output\n"); - fprintf(stdout," --mode s MetaFont mode (default 'cx')\n"); - fprintf(stdout," -M* Don't make PK fonts\n"); fprintf(stdout," -o f Output file, '%%d' is pagenumber\n"); fprintf(stdout," -O c Image offset\n"); fprintf(stdout," -p # First page to be output\n"); fprintf(stdout," -pp #,#.. Page list to be output\n"); fprintf(stdout," -q* Quiet operation\n"); - fprintf(stdout," -r* Reverse order of pages\n"); - /* fprintf(stdout," -t c Paper format (also accepts e.g., '-t a4')\n");*/ fprintf(stdout," -T c Image size (also accepts '-T bbox' and '-T tight')\n"); fprintf(stdout," -v* Verbose operation\n"); - fprintf(stdout," -x # Override dvi magnification\n"); fprintf(stdout," - Interactive query of options\n"); fprintf(stdout,"\nThese do not correspond to dvips options:\n"); fprintf(stdout," -bd # Transparent border width in dots\n"); fprintf(stdout," -bd s Transparent border fallback color (TeX-style color)\n"); - fprintf(stdout," --bdpi # Set the base (Metafont) resolution\n"); fprintf(stdout," -bg s Background color (TeX-style color or 'Transparent')\n"); fprintf(stdout," --depth* Output the image depth on stdout\n"); fprintf(stdout," --dvinum* Use TeX page numbers in output filenames\n"); fprintf(stdout," -fg s Foreground color (TeX-style color)\n"); - fprintf(stdout," --follow* Follow mode\n"); + fprintf(stdout," --follow* Wait for data at end-of-file\n"); #ifdef HAVE_FT2 fprintf(stdout," --freetype* FreeType font rendering (default on)\n"); #endif @@ -556,6 +584,9 @@ named COPYING and dvipng.c."); fprintf(stdout," --height* Output the image height on stdout\n"); fprintf(stdout," --noghostscript* Don't use ghostscript for PostScript specials\n"); fprintf(stdout," --nogssafer* Don't use -dSAFER in ghostscript calls\n"); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + fprintf(stdout," --palette* Force palette output\n"); +#endif fprintf(stdout," --picky When a warning occurs, don't output image\n"); #ifdef HAVE_GDIMAGEGIF fprintf(stdout," --png Output PNG images (dvipng default)\n"); diff --git a/Build/source/texk/dvipng/papersiz.c b/Build/source/texk/dvipng/papersiz.c index fa8117b600a..1ee322325da 100644 --- a/Build/source/texk/dvipng/papersiz.c +++ b/Build/source/texk/dvipng/papersiz.c @@ -51,7 +51,7 @@ int32_t myatodim(char ** p) Warning("unrecognized length unit \"%.2s\", assuming inches",*p); while (**p != ',' && **p !='\0') (*p)++; - tmp *= lengthsp[i]*dpi/4736286L; /* convert sp to pixels */ + tmp = tmp*lengthsp[i]*dpi/4736286L; /* sp * dots/in / (sp/in), convert sp to pixels */ return((int32_t) tmp); } diff --git a/Build/source/texk/dvipng/readme.texi b/Build/source/texk/dvipng/readme.texi index ccd94ca999b..5ac863c1a4d 100644 --- a/Build/source/texk/dvipng/readme.texi +++ b/Build/source/texk/dvipng/readme.texi @@ -38,24 +38,20 @@ and WYSIWYG editors like LyX. @section Benefits of dvipng @end ifset @end ifclear -@ifclear rawfile -@end ifclear The benefits of @samp{dvipng}/@samp{dvigif} include @itemize @bullet @item -Speed. It is a very fast bitmap-rendering code for DVI files. On a -fairly low-end laptop, it takes less than a second to generate 150 -one-formula images. This makes dvipng suitable for generating large -amounts of images on-the-fly, as needed in @previewlatex{}, WeBWorK and -others. +Speed. It is a very fast bitmap-rendering code for DVI files, which +makes it suitable for generating large amounts of images on-the-fly, +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 EOF for -further output, unless it finds the POST marker that indicates the end -of the DVI. +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. @item Interactive query of options. dvipng can read options interactively @@ -126,13 +122,16 @@ This program is released under the GNU General Public License, see the COPYING file in the dvipng distribution or @url{http://www.gnu.org/licenses/gpl.html}. -Copyright @copyright{} 2002-2005 Jan-@AA{}ke Larsson +Copyright @copyright{} 2002-2006 Jan-@AA{}ke Larsson @section Todo @itemize @bullet @item -Test the FreeType interface so that TrueType fonts work properly. +Support for CJK-@LaTeX{} (Chinese, Japanese, Korean), that is: subfonts. + +@item +Fix T1 and PK rendering so it is on par with Freetype. @item Further speed improvements. diff --git a/Build/source/texk/dvipng/set.c b/Build/source/texk/dvipng/set.c index 1b73930a1fe..a6fa3945e49 100644 --- a/Build/source/texk/dvipng/set.c +++ b/Build/source/texk/dvipng/set.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + Copyright (C) 2002-2006 Jan-Åke Larsson ************************************************************************/ @@ -29,62 +29,62 @@ #endif #include <math.h> +#ifndef HAVE_GDIMAGECREATETRUECOLOR +#define gdImageColorAllocateAlpha(i,r,g,b,a) gdImageColorAllocate(i,r,g,b) +#define gdImageColorResolveAlpha(i,r,g,b,a) gdImageColorResolve(i,r,g,b) +#define gdImageAlpha(i,c) 0 +#define gdAlphaMax 127 +#endif +#ifndef HAVE_GDIMAGEPNGEX +#define gdImagePngEX(i,f,z) gdImagePng(i,f) +#endif + +/* Persistent color cache. Index is ink thickness, + 0=no ink, 127=total coverage */ +static int ColorCache[gdAlphaMax+1]; + void CreateImage(pixels x_width,pixels y_width) { - int Background; - if (page_imagep) gdImageDestroy(page_imagep); if (x_width <= 0) x_width=1; if (y_width <= 0) y_width=1; #ifdef HAVE_GDIMAGECREATETRUECOLOR - if (flags & RENDER_TRUECOLOR) + /* GIFs are 256-color */ + if (flags & (FORCE_TRUECOLOR|PAGE_TRUECOLOR) && ~flags & GIF_OUTPUT + && ~flags & FORCE_PALETTE) page_imagep=gdImageCreateTrueColor(x_width,y_width); else #endif page_imagep=gdImageCreate(x_width,y_width); - /* Set bg color */ -#ifdef HAVE_GDIMAGECOLORRESOLVEALPHA - if (flags & BG_TRANSPARENT_ALPHA -#ifdef HAVE_GDIMAGEGIF - /* GIFs cannot handle an alpha channel, resort to transparent - color index */ - && ~flags & GIF_OUTPUT -#endif /* HAVE_GDIMAGEGIF */ - ) { - Background = gdImageColorAllocateAlpha(page_imagep, - cstack[0].red, - cstack[0].green, - cstack[0].blue,127); -#ifdef HAVE_GDIMAGEALPHABLENDING - /* Draw without blending to allow the background of the _viewer_ - to shine through. Color blending is calculated where needed. */ - gdImageAlphaBlending(page_imagep, 0); - gdImageSaveAlpha(page_imagep, 1); -#endif - } - else -#endif /* HAVE_GDIMAGECOLORRESOLVEALPHA */ - { - Background = gdImageColorAllocate(page_imagep, - cstack[0].red, - cstack[0].green, - cstack[0].blue); - /* maybe alpha is not available or perhaps we are producing - GIFs, so test for BG_TRANSPARENT_ALPHA too */ - if (flags & (BG_TRANSPARENT|BG_TRANSPARENT_ALPHA)) - gdImageColorTransparent(page_imagep,Background); - } + /* Set bg color. GIFs cannot handle an alpha channel, resort to + transparent color index, set in WriteImage */ + ColorCache[0] + = gdImageColorAllocateAlpha(page_imagep, + cstack[0].red, + cstack[0].green, + cstack[0].blue, + (flags & BG_TRANSPARENT_ALPHA + && ~flags & GIF_OUTPUT) ? 127 : 0); + ColorCache[gdAlphaMax]=-1; #ifdef HAVE_GDIMAGECREATETRUECOLOR - if (flags & RENDER_TRUECOLOR) + /* Alpha blending in libgd is only performed for truecolor images. + We need it for palette images also. Turn libgd alpha blending off + and calculate color blending where needed. We turn it back on + briefly for image inclusion. */ + gdImageAlphaBlending(page_imagep, 0); + if (flags & BG_TRANSPARENT_ALPHA) + gdImageSaveAlpha(page_imagep, 1); + if (page_imagep->trueColor) /* Truecolor: there is no background color index, fill image instead. */ gdImageFilledRectangle(page_imagep, 0, 0, - x_width-1, y_width-1, Background); + x_width-1, y_width-1, ColorCache[0]); #endif } -void ChangeColor(gdImagePtr imagep,int x1,int y1,int x2,int y2,int color1,int color2) +void ChangeColor(gdImagePtr imagep,int x1,int y1, + int x2,int y2,int color1,int color2) /* In the given rectangle, change color1 to color2 */ { int x,y; @@ -101,30 +101,41 @@ void WriteImage(char *pngname, int pagenum) char* pos; FILE* outfp=NULL; + /* Set transparent background. Maybe alpha is not available or + perhaps we are producing GIFs, so test for BG_TRANSPARENT_ALPHA + too */ + if (flags & (BG_TRANSPARENT|BG_TRANSPARENT_ALPHA)) + gdImageColorTransparent(page_imagep,ColorCache[0]); /* Transparent border */ if (borderwidth>0) { - int Transparent,bgcolor; + int Transparent; pixels x_width,y_width; x_width=gdImageSX(page_imagep); y_width=gdImageSY(page_imagep); - bgcolor = gdImageColorResolve(page_imagep, - cstack[0].red,cstack[0].green,cstack[0].blue); /* Set ANOTHER bg color, transparent this time */ /* No semi-transparency here, given the motivation for this code * (box cursor visibility in Emacs) */ if (userbordercolor) Transparent = gdImageColorAllocate(page_imagep, - bordercolor.red,bordercolor.green,bordercolor.blue); + bordercolor.red, + bordercolor.green, + bordercolor.blue); else Transparent = gdImageColorAllocate(page_imagep, - cstack[0].red,cstack[0].green,cstack[0].blue); + gdImageRed(page_imagep,ColorCache[0]), + gdImageGreen(page_imagep,ColorCache[0]), + gdImageBlue(page_imagep,ColorCache[0])); gdImageColorTransparent(page_imagep,Transparent); - ChangeColor(page_imagep,0,0,x_width-1,borderwidth-1,bgcolor,Transparent); - ChangeColor(page_imagep,0,0,borderwidth-1,y_width-1,bgcolor,Transparent); - ChangeColor(page_imagep,x_width-borderwidth,0,x_width-1,y_width-1,bgcolor,Transparent); - ChangeColor(page_imagep,0,y_width-borderwidth,x_width-1,y_width-1,bgcolor,Transparent); + ChangeColor(page_imagep,0,0,x_width-1,borderwidth-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,0,0,borderwidth-1,y_width-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,x_width-borderwidth,0,x_width-1,y_width-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,0,y_width-borderwidth,x_width-1,y_width-1, + ColorCache[0],Transparent); } if ((pos=strchr(pngname,'%')) != NULL) { @@ -156,11 +167,7 @@ void WriteImage(char *pngname, int pagenum) gdImageGif(page_imagep,outfp); else #endif -#ifdef HAVE_GDIMAGEPNGEX - gdImagePngEx(page_imagep,outfp,compression); -#else - gdImagePng(page_imagep,outfp); -#endif + gdImagePngEx(page_imagep,outfp,compression); fclose(outfp); DEBUG_PRINT(DEBUG_DVI,("\n WROTE: \t%s\n",pngname)); DestroyImage(); @@ -180,155 +187,71 @@ static int gammatable[]= 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99, 100,101,102,103,104,105,106,107,108,109, 110,111,112,113,114,115,116,117,118,119, - 120,121,122,123,124,125,126,127,128,129, - 130,131,132,133,134,135,136,137,138,139, - 140,141,142,143,144,145,146,147,148,149, - 150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169, - 170,171,172,173,174,175,176,177,178,179, - 180,181,182,183,184,185,186,187,188,189, - 190,191,192,193,194,195,196,197,198,199, - 200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219, - 220,221,222,223,224,225,226,227,228,229, - 230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249, - 250,251,252,253,254,255}; + 120,121,122,123,124,125,126,127}; void Gamma(double gamma) { int i=0; - while (i<=255) { - gammatable[i]=255-(int)(pow((double)(255-i)/255.0,gamma)*255); - DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ",i,gammatable[i])); + while (i<=gdAlphaMax) { + gammatable[i]=gdAlphaMax- + (int)(pow((gdAlphaMax-i)/((double)gdAlphaMax),gamma)*gdAlphaMax); + DEBUG_PRINT(DEBUG_GLYPH, + ("\n GAMMA GREYSCALE: %d -> %d ",i,gammatable[i])); i++; } } - -#define GREYS 255 dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv) +/* gdImageChar can only do monochrome glyphs */ { register struct char_entry *ptr = currentfont->chr[c]; - /* temporary char_entry pointer */ - int red,green,blue; - int *Color=alloca(sizeof(int)*(GREYS+1)); - int x,y; - int pos=0; + int dst_alpha,dst_weight,tot_weight,alpha; + int x,y,pos=0; int bgColor,pixelgrey,pixelcolor; + hh -= ptr->xOffset/shrinkfactor; vv -= ptr->yOffset/shrinkfactor; - - for( x=1; x<=GREYS ; x++) - Color[x] = -1; -#ifdef HAVE_GDIMAGECOLORRESOLVEALPHA - if (flags & BG_TRANSPARENT_ALPHA -#ifdef HAVE_GDIMAGEGIF - /* GIFs cannot handle an alpha channel, resort to transparent - color index */ - && ~flags & GIF_OUTPUT -#endif /* HAVE_GDIMAGEGIF */ - ) { - int alpha; - Color[0] = gdImageColorResolveAlpha(page_imagep, - cstack[0].red, - cstack[0].green, - cstack[0].blue,127); - for( y=0; y<ptr->h; y++) { - for( x=0; x<ptr->w; x++) { - if (ptr->data[pos]>0) { - pixelgrey=gammatable[(int)ptr->data[pos]]; - bgColor = gdImageGetPixel(page_imagep, hh + x, vv + y); - if (bgColor == Color[0]) { - if (Color[pixelgrey]==-1) { - DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ",ptr->data[pos],pixelgrey)); - /* Standard background: use cached value if present */ - /* 127-alpha/2: 0=opaque,127=full_trans */ - Color[pixelgrey]=gdImageColorResolveAlpha(page_imagep, - cstack[csp].red, - cstack[csp].green, - cstack[csp].blue, - 127-pixelgrey/2); - } - pixelcolor=Color[pixelgrey]; - } else { - /* Overstrike: No cache */ - red =gdImageRed(page_imagep, bgColor); - green=gdImageGreen(page_imagep, bgColor); - blue =gdImageBlue(page_imagep, bgColor); - alpha=255-2*gdImageAlpha(page_imagep, bgColor); - red =red-(red-cstack[csp].red)*pixelgrey/GREYS; - green=green-(green-cstack[csp].green)*pixelgrey/GREYS; - blue =blue-(blue-cstack[csp].blue)*pixelgrey/GREYS; - /* 255=opaque */ - alpha=alpha-(alpha-255)*pixelgrey/GREYS; - /* 127-alpha/2: 0=opaque,127=full_trans */ - pixelcolor = gdImageColorResolveAlpha(page_imagep, - red,green,blue,127-alpha/2); - } - gdImageSetPixel(page_imagep, hh + x, vv + y, pixelcolor); - } - pos++; - } - } - } else -#endif /* HAVE_GDIMAGECOLORRESOLVEALPHA */ - { - Color[0] = gdImageColorResolve(page_imagep, - cstack[0].red, - cstack[0].green, - cstack[0].blue); - for( y=0; y<ptr->h; y++) { - for( x=0; x<ptr->w; x++) { - if (ptr->data[pos]>0) { - pixelgrey=gammatable[(int)ptr->data[pos]]; - bgColor = gdImageGetPixel(page_imagep, hh + x, vv + y); - if (bgColor == Color[0]) { - /* Standard background: use cached value if present */ - if (Color[pixelgrey]==-1) { - DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ",ptr->data[pos],pixelgrey)); - red = cstack[0].red - - (cstack[0].red-cstack[csp].red)*pixelgrey/GREYS; - green = cstack[0].green - - (cstack[0].green-cstack[csp].green)*pixelgrey/GREYS; - blue = cstack[0].blue - - (cstack[0].blue-cstack[csp].blue)*pixelgrey/GREYS; - Color[pixelgrey] = - gdImageColorResolve(page_imagep,red,green,blue); - } - pixelcolor=Color[pixelgrey]; - } else { - /* Overstrike: No cache */ - red=gdImageRed(page_imagep, bgColor); - green=gdImageGreen(page_imagep, bgColor); - blue=gdImageBlue(page_imagep, bgColor); - red = red-(red-cstack[csp].red)*pixelgrey/GREYS; - green = green-(green-cstack[csp].green)*pixelgrey/GREYS; - blue = blue-(blue-cstack[csp].blue)*pixelgrey/GREYS; - pixelcolor = gdImageColorResolve(page_imagep, red, green, blue); - } - gdImageSetPixel(page_imagep, hh + x, vv + y, pixelcolor); - } - pos++; - } + /* Initialize persistent color cache. Perhaps this should be in + color.c? */ + pixelcolor=gdImageColorResolve(page_imagep, + cstack[csp].red, + cstack[csp].green, + cstack[csp].blue); + if (ColorCache[gdAlphaMax]!=pixelcolor) { + for( x=1; x<gdAlphaMax; x++ ) + ColorCache[x]=-1; + ColorCache[gdAlphaMax]=pixelcolor; + } + for( y=0; y<ptr->h; y++) { + for( x=0; x<ptr->w; x++) { + if (ptr->data[pos]>0) { + pixelgrey=gammatable[(int)ptr->data[pos]/2]; + bgColor = gdImageGetPixel(page_imagep, hh + x, vv + y); + if (ColorCache[0]!=bgColor || ColorCache[pixelgrey]==-1) { + DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ", + ptr->data[pos]/2,pixelgrey)); + alpha = gdAlphaMax-pixelgrey; + dst_alpha = gdImageAlpha(page_imagep,bgColor); + dst_weight = (gdAlphaMax - dst_alpha) * alpha / gdAlphaMax; + tot_weight = pixelgrey + dst_weight; + pixelcolor = gdImageColorResolveAlpha(page_imagep, + (cstack[csp].red*pixelgrey + + gdImageRed(page_imagep,bgColor)*dst_weight)/tot_weight, + (cstack[csp].green*pixelgrey + + gdImageGreen(page_imagep,bgColor)*dst_weight)/tot_weight, + (cstack[csp].blue*pixelgrey + + gdImageBlue(page_imagep,bgColor)*dst_weight)/tot_weight, + alpha*dst_alpha/gdAlphaMax); + if (ColorCache[0]==bgColor) + ColorCache[pixelgrey]=pixelcolor; + } else + pixelcolor=ColorCache[pixelgrey]; + gdImageSetPixel(page_imagep, hh + x, vv + y, pixelcolor); } + pos++; } - /* This code saved _no_ execution time, strangely. - * Also, it cannot gamma correct; needs that in loaded glyphs - * - * #ifdef HAVE_GDIMAGECREATETRUECOLOR - * if (truecolor) - * for( i=1; i<=ptr->glyph.nchars ; i++) { - * Color = gdImageColorResolveAlpha(page_imagep,Red,Green,Blue, - * 128-128*i/ptr->glyph.nchars); - * gdImageChar(page_imagep, &(ptr->glyph), - * hh - ptr->xOffset/shrinkfactor, - * vv - ptr->yOffset/shrinkfactor, - * i,Color); - * } - * else { - * #endif */ + } return(ptr->tfmw); } @@ -365,133 +288,3 @@ dviunits SetRule(dviunits a, dviunits b, subpixels hh,subpixels vv) } return(b); } - - -#if 0 - if (page_imagep != NULL) { - if ((a>0) && (b>0)) { - int width,height,left=-1,right=-1,bottom=-1,top=-1; - gdImagePtr rule; - - - width = (h+b+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor - - h/dvi->conv/shrinkfactor; - /* Calculate height, round up on the bottom and down on the top */ - height = (v+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor - - (v-a)/dvi->conv/shrinkfactor; - rule = gdImageCreate(width,height); - /* Set background */ - gdImageColorAllocate(rule,Red,Green,Blue); - - /* Calculate blackness of edges of wide rule */ - left = shrinkfactor - h/dvi->conv%shrinkfactor; - right = (h+b+dvi->conv-1)/dvi->conv%shrinkfactor; - if (right==0) right = shrinkfactor; - if (width==1) { - /* Adjust blackness of narrow rule */ - left = shrinkfactor; - /* The (correct) alternative produces "fuzzy" tables */ - /* left = ((h+b+dvi->conv-1)/dvi->conv - h/dvi->conv)%shrinkfactor; - */ - } - if (width==2 && right+left <= shrinkfactor +1) { - /* Adjust blackness of narrow rule when spread across two columns */ - /* Cheat to make it sharp (+1 above, and wedging it around below) */ - if (right>left) { right=shrinkfactor; left=0; } - if (right<left) { left=shrinkfactor; right=0; } - if (right==left) { left=right=(shrinkfactor+1)/2; } - } - - /* Calculate blackness of edges of tall rule */ - bottom = (v+dvi->conv-1)/dvi->conv%shrinkfactor; - if (bottom==0) bottom = shrinkfactor; - top = shrinkfactor-(v-a)/dvi->conv%shrinkfactor; - if (height == 1) { - /* Adjust blackness of short rule */ - bottom = shrinkfactor; - /* The (correct) alternative produces "fuzzy" tables */ - /* bottom = ((v+dvi->conv-1)/dvi->conv - (v-a)/dvi->conv)%shrinkfactor; - */ - } - if (height==2 && top+bottom <= shrinkfactor +1) { - /* Adjust blackness of short rule when spread across two columns */ - /* Cheat to make it sharp (+1 above, and wedging it around below) */ - if (top>bottom) { top=shrinkfactor; bottom=0; } - if (top<bottom) { bottom=shrinkfactor; top=0; } - if (right==left) { left=right=(shrinkfactor+1)/2; } - } - - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*left*bottom/shrinkfactor/shrinkfactor, - bGreen-(bGreen-Green)*left*bottom/shrinkfactor/shrinkfactor, - bBlue-(bBlue-Blue)*left*bottom/shrinkfactor/shrinkfactor); - gdImageSetPixel(rule,0,height-1,Color); - if (width>1) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*right*bottom/shrinkfactor/shrinkfactor, - bGreen-(bGreen-Green)*right*bottom/shrinkfactor/shrinkfactor, - bBlue-(bBlue-Blue)*right*bottom/shrinkfactor/shrinkfactor); - gdImageSetPixel(rule,width-1,height-1,Color); - } - if (height>1) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*left*top/shrinkfactor/shrinkfactor, - bGreen-(bGreen-Green)*left*top/shrinkfactor/shrinkfactor, - bBlue-(bBlue-Blue)*left*top/shrinkfactor/shrinkfactor); - gdImageSetPixel(rule,0,0,Color); - } - if (height>1 && width>1) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*right*top/shrinkfactor/shrinkfactor, - bGreen-(bGreen-Green)*right*top/shrinkfactor/shrinkfactor, - bBlue-(bBlue-Blue)*right*top/shrinkfactor/shrinkfactor); - gdImageSetPixel(rule,width-1,0,Color); - } - - if (width>2) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*bottom/shrinkfactor, - bGreen-(bGreen-Green)*bottom/shrinkfactor, - bBlue-(bBlue-Blue)*bottom/shrinkfactor); - gdImageFilledRectangle(rule,1,height-1,width-2,height-1,Color); - } - if (height>2) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*left/shrinkfactor, - bGreen-(bGreen-Green)*left/shrinkfactor, - bBlue-(bBlue-Blue)*left/shrinkfactor); - gdImageFilledRectangle(rule,0,1,0,height-2,Color); - } - if (height>1 && width>2) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*top/shrinkfactor, - bGreen-(bGreen-Green)*top/shrinkfactor, - bBlue-(bBlue-Blue)*top/shrinkfactor); - gdImageFilledRectangle(rule,1,0,width-2,0,Color); - } - if (height>2 && width>1) { - Color = gdImageColorResolve(rule, - bRed-(bRed-Red)*right/shrinkfactor, - bGreen-(bGreen-Green)*right/shrinkfactor, - bBlue-(bBlue-Blue)*right/shrinkfactor); - gdImageFilledRectangle(rule,width-1,1,width-1,height-2,Color); - } - gdImageCopy(page_imagep,rule, - h/dvi->conv/shrinkfactor, - (v-a)/dvi->conv/shrinkfactor, - 0,0,width,height); - DEBUG_PRINT(DEBUG_DVI,("\n RULE \t%dx%d at (%d,%d)", - width,height, - PIXROUND(h, dvi->conv*shrinkfactor), - PIXROUND(v, dvi->conv*shrinkfactor))); - DEBUG_PRINT(DEBUG_DVI,(" (lrtb %d %d %d %d)",left,right,top,bottom)); - } - } else { - min(x_min,hh); - min(y_min,vv-height+1); - max(x_max,hh+width); - max(y_max,vv+1); - } -#endif - - diff --git a/Build/source/texk/dvipng/special.c b/Build/source/texk/dvipng/special.c index be7d5e42a08..0b0b194d498 100644 --- a/Build/source/texk/dvipng/special.c +++ b/Build/source/texk/dvipng/special.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Copyright (C) 2002-2005 Jan-Åke Larsson + 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, int hresolution, int vresolution, - int urx, int ury, int llx, int lly) +ps2png(const char *psfile, char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury) { #ifndef MIKTEX int downpipe[2], uppipe[2]; @@ -45,15 +45,14 @@ ps2png(const char *psfile, int hresolution, int vresolution, PROCESS_INFORMATION pi; _TCHAR szCommandLine[2048]; _TCHAR szGsPath[_MAX_PATH]; +#define GS_PATH szGsPath int fd; #endif FILE *psstream=NULL, *pngstream=NULL; char resolution[STRSIZE]; /* char devicesize[STRSIZE]; */ - /* For some reason, png256 gives inferior result */ - char *device="-sDEVICE=png16m"; gdImagePtr psimage=NULL; - static bool showpage; + static char* showpage=""; sprintf(resolution, "-r%dx%d",hresolution,vresolution); /* Future extension for \rotatebox @@ -63,13 +62,13 @@ ps2png(const char *psfile, int hresolution, int vresolution, //(int)((sin(atan(1.0))+1)* (ury - lly)*vresolution/72);//); */ - /* png16m being the default, this code is not needed - * #ifdef HAVE_GDIMAGECREATETRUECOLOR - * if (flags & RENDER_TRUECOLOR) - * device="-sDEVICE=png16m"; - * #endif - */ - + DEBUG_PRINT(DEBUG_GS, + ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s",/* %s", */ + GS_PATH, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (flags & NO_GSSAFER) ? "-": "-dSAFER", + (flags & NO_GSSAFER) ? "": "- ")); #ifndef MIKTEX if (pipe(downpipe) || pipe(uppipe)) return(NULL); /* Ready to fork */ @@ -78,40 +77,15 @@ ps2png(const char *psfile, int hresolution, int vresolution, close(downpipe[1]); dup2(downpipe[0], STDIN_FILENO); close(downpipe[0]); -#ifdef DEBUG - if (flags & NO_GSSAFER) { - DEBUG_PRINT(DEBUG_GS, - ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s ",/* %s", */ - GS_PATH, device, resolution, /* devicesize, */ - "-dBATCH", "-dNOPAUSE", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-")); - } else { - DEBUG_PRINT(DEBUG_GS, - ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s ",/* %s", */ - GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-dSAFER", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-")); - } -#endif close(uppipe[0]); dup2(uppipe[1], STDOUT_FILENO); close(uppipe[1]); - if (flags & NO_GSSAFER) - execl (GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-",NULL); - else - execl (GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-dSAFER", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-",NULL); + execlp(GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (flags & NO_GSSAFER) ? "-": "-dSAFER", + (flags & NO_GSSAFER) ? NULL: "-", + NULL); _exit (EXIT_FAILURE); } /* Parent process. */ @@ -129,35 +103,12 @@ ps2png(const char *psfile, int hresolution, int vresolution, Warning("Ghostscript could not be found"); return(NULL); } - if (flags & NO_GSSAFER) { - DEBUG_PRINT(DEBUG_GS, - ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s ",/* %s",*/ - szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-")); - sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s",/* %s",*/ - szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-"); - } else { - DEBUG_PRINT(DEBUG_GS, - ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s ",/* %s",*/ - szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-dSAFER", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-")); - sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/ - szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-dSAFER", "-q", - "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - "-"); - } + sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/ + szGsPath, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (flags & NO_GSSAFER) ? "-": "-dSAFER", + (flags & NO_GSSAFER) ? "": "-"); if (! miktex_start_process_3(szCommandLine, &pi, INVALID_HANDLE_VALUE, &hPsStream, &hPngStream, &hStdErr, 0)) { Warning("Ghostscript could not be started"); @@ -188,14 +139,8 @@ ps2png(const char *psfile, int hresolution, int vresolution, 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); } - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t(%s) run", psfile)); - fprintf(psstream, "(%s) run\n", psfile); - if (showpage) { - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage")); - fprintf(psstream, "showpage\n"); - } - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tquit")); - fprintf(psstream, "quit\n"); + 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) { @@ -205,19 +150,13 @@ ps2png(const char *psfile, int hresolution, int vresolution, #ifdef MIKTEX CloseHandle(pi.hProcess); #endif -#ifdef HAVE_GDIMAGETRUECOLORTOPALETTE -#ifdef HAVE_GDIMAGECREATETRUECOLOR - if (!flags & RENDER_TRUECOLOR) -#endif - gdImageTrueColorToPalette(psimage,0,256); -#endif if (psimage == NULL) { DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE ")); - if (!showpage) { - showpage=true; - DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") ")); - psimage=ps2png(psfile, hresolution, vresolution, urx, ury, llx, lly); - showpage=false; + if (!(*showpage)) { + showpage="showpage"; + DEBUG_PRINT(DEBUG_GS,("(will try adding \"%s\") ",showpage)); + psimage=ps2png(psfile, device, hresolution, vresolution, llx, lly, urx, ury); + showpage=""; } #ifdef DEBUG } else { @@ -228,6 +167,60 @@ ps2png(const char *psfile, int hresolution, int vresolution, return psimage; } + +gdImagePtr readcache(char* psname) +{ + char *cachename = NULL, *cachefile, *separator; + gdImagePtr cacheimage=NULL; + + cachename = alloca(sizeof(char)*(strlen(psname+5))); + if (cachename==NULL) + Fatal("cannot allocate space for cached image filename"); + strcpy(cachename,psname); + separator = strrchr(cachename,'.'); + if (separator!=NULL) + *separator='\0'; + strcat(cachename,".png"); + + cachefile = kpse_find_file(cachename,kpse_pict_format,0); + if (cachefile!=NULL) { + FILE* cachefilep = fopen(cachefile,"rb"); + + if (cachefilep!=NULL) { + DEBUG_PRINT(DEBUG_DVI,("\n READING CACHED IMAGE \t%s", cachefile)); + cacheimage = gdImageCreateFromPng(cachefilep); + fclose(cachefilep); + } + free(cachefile); + } + return(cacheimage); +} + +void storecache(char* psname, gdImagePtr psimage) +{ + char *cachename = NULL, *separator; + + cachename = alloca(sizeof(char)*(strlen(psname+5))); + if (cachename==NULL) + Fatal("cannot allocate space for cached image filename"); + strcpy(cachename,psname); + separator = strrchr(cachename,'.'); + if (separator!=NULL) + *separator='\0'; + strcat(cachename,".png"); + + if (psimage != NULL) { + FILE* cachefilep = fopen(cachename,"wb"); + if (cachefilep!=NULL) { + gdImagePng(psimage,cachefilep); + fclose(cachefilep); + } else + Warning("Unable to cache %s as PNG", psname ); + } +} + + + /*-->SetSpecial*/ /*********************************************************************/ /**************************** SetSpecial ***************************/ @@ -235,7 +228,6 @@ ps2png(const char *psfile, int hresolution, int vresolution, void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) /* interpret a \special command, made up of keyword=value pairs */ -/* Color specials only for now. Warn otherwise. */ { char *buffer; @@ -268,11 +260,13 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) return; } - /******************* Postscript inclusion ********************/ + /******************* Image inclusion ********************/ if (strncmp(buffer,"PSfile=",7)==0) { /* PSfile */ char* psname = buffer+7,*psfile; int llx=0,lly=0,urx=0,ury=0,rwi=0,rhi=0; + bool clip=false; int hresolution,vresolution; + int pngheight,pngwidth; /* Remove quotation marks around filename */ if (*psname=='"') { @@ -296,113 +290,218 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) else if (strncmp(buffer,"ury=",4)==0) ury = strtol(buffer+4,&buffer,10); else if (strncmp(buffer,"rwi=",4)==0) rwi = strtol(buffer+4,&buffer,10); else if (strncmp(buffer,"rhi=",4)==0) rhi = strtol(buffer+4,&buffer,10); - else while (*buffer && *buffer!=' ') buffer++; + else if (strncmp(buffer,"clip",4)==0) {clip = true; buffer=buffer+4;} + while (*buffer && *buffer!=' ') buffer++; SKIPSPACES(buffer); } /* Calculate resolution, and use our base resolution as a fallback. */ /* The factor 10 is magic, the dvips graphicx driver needs this. */ - hresolution = dpi*rwi/(urx - llx)/10; - vresolution = dpi*rhi/(ury - lly)/10; + hresolution = ((dpi*rwi+urx-llx-1)/(urx - llx)+9)/10; + vresolution = ((dpi*rhi+ury-lly-1)/(ury - lly)+9)/10; if (vresolution==0) vresolution = hresolution; if (hresolution==0) hresolution = vresolution; if (hresolution==0) hresolution = vresolution = dpi; - + + /* Convert from postscript 72 dpi resolution to our given resolution */ + pngwidth = (dpi*rwi+719)/720; /* +719: round up */ + pngheight = (dpi*rhi+719)/720; + if (pngwidth==0) + pngwidth = ((dpi*rhi*(urx-llx)+ury-lly-1)/(ury-lly)+719)/720; + if (pngheight==0) + pngheight = ((dpi*rwi*(ury-lly)+urx-llx-1)/(urx-llx)+719)/720; + if (pngheight==0) { + pngwidth = (dpi*(urx-llx)+71)/72; + pngheight = (dpi*(ury-lly)+71)/72; + } if (page_imagep != NULL) { /* Draw into image */ - char* psfile; + char *psfile; gdImagePtr psimage=NULL; - - /*---------- Cache ----------*/ - char* cachename = NULL; - gdImagePtr cacheimage=NULL; + FILE* psstream; TEMPSTR(psfile,kpse_find_file(psname,kpse_pict_format,0)); - if (flags & CACHE_IMAGES) { /* Find cached image, if it exists */ - char *cachefile,*separator; - - cachename = alloca(sizeof(char)*(strlen(psname+5))); - if (cachename==NULL) - Fatal("cannot allocate space for cached image filename"); - strcpy(cachename,psname); - separator = strrchr(cachename,'.'); - if (separator!=NULL) - *separator='\0'; - strcat(cachename,".png"); - cachefile = kpse_find_file(cachename,kpse_pict_format,0); - if (cachefile!=NULL) { - FILE* cachefilep = fopen(cachefile,"rb"); - - if (cachefilep!=NULL) { - cacheimage = gdImageCreateFromPng(cachefilep); - fclose(cachefilep); - } - free(cachefile); - } - psimage = cacheimage; - } - /*---------- End Cache ----------*/ - Message(BE_NONQUIET,"<%s",psname); - if (psimage==NULL) { - /* No cached image, convert postscript */ - if (psfile == NULL) { - Warning("PS file %s not found, image will be left blank", psname ); + if (psfile == NULL) { + Warning("Image file %s not found, image will be left blank", psname ); + flags |= PAGE_GAVE_WARN; + return; + } + /* Test access permission even for EPS files */ + psstream=fopen(psfile,"rb"); + if (psstream == NULL) { + Warning("Cannot access image file %s, image will be left blank", + psname ); + flags |= PAGE_GAVE_WARN; + return; + } + Message(BE_NONQUIET," <%s",psname); + switch (getc(psstream)) { + case 0x89: /* PNG magic: "\211PNG\r\n\032\n" */ + 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)); +#ifdef HAVE_GDIMAGEGIF + fseek(psstream,0,SEEK_SET); + psimage=gdImageCreateFromGif(psstream); +#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)); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + fseek(psstream,0,SEEK_SET); + psimage=gdImageCreateFromJpeg(psstream); +#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; - } else if (flags & NO_GHOSTSCRIPT) { - Warning("GhostScript calls disallowed by --noghostscript", - psfile ); - flags |= PAGE_GAVE_WARN; } else { - psimage = ps2png(psfile, hresolution, vresolution, - urx, ury, llx, lly); - if ( psimage == NULL ) { - Warning("Unable to convert %s to PNG, image will be left blank", - psfile ); + gdImagePtr cacheimage=NULL; + if (flags & CACHE_IMAGES) + cacheimage=psimage=readcache(psname); + /* Use alpha blending, and render transparent postscript + images. The alpha blending works correctly only from + libgd 2.0.12 upwards */ +#ifdef HAVE_GDIMAGECREATETRUECOLOR + if (!page_imagep->trueColor) + Warning("Palette output, opaque image inclusion"); +#ifdef HAVE_GDIMAGEPNGEX + else if (psimage==NULL) { + DEBUG_PRINT(DEBUG_DVI,("\n RENDER PNGALPHA POSTSCRIPT \t%s", + psfile)); + if (clip) { + DEBUG_PRINT(DEBUG_DVI,(", CLIPPED TO BBOX")); + psimage = ps2png(psfile, "-sDEVICE=pngalpha", + hresolution, vresolution, + llx, lly, urx, ury); + } else { + /* Render across the whole image */ + DEBUG_PRINT(DEBUG_DVI, + ("\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", + 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); + if (psimage!=NULL) { + hh=0; + vv=gdImageSY(page_imagep)-1; + pngwidth=gdImageSX(psimage); + pngheight=gdImageSY(psimage); + } + } + if (psimage==NULL) + Warning("No GhostScript pngalpha output, opaque image inclusion"); + } +#endif +#endif + if (psimage==NULL) { + /* png256 gives inferior result */ + DEBUG_PRINT(DEBUG_DVI,("\n RENDER POSTSCRIPT \t%s", psfile)); + psimage = ps2png(psfile, "-sDEVICE=png16m", + hresolution, vresolution, + llx, lly, urx, ury); flags |= PAGE_GAVE_WARN; } + if (flags & CACHE_IMAGES && cacheimage==NULL) + storecache(psname,psimage); } } - /*---------- Store Cache ----------*/ - if (flags & CACHE_IMAGES && cachename !=NULL && - cacheimage==NULL && psimage != NULL) { - /* Cache image not found, save converted postscript */ - FILE* cachefilep = fopen(cachename,"wb"); - if (cachefilep!=NULL) { - gdImagePng(psimage,cachefilep); - fclose(cachefilep); - } else - Warning("Unable to cache %s as PNG", psfile ); - } - /*---------- End Store Cache ----------*/ if (psimage!=NULL) { + /* Rescale, but ignore (one-pixel) rounding errors */ + if (gdImageSX(psimage)!=pngwidth + && gdImageSX(psimage)!=pngwidth+1 + && gdImageSY(psimage)!=pngheight + && gdImageSY(psimage)!=pngheight+1) { + gdImagePtr scaledimage; + + DEBUG_PRINT(DEBUG_DVI, + ("\n RESCALE INCLUDED BITMAP \t%s (%d,%d) -> (%d,%d)", + psfile, + gdImageSX(psimage),gdImageSY(psimage), + pngwidth,pngheight)); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + scaledimage=gdImageCreateTrueColor(pngwidth,pngheight); + gdImageCopyResampled(scaledimage,psimage,0,0,0,0, + pngwidth,pngheight, + gdImageSX(psimage),gdImageSY(psimage)); +#else + scaledimage=gdImageCreate(pngwidth,pngheight); + gdImageCopyResized(scaledimage,psimage,0,0,0,0, + pngwidth,pngheight, + gdImageSX(psimage),gdImageSY(psimage)); +#endif + gdImageDestroy(psimage); + psimage=scaledimage; + } DEBUG_PRINT(DEBUG_DVI, - ("\n PS-PNG INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", - psfile, - gdImageSX(psimage),gdImageSY(psimage), - hresolution,vresolution, - hh, vv)); + ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", + psname,gdImageSX(psimage),gdImageSY(psimage), + hresolution,vresolution,hh,vv)); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + if (psimage->trueColor && !page_imagep->trueColor) + gdImageTrueColorToPalette(psimage,0,256); +#endif +#ifdef HAVE_GDIMAGEPNGEX + gdImageAlphaBlending(page_imagep,1); +#else + Warning("Using libgd < 2.0.12, opaque image inclusion"); + flags |= PAGE_GAVE_WARN; +#endif gdImageCopy(page_imagep, psimage, - hh, vv-gdImageSY(psimage), + hh, vv-gdImageSY(psimage)+1, 0,0, gdImageSX(psimage),gdImageSY(psimage)); +#ifdef HAVE_GDIMAGEPNGEX + gdImageAlphaBlending(page_imagep,0); +#endif gdImageDestroy(psimage); - } + } else { + Warning("Unable to load %s, image will be left blank",psfile ); + flags |= PAGE_GAVE_WARN; + } Message(BE_NONQUIET,">"); } else { /* Don't draw */ - int pngheight,pngwidth; - - /* Convert from postscript 72 dpi resolution to our given resolution */ - pngheight = (vresolution*(ury - lly)+71)/72; /* +71: do 'ceil' */ - pngwidth = (hresolution*(urx - llx)+71)/72; - DEBUG_PRINT(DEBUG_DVI,("\n PS-PNG INCLUDE \t(%d,%d)", - pngwidth,pngheight)); + flags |= PAGE_TRUECOLOR; + DEBUG_PRINT(DEBUG_DVI, + ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", + psname,pngheight,pngwidth, + hresolution,vresolution,hh,vv)); min(x_min,hh); - min(y_min,vv-pngheight); + min(y_min,vv-pngheight+1); max(x_max,hh+pngwidth); - max(y_max,vv); + max(y_max,vv+1); } return; } + if (strncmp(buffer,"!/preview@version(",18)==0) { + buffer+=18; + length-=18; + while (length>0 && buffer[length]!=')') + length--; + if (page_imagep==NULL) + Message(BE_NONQUIET," (preview-latex version %.*s)",length,buffer); + return; + } + /* preview-latex' tightpage option */ if (strncmp(buffer,"!/preview@tightpage",19)==0) { buffer+=19; @@ -426,7 +525,7 @@ void SetSpecial(char * special, int32_t length, int32_t hh, int32_t vv) if (strncmp(buffer,"!userdict",9)==0 && strstr(buffer+10,"preview-bop-")!=NULL) { if (page_imagep==NULL) - Message(BE_NONQUIET," (preview-latex beginning-of-page-hook detected)"); + Message(BE_VERBOSE," (preview-latex beginning-of-page-hook detected)"); return; } diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl index 0c7a1bad3d6..d8442cbbab6 100755 --- a/Build/tools/ctan2tl +++ b/Build/tools/ctan2tl @@ -14,6 +14,8 @@ # --place, it doesn't even create any files in the repository outside of # cdbuild/{raw,cooked}. +unset CDPATH # avoid extraneous output + mydir=`cd \`dirname $0\` && pwd` # Build/tools raw=$mydir/../cdbuild/raw test -d $raw || mkdir $raw @@ -47,20 +49,35 @@ fi echo "$0: ctan dir for $1 is $ctan_dir1" if $copy_from_ctan; then -# annoyingly, tugboat plain and tugboat latex are stored in two -# different places on ctan. we'll assume we're invoked with the latex -# dir, and now arrange to also copy in the plain stuff to a `plain' -# subdirectory, which ctan2tds.pl has a further special case to handle. -# -if test "$pkg" = tugboat; then - ctan_dir2=`echo $ctan_dir1 | sed s/latex/plain/` - destdir2=$pkg/plain -fi # remove whatever old stuff we might have. rm -rf $pkg -if test "$pkg" = genmisc; then +# An important special case: the latex-tds project contains tds-ready +# zip files for the base latex distribution. We want to use them. +latex_tds_pkglist="amslatex|babel|cyrillic|graphics|psnfss|latex-tds|tools" + +if echo "$pkg" | egrep "^($latex_tds_pkglist)\$"; then + mkdir $pkg + ctan_root=`tlpkginfo --ctan-root` + # + # another complication: the latex-tds package for our purposes is the + # sources for the tools that do the process; that's in the zip file + # source.zip, in the latex-tds directory. Argh. + # + if test $pkg = latex-tds; then + zipname=source.zip + else + zipname=$pkg.zip + fi + (cd $pkg && unzip -qq $ctan_root/macros/latex/contrib/latex-tds/$zipname) + +elif test "$pkg" = rsc; then + # single bst file. + mkdir -p $pkg + cp -p $ctan_dir1 $pkg + +elif test "$pkg" = genmisc; then # do not copy subdirs, symlinks, or any files but .sty and .tex # (that is, no patch.doc or pmat.zip). mkdir -p $pkg @@ -69,19 +86,22 @@ if test "$pkg" = genmisc; then '(' -name '*.sty' -o -name *.tex ')' -print` \ $pkg -elif test "$pkg" = rsc; then - # single bst file. - mkdir -p $pkg - cp -p $ctan_dir1 $pkg - else # normal case (/. to deref symlinks, e.g., arabtex) cp -pr $ctan_dir1/. $pkg - - # second ctan directory (e.g., tugboat). - if test -n "$ctan_dir2"; then - cp -r $ctan_dir2 $destdir2 - fi +fi + +# Another special case: annoyingly, tugboat plain and tugboat latex are +# stored in two different places on ctan. we'll assume we're invoked +# with the latex dir, and now arrange to also copy in the plain stuff to +# a `plain' subdirectory, which ctan2tds.pl has a further special case +# to handle. Maybe we'll come across other cases like this, in which +# case we can generalize this. +# +if test "$pkg" = tugboat; then + ctan_dir2=`echo $ctan_dir1 | sed s/latex/plain/` + destdir2=$pkg/plain + cp -r $ctan_dir2 $destdir2 fi fi # end of copying from CTAN. diff --git a/Build/tools/tlpkginfo b/Build/tools/tlpkginfo index c8b0a82409f..db7e72c69e7 100755 --- a/Build/tools/tlpkginfo +++ b/Build/tools/tlpkginfo @@ -16,8 +16,13 @@ sub main if ($ARGV[0] eq "--ctan-dir") { return &find_ctan_dir ($ARGV[1]); + + } elsif ($ARGV[0] eq "--ctan-root") { + print "$CTAN\n"; + return 0; + } else { - die "Usage: $0 --ctan-dir PKGNAME (not @ARGV)\n"; + die "Usage: $0 --ctan-dir PKGNAME or --ctan-root (not @ARGV)\n"; } } |