diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 09:50:07 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 09:50:07 +0000 |
commit | 82150b6fc41b8a3446f2c6020ddf5625956dd708 (patch) | |
tree | 9234f85d00b9fd322b0986b62f09e355449190e6 /Build/source | |
parent | 6b3b122ab7e6994e0b4c8d1299eb2c3462388542 (diff) |
new build system
git-svn-id: svn://tug.org/texlive/trunk@12456 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
179 files changed, 44891 insertions, 5987 deletions
diff --git a/Build/source/texk/dvipdfmx/Makefile.am b/Build/source/texk/dvipdfmx/Makefile.am new file mode 100644 index 00000000000..ec345fbf3a2 --- /dev/null +++ b/Build/source/texk/dvipdfmx/Makefile.am @@ -0,0 +1,11 @@ +## +ACLOCAL_AMFLAGS = -I ../../m4 -I m4 + +SUBDIRS = data src + +EXTRA_DIST = ChangeLog.TL m4/cho-kpse.m4 + +## Eventually delete these files +## +EXTRA_DIST += Makefile.am.orig configure.in.orig + diff --git a/Build/source/texk/lcdf-typetools/Makefile.am b/Build/source/texk/lcdf-typetools/Makefile.am index 69e545394aa..2bd02f2f2f6 100644 --- a/Build/source/texk/lcdf-typetools/Makefile.am +++ b/Build/source/texk/lcdf-typetools/Makefile.am @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign check-news +ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = liblcdf libefont @SELECTED_SUBDIRS@ -DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42 +DISTCHECK_CONFIGURE_FLAGS = --without-kpathsea + +SUBDIRS = $(SELECTED_SUBDIRS) +DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 pkgdata_DATA = glyphlist.txt texglyphlist.txt 7t.enc @@ -62,7 +64,7 @@ EXTRA_DIST = \ liblcdf libefont: cd $@ && $(MAKE) libefont: liblcdf -cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42: liblcdf libefont +cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont cd $@ && $(MAKE) srclinks: @@ -74,4 +76,14 @@ versionize: perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec -.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42 +.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 + +## Required for integration into TeX Live build system +## +EXTRA_DIST += ac/withenable.ac + +## Eventually delete these files +## + +EXTRA_DIST += Makefile.am.orig configure.ac.orig + diff --git a/Build/source/texk/lcdf-typetools/Makefile.am.orig b/Build/source/texk/lcdf-typetools/Makefile.am.orig new file mode 100644 index 00000000000..8f584119f76 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/Makefile.am.orig @@ -0,0 +1,77 @@ +## Process this file with automake to produce Makefile.in +AUTOMAKE_OPTIONS = foreign check-news + +SUBDIRS = liblcdf libefont @SELECTED_SUBDIRS@ +DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 + +pkgdata_DATA = glyphlist.txt texglyphlist.txt 7t.enc + +EXTRA_DIST = \ + ONEWS \ + lcdf-typetools.spec \ + include/lcdf/bezier.hh \ + include/lcdf/clp.h \ + include/lcdf/error.hh \ + include/lcdf/filename.hh \ + include/lcdf/globmatch.hh \ + include/lcdf/hashmap.hh include/lcdf/hashmap.cc \ + include/lcdf/inttypes.h \ + include/lcdf/landmark.hh \ + include/lcdf/md5.h \ + include/lcdf/permstr.hh \ + include/lcdf/point.hh \ + include/lcdf/slurper.hh \ + include/lcdf/straccum.hh \ + include/lcdf/string.hh \ + include/lcdf/strtonum.h \ + include/lcdf/transform.hh \ + include/lcdf/vector.hh include/lcdf/vector.cc \ + include/efont/afm.hh \ + include/efont/afmparse.hh \ + include/efont/afmw.hh \ + include/efont/amfm.hh \ + include/efont/cff.hh \ + include/efont/encoding.hh \ + include/efont/findmet.hh \ + include/efont/metrics.hh \ + include/efont/otf.hh \ + include/efont/otfcmap.hh \ + include/efont/otfdata.hh \ + include/efont/otfgpos.hh \ + include/efont/otfgsub.hh \ + include/efont/otfname.hh \ + include/efont/otfos2.hh \ + include/efont/otfpost.hh \ + include/efont/pairop.hh \ + include/efont/psres.hh \ + include/efont/t1bounds.hh \ + include/efont/t1cs.hh \ + include/efont/t1csgen.hh \ + include/efont/t1font.hh \ + include/efont/t1interp.hh \ + include/efont/t1item.hh \ + include/efont/t1mm.hh \ + include/efont/t1rw.hh \ + include/efont/t1unparser.hh \ + include/efont/ttfcs.hh \ + include/efont/ttfhead.hh \ + glyphlist.txt \ + texglyphlist.txt \ + 7t.enc + +liblcdf libefont: + cd $@ && $(MAKE) +libefont: liblcdf +cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont + cd $@ && $(MAKE) + +srclinks: + cd liblcdf && $(MAKE) srclinks + cd libefont && $(MAKE) srclinks + +versionize: + perl -pi -e 's/^\.ds V.*/.ds V $(VERSION)/;' $(top_srcdir)/cfftot1/cfftot1.1 $(top_srcdir)/mmafm/mmafm.1 $(top_srcdir)/mmpfb/mmpfb.1 $(top_srcdir)/otfinfo/otfinfo.1 $(top_srcdir)/otftotfm/otftotfm.1 $(top_srcdir)/t1dotlessj/t1dotlessj.1 $(top_srcdir)/t1lint/t1lint.1 $(top_srcdir)/t1reencode/t1reencode.1 $(top_srcdir)/t1testpage/t1testpage.1 $(top_srcdir)/ttftotype42/ttftotype42.1 + perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README + perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec + +.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 diff --git a/Build/source/texk/lcdf-typetools/Makefile.in b/Build/source/texk/lcdf-typetools/Makefile.in index f4cda5913a8..6918ddcc9ca 100644 --- a/Build/source/texk/lcdf-typetools/Makefile.in +++ b/Build/source/texk/lcdf-typetools/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,13 +30,22 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS depcomp \ - install-sh missing + $(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -73,12 +82,13 @@ am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -95,29 +105,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -126,6 +147,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -138,20 +160,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -160,6 +191,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -175,63 +207,37 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign check-news -SUBDIRS = liblcdf libefont @SELECTED_SUBDIRS@ -DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42 +ACLOCAL_AMFLAGS = -I m4 +DISTCHECK_CONFIGURE_FLAGS = --without-kpathsea +SUBDIRS = $(SELECTED_SUBDIRS) +DIST_SUBDIRS = liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 pkgdata_DATA = glyphlist.txt texglyphlist.txt 7t.enc -EXTRA_DIST = \ - ONEWS \ - lcdf-typetools.spec \ - include/lcdf/bezier.hh \ - include/lcdf/clp.h \ - include/lcdf/error.hh \ - include/lcdf/filename.hh \ - include/lcdf/globmatch.hh \ +EXTRA_DIST = ONEWS lcdf-typetools.spec include/lcdf/bezier.hh \ + include/lcdf/clp.h include/lcdf/error.hh \ + include/lcdf/filename.hh include/lcdf/globmatch.hh \ include/lcdf/hashmap.hh include/lcdf/hashmap.cc \ - include/lcdf/inttypes.h \ - include/lcdf/landmark.hh \ - include/lcdf/md5.h \ - include/lcdf/permstr.hh \ - include/lcdf/point.hh \ - include/lcdf/slurper.hh \ - include/lcdf/straccum.hh \ - include/lcdf/string.hh \ - include/lcdf/strtonum.h \ - include/lcdf/transform.hh \ + include/lcdf/inttypes.h include/lcdf/landmark.hh \ + include/lcdf/md5.h include/lcdf/permstr.hh \ + include/lcdf/point.hh include/lcdf/slurper.hh \ + include/lcdf/straccum.hh include/lcdf/string.hh \ + include/lcdf/strtonum.h include/lcdf/transform.hh \ include/lcdf/vector.hh include/lcdf/vector.cc \ - include/efont/afm.hh \ - include/efont/afmparse.hh \ - include/efont/afmw.hh \ - include/efont/amfm.hh \ - include/efont/cff.hh \ - include/efont/encoding.hh \ - include/efont/findmet.hh \ - include/efont/metrics.hh \ - include/efont/otf.hh \ - include/efont/otfcmap.hh \ - include/efont/otfdata.hh \ - include/efont/otfgpos.hh \ - include/efont/otfgsub.hh \ - include/efont/otfname.hh \ - include/efont/otfos2.hh \ - include/efont/otfpost.hh \ - include/efont/pairop.hh \ - include/efont/psres.hh \ - include/efont/t1bounds.hh \ - include/efont/t1cs.hh \ - include/efont/t1csgen.hh \ - include/efont/t1font.hh \ - include/efont/t1interp.hh \ - include/efont/t1item.hh \ - include/efont/t1mm.hh \ - include/efont/t1rw.hh \ - include/efont/t1unparser.hh \ - include/efont/ttfcs.hh \ - include/efont/ttfhead.hh \ - glyphlist.txt \ - texglyphlist.txt \ - 7t.enc - + include/efont/afm.hh include/efont/afmparse.hh \ + include/efont/afmw.hh include/efont/amfm.hh \ + include/efont/cff.hh include/efont/encoding.hh \ + include/efont/findmet.hh include/efont/metrics.hh \ + include/efont/otf.hh include/efont/otfcmap.hh \ + include/efont/otfdata.hh include/efont/otfgpos.hh \ + include/efont/otfgsub.hh include/efont/otfname.hh \ + include/efont/otfos2.hh include/efont/otfpost.hh \ + include/efont/pairop.hh include/efont/psres.hh \ + include/efont/t1bounds.hh include/efont/t1cs.hh \ + include/efont/t1csgen.hh include/efont/t1font.hh \ + include/efont/t1interp.hh include/efont/t1item.hh \ + include/efont/t1mm.hh include/efont/t1rw.hh \ + include/efont/t1unparser.hh include/efont/ttfcs.hh \ + include/efont/ttfhead.hh glyphlist.txt texglyphlist.txt 7t.enc \ + ac/withenable.ac Makefile.am.orig configure.ac.orig all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -286,6 +292,15 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @@ -379,7 +394,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -493,7 +508,6 @@ distdir: $(DISTFILES) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) - dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) @@ -517,6 +531,7 @@ dist-zip: distdir dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -622,12 +637,13 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags dvi: dvi-recursive @@ -665,7 +681,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive @@ -682,25 +698,26 @@ uninstall-am: uninstall-pkgdataDATA .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkgdataDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgdataDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-pkgdataDATA liblcdf libefont: cd $@ && $(MAKE) libefont: liblcdf -cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42: liblcdf libefont +cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42: liblcdf libefont cd $@ && $(MAKE) srclinks: @@ -712,7 +729,7 @@ versionize: perl -pi -e 's/^(\U$(PACKAGE)\E) [\d.ab]+$$/$$1 $(VERSION)/;' $(top_srcdir)/README perl -pi -e 's/^Version: [\d.ab]+$$/Version: $(VERSION)/;' $(top_srcdir)/lcdf-typetools.spec -.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42 +.PHONY: srclinks rpm liblcdf libefont cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/lcdf-typetools/NEWS b/Build/source/texk/lcdf-typetools/NEWS index b0b225d6d1c..dc44ed85093 100644 --- a/Build/source/texk/lcdf-typetools/NEWS +++ b/Build/source/texk/lcdf-typetools/NEWS @@ -1,5 +1,55 @@ LCDF Typetools NEWS +Version 2.76-rc1 2.Mar.2009 + +* Adapt to new TeX Live build scheme. + + +Version 2.75 22.Feb.2009 + +* Report a helpful warning if automatic mode is specified to a version + without kpathsea support. Question from Keith Briggs. + + +Version 2.74 16.Feb.2009 + +* Correctly detect <unistd.h>. Problem reported by C.M. Connelly. + + +Version 2.73 15.Feb.2009 + +* cfftot1 bug fix: Avoid introducing stray "rmoveto" commands and attendant + visual artifacts into the output. The problem was caused by some + coordinate system confusion. Reported by John Owens, who had tried to + convert Inconsolata. + + +Version 2.72 27.Oct.2008 + +* t1rawafm: Add missing newlines; thanks, Michael Zedler. + +* otftotfm: Understand "UniXXXX" glyph names. They're not standard, but + it's pretty obvious what they imply. Reported by Vasile Gaburici. + + +Version 2.71 8.Aug.2008 + +* otftotfm: Correctly install TrueType files when --force. Reported by + Vasile Gaburici. + + +Version 2.70 8.Aug.2008 + +* Add new t1rawafm program, which generates a "raw" (kernless and + ligatureless) AFM file given a font file (PFB/PFA). + +* otftotfm: When installing, --automatic ignores files existing in the + current directory. Confusion reported by Vasile Gaburici. + +* Type 1 parsing: Parse fonts with rare encoding formats, such as bases + other than 10. + + Version 2.69 5.May.2008 * Mini portability fix for problem reported by Vladimir Volovich. diff --git a/Build/source/texk/lcdf-typetools/README b/Build/source/texk/lcdf-typetools/README index 5c5835637b7..a6b0cddf58c 100644 --- a/Build/source/texk/lcdf-typetools/README +++ b/Build/source/texk/lcdf-typetools/README @@ -1,4 +1,4 @@ -LCDF-TYPETOOLS 2.69 +LCDF-TYPETOOLS 2.75 =================== USAGE diff --git a/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac b/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac new file mode 100644 index 00000000000..8074ab0b1df --- /dev/null +++ b/Build/source/texk/lcdf-typetools/ac/lcdf-typetools.ac @@ -0,0 +1,15 @@ +## texk/lcdf-typetools/ac/lcdf-typetools.ac +## configure options for lcdf-typetools.ac +m4_define([kpse_lcdf_typetools_progs], +[cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1rawafm t1reencode t1testpage ttftotype42])[]dnl +AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, + [AC_ARG_ENABLE(Kpse_Prog, + AS_HELP_STRING([--disable-]Kpse_Prog, + [do not build the ]Kpse_Prog[ program], + [28]))]) +m4_define([kpse_otftotfm_auto_opts], [cfftot1 t1dotlessj updmap])[]dnl +AC_FOREACH([Kpse_Opt], kpse_otftotfm_auto_opts, + [AC_ARG_ENABLE(Kpse_Opt, + AS_HELP_STRING([--disable-auto-]Kpse_Opt, + [disable running ]Kpse_Opt[ from otftotfm], + [28]))]) diff --git a/Build/source/texk/lcdf-typetools/ac/withenable.ac b/Build/source/texk/lcdf-typetools/ac/withenable.ac new file mode 100644 index 00000000000..ea825fd10e1 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/ac/withenable.ac @@ -0,0 +1,4 @@ +## texk/lcdf-typetools/ac/withenable.ac +## configure options and TL libraries required for lcdf-typetools +KPSE_WITH_PROG([lcdf-typetools], [kpathsea]) +m4_include(kpse_TL[texk/lcdf-typetools/ac/lcdf-typetools.ac]) diff --git a/Build/source/texk/lcdf-typetools/aclocal.m4 b/Build/source/texk/lcdf-typetools/aclocal.m4 index 5d8d76b6bd4..53556ff03a9 100644 --- a/Build/source/texk/lcdf-typetools/aclocal.m4 +++ b/Build/source/texk/lcdf-typetools/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -13,13 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.62],, -[m4_warning([this file was generated for autoconf 2.62. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.1], [], +m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -48,12 +48,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl +[AM_AUTOMAKE_VERSION([1.10.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -303,19 +303,28 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 4 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do +[# Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -688,13 +697,13 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -711,7 +720,7 @@ AC_DEFUN([_AM_SET_OPTION], # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -907,3 +916,11 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ac_cxx_template_objs.m4]) +m4_include([m4/kpse-common.m4]) +m4_include([m4/kpse-kpathsea-flags.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/Build/source/texk/lcdf-typetools/build-aux/config.guess b/Build/source/texk/lcdf-typetools/build-aux/config.guess new file mode 100755 index 00000000000..ca2a03ca4f1 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/build-aux/config.guess @@ -0,0 +1,1526 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner <per@bothner.com>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include <sys/param.h> +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <config-patches@gnu.org> in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +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` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/Build/source/texk/lcdf-typetools/build-aux/config.sub b/Build/source/texk/lcdf-typetools/build-aux/config.sub new file mode 100755 index 00000000000..6759825a5b7 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/build-aux/config.sub @@ -0,0 +1,1658 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-16' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/Build/source/texk/lcdf-typetools/depcomp b/Build/source/texk/lcdf-typetools/build-aux/depcomp index ca5ea4e1ef9..e5f9736c723 100755 --- a/Build/source/texk/lcdf-typetools/depcomp +++ b/Build/source/texk/lcdf-typetools/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -215,34 +215,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile diff --git a/Build/source/texk/lcdf-typetools/install-sh b/Build/source/texk/lcdf-typetools/build-aux/install-sh index a5897de6ea7..a5897de6ea7 100755 --- a/Build/source/texk/lcdf-typetools/install-sh +++ b/Build/source/texk/lcdf-typetools/build-aux/install-sh diff --git a/Build/source/texk/lcdf-typetools/build-aux/ltmain.sh b/Build/source/texk/lcdf-typetools/build-aux/ltmain.sh new file mode 100755 index 00000000000..b36c4ad366c --- /dev/null +++ b/Build/source/texk/lcdf-typetools/build-aux/ltmain.sh @@ -0,0 +1,8406 @@ +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to <bug-libtool@gnu.org>. + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=2.2.6 +TIMESTAMP="" +package_revision=1.3012 + +# 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+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/usr/bin/grep -E"} +: ${FGREP="/usr/bin/grep -F"} +: ${GREP="/usr/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/opt/local/bin/gsed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<EOF +$* +EOF + exit $EXIT_SUCCESS +fi + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +# $mode is unset +nonopt= +execute_dlfiles= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +opt_dry_run=false +opt_duplicate_deps=false +opt_silent=false +opt_debug=: + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + $ECHO "host: $host" + if test "$build_libtool_libs" = yes; then + $ECHO "enable shared libraries" + else + $ECHO "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $ECHO "enable static libraries" + else + $ECHO "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <<EOF +# $write_libobj - a libtool object file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object=$write_lobj + +# Name of the non-PIC object +non_pic_object=$write_oldobj + +EOF + $MV "${write_libobj}T" "${write_libobj}" + } +} + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + pie_flag="$pie_flag $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_quote_for_eval "$arg" + lastarg="$lastarg $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_quote_for_eval "$lastarg" + base_compile="$base_compile $func_quote_for_eval_result" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 </dev/null >/dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# 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+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat <<EOF + +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname + Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION + + The $output program cannot be directly executed until all the libtool + libraries that it depends on are installed. + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. + + Currently, it simply execs the wrapper *script* "$SHELL $output", + but could eventually absorb all of the scripts functionality and + exec $objdir/$outputname directly. +*/ +EOF + cat <<"EOF" +#include <stdio.h> +#include <stdlib.h> +#ifdef _MSC_VER +# include <direct.h> +# include <process.h> +# include <io.h> +# define setmode _setmode +#else +# include <unistd.h> +# include <stdint.h> +# ifdef __CYGWIN__ +# include <io.h> +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include <malloc.h> +#include <stdarg.h> +#include <assert.h> +#include <string.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <sys/stat.h> + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <<EOF + +static const char *script_text_part2 = +EOF + func_emit_wrapper_part2 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + + cat <<EOF +const char * MAGIC_EXE = "$magic_exe"; +const char * LIB_PATH_VARNAME = "$shlibpath_var"; +EOF + + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + func_to_host_pathlist "$temp_rpath" + cat <<EOF +const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result"; +EOF + else + cat <<"EOF" +const char * LIB_PATH_VALUE = ""; +EOF + fi + + if test -n "$dllsearchpath"; then + func_to_host_pathlist "$dllsearchpath:" + cat <<EOF +const char * EXE_PATH_VARNAME = "PATH"; +const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result"; +EOF + else + cat <<"EOF" +const char * EXE_PATH_VARNAME = ""; +const char * EXE_PATH_VALUE = ""; +EOF + fi + + if test "$fast_install" = yes; then + cat <<EOF +const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ +EOF + else + cat <<EOF +const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ +EOF + fi + + + cat <<"EOF" + +#define LTWRAPPER_OPTION_PREFIX "--lt-" +#define LTWRAPPER_OPTION_PREFIX_LENGTH 5 + +static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH; +static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; + +static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; + +static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7; +static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set"; + /* argument is putenv-style "foo=bar", value of foo is set to bar */ + +static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11; +static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend"; + /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */ + +static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10; +static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append"; + /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */ + +int +main (int argc, char *argv[]) +{ + char **newargz; + int newargc; + char *tmp_pathspec; + char *actual_cwrapper_path; + char *actual_cwrapper_name; + char *target_name; + char *lt_argv_zero; + intptr_t rval = 127; + + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0])); + LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name)); + + /* very simple arg parsing; don't want to rely on getopt */ + for (i = 1; i < argc; i++) + { + if (strcmp (argv[i], dumpscript_opt) == 0) + { +EOF + case "$host" in + *mingw* | *cygwin* ) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; + esac + + cat <<"EOF" + printf ("%s", script_text_part1); + printf ("%s", script_text_part2); + return 0; + } + } + + newargz = XMALLOC (char *, argc + 1); + tmp_pathspec = find_executable (argv[0]); + if (tmp_pathspec == NULL) + lt_fatal ("Couldn't find %s", argv[0]); + LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n", + tmp_pathspec)); + + actual_cwrapper_path = chase_symlinks (tmp_pathspec); + LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n", + actual_cwrapper_path)); + XFREE (tmp_pathspec); + + actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path)); + strendzap (actual_cwrapper_path, actual_cwrapper_name); + + /* wrapper name transforms */ + strendzap (actual_cwrapper_name, ".exe"); + tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); + XFREE (actual_cwrapper_name); + actual_cwrapper_name = tmp_pathspec; + tmp_pathspec = 0; + + /* target_name transforms -- use actual target program name; might have lt- prefix */ + target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); + strendzap (target_name, ".exe"); + tmp_pathspec = lt_extend_str (target_name, ".exe", 1); + XFREE (target_name); + target_name = tmp_pathspec; + tmp_pathspec = 0; + + LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n", + target_name)); +EOF + + cat <<EOF + newargz[0] = + XMALLOC (char, (strlen (actual_cwrapper_path) + + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); + strcpy (newargz[0], actual_cwrapper_path); + strcat (newargz[0], "$objdir"); + strcat (newargz[0], "/"); +EOF + + cat <<"EOF" + /* stop here, and copy so we don't have to do this twice */ + tmp_pathspec = xstrdup (newargz[0]); + + /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ + strcat (newargz[0], actual_cwrapper_name); + + /* DO want the lt- prefix here if it exists, so use target_name */ + lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); + XFREE (tmp_pathspec); + tmp_pathspec = NULL; +EOF + + case $host_os in + mingw*) + cat <<"EOF" + { + char* p; + while ((p = strchr (newargz[0], '\\')) != NULL) + { + *p = '/'; + } + while ((p = strchr (lt_argv_zero, '\\')) != NULL) + { + *p = '/'; + } + } +EOF + ;; + esac + + cat <<"EOF" + XFREE (target_name); + XFREE (actual_cwrapper_path); + XFREE (actual_cwrapper_name); + + lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ + lt_setenv ("DUALCASE", "1"); /* for MSK sh */ + lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); + lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); + + newargc=0; + for (i = 1; i < argc; i++) + { + if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0) + { + if (argv[i][env_set_opt_len] == '=') + { + const char *p = argv[i] + env_set_opt_len + 1; + lt_opt_process_env_set (p); + } + else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc) + { + lt_opt_process_env_set (argv[++i]); /* don't copy */ + } + else + lt_fatal ("%s missing required argument", env_set_opt); + continue; + } + if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0) + { + if (argv[i][env_prepend_opt_len] == '=') + { + const char *p = argv[i] + env_prepend_opt_len + 1; + lt_opt_process_env_prepend (p); + } + else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc) + { + lt_opt_process_env_prepend (argv[++i]); /* don't copy */ + } + else + lt_fatal ("%s missing required argument", env_prepend_opt); + continue; + } + if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0) + { + if (argv[i][env_append_opt_len] == '=') + { + const char *p = argv[i] + env_append_opt_len + 1; + lt_opt_process_env_append (p); + } + else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc) + { + lt_opt_process_env_append (argv[++i]); /* don't copy */ + } + else + lt_fatal ("%s missing required argument", env_append_opt); + continue; + } + if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0) + { + /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX + namespace, but it is not one of the ones we know about and + have already dealt with, above (inluding dump-script), then + report an error. Otherwise, targets might begin to believe + they are allowed to use options in the LTWRAPPER_OPTION_PREFIX + namespace. The first time any user complains about this, we'll + need to make LTWRAPPER_OPTION_PREFIX a configure-time option + or a configure.ac-settable value. + */ + lt_fatal ("Unrecognized option in %s namespace: '%s'", + ltwrapper_option_prefix, argv[i]); + } + /* otherwise ... */ + newargz[++newargc] = xstrdup (argv[i]); + } + newargz[++newargc] = NULL; + + LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>"))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : "<NULL>"), + (value ? value : "<NULL>"))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : "<NULL>"), + (value ? value : "<NULL>"))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : "<NULL>"), + (value ? value : "<NULL>"))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c <<EOF + int main() { return 0; } +EOF + $opt_dry_run || $RM conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + ldd_output=`ldd conftest` + for i in $deplibs; do + case $i in + -l*) + func_stripname -l '' "$i" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) + newdeplibs="$newdeplibs $i" + i="" + ;; + esac + fi + if test -n "$i" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + newdeplibs="$newdeplibs $i" + else + droppeddeps=yes + $ECHO + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which I believe you do not have" + $ECHO "*** because a test_compile did reveal that the linker did not use it for" + $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + fi + fi + ;; + *) + newdeplibs="$newdeplibs $i" + ;; + esac + done + else + # Error occurred in the first compile. Let's try to salvage + # the situation: Compile a separate program for each library. + for i in $deplibs; do + case $i in + -l*) + func_stripname -l '' "$i" + name=$func_stripname_result + $opt_dry_run || $RM conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + ldd_output=`ldd conftest` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) + newdeplibs="$newdeplibs $i" + i="" + ;; + esac + fi + if test -n "$i" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + newdeplibs="$newdeplibs $i" + else + droppeddeps=yes + $ECHO + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because a test_compile did reveal that the linker did not use this one" + $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + fi + fi + else + droppeddeps=yes + $ECHO + $ECHO "*** Warning! Library $i is needed by this library but I was not able to" + $ECHO "*** make it link in! You will probably need to install it or some" + $ECHO "*** library that it depends on before this library will be fully" + $ECHO "*** functional. Installing it before continuing would be even better." + fi + ;; + *) + newdeplibs="$newdeplibs $i" + ;; + esac + done + fi + ;; + file_magic*) + set dummy $deplibs_check_method; shift + file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/Build/source/texk/lcdf-typetools/missing b/Build/source/texk/lcdf-typetools/build-aux/missing index f359dae7a87..1c8ff7049d8 100755 --- a/Build/source/texk/lcdf-typetools/missing +++ b/Build/source/texk/lcdf-typetools/build-aux/missing @@ -1,15 +1,15 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2008-12-21.33 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # 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 3, or (at your option) +# the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, @@ -18,7 +18,9 @@ scriptversion=2008-12-21.33 # 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, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,9 +89,6 @@ Supported PROGRAM values: tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - Send bug reports to <bug-automake@gnu.org>." exit $? ;; @@ -107,22 +106,15 @@ Send bug reports to <bug-automake@gnu.org>." esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. +# the program). case $1 in - lex*|yacc*) + lex|yacc) # Not GNU programs, they don't have --version. ;; - tar*) + tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -146,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $program in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -156,7 +148,7 @@ WARNING: \`$1' is $msg. You should only need it if touch aclocal.m4 ;; - autoconf*) + autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -165,7 +157,7 @@ WARNING: \`$1' is $msg. You should only need it if touch configure ;; - autoheader*) + autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -195,7 +187,7 @@ WARNING: \`$1' is $msg. You should only need it if while read f; do touch "$f"; done ;; - autom4te*) + autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -218,7 +210,7 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison*|yacc*) + bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package @@ -248,7 +240,7 @@ WARNING: \`$1' $msg. You should only need it if fi ;; - lex*|flex*) + lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package @@ -271,7 +263,7 @@ WARNING: \`$1' is $msg. You should only need it if fi ;; - help2man*) + help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the @@ -285,11 +277,11 @@ WARNING: \`$1' is $msg. You should only need it if else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit $? + exit 1 fi ;; - makeinfo*) + makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -318,7 +310,7 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) + tar) shift # We have already tried tar in the generic part. diff --git a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am index 6bfd3a37b6c..b9a54e2e20a 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am +++ b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = cfftot1 man_MANS = cfftot1.1 diff --git a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in index 5a46970b48e..df5710c1c91 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in +++ b/Build/source/texk/lcdf-typetools/cfftot1/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = cfftot1$(EXEEXT) subdir = cfftot1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,17 +55,26 @@ am_cfftot1_OBJECTS = cfftot1.$(OBJEXT) maket1font.$(OBJEXT) cfftot1_OBJECTS = $(am_cfftot1_OBJECTS) cfftot1_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(cfftot1_SOURCES) DIST_SOURCES = $(cfftot1_SOURCES) man1dir = $(mandir)/man1 @@ -68,6 +85,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -84,29 +102,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -115,6 +144,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -127,20 +157,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -149,6 +188,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -164,7 +204,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = cfftot1.1 cfftot1_SOURCES = cfftot1.cc \ maket1font.cc maket1font.hh @@ -176,13 +215,13 @@ EXTRA_DIST = cfftot1.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -212,10 +251,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -228,7 +268,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done cfftot1$(EXEEXT): $(cfftot1_OBJECTS) $(cfftot1_DEPENDENCIES) @rm -f cfftot1$(EXEEXT) $(CXXLINK) $(cfftot1_OBJECTS) $(cfftot1_LDADD) $(LIBS) @@ -255,6 +299,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -306,7 +363,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -408,7 +465,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -451,7 +508,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -468,18 +526,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 index f3a257af747..0014d867164 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 +++ b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -84,4 +84,4 @@ and #5177, Version 1.4 ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc index 47d67596817..4a12f271dae 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc +++ b/Build/source/texk/lcdf-typetools/cfftot1/cfftot1.cc @@ -1,6 +1,6 @@ /* cfftot1.cc -- driver for translating CFF fonts to Type 1 fonts * - * Copyright (c) 2002-2006 Eddie Kohler + * Copyright (c) 2002-2009 Eddie Kohler * * 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 @@ -71,7 +71,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTIONS] [FONTFILE [OUTPUTFILE]]", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -79,8 +79,9 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'Cfftot1' translates a PostScript font from the Compact Font Format (CFF) to\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Cfftot1%> translates a PostScript font from the Compact Font Format (CFF) to\n\ the usual Type 1 format. The input file should be either a raw CFF font or a\n\ PostScript-flavored OpenType font. The result, which is usually written to the\n\ standard output, is written in PFB or PFA format.\n\ @@ -96,7 +97,7 @@ Options:\n\ -h, --help Print this message and exit.\n\ -v, --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -114,12 +115,12 @@ do_file(const char *infn, const char *outfn, PermString name, ErrorHandler *errh #endif } else if (!(f = fopen(infn, "rb"))) errh->fatal("%s: %s", infn, strerror(errno)); - + int c = getc(f); ungetc(c, f); Cff::Font *font = 0; - + if (c == EOF) errh->fatal("%s: empty file", infn); if (c == 1 || c == 'O') { @@ -146,7 +147,7 @@ do_file(const char *infn, const char *outfn, PermString name, ErrorHandler *errh if (errh->nerrors() > 0) return; - + Type1Font *font1 = create_type1_font(font, errh); if (!outfn || strcmp(outfn, "-") == 0) { @@ -176,12 +177,12 @@ main(int argc, char *argv[]) Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); const char *input_file = 0; const char *output_file = 0; const char *font_name = 0; - + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -189,7 +190,7 @@ main(int argc, char *argv[]) case PFA_OPT: binary = false; break; - + case PFB_OPT: binary = true; break; @@ -199,23 +200,23 @@ main(int argc, char *argv[]) usage_error(errh, "font name specified twice"); font_name = clp->vstr; break; - + case QUIET_OPT: if (clp->negated) errh = ErrorHandler::default_handler(); else errh = new SilentErrorHandler; break; - + case VERSION_OPT: printf("cfftot1 (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2002-2006 Eddie Kohler\n\ + printf("Copyright (C) 2002-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); @@ -236,22 +237,22 @@ particular purpose.\n"); else input_file = clp->vstr; break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: do_file(input_file, output_file, font_name, errh); - + return (errh->nerrors() == 0 ? 0 : 1); } diff --git a/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc b/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc index f693ce8b0ba..317d5744255 100644 --- a/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc +++ b/Build/source/texk/lcdf-typetools/cfftot1/maket1font.cc @@ -1,6 +1,6 @@ /* maket1font.{cc,hh} -- translate CFF fonts to Type 1 fonts * - * Copyright (c) 2002-2006 Eddie Kohler + * Copyright (c) 2002-2009 Eddie Kohler * * 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 @@ -36,7 +36,7 @@ class MakeType1CharstringInterp : public Type1CharstringGenInterp { public: ~MakeType1CharstringInterp(); Type1Font *output() const { return _output; } - + void run(const CharstringProgram *, Type1Font *, PermString glyph_definer, ErrorHandler *); void run(const CharstringContext &, Type1Charstring &, ErrorHandler *); @@ -45,7 +45,7 @@ class MakeType1CharstringInterp : public Type1CharstringGenInterp { public: String landmark() const; class Subr; - + private: // output @@ -64,7 +64,7 @@ class MakeType1CharstringInterp : public Type1CharstringGenInterp { public: Subr *csr_subr(CsRef, bool force) const; Type1Charstring *csr_charstring(CsRef) const; - + }; class MakeType1CharstringInterp::Subr { public: @@ -77,7 +77,7 @@ class MakeType1CharstringInterp::Subr { public: //String name(const MakeType1CharstringInterp *) const; Type1Charstring *charstring(const MakeType1CharstringInterp *) const; - + int ncalls() const { return _calls.size(); } Subr *call(int i) const { return _calls[i]; } bool has_call(Subr *) const; @@ -93,7 +93,7 @@ class MakeType1CharstringInterp::Subr { public: int ncallers() const { return _callers.size(); } const Caller &caller(int i) const { return _callers[i]; } - + void add_call(Subr *s) { _calls.push_back(s); } void add_caller(Subr *, int, int); @@ -103,9 +103,9 @@ class MakeType1CharstringInterp::Subr { public: void transfer_nested_calls(int pos, int length, Subr *new_caller) const; void change_callers(Subr *, int pos, int length, int new_length); bool unify(MakeType1CharstringInterp *); - + void caller_data(bool assign, MakeType1CharstringInterp *mcsi); - + private: CsRef _csr; @@ -118,7 +118,7 @@ class MakeType1CharstringInterp::Subr { public: static int max_stamp; friend class MakeType1CharstringInterp; - + }; int MakeType1CharstringInterp::Subr::max_stamp = 1; @@ -182,7 +182,7 @@ MakeType1CharstringInterp::csr_subr(CsRef csr, bool force) const vp = &_glyphs; else return 0; - + int n = (csr & CSR_NUM); if (n >= vp->size()) return 0; @@ -303,7 +303,7 @@ MakeType1CharstringInterp::Subr::unify(MakeType1CharstringInterp *mcsi) _callers.pop_back(); i--; } - + if (!_callers.size()) return false; assert(!_calls.size()); // because this hasn't been unified yet @@ -338,10 +338,10 @@ MakeType1CharstringInterp::Subr::unify(MakeType1CharstringInterp *mcsi) // Mark it as having called any subroutines contained completely within itself. // How to do this? Look at one caller, and go over all its calls. _callers[0].subr->transfer_nested_calls(_callers[0].pos, _callers[0].len, this); - + // adapt callers String callsubr_string = Type1CharstringGen::callsubr_string(_output_subrno); - + for (int i = 0; i < _callers.size(); i++) // 13.Jun.2003 - must check whether _callers[i].subr exists: if we // called a subroutine more than once, change_callers() might have @@ -369,7 +369,7 @@ bool MakeType1CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) { switch (cmd) { - + case Cs::cCallsubr: case Cs::cCallgsubr: if (subr_depth() < MAX_SUBR_DEPTH && size() == 1) { @@ -381,7 +381,7 @@ MakeType1CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left _cur_subr->add_call(callee); int left = csgen().length(); - + bool more = callxsubr_command(g); int right = csgen().length(); @@ -396,7 +396,7 @@ MakeType1CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left normal: default: return CharstringInterp::type2_command(cmd, data, left); - + } } @@ -407,7 +407,7 @@ MakeType1CharstringInterp::run(const CharstringContext &g, Type1Charstring &out, if (Type1CharstringGenInterp::bad_flex() && !_flex_message) { errh->lwarning(landmark(), "complex flex hint replaced with curves"); - errh->message("(This Type 2 format font contains flex hints prohibited by Type 1.\nI've safely replaced them with ordinary curves.)"); + errh->message("(This Type 2 format font contains flex hints prohibited by Type 1.\nI%,ve safely replaced them with ordinary curves.)"); _flex_message = true; } } @@ -486,7 +486,7 @@ create_type1_font(Cff::Font *font, ErrorHandler *errh) Type1Font *output = Type1Font::skeleton_make(font->font_name(), version); output->skeleton_comments_end(); StringAccum sa; - + // FontInfo dictionary if (version) output->add_definition(Type1Font::dFI, Type1Definition::make_string("version", version, "readonly def")); @@ -507,7 +507,7 @@ create_type1_font(Cff::Font *font, ErrorHandler *errh) add_number_def(output, Type1Font::dFI, "UnderlinePosition", font, Cff::oUnderlinePosition); add_number_def(output, Type1Font::dFI, "UnderlineThickness", font, Cff::oUnderlineThickness); output->skeleton_fontinfo_end(); - + // Encoding, other font dictionary entries output->add_item(font->type1_encoding_copy()); font->dict_value(Cff::oPaintType, &v); @@ -562,7 +562,7 @@ create_type1_font(Cff::Font *font, ErrorHandler *errh) // add glyphs MakeType1CharstringInterp maker(5); maker.run(font, output, " |-", errh); - + return output; } diff --git a/Build/source/texk/lcdf-typetools/config.h.in b/Build/source/texk/lcdf-typetools/config.h.in index dad53d351ee..b2dd0c2f49c 100644 --- a/Build/source/texk/lcdf-typetools/config.h.in +++ b/Build/source/texk/lcdf-typetools/config.h.in @@ -6,24 +6,39 @@ /* Define if strtod is broken. */ #undef BROKEN_STRTOD +/* Define to 1 if the `closedir' function returns void instead of `int'. */ +#undef CLOSEDIR_VOID + /* Define if the va_list type is addressable. */ #undef HAVE_ADDRESSABLE_VA_LIST /* Define to 1 if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H -/* Define to run cfftot1 automatically from otftotfm. */ +/* Define to 1 if you have the <assert.h> header file. */ +#undef HAVE_ASSERT_H + +/* Define to run cfftot1from otftotfm. */ #undef HAVE_AUTO_CFFTOT1 -/* Define to run t1dotlessj automatically from otftotfm. */ +/* Define to run t1dotlessjfrom otftotfm. */ #undef HAVE_AUTO_T1DOTLESSJ -/* Define to run system updmap automatically from otftotfm. */ +/* Define to run updmapfrom otftotfm. */ #undef HAVE_AUTO_UPDMAP +/* Define to 1 if you have the `bcmp' function. */ +#undef HAVE_BCMP + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + /* Define to 1 if you have the <byteorder.h> header file. */ #undef HAVE_BYTEORDER_H +/* Define to 1 if you have the `bzero' function. */ +#undef HAVE_BZERO + /* Define to 1 if you have the `ctime' function. */ #undef HAVE_CTIME @@ -35,24 +50,48 @@ */ #undef HAVE_DIRENT_H +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + /* Define if intXX_t types are not available. */ #undef HAVE_FAKE_INT_TYPES /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H +/* Define to 1 if you have the <float.h> header file. */ +#undef HAVE_FLOAT_H + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getwd' function. */ +#undef HAVE_GETWD + +/* Define to 1 if you have the `index' function. */ +#undef HAVE_INDEX + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define if you want to use kpathsea. */ -#undef HAVE_KPATHSEA - /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM +/* Define to 1 if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `memcmp' function. */ +#undef HAVE_MEMCMP + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -74,6 +113,22 @@ /* Define if PermStrings are available. */ #undef HAVE_PERMSTRING +/* Define to 1 if you are using GNU libc or otherwise have global variables + `program_invocation_name' and `program_invocation_short_name'. */ +#undef HAVE_PROGRAM_INVOCATION_NAME + +/* Define to 1 if your compiler understands prototypes. */ +#undef HAVE_PROTOTYPES + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H + +/* Define to 1 if you have the `rindex' function. */ +#undef HAVE_RINDEX + /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION @@ -83,6 +138,15 @@ /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR @@ -92,9 +156,21 @@ /* 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 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 `strtoul' function. */ #undef HAVE_STRTOUL +/* Define to 1 if `st_mtim' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_MTIM + /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H @@ -130,6 +206,10 @@ /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Define to 0 if you don't want mmafm to run mmpfb when it needs to get an intermediate master conversion program. */ #undef MMAFM_RUN_MMPFB @@ -182,6 +262,24 @@ /* Version number of package */ #undef VERSION +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + /* Allow compilation on Windows (thanks, Fabrice Popineau). */ #ifdef WIN32 # include <win32lib.h> @@ -205,8 +303,6 @@ double good_strtod(const char *nptr, char **endptr); #ifdef __cplusplus } -/* Get rid of a possible inline macro under C++. */ -# define inline inline #endif #endif /* LCDF_TYPETOOLS_CONFIG_H */ diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure index 61c6d9a7148..91e10315f43 100755 --- a/Build/source/texk/lcdf-typetools/configure +++ b/Build/source/texk/lcdf-typetools/configure @@ -1,6 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62. +# Generated by GNU Autoconf 2.63 for LCDF typetools 2.76-rc1. +# +# Report bugs to <tex-k@tug.org>. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -571,6 +573,155 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + exec 7<&0 </dev/null 6>&1 # Name of the host. @@ -592,11 +743,11 @@ MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= +PACKAGE_NAME='LCDF typetools' +PACKAGE_TARNAME='lcdf-typetools' +PACKAGE_VERSION='2.76-rc1' +PACKAGE_STRING='LCDF typetools 2.76-rc1' +PACKAGE_BUGREPORT='tex-k@tug.org' ac_unique_file="NEWS" # Factoring default headers for most tests. @@ -635,124 +786,160 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -MKDIR_P -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -MAINTAINER_MODE_TRUE -MAINTAINER_MODE_FALSE -MAINT -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE +ac_subst_vars='LTLIBOBJS +LIBOBJS +have_kpathsea_FALSE +have_kpathsea_TRUE +KPATHSEA_RULE +KPATHSEA_DEPEND +KPATHSEA_LIBS +KPATHSEA_INCLUDES +SELECTED_SUBDIRS +TEMPLATE_OBJS CXXCPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO RANLIB -TEMPLATE_OBJS -SELECTED_SUBDIRS -GREP +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP EGREP -KPSEINTERFACE_O -LIBKPATHSEA -LIBKPATHSEA_DEP -FIXLIBC_O -LIBOBJS -LTLIBOBJS' +GREP +SED +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode +enable_shared +enable_static +with_pic +enable_fast_install enable_dependency_tracking +with_gnu_ld +enable_libtool_lock +enable_largefile enable_cfftot1 enable_mmafm enable_mmpfb enable_otfinfo enable_otftotfm +enable_t1dotlessj enable_t1lint +enable_t1rawafm enable_t1reencode enable_t1testpage enable_ttftotype42 +enable_updmap enable_tetex_build with_kpathsea +with_system_kpathsea +with_kpathsea_includes +with_kpathsea_libdir enable_selfauto_set -enable_auto_cfftot1 -enable_auto_t1dotlessj -enable_auto_updmap ' ac_precious_vars='build_alias host_alias @@ -807,7 +994,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1189,9 +1376,9 @@ fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1244,7 +1431,7 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: Working directory cannot be determined" >&2 + { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 @@ -1319,7 +1506,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures LCDF typetools 2.76-rc1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1367,7 +1554,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/lcdf-typetools] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1380,11 +1567,17 @@ Program names: --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 + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of LCDF typetools 2.76-rc1:";; + esac cat <<\_ACEOF Optional Features: @@ -1393,28 +1586,43 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --disable-cfftot1 do not build the cfftot1 program - --disable-mmafm do not build the mmafm program - --disable-mmpfb do not build the mmpfb program - --disable-otfinfo do not build the otfinfo program - --disable-otftotfm do not build the otftotfm program - --disable-t1dotlessj do not build the t1dotlessj program - --disable-t1lint do not build the t1lint program - --disable-t1reencode do not build the t1reencode program - --disable-t1testpage do not build the t1testpage program - --disable-ttftotype42 do not build the ttftotype42 program - --enable-tetex-build build as part of a teTeX installation - --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich - --disable-auto-cfftot1 disable running cfftot1 from otftotfm + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --disable-cfftot1 do not build the cfftot1 program + --disable-mmafm do not build the mmafm program + --disable-mmpfb do not build the mmpfb program + --disable-otfinfo do not build the otfinfo program + --disable-otftotfm do not build the otftotfm program + --disable-t1dotlessj do not build the t1dotlessj program + --disable-t1lint do not build the t1lint program + --disable-t1rawafm do not build the t1rawafm program + --disable-t1reencode do not build the t1reencode program + --disable-t1testpage do not build the t1testpage program + --disable-ttftotype42 do not build the ttftotype42 program + --disable-auto-cfftot1 disable running cfftot1 from otftotfm --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm --disable-auto-updmap disable running updmap from otftotfm + --enable-tetex-build build as part of a teTeX installation + --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-kpathsea=PREFIX Kpathsea is installed (under PREFIX) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --without-kpathsea build otftotfm without kpathsea + --with-system-kpathsea use installed kpathsea headers and library + --with-kpathsea-includes=DIR + kpathsea headers installed in DIR + --with-kpathsea-libdir=DIR + kpathsea library installed in DIR Some influential environment variables: CC C compiler command @@ -1432,6 +1640,7 @@ Some influential environment variables: 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 <tex-k@tug.org>. _ACEOF ac_status=$? fi @@ -1494,8 +1703,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.62 +LCDF typetools configure 2.76-rc1 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -1508,8 +1717,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was -generated by GNU Autoconf 2.62. Invocation command line was +It was created by LCDF typetools $as_me 2.76-rc1, which was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1632,8 +1841,8 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -1836,6 +2045,8 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 @@ -1859,6 +2070,14 @@ fi + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1866,10 +2085,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.10' + ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do +for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -1885,8 +2104,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} { (exit 1); exit 1; }; } fi @@ -1899,6 +2118,10 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +am__api_version='1.10' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2190,230 +2413,173 @@ else fi rmdir .tst 2>/dev/null -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac -# Define the identity of the package. - PACKAGE=lcdf-typetools - VERSION=2.69 +macro_version='2.2.6' +macro_revision='1.3012' -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF -# Some tools Automake needs. -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +ltmain="$ac_aux_dir/ltmain.sh" -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else - STRIP="$ac_cv_prog_STRIP" + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +DEPDIR="${am__leading_dot}deps" +ac_config_commands="$ac_config_commands depfiles" -ac_config_headers="$ac_config_headers config.h" -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU fi - - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi fi - MAINT=$MAINTAINER_MODE_TRUE +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" + AMDEP_TRUE='#' + AMDEP_FALSE= fi @@ -2504,12 +2670,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2708,12 +2870,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2723,11 +2881,13 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 @@ -2857,11 +3017,13 @@ if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext @@ -2889,13 +3051,15 @@ $as_echo "$ac_try_echo") >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 $as_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; }; } + { (exit 1); exit 1; }; }; } fi fi fi @@ -2938,11 +3102,13 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext @@ -2996,11 +3162,13 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext @@ -3347,68 +3515,6 @@ 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 -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - depcc="$CC" am_compiler_list= @@ -3518,6 +3624,2617 @@ else fi +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + 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_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:4221: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4224: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4227: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5433 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + 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 + + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext 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 + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3739,19 +6456,6430 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_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 + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core 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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 + : +else + 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> +#include <stdlib.h> +#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 + +#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)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='lcdf-typetools' + VERSION='2.76-rc1' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" 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 + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7480: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7484: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7819: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7823: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7924: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7928: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7979: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7983: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&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 shl_load to an innocuous variant, in case <limits.h> declares shl_load. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); 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 shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&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 dlopen to an innocuous variant, in case <limits.h> declares dlopen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); 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 dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10779 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10875 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +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 + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + 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> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + 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> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core 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. */ +#define _FILE_OFFSET_BITS 64 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + 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> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core 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. */ +#define _LARGE_FILES 1 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + 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> /* for off_t */ + #include <stdio.h> +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_sys_largefile_source=no; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext 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. */ +#define _LARGEFILE_SOURCE 1 +#include <sys/types.h> /* for off_t */ + #include <stdio.h> +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_sys_largefile_source=1; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSEEKO 1 +_ACEOF + +fi + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core 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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 + : +else + 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> +#include <stdlib.h> +#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 + +#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)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking whether closedir returns void" >&5 +$as_echo_n "checking whether closedir returns void... " >&6; } +if test "${ac_cv_func_closedir_void+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_closedir_void=yes +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_dirent> +#ifndef __cplusplus +int closedir (); +#endif + +int +main () +{ +return closedir (opendir (".")) != 0; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_closedir_void=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_closedir_void=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 +$as_echo "$ac_cv_func_closedir_void" >&6; } +if test $ac_cv_func_closedir_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define CLOSEDIR_VOID 1 +_ACEOF + +fi + + + + + + + + + + + +for ac_header in assert.h float.h limits.h memory.h pwd.h stdlib.h \ + string.h strings.h sys/param.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&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 { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_func in putenv strcasecmp strtol strstr +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +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 +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + + + +for ac_func in bcmp bcopy bzero getcwd getwd index memcmp memcpy rindex strchr strrchr +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +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 +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then + $as_echo_n "(cached) " >&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 () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* 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"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 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; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim" >&5 +$as_echo_n "checking for struct stat.st_mtim... " >&6; } +if test "${ac_cv_member_struct_stat_st_mtim+set}" = set; then + $as_echo_n "(cached) " >&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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_mtim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_mtim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_mtim=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim" >&5 +$as_echo "$ac_cv_member_struct_stat_st_mtim" >&6; } +if test "x$ac_cv_member_struct_stat_st_mtim" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIM 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking whether the compiler accepts prototypes" >&5 +$as_echo_n "checking whether the compiler accepts prototypes... " >&6; } +if test "${kb_cv_c_prototypes+set}" = set; then + $as_echo_n "(cached) " >&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 <stdarg.h> +int +main () +{ +extern void foo(int i,...); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + kb_cv_c_prototypes=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + kb_cv_c_prototypes=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $kb_cv_c_prototypes" >&5 +$as_echo "$kb_cv_c_prototypes" >&6; } +if test "$kb_cv_c_prototypes" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PROTOTYPES 1 +_ACEOF + +fi +{ $as_echo "$as_me:$LINENO: checking whether program_invocation_name is predefined" >&5 +$as_echo_n "checking whether program_invocation_name is predefined... " >&6; } +if test "${kb_cv_var_program_inv_name+set}" = set; then + $as_echo_n "(cached) " >&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 () +{ +extern char *program_invocation_name; + program_invocation_name = "love"; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + kb_cv_var_program_inv_name=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + kb_cv_var_program_inv_name=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $kb_cv_var_program_inv_name" >&5 +$as_echo "$kb_cv_var_program_inv_name" >&6; } +if test "$kb_cv_var_program_inv_name" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PROGRAM_INVOCATION_NAME 1 +_ACEOF + +fi + + +ac_config_headers="$ac_config_headers config.h" + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3853,12 +12981,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -4236,11 +13360,495 @@ else fi + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&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 () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + 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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + 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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + 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 { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +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 + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then @@ -4453,11 +14061,9 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +_lt_caught_CXX_error=yes; } fi ac_ext=c @@ -4466,108 +14072,3174 @@ 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 "$GCC" ; then CC="$CC -W -Wall" ; CXX="$CXX -W -Wall" ; fi +else + _lt_caught_CXX_error=yes +fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac done -done -IFS=$as_save_IFS +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no fi -done -done -IFS=$as_save_IFS + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_prog_compiler_pic_CXX" >&6; } + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15894: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15898: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15993: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:15997: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16045: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16049: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +$as_echo "$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + 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 conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac - RANLIB=$ac_ct_RANLIB +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate fi else - RANLIB="$ac_cv_prog_RANLIB" + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +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_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_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 { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +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 + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_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 { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +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 + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" 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 + +if test -n "$GCC" ; then CC="$CC -W -Wall" ; CXX="$CXX -W -Wall" ; fi { $as_echo "$as_me:$LINENO: checking where template objects are stored" >&5 $as_echo_n "checking where template objects are stored... " >&6; } @@ -4628,16 +17300,15 @@ EOF rm -f conftest* ;; esac fi - case "x$ac_cv_cxx_templobjs" in - xunknown|xnowhere) - TEMPLATE_OBJS="" ;; - *) - TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; - esac - fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_templobjs" >&5 $as_echo "$ac_cv_cxx_templobjs" >&6; } +case $ac_cv_cxx_templobjs in + unknown|nowhere) + TEMPLATE_OBJS="" ;; + *) + TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; +esac @@ -4705,8 +17376,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF @@ -4897,83 +17569,103 @@ fi +## texk/lcdf-typetools/ac/lcdf-typetools.ac +## configure options for lcdf-typetools.ac # Check whether --enable-cfftot1 was given. if test "${enable_cfftot1+set}" = set; then - enableval=$enable_cfftot1; : -else - enable_cfftot1=yes + enableval=$enable_cfftot1; fi - # Check whether --enable-mmafm was given. if test "${enable_mmafm+set}" = set; then - enableval=$enable_mmafm; : -else - enable_mmafm=yes + enableval=$enable_mmafm; fi - # Check whether --enable-mmpfb was given. if test "${enable_mmpfb+set}" = set; then - enableval=$enable_mmpfb; : -else - enable_mmpfb=yes + enableval=$enable_mmpfb; fi - # Check whether --enable-otfinfo was given. if test "${enable_otfinfo+set}" = set; then - enableval=$enable_otfinfo; : -else - enable_otfinfo=yes + enableval=$enable_otfinfo; fi - # Check whether --enable-otftotfm was given. if test "${enable_otftotfm+set}" = set; then - enableval=$enable_otftotfm; : -else - enable_otftotfm=yes + enableval=$enable_otftotfm; fi - -# Check whether --enable-t1lint was given. -if test "${enable_t1lint+set}" = set; then - enableval=$enable_t1lint; : -else - enable_t1dotlessj=yes +# Check whether --enable-t1dotlessj was given. +if test "${enable_t1dotlessj+set}" = set; then + enableval=$enable_t1dotlessj; fi - # Check whether --enable-t1lint was given. if test "${enable_t1lint+set}" = set; then - enableval=$enable_t1lint; : -else - enable_t1lint=yes + enableval=$enable_t1lint; +fi +# Check whether --enable-t1rawafm was given. +if test "${enable_t1rawafm+set}" = set; then + enableval=$enable_t1rawafm; fi - # Check whether --enable-t1reencode was given. if test "${enable_t1reencode+set}" = set; then - enableval=$enable_t1reencode; : -else - enable_t1reencode=yes + enableval=$enable_t1reencode; fi - # Check whether --enable-t1testpage was given. if test "${enable_t1testpage+set}" = set; then - enableval=$enable_t1testpage; : -else - enable_t1testpage=yes + enableval=$enable_t1testpage; fi - # Check whether --enable-ttftotype42 was given. if test "${enable_ttftotype42+set}" = set; then - enableval=$enable_ttftotype42; : -else - enable_ttftotype42=yes + enableval=$enable_ttftotype42; fi +# Check whether --enable-cfftot1 was given. +if test "${enable_cfftot1+set}" = set; then + enableval=$enable_cfftot1; +fi +# Check whether --enable-t1dotlessj was given. +if test "${enable_t1dotlessj+set}" = set; then + enableval=$enable_t1dotlessj; +fi +# Check whether --enable-updmap was given. +if test "${enable_updmap+set}" = set; then + enableval=$enable_updmap; +fi -SELECTED_SUBDIRS='' -for i in cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42; do - y=`eval 'echo $enable_'"$i"` - if test "x$y" != xno; then SELECTED_SUBDIRS="$SELECTED_SUBDIRS $i"; fi -done +SELECTED_SUBDIRS='liblcdf libefont' +test "x$enable_cfftot1" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS cfftot1" +test "x$enable_mmafm" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS mmafm" +test "x$enable_mmpfb" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS mmpfb" +test "x$enable_otfinfo" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS otfinfo" +test "x$enable_otftotfm" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS otftotfm" +test "x$enable_t1dotlessj" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS t1dotlessj" +test "x$enable_t1lint" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS t1lint" +test "x$enable_t1rawafm" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS t1rawafm" +test "x$enable_t1reencode" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS t1reencode" +test "x$enable_t1testpage" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS t1testpage" +test "x$enable_ttftotype42" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS ttftotype42" + + + +if test "x$enable_auto_cfftot1" != xno; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AUTO_CFFTOT1 1 +_ACEOF + +fi +if test "x$enable_auto_t1dotlessj" != xno; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AUTO_T1DOTLESSJ 1 +_ACEOF + +fi +if test "x$enable_auto_updmap" != xno; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AUTO_UPDMAP 1 +_ACEOF + +fi @@ -4985,738 +17677,1636 @@ else fi +test -d $srcdir/../kpathsea && enable_tetex_build=yes + + # Check whether --with-kpathsea was given. if test "${with_kpathsea+set}" = set; then - withval=$with_kpathsea; kpathsea=$withval -else - kpathsea= + withval=$with_kpathsea; fi + ## _KPSE_INIT: Initialize TL infrastructure +kpse_BLD=`(cd "./../../." && pwd)` +kpse_SRC=`(cd "$srcdir/../../." && pwd)` + +## _KPSE_USE_LIBTOOL: Generate a libtool script for use in configure tests +: ${CONFIG_LT=./config.lt} +{ $as_echo "$as_me:$LINENO: creating $CONFIG_LT" >&5 +$as_echo "$as_me: creating $CONFIG_LT" >&6;} +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. -if test "x$kpathsea" = xno; then - KPSEINTERFACE_O= - LIBKPATHSEA= +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST else - if test "x$enable_tetex_build" = xyes; then - if test ! -d $srcdir/../../texk/kpathsea; then - { { $as_echo "$as_me:$LINENO: error: -========================================= + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac -You specified --enable-tetex-build, but I can't find the kpathsea -directory. I expected it to be in $srcdir/../../texk/kpathsea. +fi -=========================================" >&5 -$as_echo "$as_me: error: -========================================= -You specified --enable-tetex-build, but I can't find the kpathsea -directory. I expected it to be in $srcdir/../../texk/kpathsea. -=========================================" >&2;} - { (exit 1); exit 1; }; } - fi - CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk" - LDFLAGS="$LDFLAGS -L\$(top_builddir)/../../texk/kpathsea/.libs" - { $as_echo "$as_me:$LINENO: tetex build of lcdf-typetools, CPPFLAGS now: $CPPFLAGS" >&5 -$as_echo "$as_me: tetex build of lcdf-typetools, CPPFLAGS now: $CPPFLAGS" >&6;} - elif test "x$kpathsea" != x -a "x$kpathsea" != xyes; then - CPPFLAGS="$CPPFLAGS -I$kpathsea/include" - LDFLAGS="$LDFLAGS -L$kpathsea/lib" - else - kpathsea=yes - fi - if test "x$enable_tetex_build" = xyes; then - kpse_header=yes - else +# PATH needs CR +# 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 -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi -else - ac_cv_path_GREP=$GREP + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; 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 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi - $ac_path_EGREP_found && break 3 - done - done +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - ac_cv_path_EGREP=$EGREP + as_expr=false fi - fi +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&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> +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -int -main () -{ +# CDPATH. +$as_unset CDPATH - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - 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> + # 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 after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, 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 + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + # 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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - ac_cv_header_stdc=no + as_dirname=false fi -rm -f conftest* +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - ac_cv_header_stdc=no + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -rm -f conftest* +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false 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 -x / >/dev/null 2>&1; then + as_test_x='test -x' else - 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> -#include <stdlib.h> -#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 + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () +# 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'" + + + +exec 6>&1 +exec 5>>config.log { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. +Usage: $0 [OPTIONS] + -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 + +Report bugs to <bug-libtool@gnu.org>." + +lt_cl_version="\ +LCDF typetools config.lt 2.76-rc1 +configured by $0, generated by GNU Autoconf 2.63. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $# != 0 +do + case $1 in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) { { $as_echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +$as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) { { $as_echo "$as_me:$LINENO: error: unrecognized argument: $1 +Try \`$0 --help' for more information." >&5 +$as_echo "$as_me: error: unrecognized argument: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + esac + shift +done + +if $lt_cl_silent; then + exec 6>/dev/null fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' +predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' +postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_ld_CXX \ +hardcode_libdir_separator_CXX \ +fix_srcfile_path_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' +_LTEOF +cat >>"$CONFIG_LT" <<\_LTEOF +{ $as_echo "$as_me:$LINENO: creating $ofile" >&5 +$as_echo "$as_me: creating $ofile" >&6;} -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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" - eval "$as_ac_Header=no" -fi + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -fi -done +# The names of the tagged configurations supported by this script. +available_tags="CXX " +# ### BEGIN LIBTOOL CONFIG -if test "${ac_cv_header_kpathsea_kpathsea_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for kpathsea/kpathsea.h" >&5 -$as_echo_n "checking for kpathsea/kpathsea.h... " >&6; } -if test "${ac_cv_header_kpathsea_kpathsea_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kpathsea_kpathsea_h" >&5 -$as_echo "$ac_cv_header_kpathsea_kpathsea_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking kpathsea/kpathsea.h usability" >&5 -$as_echo_n "checking kpathsea/kpathsea.h usability... " >&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 <kpathsea/kpathsea.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision - ac_header_compiler=no -fi +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +# Whether or not to build static libraries. +build_old_libs=$enable_static -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking kpathsea/kpathsea.h presence" >&5 -$as_echo_n "checking kpathsea/kpathsea.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <kpathsea/kpathsea.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# What type of objects to build. +pic_mode=$pic_mode - ac_header_preproc=no -fi +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/kpathsea.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: kpathsea/kpathsea.h: in the future, the compiler will take precedence" >&2;} + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF ;; -esac -{ $as_echo "$as_me:$LINENO: checking for kpathsea/kpathsea.h" >&5 -$as_echo_n "checking for kpathsea/kpathsea.h... " >&6; } -if test "${ac_cv_header_kpathsea_kpathsea_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_kpathsea_kpathsea_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kpathsea_kpathsea_h" >&5 -$as_echo "$ac_cv_header_kpathsea_kpathsea_h" >&6; } + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" -fi -if test $ac_cv_header_kpathsea_kpathsea_h = yes; then - kpse_header=yes -else - kpse_header=no -fi +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} - fi - if test "x$kpse_header" != xyes -a "x$kpathsea" = xyes -a -r /usr/local/include/kpathsea/tex-file.h; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - if test "${ac_cv_header_kpathsea_tex_file_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for kpathsea/tex-file.h" >&5 -$as_echo_n "checking for kpathsea/tex-file.h... " >&6; } -if test "${ac_cv_header_kpathsea_tex_file_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kpathsea_tex_file_h" >&5 -$as_echo "$ac_cv_header_kpathsea_tex_file_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking kpathsea/tex-file.h usability" >&5 -$as_echo_n "checking kpathsea/tex-file.h usability... " >&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 <kpathsea/tex-file.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} - ac_header_compiler=no -fi +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking kpathsea/tex-file.h presence" >&5 -$as_echo_n "checking kpathsea/tex-file.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <kpathsea/tex-file.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} - ac_header_preproc=no -fi +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kpathsea/tex-file.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: kpathsea/tex-file.h: in the future, the compiler will take precedence" >&2;} + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} +_LT_EOF ;; -esac -{ $as_echo "$as_me:$LINENO: checking for kpathsea/tex-file.h" >&5 -$as_echo_n "checking for kpathsea/tex-file.h... " >&6; } -if test "${ac_cv_header_kpathsea_tex_file_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_kpathsea_tex_file_h=$ac_header_preproc + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + +{ (exit 0); exit 0; } +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec 5>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec 5>>config.log + $lt_cl_success || { (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 +ac_link="./libtool --mode=link --tag=CC $ac_link" + +## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags + +# Check whether --with-system-kpathsea was given. +if test "${with_system_kpathsea+set}" = set; then + withval=$with_system_kpathsea; +fi + +# Check whether --with-kpathsea-includes was given. +if test "${with_kpathsea_includes+set}" = set; then + withval=$with_kpathsea_includes; fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kpathsea_tex_file_h" >&5 -$as_echo "$ac_cv_header_kpathsea_tex_file_h" >&6; } +# Check whether --with-kpathsea-libdir was given. +if test "${with_kpathsea_libdir+set}" = set; then + withval=$with_kpathsea_libdir; +fi +if test "x$with_system_kpathsea" = xyes; then + if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then + KPATHSEA_INCLUDES="-I$with_kpathsea_includes" +fi +KPATHSEA_LIBS="-lkpathsea" +if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then + KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS" fi -if test $ac_cv_header_kpathsea_tex_file_h = yes; then - kpse_header=yes else - kpse_header=no + KPATHSEA_INCLUDES=`echo '-IBLD/texk -ISRC/texk' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + KPATHSEA_LIBS=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` + KPATHSEA_DEPEND=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ + -e 's,BLD/texk/,${top_builddir}/../,g'` + KPATHSEA_RULE='# Rebuild libkpathsea +$(KPATHSEA_DEPEND): ${top_srcdir}/../kpathsea/*.[ch] ${top_builddir}/../kpathsea/paths.h + cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS) +${top_builddir}/../kpathsea/paths.h: + cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS)' fi - fi +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS - if test "x$enable_tetex_build" = xyes; then - kpse_library=yes - else - { $as_echo "$as_me:$LINENO: checking for kpse_set_program_name in -lkpathsea" >&5 -$as_echo_n "checking for kpse_set_program_name in -lkpathsea... " >&6; } -if test "${ac_cv_lib_kpathsea_kpse_set_program_name+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkpathsea $LIBS" -cat >conftest.$ac_ext <<_ACEOF +CPPFLAGS="$CPPFLAGS $KPATHSEA_INCLUDES" +LIBS="$KPATHSEA_LIBS $LIBS" + +if test "x$with_kpathsea" != xno; then + { $as_echo "$as_me:$LINENO: checking for kpathsea headers and library" >&5 +$as_echo_n "checking for kpathsea headers and library... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kpse_set_program_name (); +#include <kpathsea/kpathsea.h> int main () { -return kpse_set_program_name (); +kpse_tfm_format; ; return 0; } @@ -5742,72 +19332,9 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_kpathsea_kpse_set_program_name=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kpathsea_kpse_set_program_name=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_kpathsea_kpse_set_program_name" >&5 -$as_echo "$ac_cv_lib_kpathsea_kpse_set_program_name" >&6; } -if test $ac_cv_lib_kpathsea_kpse_set_program_name = yes; then - kpse_library=yes -else - kpse_library=no -fi - - fi - - if test "x$kpse_header" != xyes -o "x$kpse_library" != xyes; then - { { $as_echo "$as_me:$LINENO: error: -========================================= - -I can't find the kpathsea library and/or header files. Tell me where to look -using the --with-kpathsea=PREFIX option (header files should be under -PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support -using --without-kpathsea. - -=========================================" >&5 -$as_echo "$as_me: error: -========================================= - -I can't find the kpathsea library and/or header files. Tell me where to look -using the --with-kpathsea=PREFIX option (header files should be under -PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support -using --without-kpathsea. - -=========================================" >&2;} - { (exit 1); exit 1; }; } - fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KPATHSEA 1 -_ACEOF - - KPSEINTERFACE_O='kpseinterface.$(OBJEXT)' - if test "x$enable_tetex_build" = xyes; then - LIBKPATHSEA='$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a' - LIBKPATHSEA_DEP="$LIBKPATHSEA" - else - LIBKPATHSEA='-lkpathsea' - LIBKPATHSEA_DEP='' - fi - - if test "x$enable_tetex_build" = xyes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_KPSE_OPENTYPE_FORMAT 1 -_ACEOF - - else - { $as_echo "$as_me:$LINENO: checking whether kpse_opentype_format is declared" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: checking whether kpse_opentype_format is declared" >&5 $as_echo_n "checking whether kpse_opentype_format is declared... " >&6; } if test "${ac_cv_have_decl_kpse_opentype_format+set}" = set; then $as_echo_n "(cached) " >&6 @@ -5861,27 +19388,68 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_kpse_opentype_format" >&5 $as_echo "$ac_cv_have_decl_kpse_opentype_format" >&6; } -if test $ac_cv_have_decl_kpse_opentype_format = yes; then +if test "x$ac_cv_have_decl_kpse_opentype_format" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_KPSE_OPENTYPE_FORMAT 1 _ACEOF -: + else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_KPSE_OPENTYPE_FORMAT 0 _ACEOF -: + fi - fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + with_kpathsea=no fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$with_kpathsea" = xno; then + { { $as_echo "$as_me:$LINENO: error: +========================================= + +I can't find the kpathsea header and/or library files. Tell me where to look +using the --with-kpathsea-includes=DIR option (header files under +DIR/kpathsea) and --with-kpathsea-libdir=DIR option (library under DIR), or +disable support using --without-kpathsea. + +=========================================" >&5 +$as_echo "$as_me: error: +========================================= + +I can't find the kpathsea header and/or library files. Tell me where to look +using the --with-kpathsea-includes=DIR option (header files under +DIR/kpathsea) and --with-kpathsea-libdir=DIR option (library under DIR), or +disable support using --without-kpathsea. + +=========================================" >&2;} + { (exit 1); exit 1; }; } + fi +fi + if test "x$with_kpathsea" != xno; then + have_kpathsea_TRUE= + have_kpathsea_FALSE='#' +else + have_kpathsea_TRUE='#' + have_kpathsea_FALSE= +fi +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS # Check whether --enable-selfauto-set was given. if test "${enable_selfauto_set+set}" = set; then @@ -5932,50 +19500,6 @@ _ACEOF fi -# Check whether --enable-auto-cfftot1 was given. -if test "${enable_auto_cfftot1+set}" = set; then - enableval=$enable_auto_cfftot1; : -else - enable_auto_cfftot1=yes -fi - -# Check whether --enable-auto-t1dotlessj was given. -if test "${enable_auto_t1dotlessj+set}" = set; then - enableval=$enable_auto_t1dotlessj; : -else - enable_auto_t1dotlessj=yes -fi - -# Check whether --enable-auto-updmap was given. -if test "${enable_auto_updmap+set}" = set; then - enableval=$enable_auto_updmap; : -else - enable_auto_updmap=yes -fi - - -if test "x$enable_auto_cfftot1" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AUTO_CFFTOT1 1 -_ACEOF - -fi -if test "x$enable_auto_t1dotlessj" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AUTO_T1DOTLESSJ 1 -_ACEOF - -fi -if test "x$enable_auto_updmap" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AUTO_UPDMAP 1 -_ACEOF - -fi - ac_ext=cpp @@ -5983,7 +19507,7 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - +ac_link="./libtool --mode=link --tag=CXX $ac_link" { $as_echo "$as_me:$LINENO: checking whether <new> works" >&5 $as_echo_n "checking whether <new> works... " >&6; } @@ -6053,7 +19577,8 @@ _ACEOF fi -for ac_header in new.h + +for ac_header in new.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -6171,7 +19696,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -6187,8 +19717,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6205,10 +19736,11 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="./libtool --mode=link --tag=CC $ac_link" + -FIXLIBC_O='' -for ac_func in strerror +for ac_func in strdup strerror do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -6298,14 +19830,13 @@ ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - : -else - FIXLIBC_O='fixlibc.o' + fi done @@ -6373,7 +19904,6 @@ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_strtod" >&5 $as_echo "$ac_cv_working_strtod" >&6; } if test $ac_cv_working_strtod = no; then - FIXLIBC_O='fixlibc.o' cat >>confdefs.h <<\_ACEOF #define BROKEN_STRTOD 1 @@ -6477,8 +20007,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6571,7 +20102,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_floor" >&5 $as_echo "$ac_cv_func_floor" >&6; } -if test $ac_cv_func_floor = yes; then +if test "x$ac_cv_func_floor" = x""yes; then : else @@ -6640,7 +20171,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 $as_echo "$ac_cv_lib_m_floor" >&6; } -if test $ac_cv_lib_m_floor = yes; then +if test "x$ac_cv_lib_m_floor" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -6736,7 +20267,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fabs" >&5 $as_echo "$ac_cv_func_fabs" >&6; } -if test $ac_cv_func_fabs = yes; then +if test "x$ac_cv_func_fabs" = x""yes; then : else @@ -6805,7 +20336,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_fabs" >&5 $as_echo "$ac_cv_lib_m_fabs" >&6; } -if test $ac_cv_lib_m_fabs = yes; then +if test "x$ac_cv_lib_m_fabs" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -6938,7 +20469,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -6954,8 +20490,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6968,8 +20505,6 @@ done - - for ac_header in inttypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -7088,7 +20623,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -7104,8 +20644,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7235,7 +20776,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -7251,8 +20797,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7456,7 +21003,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 $as_echo "$ac_cv_type_uintptr_t" >&6; } -if test $ac_cv_type_uintptr_t = yes; then +if test "x$ac_cv_type_uintptr_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINTPTR_T 1 @@ -7717,11 +21264,13 @@ done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; '') if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_void_p=0 fi ;; @@ -7797,11 +21346,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_void_p=0 fi @@ -8072,11 +21623,13 @@ done case $ac_lo in ?*) ac_cv_sizeof_unsigned_long=$ac_lo;; '') if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_unsigned_long=0 fi ;; @@ -8152,11 +21705,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_unsigned_long=0 fi @@ -8427,11 +21982,13 @@ done case $ac_lo in ?*) ac_cv_sizeof_unsigned_int=$ac_lo;; '') if test "$ac_cv_type_unsigned_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_unsigned_int=0 fi ;; @@ -8507,11 +22064,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_unsigned_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_unsigned_int=0 fi @@ -8539,6 +22098,7 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_link="./libtool --mode=link --tag=CXX $ac_link" @@ -8661,7 +22221,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -8677,8 +22242,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8865,7 +22431,12 @@ $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compi $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -8881,8 +22452,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$ac_res" >&6; } fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8972,6 +22544,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="./libtool --mode=link --tag=CC $ac_link" @@ -8981,6 +22554,7 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_link="./libtool --mode=link --tag=CXX $ac_link" { $as_echo "$as_me:$LINENO: checking for addressable va_list type" >&5 $as_echo_n "checking for addressable va_list type... " >&6; } @@ -9091,7 +22665,20 @@ _ACEOF -ac_config_files="$ac_config_files Makefile liblcdf/Makefile libefont/Makefile cfftot1/Makefile mmafm/Makefile mmpfb/Makefile otfinfo/Makefile otftotfm/Makefile t1dotlessj/Makefile t1lint/Makefile t1reencode/Makefile t1testpage/Makefile ttftotype42/Makefile" +ac_config_files="$ac_config_files Makefile liblcdf/Makefile libefont/Makefile" + +ac_config_files="$ac_config_files cfftot1/Makefile" +ac_config_files="$ac_config_files mmafm/Makefile" +ac_config_files="$ac_config_files mmpfb/Makefile" +ac_config_files="$ac_config_files otfinfo/Makefile" +ac_config_files="$ac_config_files otftotfm/Makefile" +ac_config_files="$ac_config_files t1dotlessj/Makefile" +ac_config_files="$ac_config_files t1lint/Makefile" +ac_config_files="$ac_config_files t1rawafm/Makefile" +ac_config_files="$ac_config_files t1reencode/Makefile" +ac_config_files="$ac_config_files t1testpage/Makefile" +ac_config_files="$ac_config_files ttftotype42/Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -9120,8 +22707,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -9218,6 +22805,20 @@ $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${have_kpathsea_TRUE}" && test -z "${have_kpathsea_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"have_kpathsea\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"have_kpathsea\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -9540,8 +23141,8 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.62. Invocation command line was +This file was extended by LCDF typetools $as_me 2.76-rc1, which was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -9554,6 +23155,15 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" @@ -9567,16 +23177,17 @@ ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + 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] + --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] + --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: @@ -9593,8 +23204,8 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.62, +LCDF typetools config.status 2.76-rc1 +configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. @@ -9708,6 +23319,358 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' +predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' +postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_ld_CXX \ +hardcode_libdir_separator_CXX \ +fix_srcfile_path_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + +ac_aux_dir='$ac_aux_dir' + + + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -9716,8 +23679,9 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "liblcdf/Makefile") CONFIG_FILES="$CONFIG_FILES liblcdf/Makefile" ;; "libefont/Makefile") CONFIG_FILES="$CONFIG_FILES libefont/Makefile" ;; @@ -9728,6 +23692,7 @@ do "otftotfm/Makefile") CONFIG_FILES="$CONFIG_FILES otftotfm/Makefile" ;; "t1dotlessj/Makefile") CONFIG_FILES="$CONFIG_FILES t1dotlessj/Makefile" ;; "t1lint/Makefile") CONFIG_FILES="$CONFIG_FILES t1lint/Makefile" ;; + "t1rawafm/Makefile") CONFIG_FILES="$CONFIG_FILES t1rawafm/Makefile" ;; "t1reencode/Makefile") CONFIG_FILES="$CONFIG_FILES t1reencode/Makefile" ;; "t1testpage/Makefile") CONFIG_FILES="$CONFIG_FILES t1testpage/Makefile" ;; "ttftotype42/Makefile") CONFIG_FILES="$CONFIG_FILES ttftotype42/Makefile" ;; @@ -9812,7 +23777,8 @@ for ac_last_try in false false false false false :; do $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -10017,9 +23983,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 } split(mac1, mac2, "(") #) macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". - prefix = substr(line, 1, index(line, defundef) - 1) print prefix "define", macro P[macro] D[macro] next } else { @@ -10027,7 +23993,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { - print "/*", line, "*/" + print "/*", prefix defundef, macro, "*/" next } } @@ -10051,8 +24017,8 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -10384,7 +24350,16 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -10508,6 +24483,808 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} done done ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; esac done # for ac_tag @@ -10545,7 +25322,7 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/Build/source/texk/lcdf-typetools/configure.ac b/Build/source/texk/lcdf-typetools/configure.ac index 0c4ce548b0d..9316a2daec9 100644 --- a/Build/source/texk/lcdf-typetools/configure.ac +++ b/Build/source/texk/lcdf-typetools/configure.ac @@ -1,92 +1,19 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(NEWS) -AM_INIT_AUTOMAKE(lcdf-typetools, 2.69) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE +AC_INIT([LCDF typetools], [2.76-rc1], [tex-k@tug.org]) +AC_PREREQ([2.63]) +AC_CONFIG_SRCDIR([NEWS]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) + +dnl Common code for all programs using libkpathsea. +KPSE_COMMON([lcdf-typetools], [check-news]) -AC_PROG_MAKE_SET +AM_CONFIG_HEADER(config.h) -AC_PROG_CC -AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP if test -n "$GCC" ; then CC="$CC -W -Wall" ; CXX="$CXX -W -Wall" ; fi -dnl AN_MAKEVAR([AR], [AC_PROG_AR]) -dnl AN_PROGRAM([ar], [AC_PROG_AR]) -dnl AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) -dnl AC_PROG_AR - -AC_PROG_RANLIB - - -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_template_objs.html -dnl -AC_DEFUN([AC_CXX_TEMPLATE_OBJS], -[AC_CACHE_CHECK(where template objects are stored, ac_cv_cxx_templobjs, - [ ac_cv_cxx_templobjs='unknown' - if test "$GXX" = yes; then - ac_cv_cxx_templobjs='nowhere' - else - case $CXX in - CC|*/CC) - cat > conftest.cc <<EOF -template<class T> class A { public : A () {} }; -template<class T> void f (const A<T>&) {} -main() -{ A<double> d; - A<int> i; - f (d); - f (i); - return 0; -} -EOF - if test "$ac_cv_cxx_templobjs" = 'unknown' ; then - if test -d Templates.DB ; then - rm -fr Templates.DB - fi - if $CXX $CXXFLAGS -ptr. -c conftest.cc 1> /dev/null 2>&1; then - if test -d Templates.DB ; then -# this should be Sun CC <= 4.2 - CXXFLAGS="$CXXFLAGS -ptr." - if test x"$LIBTOOL" = x ; then - ac_cv_cxx_templobjs='Templates.DB/*.o' - else - ac_cv_cxx_templobjs='Templates.DB/*.lo' - fi - rm -fr Templates.DB - fi - fi - fi - if test "$ac_cv_cxx_templobjs" = 'unknown' ; then - if test -d SunWS_cache ; then - rm -fr SunWS_cache - fi - if $CXX $CXXFLAGS -c conftest.cc 1> /dev/null 2>&1; then - if test -d SunWS_cache ; then -# this should be Sun WorkShop C++ compiler 5.x -# or Sun Forte C++ compiler >= 6.x - if test x"$LIBTOOL" = x ; then - ac_cv_cxx_templobjs='SunWS_cache/*/*.o' - else - ac_cv_cxx_templobjs='SunWS_cache/*/*.lo' - fi - rm -fr SunWS_cache - fi - fi - fi - rm -f conftest* ;; - esac - fi - case "x$ac_cv_cxx_templobjs" in - xunknown|xnowhere) - TEMPLATE_OBJS="" ;; - *) - TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; - esac - AC_SUBST(TEMPLATE_OBJS)])]) - AC_CXX_TEMPLATE_OBJS @@ -98,115 +25,67 @@ AC_HEADER_DIRENT dnl -dnl select programs to be compiled +dnl select programs to be compiled, otftotfm auto-options dnl -AC_ARG_ENABLE(cfftot1, [ --disable-cfftot1 do not build the cfftot1 program], :, enable_cfftot1=yes) -AC_ARG_ENABLE(mmafm, [ --disable-mmafm do not build the mmafm program], :, enable_mmafm=yes) -AC_ARG_ENABLE(mmpfb, [ --disable-mmpfb do not build the mmpfb program], :, enable_mmpfb=yes) -AC_ARG_ENABLE(otfinfo, [ --disable-otfinfo do not build the otfinfo program], :, enable_otfinfo=yes) -AC_ARG_ENABLE(otftotfm, [ --disable-otftotfm do not build the otftotfm program], :, enable_otftotfm=yes) -AC_ARG_ENABLE(t1lint, [ --disable-t1dotlessj do not build the t1dotlessj program], :, enable_t1dotlessj=yes) -AC_ARG_ENABLE(t1lint, [ --disable-t1lint do not build the t1lint program], :, enable_t1lint=yes) -AC_ARG_ENABLE(t1reencode, [ --disable-t1reencode do not build the t1reencode program], :, enable_t1reencode=yes) -AC_ARG_ENABLE(t1testpage, [ --disable-t1testpage do not build the t1testpage program], :, enable_t1testpage=yes) -AC_ARG_ENABLE(ttftotype42, [ --disable-ttftotype42 do not build the ttftotype42 program], :, enable_ttftotype42=yes) - -SELECTED_SUBDIRS='' -for i in cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42; do - y=`eval 'echo $enable_'"$i"` - if test "x$y" != xno; then SELECTED_SUBDIRS="$SELECTED_SUBDIRS $i"; fi -done +m4_include([ac/lcdf-typetools.ac]) +SELECTED_SUBDIRS='liblcdf libefont' +AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, + [test "x$enable_[]Kpse_Prog" = xno || SELECTED_SUBDIRS="$SELECTED_SUBDIRS Kpse_Prog" +]) AC_SUBST(SELECTED_SUBDIRS) +AC_FOREACH([Kpse_Opt], kpse_otftotfm_auto_opts, + [AS_IF([test "x$enable_auto_]Kpse_Opt[" != xno], + [AC_DEFINE([HAVE_AUTO_]AS_TR_CPP(Kpse_Opt), 1, + [Define to run ]Kpse_Opt[from otftotfm.])])]) dnl -dnl kpathsea, auto-cfftot1 +dnl kpathsea dnl AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation], :, enable_tetex_build=no) -AC_ARG_WITH(kpathsea, [ --with-kpathsea=PREFIX Kpathsea is installed (under PREFIX)], - [kpathsea=$withval], [kpathsea=]) - -if test "x$kpathsea" = xno; then - KPSEINTERFACE_O= - LIBKPATHSEA= -else - if test "x$enable_tetex_build" = xyes; then - if test ! -d $srcdir/../../texk/kpathsea; then - AC_MSG_ERROR([ -========================================= -You specified --enable-tetex-build, but I can't find the kpathsea -directory. I expected it to be in $srcdir/../../texk/kpathsea. +dnl FIXME: +test -d $srcdir/../kpathsea && enable_tetex_build=yes -=========================================]) - fi - CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk" - LDFLAGS="$LDFLAGS -L\$(top_builddir)/../../texk/kpathsea/.libs" - AC_MSG_NOTICE([tetex build of lcdf-typetools, CPPFLAGS now: $CPPFLAGS]) - elif test "x$kpathsea" != x -a "x$kpathsea" != xyes; then - CPPFLAGS="$CPPFLAGS -I$kpathsea/include" - LDFLAGS="$LDFLAGS -L$kpathsea/lib" - else - kpathsea=yes - fi +AC_ARG_WITH([kpathsea], + [AS_HELP_STRING([--without-kpathsea], + [build otftotfm without kpathsea])]) + KPSE_KPATHSEA_FLAGS - dnl check for kpathsea/kpathsea.h - if test "x$enable_tetex_build" = xyes; then - kpse_header=yes - else - AC_CHECK_HEADER(kpathsea/kpathsea.h, [kpse_header=yes], [kpse_header=no]) - fi +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS - dnl if not found and kpathsea prefix not set, check /usr/local - if test "x$kpse_header" != xyes -a "x$kpathsea" = xyes -a -r /usr/local/include/kpathsea/tex-file.h; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - AC_CHECK_HEADER(kpathsea/tex-file.h, [kpse_header=yes], [kpse_header=no]) - fi +CPPFLAGS="$CPPFLAGS $KPATHSEA_INCLUDES" +LIBS="$KPATHSEA_LIBS $LIBS" - dnl check for -lkpathsea - if test "x$enable_tetex_build" = xyes; then - kpse_library=yes - else - AC_CHECK_LIB(kpathsea, kpse_set_program_name, [kpse_library=yes], [kpse_library=no]) - fi +if test "x$with_kpathsea" != xno; then + AC_MSG_CHECKING([for kpathsea headers and library]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]], + [[kpse_tfm_format;]])], + [AC_MSG_RESULT([yes]) + AC_CHECK_DECLS([kpse_opentype_format], , , + [#include <kpathsea/kpathsea.h>])], + [AC_MSG_RESULT([no]) + with_kpathsea=no]) - dnl bail out if not found - if test "x$kpse_header" != xyes -o "x$kpse_library" != xyes; then - AC_MSG_ERROR([ + if test "x$with_kpathsea" = xno; then + AC_MSG_ERROR([ ========================================= -I can't find the kpathsea library and/or header files. Tell me where to look -using the --with-kpathsea=PREFIX option (header files should be under -PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support -using --without-kpathsea. +I can't find the kpathsea header and/or library files. Tell me where to look +using the --with-kpathsea-includes=DIR option (header files under +DIR/kpathsea) and --with-kpathsea-libdir=DIR option (library under DIR), or +disable support using --without-kpathsea. =========================================]) - fi - - dnl OK, found - AC_DEFINE(HAVE_KPATHSEA, 1, [Define if you want to use kpathsea.]) - KPSEINTERFACE_O='kpseinterface.$(OBJEXT)' - if test "x$enable_tetex_build" = xyes; then - LIBKPATHSEA='$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a' - LIBKPATHSEA_DEP="$LIBKPATHSEA" - else - LIBKPATHSEA='-lkpathsea' - LIBKPATHSEA_DEP='' - fi - - dnl does it have opentype support? - if test "x$enable_tetex_build" = xyes; then - AC_DEFINE(HAVE_DECL_KPSE_OPENTYPE_FORMAT) - else - AC_CHECK_DECLS(kpse_opentype_format, :, :, [#include <kpathsea/kpathsea.h>]) - fi + fi fi -AC_SUBST([KPSEINTERFACE_O]) -AC_SUBST([LIBKPATHSEA]) -AC_SUBST([LIBKPATHSEA_DEP]) +AM_CONDITIONAL([have_kpathsea], [test "x$with_kpathsea" != xno]) + +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS AC_ARG_ENABLE(selfauto-set, [ --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich], :, enable_selfauto_set=yes) @@ -231,20 +110,6 @@ Either supply the correct PREFIX to --with-kpathsea, or supply AC_DEFINE_UNQUOTED(SELFAUTOPARENT, "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable]) fi -AC_ARG_ENABLE(auto-cfftot1, [ --disable-auto-cfftot1 disable running cfftot1 from otftotfm], :, enable_auto_cfftot1=yes) -AC_ARG_ENABLE(auto-t1dotlessj, [ --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm], :, enable_auto_t1dotlessj=yes) -AC_ARG_ENABLE(auto-updmap, [ --disable-auto-updmap disable running updmap from otftotfm], :, enable_auto_updmap=yes) - -if test "x$enable_auto_cfftot1" = xyes; then - AC_DEFINE(HAVE_AUTO_CFFTOT1, 1, [Define to run cfftot1 automatically from otftotfm.]) -fi -if test "x$enable_auto_t1dotlessj" = xyes; then - AC_DEFINE(HAVE_AUTO_T1DOTLESSJ, 1, [Define to run t1dotlessj automatically from otftotfm.]) -fi -if test "x$enable_auto_updmap" = xyes; then - AC_DEFINE(HAVE_AUTO_UPDMAP, 1, [Define to run system updmap automatically from otftotfm.]) -fi - dnl dnl <new> and/or <new.h> @@ -260,7 +125,7 @@ AC_CACHE_CHECK([whether <new> works], ac_cv_good_new_hdr, if test "$ac_cv_good_new_hdr" = yes; then AC_DEFINE(HAVE_NEW_HDR, 1, [Define if <new> exists and works.]) fi -AC_CHECK_HEADERS(new.h) +AC_CHECK_HEADERS([new.h unistd.h]) dnl @@ -269,8 +134,7 @@ dnl headers such as unistd.h dnl AC_LANG_C -FIXLIBC_O='' -AC_CHECK_FUNCS(strerror, :, FIXLIBC_O='fixlibc.o') +AC_CHECK_FUNCS([strdup strerror]) AC_CACHE_CHECK(whether strtod works, ac_cv_working_strtod, [AC_TRY_RUN([#include <stdio.h> @@ -283,7 +147,6 @@ int main(int c, char **v) { }], ac_cv_working_strtod=yes, ac_cv_working_strtod=no, ac_cv_working_strtod=yes)]) if test $ac_cv_working_strtod = no; then - FIXLIBC_O='fixlibc.o' AC_DEFINE(BROKEN_STRTOD, 1, [Define if strtod is broken.]) fi @@ -292,8 +155,6 @@ AC_CHECK_FUNC(floor, :, [AC_CHECK_LIB(m, floor)]) AC_CHECK_FUNC(fabs, :, [AC_CHECK_LIB(m, fabs)]) AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/wait.h) -AC_SUBST(FIXLIBC_O) - dnl dnl integer types @@ -451,8 +312,6 @@ double good_strtod(const char *nptr, char **endptr); #ifdef __cplusplus } -/* Get rid of a possible inline macro under C++. */ -# define inline inline #endif #endif /* LCDF_TYPETOOLS_CONFIG_H */]) @@ -481,4 +340,8 @@ dnl dnl Output dnl -AC_OUTPUT(Makefile liblcdf/Makefile libefont/Makefile cfftot1/Makefile mmafm/Makefile mmpfb/Makefile otfinfo/Makefile otftotfm/Makefile t1dotlessj/Makefile t1lint/Makefile t1reencode/Makefile t1testpage/Makefile ttftotype42/Makefile) +AC_CONFIG_FILES([Makefile liblcdf/Makefile libefont/Makefile]) +AC_FOREACH([Kpse_Prog], kpse_lcdf_typetools_progs, + [AC_CONFIG_FILES(Kpse_Prog[/Makefile])]) + +AC_OUTPUT diff --git a/Build/source/texk/lcdf-typetools/configure.ac.orig b/Build/source/texk/lcdf-typetools/configure.ac.orig new file mode 100644 index 00000000000..0c4ce548b0d --- /dev/null +++ b/Build/source/texk/lcdf-typetools/configure.ac.orig @@ -0,0 +1,484 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(NEWS) +AM_INIT_AUTOMAKE(lcdf-typetools, 2.69) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE + +AC_PROG_MAKE_SET + +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CXX +AC_PROG_CXXCPP +if test -n "$GCC" ; then CC="$CC -W -Wall" ; CXX="$CXX -W -Wall" ; fi + +dnl AN_MAKEVAR([AR], [AC_PROG_AR]) +dnl AN_PROGRAM([ar], [AC_PROG_AR]) +dnl AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) +dnl AC_PROG_AR + +AC_PROG_RANLIB + + +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_template_objs.html +dnl +AC_DEFUN([AC_CXX_TEMPLATE_OBJS], +[AC_CACHE_CHECK(where template objects are stored, ac_cv_cxx_templobjs, + [ ac_cv_cxx_templobjs='unknown' + if test "$GXX" = yes; then + ac_cv_cxx_templobjs='nowhere' + else + case $CXX in + CC|*/CC) + cat > conftest.cc <<EOF +template<class T> class A { public : A () {} }; +template<class T> void f (const A<T>&) {} +main() +{ A<double> d; + A<int> i; + f (d); + f (i); + return 0; +} +EOF + if test "$ac_cv_cxx_templobjs" = 'unknown' ; then + if test -d Templates.DB ; then + rm -fr Templates.DB + fi + if $CXX $CXXFLAGS -ptr. -c conftest.cc 1> /dev/null 2>&1; then + if test -d Templates.DB ; then +# this should be Sun CC <= 4.2 + CXXFLAGS="$CXXFLAGS -ptr." + if test x"$LIBTOOL" = x ; then + ac_cv_cxx_templobjs='Templates.DB/*.o' + else + ac_cv_cxx_templobjs='Templates.DB/*.lo' + fi + rm -fr Templates.DB + fi + fi + fi + if test "$ac_cv_cxx_templobjs" = 'unknown' ; then + if test -d SunWS_cache ; then + rm -fr SunWS_cache + fi + if $CXX $CXXFLAGS -c conftest.cc 1> /dev/null 2>&1; then + if test -d SunWS_cache ; then +# this should be Sun WorkShop C++ compiler 5.x +# or Sun Forte C++ compiler >= 6.x + if test x"$LIBTOOL" = x ; then + ac_cv_cxx_templobjs='SunWS_cache/*/*.o' + else + ac_cv_cxx_templobjs='SunWS_cache/*/*.lo' + fi + rm -fr SunWS_cache + fi + fi + fi + rm -f conftest* ;; + esac + fi + case "x$ac_cv_cxx_templobjs" in + xunknown|xnowhere) + TEMPLATE_OBJS="" ;; + *) + TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; + esac + AC_SUBST(TEMPLATE_OBJS)])]) + +AC_CXX_TEMPLATE_OBJS + + +dnl +dnl directory searching +dnl + +AC_HEADER_DIRENT + + +dnl +dnl select programs to be compiled +dnl + +AC_ARG_ENABLE(cfftot1, [ --disable-cfftot1 do not build the cfftot1 program], :, enable_cfftot1=yes) +AC_ARG_ENABLE(mmafm, [ --disable-mmafm do not build the mmafm program], :, enable_mmafm=yes) +AC_ARG_ENABLE(mmpfb, [ --disable-mmpfb do not build the mmpfb program], :, enable_mmpfb=yes) +AC_ARG_ENABLE(otfinfo, [ --disable-otfinfo do not build the otfinfo program], :, enable_otfinfo=yes) +AC_ARG_ENABLE(otftotfm, [ --disable-otftotfm do not build the otftotfm program], :, enable_otftotfm=yes) +AC_ARG_ENABLE(t1lint, [ --disable-t1dotlessj do not build the t1dotlessj program], :, enable_t1dotlessj=yes) +AC_ARG_ENABLE(t1lint, [ --disable-t1lint do not build the t1lint program], :, enable_t1lint=yes) +AC_ARG_ENABLE(t1reencode, [ --disable-t1reencode do not build the t1reencode program], :, enable_t1reencode=yes) +AC_ARG_ENABLE(t1testpage, [ --disable-t1testpage do not build the t1testpage program], :, enable_t1testpage=yes) +AC_ARG_ENABLE(ttftotype42, [ --disable-ttftotype42 do not build the ttftotype42 program], :, enable_ttftotype42=yes) + +SELECTED_SUBDIRS='' +for i in cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1reencode t1testpage ttftotype42; do + y=`eval 'echo $enable_'"$i"` + if test "x$y" != xno; then SELECTED_SUBDIRS="$SELECTED_SUBDIRS $i"; fi +done +AC_SUBST(SELECTED_SUBDIRS) + + +dnl +dnl kpathsea, auto-cfftot1 +dnl + +AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation], :, enable_tetex_build=no) +AC_ARG_WITH(kpathsea, [ --with-kpathsea=PREFIX Kpathsea is installed (under PREFIX)], + [kpathsea=$withval], [kpathsea=]) + +if test "x$kpathsea" = xno; then + KPSEINTERFACE_O= + LIBKPATHSEA= +else + if test "x$enable_tetex_build" = xyes; then + if test ! -d $srcdir/../../texk/kpathsea; then + AC_MSG_ERROR([ +========================================= + +You specified --enable-tetex-build, but I can't find the kpathsea +directory. I expected it to be in $srcdir/../../texk/kpathsea. + +=========================================]) + fi + CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk" + LDFLAGS="$LDFLAGS -L\$(top_builddir)/../../texk/kpathsea/.libs" + AC_MSG_NOTICE([tetex build of lcdf-typetools, CPPFLAGS now: $CPPFLAGS]) + elif test "x$kpathsea" != x -a "x$kpathsea" != xyes; then + CPPFLAGS="$CPPFLAGS -I$kpathsea/include" + LDFLAGS="$LDFLAGS -L$kpathsea/lib" + else + kpathsea=yes + fi + + dnl check for kpathsea/kpathsea.h + if test "x$enable_tetex_build" = xyes; then + kpse_header=yes + else + AC_CHECK_HEADER(kpathsea/kpathsea.h, [kpse_header=yes], [kpse_header=no]) + fi + + dnl if not found and kpathsea prefix not set, check /usr/local + if test "x$kpse_header" != xyes -a "x$kpathsea" = xyes -a -r /usr/local/include/kpathsea/tex-file.h; then + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + AC_CHECK_HEADER(kpathsea/tex-file.h, [kpse_header=yes], [kpse_header=no]) + fi + + dnl check for -lkpathsea + if test "x$enable_tetex_build" = xyes; then + kpse_library=yes + else + AC_CHECK_LIB(kpathsea, kpse_set_program_name, [kpse_library=yes], [kpse_library=no]) + fi + + dnl bail out if not found + if test "x$kpse_header" != xyes -o "x$kpse_library" != xyes; then + AC_MSG_ERROR([ +========================================= + +I can't find the kpathsea library and/or header files. Tell me where to look +using the --with-kpathsea=PREFIX option (header files should be under +PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support +using --without-kpathsea. + +=========================================]) + fi + + dnl OK, found + AC_DEFINE(HAVE_KPATHSEA, 1, [Define if you want to use kpathsea.]) + KPSEINTERFACE_O='kpseinterface.$(OBJEXT)' + if test "x$enable_tetex_build" = xyes; then + LIBKPATHSEA='$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a' + LIBKPATHSEA_DEP="$LIBKPATHSEA" + else + LIBKPATHSEA='-lkpathsea' + LIBKPATHSEA_DEP='' + fi + + dnl does it have opentype support? + if test "x$enable_tetex_build" = xyes; then + AC_DEFINE(HAVE_DECL_KPSE_OPENTYPE_FORMAT) + else + AC_CHECK_DECLS(kpse_opentype_format, :, :, [#include <kpathsea/kpathsea.h>]) + fi +fi +AC_SUBST([KPSEINTERFACE_O]) +AC_SUBST([LIBKPATHSEA]) +AC_SUBST([LIBKPATHSEA_DEP]) + +AC_ARG_ENABLE(selfauto-set, [ --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich], :, enable_selfauto_set=yes) + +if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_tetex_build" != xyes; then + kpsewhich='kpsewhich' + test "x$kpathsea" != xyes -a -x "$kpathsea/bin/kpsewhich" && kpsewhich="$kpathsea/bin/kpsewhich" + SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null` + SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null` + SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null` + if test -z "$SELFAUTODIR"; then + AC_MSG_WARN([ +========================================= + +Could not extract SELFAUTO variables from $kpsewhich. +Either supply the correct PREFIX to --with-kpathsea, or supply +--disable-selfauto-loc. + +=========================================]) + fi + AC_DEFINE_UNQUOTED(SELFAUTOLOC, "$SELFAUTOLOC", [kpsewhich's $SELFAUTOLOC variable]) + AC_DEFINE_UNQUOTED(SELFAUTODIR, "$SELFAUTODIR", [kpsewhich's $SELFAUTODIR variable]) + AC_DEFINE_UNQUOTED(SELFAUTOPARENT, "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable]) +fi + +AC_ARG_ENABLE(auto-cfftot1, [ --disable-auto-cfftot1 disable running cfftot1 from otftotfm], :, enable_auto_cfftot1=yes) +AC_ARG_ENABLE(auto-t1dotlessj, [ --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm], :, enable_auto_t1dotlessj=yes) +AC_ARG_ENABLE(auto-updmap, [ --disable-auto-updmap disable running updmap from otftotfm], :, enable_auto_updmap=yes) + +if test "x$enable_auto_cfftot1" = xyes; then + AC_DEFINE(HAVE_AUTO_CFFTOT1, 1, [Define to run cfftot1 automatically from otftotfm.]) +fi +if test "x$enable_auto_t1dotlessj" = xyes; then + AC_DEFINE(HAVE_AUTO_T1DOTLESSJ, 1, [Define to run t1dotlessj automatically from otftotfm.]) +fi +if test "x$enable_auto_updmap" = xyes; then + AC_DEFINE(HAVE_AUTO_UPDMAP, 1, [Define to run system updmap automatically from otftotfm.]) +fi + + +dnl +dnl <new> and/or <new.h> +dnl + +AC_LANG_CPLUSPLUS +AC_CACHE_CHECK([whether <new> works], ac_cv_good_new_hdr, +[AC_TRY_LINK([#include <new>], [ + int a; + int *b = new(&a) int; + return 0; +], ac_cv_good_new_hdr=yes, ac_cv_good_new_hdr=no)]) +if test "$ac_cv_good_new_hdr" = yes; then + AC_DEFINE(HAVE_NEW_HDR, 1, [Define if <new> exists and works.]) +fi +AC_CHECK_HEADERS(new.h) + + +dnl +dnl functions such as strerror, working strtod, strtoul, time +dnl headers such as unistd.h +dnl + +AC_LANG_C +FIXLIBC_O='' +AC_CHECK_FUNCS(strerror, :, FIXLIBC_O='fixlibc.o') + +AC_CACHE_CHECK(whether strtod works, ac_cv_working_strtod, +[AC_TRY_RUN([#include <stdio.h> +#include <stdlib.h> +int main(int c, char **v) { + char s[] = "12 "; + char *endp; + double d = strtod(s, &endp); + exit(*endp == 0 ? 1 : 0); +}], ac_cv_working_strtod=yes, ac_cv_working_strtod=no, +ac_cv_working_strtod=yes)]) +if test $ac_cv_working_strtod = no; then + FIXLIBC_O='fixlibc.o' + AC_DEFINE(BROKEN_STRTOD, 1, [Define if strtod is broken.]) +fi + +AC_CHECK_FUNCS(strtoul ctime mkstemp ftruncate sigaction waitpid) +AC_CHECK_FUNC(floor, :, [AC_CHECK_LIB(m, floor)]) +AC_CHECK_FUNC(fabs, :, [AC_CHECK_LIB(m, fabs)]) +AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/wait.h) + +AC_SUBST(FIXLIBC_O) + + +dnl +dnl integer types +dnl + +AC_CHECK_HEADERS(inttypes.h, have_inttypes_h=yes, have_inttypes_h=no) +AC_CHECK_HEADERS(sys/types.h, have_sys_types_h=yes, have_sys_types_h=no) + +if test $have_inttypes_h = no -a $have_sys_types_h = yes; then + AC_CACHE_CHECK([for uintXX_t typedefs], ac_cv_uint_t, + [AC_EGREP_HEADER(dnl +changequote(<<,>>)<<(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]>>changequote([,]), + sys/types.h, ac_cv_uint_t=yes, ac_cv_uint_t=no)]) +fi +if test $have_inttypes_h = no -a $have_sys_types_h = yes -a "$ac_cv_uint_t" = no; then + AC_CACHE_CHECK([for u_intXX_t typedefs], ac_cv_u_int_t, + [AC_EGREP_HEADER(dnl +changequote(<<,>>)<<(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]>>changequote([,]), + sys/types.h, ac_cv_u_int_t=yes, ac_cv_u_int_t=no)]) +fi +if test $have_inttypes_h = yes -o "$ac_cv_uint_t" = yes; then + : +elif test "$ac_cv_u_int_t" = yes; then + AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define if you have u_intXX_t types but not uintXX_t types.]) +else + AC_MSG_WARN([ +========================================= + +Neither uint32_t nor u_int32_t defined by <inttypes.h> or <sys/types.h>! +Assuming "short" has 16 bits and "int" has 32 bits. + +=========================================]) + AC_DEFINE(HAVE_FAKE_INT_TYPES, 1, [Define if intXX_t types are not available.]) +fi + +AC_CHECK_TYPES(uintptr_t, [], [], +[#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +]) + +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(unsigned long) +AC_CHECK_SIZEOF(unsigned int) + + +dnl +dnl ntohs, ntohl (need them in C++ code) +dnl + +AC_LANG_CPLUSPLUS +AC_CHECK_HEADERS(byteorder.h netinet/in.h sys/param.h) +AC_MSG_CHECKING([whether ntohs and ntohl are defined]) +ac_ntoh_defined=no +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_BYTEORDER_H +# include <byteorder.h> +#elif HAVE_NETINET_IN_H +# include <netinet/in.h> +#elif HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif +]], [[(void) ntohs(0x0020), (void) ntohl(0x03040020);]])], + [AC_MSG_RESULT(yes) +ac_ntoh_defined=yes], + [AC_MSG_RESULT(no)]) +if test $ac_ntoh_defined = no; then + AC_CHECK_HEADERS([arpa/inet.h], [have_arpa_inet_h=yes], [have_arpa_inet_h=no]) + if test $have_arpa_inet_h = yes; then + AC_MSG_CHECKING([whether ntohs and ntohl are defined in <arpa/inet.h>]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#include <arpa/inet.h> +]], [[(void) ntohs(0x0020), (void) ntohl(0x03040020);]])], + [AC_MSG_RESULT(yes) +AC_DEFINE(NEED_ARPA_INET_H, 1, [Define to 1 if you must include <arpa/inet.h> to get `ntohl'.]) +ac_ntoh_defined=yes], + [AC_MSG_RESULT(no)]) + fi +fi +if test $ac_ntoh_defined = no; then + AC_MSG_ERROR([ +========================================= + +Cannot find a definition for ntohs and/or ntohl! + +=========================================]) +fi +AC_LANG_C + + +dnl +dnl is va_list addressable? +dnl + +AC_LANG_CPLUSPLUS +AC_CACHE_CHECK([for addressable va_list type], + ac_cv_va_list_addr, + [AC_TRY_COMPILE([#include <stdarg.h> +void f(va_list *) { +} +void g(va_list val) { + f(&val); +} +void h(int a, ...) { + va_list val; + va_start(val, a); + g(val); + va_end(val); +}], [h(2, 3, 4);], ac_cv_va_list_addr=yes, ac_cv_va_list_addr=no)]) +if test "x$ac_cv_va_list_addr" = xyes; then + AC_DEFINE(HAVE_ADDRESSABLE_VA_LIST, 1, [Define if the va_list type is addressable.]) +fi + + +dnl +dnl verbatim portions of the header +dnl + +AC_DEFINE(HAVE_PERMSTRING, 1, [Define if PermStrings are available.]) +AC_DEFINE(MMAFM_RUN_MMPFB, 1, [Define to 0 if you don't want mmafm to run mmpfb when it needs to get an intermediate master conversion program.]) +dnl PATHNAME_SEPARATOR? + +AH_TOP([#ifndef LCDF_TYPETOOLS_CONFIG_H +#define LCDF_TYPETOOLS_CONFIG_H]) + +AH_BOTTOM([/* Allow compilation on Windows (thanks, Fabrice Popineau). */ +#ifdef WIN32 +# include <win32lib.h> +#else +# define CDECL /* nothing */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Prototype strerror if we don't have it. */ +#if !HAVE_STRERROR +char *strerror(int errno); +#endif + +/* Prototype good_strtod if we need it. */ +#if BROKEN_STRTOD +double good_strtod(const char *nptr, char **endptr); +#endif + +#ifdef __cplusplus +} +/* Get rid of a possible inline macro under C++. */ +# define inline inline +#endif + +#endif /* LCDF_TYPETOOLS_CONFIG_H */]) + + +dnl +dnl set path variables +dnl + +shell_expand () { + val=`eval echo '$'"$1"` + while echo "x$val" | fgrep '$' >/dev/null 2>&1; do val=`eval echo "$val"`; done + eval "$1='$val'" +} + +dnl Preset $prefix and $exec_prefix. +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +shell_expand datadir + +AC_DEFINE_UNQUOTED(SHAREDIR, "$datadir/lcdf-typetools", [Data directory.]) + + +dnl +dnl Output +dnl + +AC_OUTPUT(Makefile liblcdf/Makefile libefont/Makefile cfftot1/Makefile mmafm/Makefile mmpfb/Makefile otfinfo/Makefile otftotfm/Makefile t1dotlessj/Makefile t1lint/Makefile t1reencode/Makefile t1testpage/Makefile ttftotype42/Makefile) diff --git a/Build/source/texk/lcdf-typetools/include/efont/afm.hh b/Build/source/texk/lcdf-typetools/include/efont/afm.hh index 465ff87dd54..f462e0079a4 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/afm.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/afm.hh @@ -13,46 +13,46 @@ struct AfmMetricsXt: public MetricsXt { Vector<PermString> opening_comments; PermString notice; PermString encoding_scheme; - + PermString kind() const { return "AFM"; } - + }; class AfmReader { public: static Metrics *read(const Filename &, ErrorHandler *); static Metrics *read(Slurper &, ErrorHandler *); - + private: - + Metrics *_afm; AfmMetricsXt *_afm_xt; AfmParser &_l; ErrorHandler *_errh; - + mutable bool _composite_warned; mutable bool _metrics_sets_warned; mutable int _y_width_warned; - + void lwarning(const char *, ...) const; void lerror(const char *, ...) const; void composite_warning() const; void metrics_sets_warning() const; void y_width_warning() const; void no_match_warning(const char *context = 0) const; - + double &fd(int i) { return _afm->fd(i); } GlyphIndex find_err(PermString, const char *) const; - + void read_char_metric_data() const; void read_char_metrics() const; void read_kerns() const; void read_composites() const; - + bool read(); - + AfmReader(AfmParser &, Metrics *, AfmMetricsXt *, ErrorHandler *); - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/afmparse.hh b/Build/source/texk/lcdf-typetools/include/efont/afmparse.hh index 5a5350a55c7..c29d990ceab 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/afmparse.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/afmparse.hh @@ -7,49 +7,49 @@ namespace Efont { class AfmParser { public: - + AfmParser(Slurper &); - + bool ok() const { return _slurper.ok(); } operator Landmark() const { return _slurper.landmark(); } Landmark landmark() const { return _slurper.landmark(); } unsigned lineno() const { return _slurper.lineno(); } const Filename &filename() const { return _slurper.filename(); } - + bool key_matched() const { return _fail_field >= 0; } int fail_field() const { return _fail_field; } PermString message() const { return _message; } void clear_message() { _message = PermString(); } - + PermString keyword() const; bool is(const char *, ...); bool isall(const char *, ...); - + inline bool next_line(); void save_line() { _slurper.save_line(); } void skip_until(unsigned char); - + unsigned char *cur_line() const { return _pos; } unsigned char first() const { return _pos[0]; } unsigned char operator[](int i) const { return _pos[i]; } bool left() const { return *_pos != 0; } private: - + Slurper &_slurper; bool _save_line; - + unsigned char *_line; unsigned char *_pos; int _length; - + PermString _message; int _fail_field; - + void static_initialize(); void trim_end(); unsigned char *vis(const char *, va_list); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/afmw.hh b/Build/source/texk/lcdf-typetools/include/efont/afmw.hh index fa883517999..4eda701b688 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/afmw.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/afmw.hh @@ -13,16 +13,16 @@ class AfmWriter { public: Metrics *_m; AfmMetricsXt *_afm_xt; FILE *_f; - + void write_prologue() const; void write_char_metric_data(GlyphIndex, int) const; void write_kerns() const; void write(); - + double fd(int i) const { return _m->fd(i); } - + AfmWriter(Metrics *, FILE *); - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/amfm.hh b/Build/source/texk/lcdf-typetools/include/efont/amfm.hh index 27e87c093ca..6cc1db90b6e 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/amfm.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/amfm.hh @@ -14,124 +14,124 @@ class Type1Charstring; struct AmfmMaster { - + PermString font_name; PermString family; PermString full_name; PermString version; Vector<double> weight_vector; - + bool loaded; Metrics *afm; - + AmfmMaster() : loaded(0), afm(0) { } - + }; struct AmfmPrimaryFont { - + Vector<int> design_vector; Vector<PermString> labels; PermString name; AmfmPrimaryFont *next; - + }; class AmfmMetrics { public: - + AmfmMetrics(MetricsFinder *); ~AmfmMetrics(); - + void use() { _uses++; } void unuse() { if (--_uses == 0) delete this; } - + bool sanity(ErrorHandler *) const; - + double fd(int i) const { return _fdv[i]; } double &fd(int i) { return _fdv[i]; } - + PermString font_name() const { return _font_name; } PermString directory() const { return _directory; } - + int naxes() const { return _naxes; } int nmasters() const { return _nmasters; } MultipleMasterSpace *mmspace() const { return _mmspace; } - + int primary_label_value(int, PermString) const; - + Metrics *interpolate(const Vector<double> &design, const Vector<double> &weight, ErrorHandler *); - + private: - + MetricsFinder *_finder; PermString _directory; - + Vector<double> _fdv; - + PermString _font_name; PermString _family; PermString _full_name; PermString _weight; - + PermString _version; PermString _notice; Vector<PermString> _opening_comments; - + PermString _encoding_scheme; Vector<double> _weight_vector; - + int _nmasters; int _naxes; AmfmMaster *_masters; MultipleMasterSpace *_mmspace; - + AmfmPrimaryFont *_primary_fonts; - + Metrics *_sanity_afm; unsigned _uses; - + friend class AmfmReader; - + AmfmMetrics(const AmfmMetrics &) { assert(0); } AmfmMetrics &operator=(const AmfmMetrics &) { assert(0); return *this; } - + AmfmPrimaryFont *find_primary_font(const Vector<double> &design) const; - + Metrics *master(int, ErrorHandler *); - + }; class AmfmReader { public: - + static AmfmMetrics *read(const Filename &, MetricsFinder *, ErrorHandler*); static AmfmMetrics *read(Slurper &, MetricsFinder *, ErrorHandler *); static void add_amcp_file(Slurper &, AmfmMetrics *, ErrorHandler *); private: - + typedef Vector<double> NumVector; - + AmfmMetrics *_amfm; MetricsFinder *_finder; AfmParser &_l; MultipleMasterSpace *_mmspace; ErrorHandler *_errh; - + double &fd(int i) const { return _amfm->fd(i); } int naxes() const { return _amfm->_naxes; } int nmasters() const { return _amfm->_nmasters; } void check_mmspace(); - + void lwarning(const char *, ...) const; void lerror(const char *, ...) const; void no_match_warning(const char *context = 0) const; - + bool read_simple_array(Vector<double> &) const; void read_positions() const; void read_normalize() const; @@ -142,11 +142,11 @@ class AmfmReader { public: void read_one_primary_font() const; void read_conversion_programs() const; bool read(); - + void read_amcp_file(); AmfmReader(AfmParser &, AmfmMetrics *, ErrorHandler *); - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/cff.hh b/Build/source/texk/lcdf-typetools/include/efont/cff.hh index 775f56498f6..f965bd60c07 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/cff.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/cff.hh @@ -40,7 +40,7 @@ class Cff { public: int ngsubrs() const { return _gsubrs_index.nitems(); } Charstring *gsubr(int i); - + enum DictOperator { oVersion = 0, oNotice = 1, oFullName = 2, oFamilyName = 3, oWeight = 4, oFontBBox = 5, oBlueValues = 6, oOtherBlues = 7, @@ -79,7 +79,7 @@ class Cff { public: IndexIterator(const uint8_t *, int, int, ErrorHandler * = 0, const char *index_name = "INDEX"); int error() const { return (_offsize < 0 ? _offsize : 0); } - + bool live() const { return _offset < _last_offset; } operator bool() const { return live(); } int nitems() const; @@ -90,18 +90,18 @@ class Cff { public: void operator++() { _offset += _offsize; } void operator++(int) { ++(*this); } - + private: - + const uint8_t *_contents; const uint8_t *_offset; const uint8_t *_last_offset; int _offsize; inline uint32_t offset_at(const uint8_t *) const; - + }; - + private: String _data_string; @@ -109,7 +109,7 @@ class Cff { public: int _len; int _error; - + Vector<PermString> _name_index; IndexIterator _top_dict_index; @@ -126,7 +126,7 @@ class Cff { public: int font_offset(PermString, int &, int &) const; enum { HEADER_SIZE = 4 }; - + }; @@ -135,7 +135,7 @@ class Cff::Dict { public: Dict(); Dict(Cff *, int pos, int dict_len, ErrorHandler * = 0, const char *dict_name = "DICT"); int assign(Cff *, int pos, int dict_len, ErrorHandler * = 0, const char *dict_name = "DICT"); - + bool ok() const { return _error >= 0; } int error() const { return _error; } @@ -170,13 +170,13 @@ class Cff::Charset { public: void assign(const Cff *, int pos, int nglyphs, int max_sid, ErrorHandler * = 0); int error() const { return _error; } - + int nglyphs() const { return _sids.size(); } int nsids() const { return _gids.size(); } - + inline int gid_to_sid(int gid) const; inline int sid_to_gid(int sid) const; - + private: Vector<int> _sids; @@ -185,7 +185,7 @@ class Cff::Charset { public: void assign(const int *, int, int); int parse(const Cff *, int pos, int nglyphs, int max_sid, ErrorHandler *); - + }; class Cff::FDSelect { public: @@ -195,10 +195,10 @@ class Cff::FDSelect { public: void assign(const Cff *, int pos, int nglyphs, ErrorHandler * = 0); int error() const { return _error; } - + int nglyphs() const { return _nglyphs; } inline int gid_to_fd(int gid) const; - + private: const uint8_t *_fds; @@ -209,7 +209,7 @@ class Cff::FDSelect { public: FDSelect(const FDSelect &); FDSelect &operator=(const FDSelect &); int parse(const Cff *, int pos, int nglyphs, ErrorHandler *); - + }; @@ -233,9 +233,9 @@ class Cff::FontParent : public CharstringProgram { public: FontParent(const FontParent &); FontParent &operator=(const FontParent &); - + Charstring *charstring(const IndexIterator &, int) const; - + friend class Cff::Font; friend class Cff::CIDFont; friend class Cff::ChildFont; @@ -263,7 +263,7 @@ class Cff::CIDFont : public Cff::FontParent { public: bool dict_value(DictOperator, double *) const; bool dict_xvalue(DictOperator, double, double *) const; bool dict_value(DictOperator, Vector<double> &) const; - + private: PermString _font_name; @@ -280,7 +280,7 @@ class Cff::CIDFont : public Cff::FontParent { public: Cff::FDSelect _fdselect; const Dict &dict_of(DictOperator) const; - + }; class Cff::ChildFont : public Cff::FontParent { public: @@ -293,9 +293,9 @@ class Cff::ChildFont : public Cff::FontParent { public: PermString font_name() const { return _parent->font_name(); } void font_matrix(double m[6]) const { _parent->font_matrix(m); } - + inline bool cid() const; - + int nsubrs_x() const { return _subrs_index.nitems(); } int nsubrs() const { return nsubrs_x(); } Charstring *subr(int) const; @@ -308,7 +308,7 @@ class Cff::ChildFont : public Cff::FontParent { public: Charstring *glyph(PermString n) const { return _parent->glyph(n); } double global_width_x(bool) const; - + private: Cff::CIDFont *_parent; @@ -328,7 +328,7 @@ class Cff::ChildFont : public Cff::FontParent { public: Charstring *charstring(const IndexIterator &, int) const; friend class Cff::Font; - + }; class Cff::Font : public Cff::ChildFont { public: @@ -354,7 +354,7 @@ class Cff::Font : public Cff::ChildFont { public: inline bool dict_value(DictOperator, double *) const; inline bool dict_value(DictOperator, Vector<double> &) const; const Dict &top_dict() const { return _top_dict; } - + private: PermString _font_name; @@ -372,7 +372,7 @@ class Cff::Font : public Cff::ChildFont { public: int assign_standard_encoding(const int *standard_encoding); inline const Dict &dict_of(DictOperator) const; - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/encoding.hh b/Build/source/texk/lcdf-typetools/include/efont/encoding.hh index 59758b06607..fd8d749acec 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/encoding.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/encoding.hh @@ -6,21 +6,21 @@ namespace Efont { typedef int GlyphIndex; class Encoding8 { - + Vector<GlyphIndex> _codes; Vector<int> _code_map; - + public: - + Encoding8() : _code_map(256, -1) { } void reserve_glyphs(int); - + int code(GlyphIndex gi) const { return _codes[gi]; } GlyphIndex find_code(int c) const { return _code_map[c]; } void set_code(GlyphIndex gi, int c) { _codes[gi] = c; _code_map[c] = gi; } - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/findmet.hh b/Build/source/texk/lcdf-typetools/include/efont/findmet.hh index dcfa8fb438a..74b3ecee141 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/findmet.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/findmet.hh @@ -31,7 +31,7 @@ class MetricsFinder { public: virtual void record(AmfmMetrics *); private: - + MetricsFinder *_next; MetricsFinder *_prev; @@ -50,7 +50,7 @@ class CacheMetricsFinder: public MetricsFinder { public: CacheMetricsFinder(); ~CacheMetricsFinder(); - + Metrics *find_metrics_x(PermString, MetricsFinder *, ErrorHandler *); AmfmMetrics *find_amfm_x(PermString, MetricsFinder *, ErrorHandler *); void record(Metrics *, PermString); @@ -59,55 +59,55 @@ class CacheMetricsFinder: public MetricsFinder { public: void clear(); private: - + HashMap<PermString, int> _metrics_map; Vector<Metrics *> _metrics; HashMap<PermString, int> _amfm_map; Vector<AmfmMetrics *> _amfm; - + }; class InstanceMetricsFinder: public MetricsFinder { public: - + InstanceMetricsFinder(bool call_mmpfb = true); - + Metrics *find_metrics_x(PermString, MetricsFinder *, ErrorHandler *); - + private: bool _call_mmpfb; - + Metrics *find_metrics_instance(PermString, MetricsFinder *, ErrorHandler *); - + }; class PsresMetricsFinder: public MetricsFinder { public: PsresMetricsFinder(PsresDatabase *); - + Metrics *find_metrics_x(PermString, MetricsFinder *, ErrorHandler *); AmfmMetrics *find_amfm_x(PermString, MetricsFinder *, ErrorHandler *); - + private: - + PsresDatabase *_psres; - + }; class DirectoryMetricsFinder: public MetricsFinder { public: - + DirectoryMetricsFinder(PermString); - + Metrics *find_metrics_x(PermString, MetricsFinder *, ErrorHandler *); AmfmMetrics *find_amfm_x(PermString, MetricsFinder *, ErrorHandler *); - + private: - + PermString _directory; - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/metrics.hh b/Build/source/texk/lcdf-typetools/include/efont/metrics.hh index ae0a61126ed..21a5f1796fb 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/metrics.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/metrics.hh @@ -14,26 +14,26 @@ class Metrics { public: Metrics(); Metrics(PermString font_name, PermString full_name, const Metrics &); ~Metrics(); - + void use() { _uses++; } void unuse() { if (--_uses == 0) delete this; } - + // GLOBALS - + PermString font_name() const { return _font_name; } PermString family() const { return _family; } PermString full_name() const { return _full_name; } PermString weight() const { return _weight; } PermString version() const { return _version; } - + void set_font_name(PermString); void set_family(PermString s) { _family = s; } void set_full_name(PermString s) { _full_name = s; } void set_weight(PermString s) { _weight = s; } void set_version(PermString s) { _version = s; } - + // GLYPHS - + int nglyphs() const { return _names.size(); } PermString name(GlyphIndex gi) const { return _names[gi]; } GlyphIndex find(PermString n) const { return _name_map[n]; } @@ -41,18 +41,18 @@ class Metrics { public: int code(GlyphIndex gi) const { return _encoding.code(gi); } GlyphIndex find_code(int c) const { return _encoding.find_code(c); } void set_code(GlyphIndex gi, int c) { _encoding.set_code(gi, c); } - + GlyphIndex add_glyph(PermString); void reserve_glyphs(int); - + // DIMENSIONS - + double scale() const { return _scale; } void set_scale(double d) { _scale = d; } - + int nfd() const { return _fdv.size(); } int nkv() const { return _kernv.size(); } - + double fd(int i) const { return _fdv[i]; } double wd(int i) const { return _wdv[i]; } double lf(int i) const { return _lfv[i]; } @@ -60,7 +60,7 @@ class Metrics { public: double tp(int i) const { return _tpv[i]; } double bt(int i) const { return _btv[i]; } double kv(int i) const { return _kernv[i]; } - + double &fd(int i) { return _fdv[i]; } double &wd(int i) { return _wdv[i]; } double &lf(int i) { return _lfv[i]; } @@ -68,13 +68,13 @@ class Metrics { public: double &tp(int i) { return _tpv[i]; } double &bt(int i) { return _btv[i]; } double &kv(int i) { return _kernv[i]; } - + inline int add_kv(double d); - + void interpolate_dimens(const Metrics &, double, bool increment); - + // PAIR PROGRAM - + PairProgram *pair_program() { return &_pairp; } const PairProgram *pair_program() const { return &_pairp; } inline bool add_kern(GlyphIndex, GlyphIndex, int); @@ -86,73 +86,73 @@ class Metrics { public: void add_xt(MetricsXt *); private: - + PermString _font_name; - + PermString _family; PermString _full_name; PermString _weight; PermString _version; - + HashMap<PermString, GlyphIndex> _name_map; Vector<PermString> _names; Encoding8 _encoding; - + double _scale; - + Vector<double> _fdv; Vector<double> _wdv; Vector<double> _lfv; Vector<double> _rtv; Vector<double> _tpv; Vector<double> _btv; - + PairProgram _pairp; Vector<double> _kernv; - + HashMap<PermString, int> _xt_map; Vector<MetricsXt *> _xt; unsigned _uses; - + }; class MetricsXt { - + public: - + MetricsXt() { } virtual ~MetricsXt() { } - + virtual PermString kind() const = 0; - + virtual void reserve_glyphs(int) { } - + }; enum FontDimensionDefs { - + fdCapHeight = 0, fdXHeight, fdAscender, fdDescender, - + fdItalicAngle, fdUnderlinePosition, fdUnderlineThickness, - + fdFontBBllx, fdFontBBlly, fdFontBBurx, fdFontBBury, - + fdStdHW, fdStdVW, - + fdLast - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/otf.hh b/Build/source/texk/lcdf-typetools/include/efont/otf.hh index 0333e70e3f5..3c699c2143b 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otf.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otf.hh @@ -10,7 +10,7 @@ class Name; typedef int Glyph; // 16-bit integer class Tag { public: - + Tag() : _tag(0U) { } explicit Tag(uint32_t tag) : _tag(tag) { } Tag(const char*); @@ -20,9 +20,9 @@ class Tag { public: bool null() const { return _tag == 0; } operator bool() const { return _tag != 0; } bool valid() const; - + uint32_t value() const { return _tag; } - + String text() const; static String langsys_text(Tag script, Tag langsys = Tag()); @@ -31,7 +31,7 @@ class Tag { public: const char* script_description() const; const char* language_description() const; const char* feature_description() const; - + private: uint32_t _tag; @@ -59,7 +59,7 @@ class Font { public: static uint32_t checksum(const uint8_t *, const uint8_t *); static uint32_t checksum(const String &); static Font make(bool truetype, const Vector<Tag>& tags, const Vector<String>& data); - + enum { HEADER_SIZE = 12, TABLE_DIR_ENTRY_SIZE = 16 }; private: @@ -68,7 +68,7 @@ class Font { public: int _error; int parse_header(ErrorHandler*); - + }; class ScriptList { public: @@ -82,20 +82,20 @@ class ScriptList { public: int language_systems(Vector<Tag>& scripts, Vector<Tag>& langsys, ErrorHandler* = 0) const; int features(Tag script, Tag langsys, int& required_fid, Vector<int>& fids, ErrorHandler* = 0, bool clear_fids = true) const; - + private: enum { SCRIPTLIST_HEADERSIZE = 2, SCRIPT_RECSIZE = 6, SCRIPT_HEADERSIZE = 4, LANGSYS_RECSIZE = 6, LANGSYS_HEADERSIZE = 6, FEATURE_RECSIZE = 2 }; - + String _str; int check_header(ErrorHandler*); int script_offset(Tag) const; int check_script(Tag, int, ErrorHandler*) const; int langsys_offset(Tag, Tag, ErrorHandler* = 0) const; - + }; class FeatureList { public: @@ -125,13 +125,13 @@ class FeatureList { public: enum { FEATURELIST_HEADERSIZE = 2, FEATURE_RECSIZE = 6, FEATURE_HEADERSIZE = 4, LOOKUPLIST_RECSIZE = 2 }; - + String _str; int check_header(ErrorHandler*); int script_offset(Tag) const; int langsys_offset(Tag, Tag, ErrorHandler* = 0) const; - + }; class Coverage { public: @@ -149,7 +149,7 @@ class Coverage { public: void unparse(StringAccum&) const throw (); String unparse() const throw (); - + class iterator { public: iterator() : _pos(0), _value(0) { } // private constructor @@ -157,11 +157,11 @@ class Coverage { public: bool ok() const { return _pos < _str.length(); } operator bool() const { return ok(); } - + Glyph operator*() const { return _value; } Glyph value() const { return _value; } int coverage_index() const; - + void operator++(int); void operator++() { (*this)++; } bool forward_to(Glyph); @@ -173,7 +173,7 @@ class Coverage { public: bool operator>(const iterator& o) { return _value > o._value; } bool operator==(const iterator& o) { return _value == o._value; } bool operator!=(const iterator& o) { return _value != o._value; } - + private: String _str; int _pos; @@ -181,20 +181,20 @@ class Coverage { public: friend class Coverage; iterator(const String&, int); }; - + iterator begin() const { return iterator(_str, 0); } iterator end() const { return iterator(_str, _str.length()); } Glyph operator[](int) const throw (); - + enum { T_LIST = 1, T_RANGES = 2, HEADERSIZE = 4, LIST_RECSIZE = 2, RANGES_RECSIZE = 6 }; - + private: String _str; int check(ErrorHandler*); - + }; Coverage operator&(const Coverage&, const Coverage&); @@ -216,9 +216,9 @@ class GlyphSet { public: int change(Glyph, bool); void insert(Glyph g) { change(g, true); } void remove(Glyph g) { change(g, false); } - + GlyphSet& operator=(const GlyphSet&); - + private: enum { GLYPHBITS = 16, SHIFT = 8, @@ -244,18 +244,18 @@ class ClassDef { public: void unparse(StringAccum&) const throw (); String unparse() const throw (); - + class class_iterator { public: // private constructor // default destructor bool ok() const { return _pos < _str.length(); } operator bool() const { return ok(); } - + Glyph operator*() const { return *_coviter; } Glyph value() const { return *_coviter; } int class_value() const { return _class; } - + void operator++(int); void operator++() { (*this)++; } @@ -266,7 +266,7 @@ class ClassDef { public: bool operator>(const class_iterator& o) { return _coviter > o._coviter; } bool operator==(const class_iterator& o) { return _coviter == o._coviter; } bool operator!=(const class_iterator& o) { return _coviter != o._coviter; } - + private: String _str; int _pos; @@ -286,7 +286,7 @@ class ClassDef { public: enum { T_LIST = 1, T_RANGES = 2, LIST_HEADERSIZE = 6, LIST_RECSIZE = 2, RANGES_HEADERSIZE = 4, RANGES_RECSIZE = 6 }; - + private: String _str; diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfcmap.hh b/Build/source/texk/lcdf-typetools/include/efont/otfcmap.hh index 7f732364bff..de7558ed35f 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfcmap.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfcmap.hh @@ -29,14 +29,14 @@ class Cmap { public: HIBYTE_SUBHEADERS = 524 }; enum Format { F_BYTE = 0, F_HIBYTE = 2, F_SEGMENTED = 4, F_TRIMMED = 6, F_HIBYTE32 = 8, F_TRIMMED32 = 10, F_SEGMENTED32 = 12 }; - + int parse_header(ErrorHandler *); int first_unicode_table() const { return _first_unicode_table; } int first_table(int platform, int encoding) const; int check_table(int t, ErrorHandler * = 0) const; Glyph map_table(int t, uint32_t, ErrorHandler * = 0) const; void dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler * = 0) const; - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfdata.hh b/Build/source/texk/lcdf-typetools/include/efont/otfdata.hh index b8df8b6dcbf..b6e10e46f9a 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfdata.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfdata.hh @@ -29,12 +29,12 @@ namespace Efont { namespace OpenType { class Error { public: String description; - Error() : description(String::stable_string("unspecified error")) { } + Error() : description(String::make_stable("unspecified error")) { } Error(const String &d) : description(d) { } }; class Bounds : public Error { public: - Bounds() : Error(String::stable_string("bounds error")) { } + Bounds() : Error(String::make_stable("bounds error")) { } }; class Format : public Error { public: @@ -63,7 +63,7 @@ class Data { public: inline uint8_t operator[](unsigned offset) const throw (Bounds); inline uint16_t u16(unsigned offset) const throw (Bounds); inline int16_t s16(unsigned offset) const throw (Bounds); - inline uint32_t u32(unsigned offset) const throw (Bounds); + inline uint32_t u32(unsigned offset) const throw (Bounds); inline int32_t s32(unsigned offset) const throw (Bounds); Data subtable(unsigned offset) const throw (Bounds); @@ -75,7 +75,7 @@ class Data { public: private: String _str; - + }; inline uint8_t Data::operator[](unsigned offset) const throw (Bounds) diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh b/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh index bc274285485..689795ff390 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfgpos.hh @@ -17,15 +17,15 @@ class Gpos { public: int nlookups() const; GposLookup lookup(unsigned) const; - + enum { HEADERSIZE = 10 }; - + private: ScriptList _script_list; FeatureList _feature_list; Data _lookup_list; - + }; class GposLookup { public: @@ -109,7 +109,7 @@ class Positioning { public: // single positioning inline Positioning(const Position &); - + // pair positioning inline Positioning(const Position &, const Position &); @@ -127,15 +127,15 @@ class Positioning { public: Glyph left_glyph() const { return _left.g; } const Position &right() const { return _right; } Glyph right_glyph() const { return _right.g; } - + void unparse(StringAccum &, const Vector<PermString> * = 0) const; String unparse(const Vector<PermString> * = 0) const; - + private: Position _left; Position _right; - + }; inline int GposValue::size(uint16_t format) diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh b/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh index a930b12f7ab..38588e449c4 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfgsub.hh @@ -20,14 +20,14 @@ class Gsub { public: GsubLookup lookup(unsigned) const; enum { HEADERSIZE = 10 }; - + private: ScriptList _script_list; FeatureList _feature_list; Data _lookup_list; bool _chaincontext_reverse_backtrack; - + }; class GsubLookup { public: @@ -117,20 +117,20 @@ class Substitution { public: // single substitution Substitution(Glyph in, Glyph out); - + // multiple substitution Substitution(Glyph in, const Vector<Glyph> &out, bool is_alternate = false); - + // ligature substitution Substitution(Glyph in1, Glyph in2, Glyph out); Substitution(const Vector<Glyph> &in, Glyph out); Substitution(int nin, const Glyph *in, Glyph out); - + // space Substitution(int nleft, int nin, int nout, int nright); - + ~Substitution(); - + Substitution &operator=(const Substitution &); bool context_in(const Coverage &) const; @@ -154,22 +154,22 @@ class Substitution { public: inline int left_nglyphs() const; inline Glyph *left_glyphptr(); inline const Glyph *left_glyphptr() const; - + inline Glyph in_glyph() const; inline Glyph in_glyph(int pos) const; inline bool in_glyphs(Vector<Glyph> &) const; inline int in_nglyphs() const; inline Glyph *in_glyphptr(); inline const Glyph *in_glyphptr() const; - + inline bool in_matches(int pos, Glyph) const; - + inline Glyph out_glyph() const; inline Glyph out_glyph(int pos) const; inline bool out_glyphs(Vector<Glyph> &) const; inline Glyph *out_glyphptr(); inline const Glyph *out_glyphptr() const; - + inline int out_nglyphs() const; inline Glyph right_glyph() const; inline Glyph *right_glyphptr(); @@ -177,7 +177,7 @@ class Substitution { public: bool all_in_glyphs(Vector<Glyph> &) const; bool all_out_glyphs(Vector<Glyph> &) const; - + // alter void add_outer_left(Glyph); void remove_outer_left(); @@ -188,7 +188,7 @@ class Substitution { public: void unparse(StringAccum &, const Vector<PermString> * = &debug_glyph_names) const; String unparse(const Vector<PermString> * = &debug_glyph_names) const; - + private: enum { T_NONE = 0, T_GLYPH, T_GLYPHS, T_COVERAGE }; @@ -229,7 +229,7 @@ class Substitution { public: static bool matches(const Substitute &, uint8_t, int pos, Glyph) throw (); static void unparse_glyphids(StringAccum &, const Substitute &, uint8_t, const Vector<PermString> *) throw (); - + }; inline Substitution::Substitution() diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfname.hh b/Build/source/texk/lcdf-typetools/include/efont/otfname.hh index 7643b66923d..c91fc5af95f 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfname.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfname.hh @@ -26,7 +26,7 @@ class Name { public: E_MS_UNICODE_BMP = 1, E_MAC_ROMAN = 0, L_MS_ENGLISH_AMERICAN = 0x409 }; enum { HEADER_SIZE = 6, NAMEREC_SIZE = 12 }; - + typedef uint8_t namerecord_t[NAMEREC_SIZE]; typedef const namerecord_t *const_iterator; @@ -34,7 +34,7 @@ class Name { public: inline static int platform(const namerecord_t &); inline static int encoding(const namerecord_t &); inline static int language(const namerecord_t &); - + inline const_iterator begin() const; inline const_iterator end() const; String name(const_iterator) const; @@ -43,14 +43,14 @@ class Name { public: // check version string for backwards compatibility bool version_chaincontext_reverse_backtrack() const; - + struct PlatformPred { inline PlatformPred(int nameid, int platform = -1, int encoding = -1, int language = -1); inline bool operator()(const namerecord_t &) const; private: int _nameid, _platform, _encoding, _language; }; - + struct EnglishPlatformPred { EnglishPlatformPred(int nameid) : _nameid(nameid) { } inline bool operator()(const namerecord_t &) const; @@ -64,7 +64,7 @@ class Name { public: int _error; int parse_header(ErrorHandler *); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfos2.hh b/Build/source/texk/lcdf-typetools/include/efont/otfos2.hh index 23cc513715a..e8c803008f6 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfos2.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfos2.hh @@ -36,7 +36,7 @@ class Os2 { public: int _error; int parse_header(ErrorHandler *); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/otfpost.hh b/Build/source/texk/lcdf-typetools/include/efont/otfpost.hh index 4d7ff64146c..58651583fcb 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/otfpost.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/otfpost.hh @@ -31,7 +31,7 @@ class Post { public: enum { HEADER_SIZE = 32, N_MAC_GLYPHS = 258 }; int parse_header(ErrorHandler *); - + }; inline int diff --git a/Build/source/texk/lcdf-typetools/include/efont/pairop.hh b/Build/source/texk/lcdf-typetools/include/efont/pairop.hh index c445f16624a..bbb42073e44 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/pairop.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/pairop.hh @@ -5,18 +5,18 @@ namespace Efont { enum PairOpDefs { - + opNoop = -1, opLigature = -2, - + opLigSimple = 0, opLigSaveLeft = 1, opLigSaveRight = 2, opLigPast1 = 4, opLigPast2 = 8, - + opAllblock = 0 - + }; @@ -24,60 +24,60 @@ typedef int PairOpIndex; class PairOp { public: - + PairOp() { } inline PairOp(GlyphIndex l, GlyphIndex r, int v, PairOpIndex nl); inline PairOp(GlyphIndex l, GlyphIndex r, GlyphIndex x, int kind, PairOpIndex nl); - + void noopify() { _val = opNoop; } void set_value(int val) { _val = val; } - + inline void set_next(PairOpIndex); - + bool is_lig() const { return _val <= opLigature; } bool is_kern() const { return _val >= 0; } bool is_noop() const { return _val == opNoop; } int lig_kind() const { assert(is_lig()); return -_val+opLigature; } - + GlyphIndex left() const { return _left; } GlyphIndex right() const { return _right; } GlyphIndex result() const { assert(is_lig()); return _result; } int value() const { return _val; } PairOpIndex next_left() const { return _next_left; } - + private: - + GlyphIndex _left; GlyphIndex _right; GlyphIndex _result; int _val; - + PairOpIndex _next_left; - + }; class PairProgram { public: - + PairProgram() : _reversed(false) { } PairProgram(const PairProgram &); - + void reserve_glyphs(int); - + PairOpIndex find_left(GlyphIndex gi) const { return _left_map[gi]; } PairOpIndex find(GlyphIndex leftgi, GlyphIndex rightgi) const; - + int op_count() const { return _op.size(); } const PairOp &op(PairOpIndex i) const { return _op[i]; } - + // Return true if it's a duplicate. bool add_kern(GlyphIndex, GlyphIndex, int); bool add_lig(GlyphIndex, GlyphIndex, GlyphIndex, int kind = opLigSimple); - + void set_reversed(bool r) { _reversed = r; } void unreverse(); void optimize(); - + void print() const; private: @@ -85,11 +85,11 @@ class PairProgram { public: bool _reversed; Vector<PairOpIndex> _left_map; Vector<PairOp> _op; - + inline const char *print_name(GlyphIndex) const; - + PairProgram &operator=(const PairProgram &) { assert(0); return *this; } - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/psres.hh b/Build/source/texk/lcdf-typetools/include/efont/psres.hh index b08e2fe35a5..ee302821fdb 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/psres.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/psres.hh @@ -13,50 +13,50 @@ class PsresDatabase { public: PsresDatabase(); ~PsresDatabase(); - + void add_psres_path(const char* path, const char* defaults, bool override); bool add_psres_file(Filename&, bool override); void add_database(PsresDatabase*, bool override); - + inline PsresDatabaseSection* section(PermString section) const; const String& value(PermString section, PermString key) const; const String& unescaped_value(PermString section, PermString key) const; Filename filename_value(PermString section, PermString key) const; - + private: - + HashMap<PermString, int> _section_map; Vector<PsresDatabaseSection*> _sections; - + PsresDatabaseSection* force_section(PermString); bool add_one_psres_file(Slurper&, bool override); void add_psres_directory(PermString); - + }; class PsresDatabaseSection { public: PsresDatabaseSection(PermString); - + PermString section_name() const { return _section_name; } - + void add_psres_file_section(Slurper&, PermString, bool); void add_section(PsresDatabaseSection*, bool override); - + const String& value(PermString key) { return value(_map[key]); } inline const String& unescaped_value(PermString key) const; Filename filename_value(PermString key); - + private: - + PermString _section_name; HashMap<PermString, int> _map; Vector<PermString> _directories; Vector<String> _values; Vector<int> _value_escaped; - + const String& value(int index); - + }; inline PsresDatabaseSection* PsresDatabase::section(PermString n) const diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1bounds.hh b/Build/source/texk/lcdf-typetools/include/efont/t1bounds.hh index 116705f9a10..c5e50634f4c 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1bounds.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1bounds.hh @@ -35,7 +35,7 @@ class CharstringBounds : public CharstringInterp { public: static bool bounds(const CharstringContext&, int bounds[4], int& width); static bool bounds(const Transform&, const CharstringContext&, int bounds[4], int& width); - + private: Point _lb; @@ -46,13 +46,13 @@ class CharstringBounds : public CharstringInterp { public: const CharstringProgram* _last_xf_program; void set_xf(const CharstringProgram*); - + inline void xf_mark(const Point&); void xf_mark(const Bezier&); inline bool xf_inside(const Point&) const; inline bool xf_controls_inside(const Bezier&) const; - + }; inline void CharstringBounds::xf_mark(const Point& p) diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1cs.hh b/Build/source/texk/lcdf-typetools/include/efont/t1cs.hh index 35816f6f64e..ea5adaa59b4 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1cs.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1cs.hh @@ -26,7 +26,7 @@ class Charstring { public: virtual ~Charstring(); virtual bool process(CharstringInterp &) const = 0; - + enum Commands { cError = 0, cHstem = 1, @@ -57,7 +57,7 @@ class Charstring { public: cCallgsubr = 29, cVhcurveto = 30, cHvcurveto = 31, - + cEscapeDelta = 32, cDotsection = 32 + 0, cVstem3 = 32 + 1, @@ -121,60 +121,60 @@ class Charstring { public: static String command_name(int); static const char * const command_names[]; - + static const char * const standard_encoding[256]; - + }; class Type1Charstring : public Charstring { public: - + Type1Charstring() { } inline Type1Charstring(const String &); // unencrypted Type1Charstring(int lenIV, const String &); // encrypted // default copy constructor // default destructor // default assignment operator - + inline const uint8_t *data() const; int length() const { return _s.length(); } operator bool() const { return _s.length() != 0; } - + inline const String &data_string() const; inline String substring(int pos, int len) const; int first_caret_after(int pos) const; - + inline void assign(const String &); void prepend(const Type1Charstring &); void assign_substring(int pos, int len, const String &); - + bool process(CharstringInterp &) const; private: mutable String _s; mutable int _key; - + void decrypt() const; - + }; class Type2Charstring : public Charstring { public: - + Type2Charstring() { } inline Type2Charstring(const String &); // default copy constructor // default destructor // default assignment operator - + inline const uint8_t *data() const; int length() const { return _s.length(); } - + bool process(CharstringInterp &) const; private: - + String _s; }; @@ -185,10 +185,10 @@ struct CharstringContext { CharstringContext(const CharstringProgram *program_, const Charstring *cs_) : program(program_), cs(cs_) { } operator bool() const { return cs != 0; } - + const CharstringProgram *program; const Charstring *cs; - + }; @@ -205,11 +205,11 @@ class CharstringProgram { public: virtual const CharstringProgram *child_program(int) const; bool parent_program() const { return _parent_program; } void set_parent_program(bool pp) { _parent_program = pp; } - + virtual int nsubrs() const { return 0; } virtual Charstring *subr(int) const { return 0; } virtual int subr_bias() const { return 0; } - + virtual int ngsubrs() const { return 0; } virtual Charstring *gsubr(int) const { return 0; } virtual int gsubr_bias() const { return 0; } @@ -217,7 +217,7 @@ class CharstringProgram { public: inline int nxsubrs(bool g) const; inline Charstring *xsubr(bool g, int) const; inline int xsubr_bias(bool g) const; - + virtual int nglyphs() const { return 0; } virtual PermString glyph_name(int) const { return PermString();} virtual void glyph_names(Vector<PermString> &) const; @@ -239,7 +239,7 @@ class CharstringProgram { public: private: bool _parent_program; - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1csgen.hh b/Build/source/texk/lcdf-typetools/include/efont/t1csgen.hh index 8c054643f86..07d236f36eb 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1csgen.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1csgen.hh @@ -13,7 +13,8 @@ class Type1CharstringGen { public: int precision() const { return _precision; } void clear(); - char *data() const { return _ncs.data(); } + char *data() { return _ncs.data(); } + const char *data() const { return _ncs.data(); } int length() const { return _ncs.length(); } void gen_number(double, int kind = 0); @@ -30,19 +31,19 @@ class Type1CharstringGen { public: void output(Type1Charstring &); static String callsubr_string(int subr); - + private: - + StringAccum _ncs; int _precision; double _f_precision; - + Point _true; Point _false; enum State { S_INITIAL, S_GEN }; State _state; - + }; class Type1CharstringGenInterp : public CharstringInterp { public: @@ -52,13 +53,13 @@ class Type1CharstringGenInterp : public CharstringInterp { public: int precision() const { return _csgen.precision(); } void set_direct_hint_replacement(bool dhr) { _direct_hr = dhr; } void set_hint_replacement_storage(Type1Font *); - + int nhints() const { return _stem_hstem.size(); } double max_flex_height() const { return _max_flex_height; } bool bad_flex() const { return _bad_flex; } const Type1CharstringGen &csgen() const { return _csgen; } - + void act_width(int, const Point &); void act_seac(int, double, double, double, int, int); @@ -73,7 +74,7 @@ class Type1CharstringGenInterp : public CharstringInterp { public: void intermediate_output(Type1Charstring &out); void run(const CharstringContext &g, Type1Charstring &out); - + private: // output @@ -105,7 +106,7 @@ class Type1CharstringGenInterp : public CharstringInterp { public: void gen_sbw(bool hints_follow); String gen_hints(const unsigned char *, int) const; void swap_stem_hints(); - + }; inline String Type1CharstringGen::take_string() diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1font.hh b/Build/source/texk/lcdf-typetools/include/efont/t1font.hh index e63e2197d42..4ec827e7e24 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1font.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1font.hh @@ -21,12 +21,12 @@ class Type1Font : public CharstringProgram { public: ~Type1Font(); int read(Type1Reader &); - + bool ok() const; - + inline PermString font_name() const; void font_matrix(double[6]) const; - + int nitems() const { return _items.size(); } Type1Item *item(int i) const { return _items[i]; } void add_item(Type1Item *it) { _items.push_back(it); } @@ -47,11 +47,11 @@ class Type1Font : public CharstringProgram { public: bool remove_subr(int); void fill_in_subrs(); void renumber_subrs(const Vector<int> &); // dangerous! - + Type1Subr *glyph_x(int i) const { return _glyphs[i]; } Type1Encoding *type1_encoding() const { return _encoding; } - + // note: the order is relevant enum Dict { dFont = 0, dF = dFont, @@ -62,7 +62,7 @@ class Type1Font : public CharstringProgram { public: dBlendPrivate = dB+dP, dBP = dBlendPrivate, dLast }; - + Type1Definition *dict(int d, PermString s) const { return _dict[d][s]; } Type1Definition *dict(PermString s) const { return _dict[dF][s]; } Type1Definition *p_dict(PermString s) const { return _dict[dP][s]; } @@ -77,14 +77,14 @@ class Type1Font : public CharstringProgram { public: Type1Definition *ensure(Dict, PermString); void add_header_comment(const String &); - + MultipleMasterSpace *create_mmspace(ErrorHandler * = 0) const; MultipleMasterSpace *mmspace() const; void undo_synthetic(); void set_charstring_definer(PermString d) { _charstring_definer = d; } - + void write(Type1Writer &); // font skeletons @@ -95,36 +95,36 @@ class Type1Font : public CharstringProgram { public: void skeleton_fontdict_end(); void skeleton_private_end(); void skeleton_common_subrs(); - + // for experts only void set_item(int, Type1Item *); inline void set_dict(int dict, PermString, Type1Definition *); void uncache_defs(); private: - + mutable bool _cached_defs; bool _built; mutable PermString _font_name; - + Vector<Type1Item *> _items; - + HashMap<PermString, Type1Definition *> *_dict; int _index[dLast]; int _dict_deltas[dLast]; - + Vector<Type1Subr *> _subrs; Vector<Type1Subr *> _glyphs; HashMap<PermString, int> _glyph_map; - + PermString _charstring_definer; Type1Encoding *_encoding; - + mutable bool _cached_mmspace; mutable MultipleMasterSpace *_mmspace; Type1IncludedFont *_synthetic_item; - + Type1Font(PermString); Type1Font(const Type1Font &); Type1Font &operator=(const Type1Font &); diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1interp.hh b/Build/source/texk/lcdf-typetools/include/efont/t1interp.hh index 934c0a5885f..0b693b08c70 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1interp.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1interp.hh @@ -16,10 +16,10 @@ class CharstringInterp { public: int error_data() const { return _error_data; } static String error_string(int error, int error_data); inline String error_string() const; - + bool careful() const { return _careful; } void set_careful(bool c) { _careful = c; } - + bool done() const { return _done; } void set_done() { _done = true; } @@ -37,7 +37,7 @@ class CharstringInterp { public: void ps_clear() { _ps_sp = 0; } int subr_depth() const { return _subr_depth; } - + inline double &vec(Vector<double> *, int); const Vector<double> &weight_vector() const { return _weight_vector; } Vector<double> *scratch_vector() { return &_scratch_vector; } @@ -68,7 +68,7 @@ class CharstringInterp { public: const Point &left_sidebearing() const { return _lsb; } const Point ¤tpoint() const { return _cp; } void set_state_path() { _state = S_PATH; } - + virtual bool callothersubr_command(int, int); virtual bool type1_command(int); virtual bool type2_command(int, const uint8_t *, int *); @@ -92,7 +92,7 @@ class CharstringInterp { public: virtual void act_hintmask(int cmd, const uint8_t *data, int nhints); typedef Charstring Cs; - + enum Errors { errOK = 0, errInternal = -1, @@ -118,9 +118,9 @@ class CharstringInterp { public: enum { STACK_SIZE = 48, PS_STACK_SIZE = 24, MAX_SUBR_DEPTH = 10, SCRATCH_SIZE = 32 }; - + private: - + int _error; int _error_data; bool _done; @@ -150,14 +150,14 @@ class CharstringInterp { public: // for processing Type 2 charstrings int _t2nhints; - + static double double_for_error; void initialize(); - + inline void ensure_weight_vector(); void fetch_weight_vector(); - + bool roll_command(); int type2_handle_width(int, bool); @@ -165,7 +165,7 @@ class CharstringInterp { public: inline void actp_rlineto(int, double, double); void actp_rrcurveto(int, double, double, double, double, double, double); void actp_rrflex(int, double, double, double, double, double, double, double, double, double, double, double, double, double); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1item.hh b/Build/source/texk/lcdf-typetools/include/efont/t1item.hh index 7358410e38e..056ba0e71d4 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1item.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1item.hh @@ -17,25 +17,25 @@ class Type1Item { public: Type1Item() { } virtual ~Type1Item() { } - + virtual void gen(Type1Writer &) = 0; virtual Type1CopyItem *cast_copy() { return 0; } virtual Type1Subr *cast_subr() { return 0; } virtual Type1Definition *cast_definition() { return 0; } virtual Type1SubrGroupItem *cast_subr_group() { return 0; } - + private: - + Type1Item(const Type1Item &); Type1Item &operator=(const Type1Item &); - + }; class Type1NullItem : public Type1Item { public: - + Type1NullItem() { } - + void gen(Type1Writer &); }; @@ -47,46 +47,46 @@ class Type1CopyItem : public Type1Item { public: const String &value() const { return _value; } int length() const { return _value.length(); } - + void set_value(const String &s) { _value = s; } - + void gen(Type1Writer &); - + Type1CopyItem *cast_copy() { return this; } - + private: - + String _value; - + }; class Type1EexecItem : public Type1Item { public: Type1EexecItem(bool on) : _eexec_on(on) { } - + void gen(Type1Writer &w); - + private: - + bool _eexec_on; - + }; class Type1Definition : public Type1Item { public: - + typedef Vector<double> NumVector; - + Type1Definition(PermString, const String &, PermString); ~Type1Definition() { } static Type1Definition *make(StringAccum &, Type1Reader * = 0, bool force = false); static Type1Definition *make_string(PermString, const String &, PermString); static inline Type1Definition *make_literal(PermString, const String &, PermString); static inline Type1Definition *make(PermString, double, PermString); - + PermString name() const { return _name; } const String &value() const { return _val; } PermString definer() const { return _definer; } - + bool value_bool(bool &) const; bool value_int(int &) const; bool value_num(double &) const; @@ -96,7 +96,7 @@ class Type1Definition : public Type1Item { public: bool value_numvec_vec(Vector<NumVector> &) const; bool value_normalize(Vector<NumVector> &in, Vector<NumVector> &out) const; bool value_namevec(Vector<PermString> &) const; - + void set_bool(bool); void set_int(int); void set_num(double); @@ -107,24 +107,24 @@ class Type1Definition : public Type1Item { public: void set_numvec_vec(const Vector<NumVector> &); void set_normalize(const Vector<NumVector> &, const Vector<NumVector> &); void set_namevec(const Vector<PermString> &, bool executable = true); - + void gen(Type1Writer &); void gen(StringAccum &); - + Type1Definition *cast_definition() { return this; } - + private: - + PermString _name; String _val; PermString _definer; - + static int slurp_string(StringAccum &, int, Type1Reader *); static int slurp_proc(StringAccum &, int, Type1Reader *); - + inline void set_val(const String &); inline void set_val(StringAccum &); - + }; class Type1Encoding : public Type1Item { public: @@ -135,7 +135,7 @@ class Type1Encoding : public Type1Item { public: void clear(); void unshare(); - + PermString operator[](int e) const { assert(e>=0&&e<256); return _v[e]; } PermString elt(int e) const { return (*this)[e]; } PermString operator[](unsigned char e) const { return _v[e]; } @@ -143,7 +143,7 @@ class Type1Encoding : public Type1Item { public: inline void put(int e, PermString p); void set_definer(PermString s) { _definer = s; } - + static Type1Encoding *standard_encoding(); void gen(Type1Writer &); @@ -153,10 +153,10 @@ class Type1Encoding : public Type1Item { public: PermString *_v; Type1Encoding *_copy_of; PermString _definer; - + Type1Encoding(Type1Encoding *); Type1Encoding &operator=(const Type1Encoding &); - + }; class Type1Subr : public Type1Item { public: @@ -164,7 +164,7 @@ class Type1Subr : public Type1Item { public: static Type1Subr *make(const char *, int, int cs_start, int cs_len, int lenIV); static Type1Subr *make_subr(int, const Type1Charstring &, PermString); static Type1Subr *make_glyph(PermString, const Type1Charstring &, PermString); - + bool is_subr() const { return !_name; } PermString name() const { return _name; } int subrno() const { return _subrno; } @@ -174,24 +174,24 @@ class Type1Subr : public Type1Item { public: const Type1Charstring &t1cs() const { return _cs; } operator Type1Charstring &() { return _cs; } operator const Type1Charstring &() const { return _cs; } - + void gen(Type1Writer &); - + virtual Type1Subr *cast_subr() { return this; } - + private: - + PermString _name; int _subrno; PermString _definer; - + Type1Charstring _cs; - + static PermString cached_definer; - + Type1Subr(PermString, int, PermString, int, const String &); Type1Subr(PermString, int, PermString, const Type1Charstring &); - + }; class Type1SubrGroupItem : public Type1Item { public: @@ -205,18 +205,18 @@ class Type1SubrGroupItem : public Type1Item { public: bool is_subrs() const { return _is_subrs; } const String &end_text() const { return _end_text; } - + void gen(Type1Writer &); - + Type1SubrGroupItem *cast_subr_group() { return this; } - + private: - + Type1Font *_font; bool _is_subrs; String _value; String _end_text; - + }; class Type1IncludedFont : public Type1Item { public: @@ -225,7 +225,7 @@ class Type1IncludedFont : public Type1Item { public: ~Type1IncludedFont(); Type1Font *included_font() const { return _included_font; } - + void gen(Type1Writer &); private: diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1mm.hh b/Build/source/texk/lcdf-typetools/include/efont/t1mm.hh index 94e32e3ed14..bf2e81a00e9 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1mm.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1mm.hh @@ -10,25 +10,25 @@ class MultipleMasterSpace : public CharstringProgram { public: MultipleMasterSpace(PermString, int naxes, int nmasters); // default destructor - + typedef Vector<double> NumVector; - + PermString font_name() const { return _font_name; } int naxes() const { return _naxes; } int nmasters() const { return _nmasters; } - + int axis(PermString) const; double axis_low(int) const; double axis_high(int) const; - + PermString axis_type(int a) const { return _axis_types[a]; } PermString axis_label(int a) const { return _axis_labels[a]; } inline PermString axis_abbreviation(int a) const; static PermString axis_abbreviation(PermString); - + const Type1Charstring &ndv() const { return _ndv; } const Type1Charstring &cdv() const { return _cdv; } - + void set_master_positions(const Vector<NumVector> &); void set_normalize(const Vector<NumVector> &, const Vector<NumVector> &); void set_axis_type(int, PermString); @@ -37,7 +37,7 @@ class MultipleMasterSpace : public CharstringProgram { public: void set_cdv(const Type1Charstring &cs) { _cdv = cs; } void set_design_vector(const NumVector &); void set_weight_vector(const NumVector &); - + bool check(ErrorHandler * = 0); bool check_intermediate(ErrorHandler * = 0); @@ -45,47 +45,47 @@ class MultipleMasterSpace : public CharstringProgram { public: inline const NumVector &default_design_vector() const; bool set_design(NumVector &, int, double, ErrorHandler * = 0) const; bool set_design(NumVector &, PermString, double, ErrorHandler * = 0) const; - + inline const NumVector &default_weight_vector() const; - + bool design_to_norm_design(const NumVector &, NumVector &, ErrorHandler * = 0) const; bool design_to_weight(const NumVector &, NumVector &, ErrorHandler * = 0) const; - + NumVector *mm_vector(VectorType, bool writable) const; private: - + mutable bool _ok; - + PermString _font_name; int _naxes; int _nmasters; - + Vector<NumVector> _master_positions; Vector<NumVector> _normalize_in; Vector<NumVector> _normalize_out; - + Vector<PermString> _axis_types; Vector<PermString> _axis_labels; - + Type1Charstring _ndv; Type1Charstring _cdv; - + NumVector _default_design_vector; NumVector _default_weight_vector; - + mutable NumVector *_design_vector; mutable NumVector *_norm_design_vector; mutable NumVector *_weight_vector; - + bool error(ErrorHandler *, const char *, ...) const; - + MultipleMasterSpace(const MultipleMasterSpace &); MultipleMasterSpace &operator=(const MultipleMasterSpace &); - + bool normalize_vector(ErrorHandler *) const; bool convert_vector(ErrorHandler *) const; - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1rw.hh b/Build/source/texk/lcdf-typetools/include/efont/t1rw.hh index ae37856342a..d59f4089742 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1rw.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1rw.hh @@ -10,84 +10,84 @@ class Type1Reader { public: Type1Reader(); virtual ~Type1Reader(); - + int get_data(unsigned char *, int); virtual int more_data(unsigned char *, int) = 0; virtual bool preserve_whitespace() const { return false; } - + void switch_eexec(bool, unsigned char *, int); virtual void set_charstring_definer(PermString); - + bool next_line(StringAccum &); bool was_charstring() const { return _charstring_len > 0; } int charstring_start() const { return _charstring_start; } int charstring_length() const { return _charstring_len; } - + private: - + enum { DATA_SIZE = 1024 }; - + unsigned char *_data; int _len; int _pos; - + PermString _charstring_definer; int _charstring_start; int _charstring_len; - + int _ungot; int _crlf; - + bool _eexec; bool _binary_eexec; int _r; - + Type1Reader(const Type1Reader &); Type1Reader &operator=(const Type1Reader &); - + int more_data(); - + inline int eexec(int); int ascii_eexec_get(); inline int get_base(); inline int get(); - + void start_eexec(int ascii_chars); - + bool test_charstring(StringAccum &); - + static unsigned char xvalue_store[]; static unsigned char *xvalue; static void static_initialize(); - + }; class Type1PFAReader : public Type1Reader { - + FILE *_f; - + public: - + Type1PFAReader(FILE *); - + int more_data(unsigned char *, int); - + }; class Type1PFBReader : public Type1Reader { - + FILE *_f; bool _binary; int _left; - + public: - + Type1PFBReader(FILE *); - + int more_data(unsigned char *, int); bool preserve_whitespace() const; - + }; class Type1SubsetReader : public Type1Reader { @@ -110,20 +110,20 @@ class Type1SubsetReader : public Type1Reader { **/ class Type1Writer { public: - + Type1Writer(); virtual ~Type1Writer(); - + bool eexecing() const { return _eexec; } - + inline void print(int); void print(const char *, int); - + inline Type1Writer &operator<<(char); inline Type1Writer &operator<<(unsigned char); Type1Writer &operator<<(int); Type1Writer &operator<<(double); - + virtual void flush(); virtual void switch_eexec(bool); virtual void print0(const unsigned char *, int) = 0; @@ -134,12 +134,12 @@ class Type1Writer { public: void set_lenIV(int l) { _lenIV = l; } private: - + enum { BufSize = 1024 }; - + unsigned char *_buf; int _pos; - + bool _eexec; int _eexec_start; int _eexec_end; @@ -147,47 +147,47 @@ class Type1Writer { public: PermString _charstring_start; int _lenIV; - + void local_flush(); inline unsigned char eexec(int); - + Type1Writer(const Type1Writer &); Type1Writer &operator=(const Type1Writer &); - + }; class Type1PFAWriter: public Type1Writer { - + FILE *_f; int _hex_line; - + public: - + Type1PFAWriter(FILE *); ~Type1PFAWriter(); - + void switch_eexec(bool); void print0(const unsigned char *, int); - + }; class Type1PFBWriter: public Type1Writer { - + StringAccum _save; FILE *_f; bool _binary; - + public: - + Type1PFBWriter(FILE *); ~Type1PFBWriter(); - + void flush(); void switch_eexec(bool); void print0(const unsigned char *, int); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/efont/t1unparser.hh b/Build/source/texk/lcdf-typetools/include/efont/t1unparser.hh index 06d46ee96ee..3a6e446e3c7 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/t1unparser.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/t1unparser.hh @@ -25,7 +25,7 @@ class CharstringUnparser : public CharstringInterp { public: static String unparse(const Charstring *); static String unparse(const Charstring &); - + private: String _indent; diff --git a/Build/source/texk/lcdf-typetools/include/efont/ttfcs.hh b/Build/source/texk/lcdf-typetools/include/efont/ttfcs.hh index 6253fac0c3d..a2c04461872 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/ttfcs.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/ttfcs.hh @@ -12,12 +12,12 @@ class TrueTypeBoundsCharstringProgram : public CharstringProgram { public: ~TrueTypeBoundsCharstringProgram(); int units_per_em() const; - + int nglyphs() const; Charstring *glyph(int gi) const; PermString glyph_name(int gi) const; void glyph_names(Vector<PermString> &) const; - + private: const OpenType::Font *_otf; @@ -33,7 +33,7 @@ class TrueTypeBoundsCharstringProgram : public CharstringProgram { public: mutable bool _got_glyph_names; mutable Vector<uint32_t> _unicodes; mutable bool _got_unicodes; - + }; } diff --git a/Build/source/texk/lcdf-typetools/include/efont/ttfhead.hh b/Build/source/texk/lcdf-typetools/include/efont/ttfhead.hh index 59ad0d95aec..2611a405b1b 100644 --- a/Build/source/texk/lcdf-typetools/include/efont/ttfhead.hh +++ b/Build/source/texk/lcdf-typetools/include/efont/ttfhead.hh @@ -23,7 +23,7 @@ class Head { public: int _error; int parse_header(ErrorHandler *); - + }; diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/bezier.hh b/Build/source/texk/lcdf-typetools/include/lcdf/bezier.hh index 2635069521b..ebb93ce9aea 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/bezier.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/bezier.hh @@ -6,11 +6,11 @@ #include <string.h> class Bezier { public: - + Bezier() : _bb(-1) { } inline Bezier(Point p[4]) throw (); inline Bezier(const Point &, const Point &, const Point &, const Point &) throw (); - + const Point *points() const { return _p; } const Point &point(int i) const { assert(i>=0&&i<4); return _p[i]; } Point &mpoint(int i) { assert(i>=0&&i<4); _bb = -1; return _p[i]; } @@ -30,22 +30,22 @@ class Bezier { public: inline double bb_right_x() const throw (); inline double bb_top_x() const throw (); inline double bb_bottom_x() const throw (); - + void halve(Bezier &, Bezier &) const throw (); inline void segmentize(Vector<Point> &) const; void segmentize(Vector<Point> &, bool) const; - + static void fit(const Vector<Point> &, double, Vector<Bezier> &); - + private: - + Point _p[4]; mutable int _bb; void make_bb() const throw (); inline void ensure_bb() const throw (); - + double hit_recurse(const Point &, double, double, double, double, double) const throw (); }; diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/clp.h b/Build/source/texk/lcdf-typetools/include/lcdf/clp.h index 5006d350905..bcec630fe49 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/clp.h +++ b/Build/source/texk/lcdf-typetools/include/lcdf/clp.h @@ -167,10 +167,10 @@ typedef void (*Clp_ErrorHandler)(Clp_Parser *clp, const char *message); struct Clp_Parser { int negated; /**< Whether the last option was negated. */ - int have_val; /**< Whether the last option had a value. */ + int have_val; /**< Whether the last option had a value. */ const char *vstr; /**< The string value provided with the last option. */ - + union { int i; unsigned u; @@ -190,10 +190,18 @@ struct Clp_Parser { void *user_data; /**< Uninterpreted by CLP; users can set arbitrarily. */ - + struct Clp_Internal *internal; }; +/** @cond never */ +#if __GNUC__ >= 4 +# define CLP_SENTINEL __attribute__((sentinel)) +#else +# define CLP_SENTINEL /* nothing */ +#endif +/** @endcond never */ + /** @brief Create a new Clp_Parser. */ Clp_Parser *Clp_NewParser(int argc, const char * const *argv, @@ -250,7 +258,8 @@ int Clp_AddStringListTypeVec(Clp_Parser *clp, int val_type, int flags, const int *vals); /** @brief Define a new string list value type for @a clp. */ -int Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...); +int Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...) + CLP_SENTINEL; /** @brief Parse and return the next argument from @a clp. */ @@ -282,6 +291,7 @@ int Clp_CurOptionNameBuf(Clp_Parser *clp, char *buf, int len); /** @brief Extract the current option as a string. */ const char *Clp_CurOptionName(Clp_Parser *clp); +#undef CLP_SENTINEL #ifdef __cplusplus } #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/error.hh b/Build/source/texk/lcdf-typetools/include/lcdf/error.hh index 8d38cbfb87a..f43d5d7157e 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/error.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/error.hh @@ -15,178 +15,875 @@ # define VA_LIST_DEREF(val) (val) # define VA_LIST_REF(val) (val) #endif +#if __GNUC__ <= 3 +# define ERRH_SENTINEL +#else +# define ERRH_SENTINEL __attribute__((sentinel)) +#endif +/** @class ErrorHandler + * @brief Error reporting class. + * + * Report errors through ErrorHandler objects, which represent + * error collectors and printers. ErrorHandlers are passed to configure() and + * initialize() methods explicitly, as well as to write handlers; the + * click_chatter() function calls ErrorHandler implicitly. + * + * <h3>Cooked error messages</h3> + * + * Most ErrorHandler interactions consist of a simple call like this: + * @code + * errh->error("not enough arguments (%d needed)", 5); + * // prints something like "not enough arguments (5 needed)\n" + * @endcode + * + * This function constructs an error message string from the format arguments, + * annotates the string with a default error level (here, el_error), and + * prints it. Alternate versions take a landmark specifying where the error + * took place: + * @code + * errh->lwarning("file.click:2", "syntax error at '%s'", word.c_str()); + * // prints something like "file.click:2: syntax error at 'foo'\n" + * @endcode + * + * <h3>Raw error messages</h3> + * + * For finer control over error levels and annotations, construct an error + * message string directly. An error message is a string consisting of one or + * more lines. Each line begins with a set of optional textual @em + * annotations. The following error message has a @em level annotation + * determining how serious the error is (this one is critical, since + * el_critical == 2), and a @em landmark annotation, which specifies where the + * error took place (here, "x.click:1"): + * + * <tt>"<2>{l:x.click:1}syntax error"</tt> + * + * The default ErrorHandlers understand the level and landmark + * annotations. Users can add other arbitrary annotations, which can be + * useful to pass error metadata. A pair of braces ends the annotation area. + * This example has one user annotation <tt>eoc</tt>, and a message area that + * would be mistaken for an annotation were it not for the <tt>{}</tt>: + * + * <tt>"<2>{l:x.click:1}{eoc:520}{}{not:an annotation}"</tt> + * + * <h3>Stacking handlers</h3> + * + * Some ErrorHandlers stack on top of others, adding useful functionality like + * automatic context description and prefixing. For example, + * ContextErrorHandler can be used to print messages like "In function + * 'xxx':". + * @code + * FileErrorHandler errh1(stderr); + * ContextErrorHandler errh2(&errh1, "While counting to 2:"); + * errh2.error("An error occurred."); + * errh2.error("Another error occurred."); + * // prints "While counting to 2:\n" + * // " An error occurred.\n" + * // " Another error occurred.\n" + * @endcode */ class ErrorHandler { public: - - enum Seriousness { - ERRVERBOSITY_CONTEXT= 0x8000, - ERRVERBOSITY_MAX = 0xFFFF, - ERRVERBOSITY_DEFAULT= ERRVERBOSITY_MAX, - ERRVERBOSITY_MASK = 0x0000FFFF, - ERRVERBOSITY_SHIFT = 16, - - ERR_MIN_DEBUG = 0x00000000, - ERR_MIN_MESSAGE = 0x00010000, - ERR_MIN_WARNING = 0x00020000, - ERR_MIN_ERROR = 0x00030000, - ERR_MIN_FATAL = 0x00040000, - - // fatal() with no explicit exit status exits with this status - FATAL_EXITSTATUS = 1, - - ERR_DEBUG = ERR_MIN_DEBUG + ERRVERBOSITY_DEFAULT, - ERR_CONTEXT_MESSAGE = ERR_MIN_MESSAGE + ERRVERBOSITY_CONTEXT, - ERR_MESSAGE = ERR_MIN_MESSAGE + ERRVERBOSITY_DEFAULT, - ERR_WARNING = ERR_MIN_WARNING + ERRVERBOSITY_DEFAULT, - ERR_CONTEXT_ERROR = ERR_MIN_ERROR + ERRVERBOSITY_CONTEXT, - ERR_ERROR = ERR_MIN_ERROR + ERRVERBOSITY_DEFAULT, - ERR_FATAL = ERR_MIN_FATAL + ERRVERBOSITY_DEFAULT + (FATAL_EXITSTATUS << ERRVERBOSITY_SHIFT) - }; - - ErrorHandler() { } - virtual ~ErrorHandler() { } - - static ErrorHandler *static_initialize(ErrorHandler *errh); // returns errh - static void static_cleanup(); - - static ErrorHandler *default_handler(); - static ErrorHandler *ignore_handler(); - - static bool has_default_handler(); - static void set_default_handler(ErrorHandler *); - - virtual int nwarnings() const = 0; - virtual int nerrors() const = 0; - virtual void reset_counts() = 0; - virtual int min_verbosity() const; - - // seriousness < ERR_MIN_WARNING returns OK_RESULT, which is 0 - // seriousness >= ERR_MIN_WARNING returns ERROR_RESULT, which is -EINVAL - static const int OK_RESULT; - static const int ERROR_RESULT; - - void debug(const char *format, ...); - void message(const char *format, ...); - int warning(const char *format, ...); - int error(const char *format, ...); - int fatal(const char *format, ...); - int fatal(int exit_status, const char *format, ...); - - void ldebug(const String &landmark, const char *format, ...); - void lmessage(const String &landmark, const char *format, ...); - int lwarning(const String &landmark, const char *format, ...); - int lerror(const String &landmark, const char *format, ...); - int lfatal(const String &landmark, const char *format, ...); - int lfatal(int exit_status, const String &landmark, const char *format, ...); - - int verror(Seriousness, const String &landmark, const char *format, va_list); - int verror_text(Seriousness, const String &landmark, const String &text); - - String make_text(Seriousness, const char *, ...); - virtual String make_text(Seriousness, const char *, va_list); - virtual String decorate_text(Seriousness, const String &, const String &); - virtual void handle_text(Seriousness, const String &) = 0; - virtual int count_error(Seriousness, const String &) = 0; - - virtual void set_error_code(int); - - static String prepend_lines(const String &prefix, const String &text); - - // error conversions - struct Conversion; - typedef String (*ConversionHook)(int flags, VA_LIST_REF_T); - enum ConversionFlags { - ZERO_PAD = 1, PLUS_POSITIVE = 2, SPACE_POSITIVE = 4, LEFT_JUST = 8, - ALTERNATE_FORM = 16, UPPERCASE = 32, SIGNED = 64, NEGATIVE = 128 - }; - static Conversion *add_conversion(const String &, ConversionHook); - static int remove_conversion(Conversion *); - + + /** @brief Error level constants. + * + * Lower values represent more serious errors. Levels 0-7 correspond to + * Linux's error levels. Negative levels request immediate exit; at user + * level, the exit status is the absolute value of the + * error level. */ + enum Level { + el_abort = -999, ///< Error level that triggers abort(). + el_fatal = -1, ///< Fatal exit error level. + /// Exit status equals -(level). + el_emergency = 0, ///< Emergency error level: system is unusable. + el_alert = 1, ///< Alert error level: action must be taken. + el_critical = 2, ///< Error level for critical conditions. + el_error = 3, ///< Error level for normal error conditions. + el_warning = 4, ///< Error level for warning conditions. + el_notice = 5, ///< Error level for normal, but significant + /// conditions. + el_info = 6, ///< Error level for informational messages. + el_debug = 7 ///< Error level for debug messages. + }; + + /** @brief Error level indicators. */ + static const char e_abort[], + e_fatal[], + e_emergency[], + e_alert[], + e_critical[], + e_error[], + e_warning[], + e_warning_annotated[], + e_notice[], + e_info[], + e_debug[]; + + /** @brief Construct an ErrorHandler. */ + ErrorHandler() + : _nerrors(0), _nwarnings(0) { + } + + virtual ~ErrorHandler() { + } + + + /** @brief Initialize the ErrorHandler implementation. + * @param errh default error handler + * @return @a errh + * + * Call this function to initialize the ErrorHandler implementation. The + * function installs the default conversions, creates the + * silent_handler(), and installs @a errh as the default error handler + * (see default_handler()). + * + * @note The @a errh object becomes the property of the ErrorHandler + * implementation and must not be deleted. + * (ErrorHandler::static_cleanup() will delete it.) Only the first call + * to static_initialize() has any effect. */ + static ErrorHandler *static_initialize(ErrorHandler *errh); + + /** @brief Tear down the ErrorHandler implementation. + * + * Deletes the internal ErrorHandlers and uninstalls default + * conversions. */ + static void static_cleanup(); + + + /** @brief Return the default ErrorHandler. + * @sa static_initialize() */ + static ErrorHandler *default_handler() { + return the_default_handler; + } + + /** @brief Set the default ErrorHandler to @a errh. + * @note @a errh becomes property of the ErrorHandler implementation, + * and will be freed by static_cleanup(). However, any prior default + * handler is @em not destroyed. Callers should delete the prior handler + * when necessary. */ + static void set_default_handler(ErrorHandler *errh); + + /** @brief Return the global silent ErrorHandler. */ + static ErrorHandler *silent_handler() { + return the_silent_handler; + } + + + static const int ok_result; ///< Equals 0, used for error levels + /// <5> and above + static const int error_result; ///< Equals -EINVAL, used for error + /// levels <4> and below + + + /** @brief Print a debug message (level el_debug). + * + * @a fmt and any following arguments are parsed as by format(), and the + * resulting string is passed to xmessage(). */ + void debug(const char *fmt, ...); + /** @brief Print an informational message (level el_info). */ + void message(const char *fmt, ...); + /** @brief Print a warning message (level el_warning). + * @return error_result + * + * The string "warning: " is prepended to every line of the message. */ + int warning(const char *fmt, ...); + /** @brief Print an error message (level el_error). + * @return error_result */ + int error(const char *fmt, ...); + /** @brief Print a fatal error message (level el_fatal). + * @return error_result + * + * In many ErrorHandlers, calling fatal() will cause the process to + * abort. */ + int fatal(const char *fmt, ...); + + /** @brief Print a debug message with a landmark annotation. */ + void ldebug(const String &landmark, const char *fmt, ...); + /** @brief Print an informational message with a landmark annotation. */ + void lmessage(const String &landmark, const char *fmt, ...); + /** @brief Print a warning message with a landmark annotation. */ + int lwarning(const String &landmark, const char *fmt, ...); + /** @brief Print an error message with a landmark annotation. */ + int lerror(const String &landmark, const char *fmt, ...); + /** @brief Print a fatal error message with a landmark annotation. */ + int lfatal(const String &landmark, const char *fmt, ...); + + + /** @brief Print an annotated error message. + * @return ok_result if the minimum error level was el_notice or higher, + * otherwise error_result + * + * This function drives the virtual functions actually responsible for + * error message decoration and printing. It passes @a str to decorate(), + * separates the result into lines, calls emit() for each line, and calls + * account() with the minimum error level of any line. + * + * Most users will call shorthand functions like error(), warning(), or + * lmessage(), which add relevant annotations to the message. */ + int xmessage(const String &str); + /** @brief Print an error message, adding annotations. + * @param anno annotations + * @param str error message + * + * Shorthand for xmessage(combine_anno(@a str, @a anno)). */ + int xmessage(const String &anno, const String &str) { + return xmessage(combine_anno(str, anno)); + } + /** @brief Format and print an error message, adding annotations. + * @param anno annotations + * @param fmt error message format + * @param val format arguments + * + * Shorthand for xmessage(@a anno, vformat(@a fmt, @a val)). */ + int vxmessage(const String &anno, const char *fmt, va_list val) { + return xmessage(anno, vformat(fmt, val)); + } + /** @brief Print an error message, adding landmark and other annotations. + * @param landmark landmark annotation + * @param anno additional annotations + * @param str error message + * + * Shorthand for xmessage(combine_anno(@a anno, make_landmark_anno(@a + * landmark)), @a str). */ + int xmessage(const String &landmark, const String &anno, + const String &str) { + return xmessage(combine_anno(anno, make_landmark_anno(landmark)), str); + } + /** @brief Format and print an error message, adding landmark and other + * annotations. + * @param landmark landmark annotation + * @param anno additional annotations + * @param fmt error message format + * @param val format arguments + * + * Shorthand for xmessage(@a landmark, @a anno, vformat(@a fmt, @a + * val)). */ + int vxmessage(const String &landmark, const String &anno, + const char *fmt, va_list val) { + return xmessage(landmark, anno, vformat(fmt, val)); + } + + + /** @brief Return the number of errors reported via this handler. + * + * An error is any message that contains at least one line with error + * level 3 (#el_error) or below. + * + * @note The error count will also contain errors reported via stacked + * handlers. For instance: + * @code + * SilentErrorHandler errh1; + * PrefixErrorHandler errh2(&errh1, ""); + * assert(errh1.nerrors() == 0); + * errh2.error("blah"); + * assert(errh1.nerrors() == 1); + * @endcode + * + * @sa nwarnings, reset_counts */ + int nerrors() const { + return _nerrors; + } + + /** @brief Return the number of warnings reported via this handler. + * + * A warning is any message that contains at least one line with error + * level 4 (#el_warning), and no line with a lower level. */ + int nwarnings() const { + return _nwarnings; + } + + /** @brief Reset the nwarnings() and nerrors() counts to zero. */ + void reset_counts() { + _nwarnings = _nerrors = 0; + } + + + /** @brief Format an error string. + * @param default_flags default ConversionFlags + * @param fmt printf-like format string + * @return formatted error string + * + * Formats an error string using printf-like % conversions. Conversions + * include: + * + * <table> + * + * <tr><td><tt>\%d</tt>, <tt>\%i</tt></td><td>Format an <tt>int</tt> as a + * decimal string. Understands flags in <tt>#0- +</tt>, field widths + * (including <tt>*</tt>), and precisions.</td></tr> + * + * <tr><td><tt>\%hd</tt>, <tt>\%ld</tt>, <tt>\%lld</tt>, + * <tt>\%zd</tt></td><td>Format a <tt>short</tt>, <tt>long</tt>, <tt>long + * long</tt>, or <tt>size_t</tt>.</td></tr> + * + * <tr><td><tt>\%^16d</tt>, <tt>\%^32d</tt>, <tt>\%^64d</tt></td> + * <td>Format a 16-, 32-, or 64-bit integer.</td></tr> + * + * <tr><td><tt>\%o</tt>, <tt>\%u</tt>, <tt>\%x</tt>, + * <tt>\%X</tt></td><td>Format an unsigned integer in octal, decimal, or + * hexadecimal (with lower-case or upper-case letters).</td></tr> + * + * <tr><td><tt>\%s</tt></td><td>Format a C string (<tt>const char *</tt>). + * The alternate form <tt>\%\#s</tt> calls String::printable() on the + * input string. Both <tt>\%\#s</tt> and the alternate form <tt>\%'s</tt> + * ensure that no part of the string is mistaken for an error + * annotation.</td></tr> + * + * <tr><td><tt>\%c</tt></td><td>Format a character. Prints a C-like + * escape if the input character isn't printable ASCII.</td></tr> + * + * <tr><td><tt>\%p</tt></td><td>Format a pointer as a hexadecimal + * value.</td></tr> + * + * <tr><td><tt>\%e</tt>, <tt>\%E</tt>, <tt>\%f</tt>, <tt>\%F</tt>, + * <tt>\%g</tt>, <tt>\%G</tt></td><td>Format a <tt>double</tt> (user-level + * only).</td></tr> + * + * <tr><td><tt>\%{...}</tt><td>Call a user-provided conversion function. + * For example, <tt>\%{ip_ptr}</tt> reads an <tt>IPAddress *</tt> argument + * from the argument list, and formats the pointed-to address using + * IPAddress::unparse().</td></tr> + * + * <tr><td><tt>\%\%</tt></td><td>Format a literal \% character.</td></tr> + * + * <tr><td><tt>\%\<</tt></td><td>Format a left quote string. Usually + * prints a single quote.</td></tr> + * + * <tr><td><tt>\%\></tt></td><td>Format a right quote string. Usually + * prints a single quote.</td></tr> + * + * <tr><td><tt>\%,</tt></td><td>Format an apostrophe string. Usually + * prints a single quote.</td></tr> + * + * </table> */ + static String xformat(int default_flags, const char *fmt, ...); + /** @overload */ + static String vxformat(int default_flags, const char *fmt, va_list val); + /** @overload */ + static String xformat(const char *fmt, ...); + /** @overload */ + static String vxformat(const char *fmt, va_list val) { + return vxformat(0, fmt, val); + } + + + /** @brief Format an error string. + * @param fmt format string + * @param val argument list + * + * @warning ErrorHandler users don't need to call this function directly; + * it is called implicitly by the error()/xmessage() functions. + * + * This virtual function is called to format an error message. The + * default implementation returns the result of vxformat(@a fmt, @a val). */ + virtual String vformat(const char *fmt, va_list val); + + /** @brief Format an error string. + * @param fmt format string + * + * @warning ErrorHandler users don't usually need to call this function + * directly. + * + * This is a convenience function that calls vformat(const char *fmt, + * va_list val) for a va_list taken from the ellipsis arguments. */ + String format(const char *fmt, ...); + + /** @brief Decorate an error message. + * @param str error message, possibly with annotations + * @return decorated error message + * + * @warning ErrorHandler users don't need to call this function directly; + * it is called implicitly by the error()/xmessage() functions. + * + * This virtual function is called to decorate an error message before it + * is emitted. The input @a str is an error message string, possibly + * annotated. The default implementation returns @a str unchanged. Other + * ErrorHandlers might add context lines (ContextErrorHandler), prefixes + * (PrefixErrorHandler), or a default landmark (LandmarkErrorHandler). */ + virtual String decorate(const String &str); + + /** @brief Output an error message line. + * @param str error message line, possibly with annotations + * @param user_data callback data, 0 for first line in a message + * @param more true iff this is the last line in the current message + * @return @a user_data to be passed to emit() for the next line + * + * @warning ErrorHandler users don't need to call this function directly; + * it is called implicitly by the error()/xmessage() functions. + * + * After calling decorate(), ErrorHandler splits the message into + * individual lines and calls emit() once per line. ErrorHandler + * subclasses should output the error lines as appropriate; for example, + * FileErrorHandler outputs the error message to a file. + * + * @a str does not contain a newline, but may contain annotations, + * including a landmark annotation. Most ErrorHandlers use parse_anno() + * to extract the landmark annotation, clean it with clean_landmark(), and + * print it ahead of the error message proper. + * + * ErrorHandler can handle multi-line error messages. However, the emit() + * function takes a line at a time; this is more useful in practice for + * most error message printers. The @a user_data and @a more arguments + * can help an ErrorHandler combine the lines of a multi-line error + * message. @a user_data is null for the first line; for second and + * subsequent lines, ErrorHandler passes the result of the last line's + * emit() call. @a more is true iff this is the last line in the current + * message. + * + * The default emit() implementation does nothing. */ + virtual void *emit(const String &str, void *user_data, bool more); + + /** @brief Account for an error message at level @a level. + * @param level minimum error level in the message + * + * @warning ErrorHandler users don't need to call this function directly; + * it is called implicitly by the error()/xmessage() functions. + * + * After calling emit() for the lines of an error message, ErrorHandler + * calls account(), passing the minimum (worst) error level of any message + * line (or 1000 if no line had a level). The default implementation + * updates the nwarnings() and nerrors() counts. Some other ErrorHandlers + * add account() behavior that, for example, exits after printing messages + * at el_fatal level or below. */ + virtual void account(int level) { + if (level <= el_error) + ++_nerrors; + else if (level == el_warning) + ++_nwarnings; + } + + + /** @brief Create an error annotation. + * @param name annotation name + * @param value annotation value + * @return annotation string + * + * Returns an error annotation that associates annotation @a name with @a + * value. + * + * If @a name equals "<>", then returns a level annotation of the form + * "<@a value>". @a value must be valid number; if it isn't, the function + * returns the empty string. + * + * Otherwise, @a name must be a nonempty series of letters and digits. + * make_anno() returns a string of the form "{@a name:@a value}", where + * special characters in @a value are quoted with backslashes. */ + static String make_anno(const char *name, const String &value); + + /** @brief Apply annotations from @a anno to every line in @a str. + * @param str string + * @param anno annotation string + * + * The annotations from @a anno are applied to every line in @a str. New + * annotations do not override existing annotations with the same names. + * If the @a anno string ends with non-annotation characters, this + * substring is prefixed to every line in @a str. + * + * For example: + * @code + * combine_anno("Line 1\n{l:old}{x:x}Line 2\n", "<0>{l:new} ") + * // returns "<0>{l:new} Line 1\n<0>{l:old}{x:x} Line 2\n" + * @endcode */ + static String combine_anno(const String &str, const String &anno); + + /** @brief Parse error annotations from a string. + * @param str the string + * @param begin pointer within @a str to start of annotation area + * @param end pointer to end of error region, usually @a str.end() + * @return pointer to first character after annotation area + * @pre @a str.begin() <= {@a begin, @a end} <= @a str.end() + * @post @a begin <= returned value <= @a end + * + * Use this function to skip an error line's annotation area, possibly + * extracting named annotations. + * + * The variable arguments portion consists of a series of pairs of C + * strings and value pointers, terminated by a null character pointer. + * Each C string is an annotation name. The corresponding annotation + * value, if found, is stored as a String object in the value pointer. + * You can also store the <tt>int</tt> value of an annotation by prefixing + * an annotation name with the '#' character. + * + * For example: + * @code + * String line = "{l:file:30}<4.5>error message\n"; + * String landmark_str, level_str; + * const char *s = ErrorHandler::parse_anno(line, line.begin(), line.end(), + * "l", &landmark_str, "<>", &level_str, (const char *) 0); + * // Results: s points to "error message\n", + * // landmark_str == "file:30", level_str == "4.5" + * + * int level; + * s = ErrorHandler::parse_anno(line, line.begin(), line.end(), + * "#<>", &level, (const char *) 0); + * // Results: s points to "error message\n", level_str == 4 + * @endcode */ + static const char *parse_anno(const String &str, + const char *begin, const char *end, ...) ERRH_SENTINEL; + + /** @brief Skip a string's error annotations. + * @param begin pointer to start of string + * @param end pointer one past end of string + * @return pointer to first character after annotation area + * @post @a begin <= returned value <= @a end + * + * Use this function to skip an error line's annotation area. The error + * line is defined as a pair of iterators. */ + static const char *skip_anno(const char *begin, const char *end) { + String name, value; + const char *x = begin; + do { + x = skip_anno(String(), x, end, &name, &value, false); + } while (name); + return x; + } + + + /** @brief Return a landmark annotation equal to @a x. + * @param x landmark + * + * If @a x is empty, returns the empty string. Otherwise, if @a x looks + * like a formatted annotation (it starts with an open brace), returns @a + * x unchanged. Otherwise, returns make_anno("l", @a x). */ + static String make_landmark_anno(const String &x) { + if (x && x[0] == '{') + return x; + else if (x) + return make_anno("l", x); + else + return String(); + } + + /** @brief Clean the @a landmark. + * @param landmark landmark text + * @param colon if true, append <tt>": "</tt> to a nonempty landmark + * + * Removes trailing space and an optional trailing colon from @a landmark + * and returns the result. If @a colon is true, and the cleaned landmark + * isn't the empty string, then appends <tt>": "</tt> to the result. */ + static String clean_landmark(const String &landmark, bool colon = false); + + + // error conversions + struct Conversion; + typedef String (*ConversionFunction)(int flags, VA_LIST_REF_T); + enum ConversionFlags { + cf_zero_pad = 1, ///< Set for conversions using the '0' flag. + cf_plus_positive = 2, ///< Set for conversions using the '+' flag. + cf_space_positive = 4, ///< Set for conversions using the ' ' flag. + cf_left_just = 8, ///< Set for conversions using the '-' flag. + cf_alternate_form = 16, ///< Set for conversions using the '#' flag. + cf_singlequote = 32, ///< Set for conversions using the '\'' flag. + cf_uppercase = 64, ///< Set for 'X' conversions (not 'x'). + cf_signed = 128, ///< Set for conversions of signed numbers. + cf_negative = 256, ///< Set for conversions of negative numbers. + cf_utf8 = 1024 ///< Set to use UTF-8 characters on output. + }; + static Conversion *add_conversion(const String &name, ConversionFunction func); + static int remove_conversion(Conversion *conversion); + + private: + + int _nerrors; + int _nwarnings; + + static ErrorHandler *the_default_handler; + static ErrorHandler *the_silent_handler; + + static const char *skip_anno(const String &str, + const char *begin, const char *end, + String *name_result, String *value_result, + bool raw); + }; -class BaseErrorHandler : public ErrorHandler { public: - BaseErrorHandler() : _nwarnings(0), _nerrors(0) { } - int nwarnings() const { return _nwarnings; } - int nerrors() const { return _nerrors; } - void reset_counts() { _nwarnings = _nerrors = 0; } - int count_error(Seriousness, const String &); - private: - int _nwarnings, _nerrors; + +/** @class SilentErrorHandler + * @brief An ErrorHandler that does not report messages. + * + * Use SilentErrorHandler when an ErrorHandler object is required, but error + * messages should not be printed. */ +class SilentErrorHandler : public ErrorHandler { public: + + SilentErrorHandler() { + } + +}; + + +/** @class ErrorVeneer + * @brief Base class for ErrorHandlers that forward messages. + * + * ErrorHandlers can stack. Stacking ErrorHandlers simplify modify a message + * and then pass the result to a base ErrorHandler, which does the actual + * printing. The ErrorVeneer base class simplifies the implementation of + * stacking ErrorHandlers. It provides versions of ErrorHandler's format(), + * decorate(), emit(), and account() methods that forward to the underlying + * handler. */ +class ErrorVeneer : public ErrorHandler { public: + + /** @brief Construct an ErrorVeneer. + * @param errh base ErrorHandler + * + * If @a errh is 0, then the ErrorVeneer acts like a + * SilentErrorHandler. */ + ErrorVeneer(ErrorHandler *errh) + : _errh(errh) { + } + + String vformat(const char *fmt, va_list val); + String decorate(const String &str); + void *emit(const String &str, void *user_data, bool more); + void account(int level); + + private: + + ErrorHandler *_errh; + }; + #ifndef __KERNEL__ -class FileErrorHandler : public BaseErrorHandler { public: - FileErrorHandler(FILE *, const String & = String()); - void handle_text(Seriousness, const String &); - private: - FILE *_f; - String _context; +/** @class FileErrorHandler + * @brief An ErrorHandler that prints error messages to a given file. + * + * FileErrorHandler is the typical base ErrorHandler used at user level. It + * prints messages to a file passed in to the constructor, and calls exit() or + * abort() based on the error level. */ +class FileErrorHandler : public ErrorHandler { public: + + /** @brief Construct a FileErrorHandler. + * @param f file to print errors + * @param prefix string to prefix every error line */ + FileErrorHandler(FILE *f, const String &prefix = String()); + + void set_default_flags(int default_flags) { + _default_flags = default_flags; + } + + String vformat(const char *fmt, va_list val); + void *emit(const String &str, void *user_data, bool more); + void account(int level); + + private: + + FILE *_f; + String _context; + int _default_flags; + }; #endif -class SilentErrorHandler : public BaseErrorHandler { public: - SilentErrorHandler() { } - void handle_text(Seriousness, const String &); + +/** @class LocalErrorHandler + * @brief A convenience stackable ErrorHandler. + * + * It's often convenient to pass a null ErrorHandler pointer when errors + * should not be printed. The LocalErrorHandler class simplifies dealing with + * ErrorHandler pointers that may or may not be null. LocalErrorHandler is a + * transparent layer on the base handler; but if the base handler is null, it + * acts like a SilentErrorHandler. For example: + * @code + * void f(ErrorHandler *errh) { // errh might or might not be null + * LocalErrorHandler lerrh(errh); + * ... lerrh.message("message") ... + * } + * @endcode */ +class LocalErrorHandler : public ErrorVeneer { public: + + /** @brief Construct a LocalErrorHandler. */ + LocalErrorHandler(ErrorHandler *errh) + : ErrorVeneer(errh) { + } + }; -class ErrorVeneer : public ErrorHandler { public: - ErrorVeneer(ErrorHandler *errh) : _errh(errh) { } +/** @class ContextErrorHandler + * @brief A stackable ErrorHandler that prints context lines. + * + * The stackable ContextErrorHandler adds context to the first error + * message printed, and optionally indent error messages so that they appear + * grouped underneath the context. + * @code + * FileErrorHandler errh1(stderr); + * ContextErrorHandler errh2(&errh1, "While counting to 2:"); + * errh2.error("An error occurred."); + * errh2.error("Another error occurred."); + * // prints "While counting to 2:\n" + * // " An error occurred.\n" + * // " Another error occurred.\n" + * @endcode + * + * To prevent ContextErrorHandler from indenting or printing context for a + * message, add a "{context:no}" annotation to the message's first line. To + * turn off the indent but keep the context, add a "{context:noindent}" + * annotation. + * @code + * FileErrorHandler errh1(stderr); + * ContextErrorHandler errh2(&errh1, "While counting to 2:"); + * errh2.error("{context:no}An error occurred."); + * errh2.error("Another error occurred."); + * // prints "An error occurred.\n" + * // "While counting to 2:\n" + * // " Another error occurred.\n" + * + * FileErrorHandler errh1(stderr); + * PrefixErrorHandler noctx_errh(stderr, "{context:no}"); + * ContextErrorHandler errh2(&errh1, "While counting to 2:"); + * errh2.error("An error occurred."); + * errh2.error("Another error occurred."); + * // prints "An error occurred.\n" + * // "Another error occurred.\n" + * @endcode + * + * ContextErrorHandler adds the "{context:context}" annotation to context + * lines. */ +class ContextErrorHandler : public ErrorVeneer { public: - int nwarnings() const; - int nerrors() const; - void reset_counts(); + /** @brief Construct a ContextErrorHandler. + * @param errh base ErrorHandler + * @param fmt format for context lines + * + * The context message is formed by @a errh->format() using @a fmt and + * any additional arguments. */ + ContextErrorHandler(ErrorHandler *errh, const char *fmt, ...); - String make_text(Seriousness, const char *, va_list); - String decorate_text(Seriousness, const String &, const String &); - void handle_text(Seriousness, const String &); - int count_error(Seriousness, const String &); + /** @brief Return true iff the context has already been printed. */ + bool context_printed() const { + return _context_printed; + } - protected: + /** @brief Set whether the context has been printed. */ + void set_context_printed(bool x) { + _context_printed = x; + } - ErrorHandler *_errh; - -}; + /** @brief Set the context string to @a str. */ + void set_context(const String &str) { + _context = str; + } + + /** @brief Set the indent string to @a str. + * + * The indent string is prepended to all non-context messages. It can + * contain landmarks as well as non-landmark text. The default indent + * string is " " (two spaces). */ + void set_indent(const String &str) { + _indent = str; + } + + /** @brief Set the context landmark to @a str. + * + * The context landmark is used to decorate the context, and also applied + * to any error messages that lack landmarks of their own. The default + * context landmark is empty. + * + * @note The input @a str is passed to + * ErrorHandler::make_landmark_anno(). */ + void set_context_landmark(const String &str) { + _context_landmark = make_landmark_anno(str); + } + + String decorate(const String &str); + + private: + + String _context; + String _indent; + String _context_landmark; + bool _context_printed; -class ContextErrorHandler : public ErrorVeneer { public: - ContextErrorHandler(ErrorHandler *, const String &context, const String &indent = " ", const String &context_landmark = ""); - String decorate_text(Seriousness, const String &, const String &); - private: - String _context; - String _indent; - String _context_landmark; }; + +/** @class PrefixErrorHandler + * @brief A stackable ErrorHandler that adds a prefix to error messages. + * + * The stackable ContextErrorHandler adds a prefix to every error line + * printed. For example: + * @code + * FileErrorHandler errh1(stderr); + * PrefixErrorHandler errh2(&errh1, "Blah--"); + * errh2.error("An error occurred."); + * errh2.error("Another error occurred."); + * // prints "Blah--An error occurred.\n" + * // "Blah--Another error occurred.\n" + * @endcode */ class PrefixErrorHandler : public ErrorVeneer { public: - PrefixErrorHandler(ErrorHandler *, const String &prefix); - String decorate_text(Seriousness, const String &, const String &); - private: - String _prefix; + + /** @brief Construct a PrefixErrorHandler. + * @param errh base ErrorHandler + * @param prefix string to prefix to error lines */ + PrefixErrorHandler(ErrorHandler *errh, const String &prefix); + + String decorate(const String &str); + + private: + + String _prefix; + }; + +/** @class LandmarkErrorHandler + * @brief A stackable ErrorHandler that adds a default landmark to error + * messages. + * + * The stackable ContextErrorHandler adds a default landmark to every error + * line printed. Error lines' own landmarks are preserved when they exist. + * For example: + * @code + * FileErrorHandler errh1(stderr); + * LandmarkErrorHandler errh2(&errh1, "file:1"); + * errh2.error("An error occurred."); + * errh2.lerror("file:2", "Another error occurred."); + * // prints "file:1: An error occurred.\n" + * // "file:2: Another error occurred.\n" + * @endcode */ class LandmarkErrorHandler : public ErrorVeneer { public: - LandmarkErrorHandler(ErrorHandler *, const String &); - void set_landmark(const String &s) { _landmark = s; } - String decorate_text(Seriousness, const String &, const String &); - private: - String _landmark; -}; -class VerboseFilterErrorHandler : public ErrorVeneer { public: - VerboseFilterErrorHandler(ErrorHandler *, int min_verbosity); - int min_verbosity() const; - void handle_text(Seriousness, const String &); - private: - int _min_verbosity; + /** @brief Construct a LandmarkErrorHandler. + * @param errh base ErrorHandler + * @param landmark default landmark */ + LandmarkErrorHandler(ErrorHandler *errh, const String &landmark); + + /** @brief Set the default landmark applied to error messages. */ + void set_landmark(const String &landmark) { + _landmark = make_landmark_anno(landmark); + } + + String decorate(const String &str); + + private: + + String _landmark; + }; + #ifndef __KERNEL__ +/** @class BailErrorHandler + * @brief A stackable ErrorHandler that exits when errors occur. + * + * The stackable BailErrorHandler, available only at user level, causes the + * process to exit if an error worse than a configurable level occurs. */ class BailErrorHandler : public ErrorVeneer { public: - BailErrorHandler(ErrorHandler *, Seriousness = ERR_MIN_ERROR); - void handle_text(Seriousness, const String &); - private: - int _exit_seriousness; + + /** @brief Construct a BailErrorHandler. + * @param errh base ErrorHandler + * @param level error level that causes premature exit + * + * An error message with level less than or equal to @a el_error will + * cause the process to exit with status 1. */ + BailErrorHandler(ErrorHandler *errh, int level = el_error); + + void account(int level); + + private: + + int _level; + }; #endif +#undef ERRH_SENTINEL #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/filename.hh b/Build/source/texk/lcdf-typetools/include/lcdf/filename.hh index 9f1589d4779..9424a4c04fa 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/filename.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/filename.hh @@ -5,14 +5,14 @@ #include <stdio.h> class Filename { public: - + Filename() : _dir("."), _actual(0) { } Filename(const String &); Filename(const String &dir, const String &name); Filename(FILE *, const String &fake_name); - + bool fake() const { return _actual != 0; } - + const String &directory() const { return _dir; } const String &name() const { return _name; } const String &path() const { return _path; } @@ -21,21 +21,21 @@ class Filename { public: operator bool() const { return _name; } bool operator!() const { return !_name; } - + FILE *open_read(bool binary = false) const; bool readable() const; - + FILE *open_write(bool binary = false) const; - + Filename from_directory(const String &n) const { return Filename(_dir, n);} - + private: - + mutable String _dir; // mutable for c_str() mutable String _name; mutable String _path; FILE *_actual; - + }; #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.cc b/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.cc index 17cec16e0d5..4851463c560 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.cc +++ b/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.cc @@ -56,7 +56,7 @@ HashMap<K, V>::operator=(const HashMap<K, V> &o) _grow_limit = o._grow_limit; _n = o._n; _default_value = o._default_value; - + Pair *new_e = new Pair[_capacity]; for (int i = 0; i < _capacity; i++) new_e[i] = o._e[i]; @@ -87,7 +87,7 @@ HashMap<K, V>::increase(int min_size) _e = ne; _capacity = ncap; _grow_limit = ((3 * _capacity) >> 2) - 1; - + Pair *otrav = oe; for (int i = 0; i < ocap; i++, otrav++) if (otrav->key) { diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.hh b/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.hh index 10b5c321177..be016da52bc 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/hashmap.hh @@ -5,11 +5,11 @@ // K AND V REQUIREMENTS: // // K::K() -// K::operator bool() const +// K::operator bool() const // Must have (bool)(K()) == false // and no k with (bool)k == false is stored. // K & K::operator=(const K &) -// k1 == k2 +// k1 == k2 // unsigned hashcode(const K &) // If hashcode(k1) != hashcode(k2), then k1 != k2. // @@ -45,7 +45,7 @@ hashcode(unsigned long ul) template <class K, class V> class HashMap { public: - + HashMap(); explicit HashMap(const V &); HashMap(const HashMap<K, V> &); @@ -105,13 +105,13 @@ template <class K, class V> class _HashMap_const_iterator { public: typedef _HashMap_const_iterator const_iterator; typedef typename HashMap<K, V>::Pair Pair; - + operator bool() const { return _pos < _hm->_capacity; } bool operator!() const { return _pos >= _hm->_capacity; } - + void operator++(int); void operator++() { (*this)++; } - + const K &key() const { return _hm->_e[_pos].key; } const V &value() const { return _hm->_e[_pos].value; } const Pair &pair() const { return _hm->_e[_pos]; } @@ -130,7 +130,7 @@ class _HashMap_const_iterator { public: template <class K, class V> class _HashMap_iterator : public _HashMap_const_iterator<K, V> { public: typedef _HashMap_iterator iterator; - + V &value() const { return this->_hm->_e[this->_pos].value; } private: diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/landmark.hh b/Build/source/texk/lcdf-typetools/include/lcdf/landmark.hh index 836f14ec088..183ab936ee8 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/landmark.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/landmark.hh @@ -15,17 +15,17 @@ class Landmark { public: const String &file() const { return _file; } unsigned line() const { return _line; } - + Landmark next_line() const; Landmark whole_file() const { return Landmark(_file); } - + operator String() const; - + private: - + String _file; unsigned _line; - + }; Landmark operator+(const Landmark &, int); diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/permstr.hh b/Build/source/texk/lcdf-typetools/include/lcdf/permstr.hh index 82d338140c9..4e82e1f3ff6 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/permstr.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/permstr.hh @@ -11,12 +11,12 @@ inline bool operator==(PermString a, PermString b); inline bool operator!=(PermString a, PermString b); class PermString { struct Doodad; public: - + typedef Doodad *Capsule; // Declare a PermString::Initializer in any file in which you declare // static global PermStrings. struct Initializer { Initializer(); }; - + PermString() : _rep(zero_char_doodad.data) { } @@ -30,10 +30,10 @@ class PermString { struct Doodad; public: typedef int (PermString::*unspecified_bool_type)() const; inline operator unspecified_bool_type() const; inline bool operator!() const; - + inline int length() const; char operator[](int i) const; - + inline const char *c_str() const { return _rep; } @@ -50,26 +50,26 @@ class PermString { struct Doodad; public: inline Capsule capsule() const; inline static PermString decapsule(Capsule c); - + friend PermString permprintf(const char*, ...); friend PermString vpermprintf(const char*, va_list); friend PermString permcat(PermString, PermString); - friend PermString permcat(PermString, PermString, PermString); + friend PermString permcat(PermString, PermString, PermString); private: - + struct Doodad { Doodad *next; int length; char data[2]; }; - + const char *_rep; - + PermString(Doodad* d) : _rep(d->data) { } void initialize(const char*, int); Doodad* doodad() const { return (Doodad*)(_rep - offsetof(Doodad, data)); } - + friend struct PermString::Initializer; static void static_initialize(); diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/point.hh b/Build/source/texk/lcdf-typetools/include/lcdf/point.hh index a4d2495cac2..aad59b53ccf 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/point.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/point.hh @@ -4,7 +4,7 @@ #include <math.h> struct Point { - + double x; double y; @@ -24,7 +24,7 @@ struct Point { inline double angle() const throw (); void shift(double dx, double dy) { x += dx; y += dy; } - + inline Point shifted(double dx, double dy) const throw (); Point rotated(double) const throw (); inline Point normal() const throw (); @@ -45,7 +45,7 @@ struct Point { // bool operator==(const Point &, const Point &); // bool operator!=(const Point &, const Point &); - + }; inline double diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/straccum.hh b/Build/source/texk/lcdf-typetools/include/lcdf/straccum.hh index e6c6422d2af..0046d4020d9 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/straccum.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/straccum.hh @@ -4,83 +4,405 @@ #include <string.h> #include <assert.h> #include <lcdf/string.hh> -#ifdef HAVE_PERMSTRING +#if HAVE_PERMSTRING # include <lcdf/permstr.hh> #endif -template<class T> class Vector; - -class StringAccum { public: - - StringAccum() : _s(0), _len(0), _cap(0) { } - explicit inline StringAccum(int); - explicit StringAccum(const char *); - explicit StringAccum(const String &); -#ifdef HAVE_PERMSTRING - explicit StringAccum(PermString); +#if __GNUC__ > 4 +# define LCDF_SNPRINTF_ATTR __attribute__((__format__(__printf__, 3, 4))) +#else +# define LCDF_SNPRINTF_ATTR /* nothing */ #endif - ~StringAccum() { if (_cap >= 0) delete[] _s; } +template<typename T> class Vector; - char *data() const { return (char *)_s; } - int length() const { return _len; } +/** @file <lcdf/straccum.hh> + @brief Click's StringAccum class, used to construct Strings efficiently from pieces. +*/ - operator bool() const { return _len != 0; } - bool operator!() const { return _len == 0; } +class StringAccum { public: - bool out_of_memory() const { return _cap < 0; } - + /** @brief Construct an empty StringAccum (with length 0). */ + StringAccum() + : _s(0), _len(0), _cap(0) { + } + + /** @brief Construct a StringAccum with room for at least @a capacity + * characters. + * @param capacity initial capacity + * + * If @a capacity <= 0, the StringAccum is created empty. If @a capacity + * is too large (so that @a capacity bytes of memory can't be allocated), + * the StringAccum is created as out-of-memory. */ + explicit inline StringAccum(int capacity); + + /** @brief Construct a StringAccum containing the characters in @a s. */ + explicit inline StringAccum(const char *s, int len = -1) + : _s(0), _len(0), _cap(0) { + append(s, len); + } + + /** @brief Construct a StringAccum containing the characters in @a str. */ + StringAccum(const String &str) + : _s(0), _len(0), _cap(0) { + append(str.begin(), str.end()); + } + + /** @brief Construct a StringAccum containing a copy of @a x. */ + StringAccum(const StringAccum &x) + : _s(0), _len(0), _cap(0) { + append(x.data(), x.length()); + } + + /** @brief Destroy a StringAccum, freeing its memory. */ + ~StringAccum() { + if (_cap >= 0) + delete[] _s; + } + + + /** @brief Return the contents of the StringAccum. + * @return The StringAccum's contents. + * + * The return value is null if the StringAccum is empty or out-of-memory. + * The returned data() value points to writable memory (unless the + * StringAccum itself is const). */ + inline const char *data() const { + return reinterpret_cast<const char *>(_s); + } + + /** @overload */ + inline char *data() { + return reinterpret_cast<char *>(_s); + } + + /** @brief Return the length of the StringAccum. */ + int length() const { + return _len; + } + + /** @brief Return the StringAccum's current capacity. + * + * The capacity is the maximum length the StringAccum can hold without + * incurring a memory allocation. Returns -1 for out-of-memory + * StringAccums. */ + int capacity() const { + return _cap; + } + + + typedef const char *const_iterator; + typedef char *iterator; + + /** @brief Return an iterator for the first character in the StringAccum. + * + * StringAccum iterators are simply pointers into string data, so they are + * quite efficient. @sa StringAccum::data */ + inline const_iterator begin() const { + return reinterpret_cast<char *>(_s); + } + + /** @overload */ + inline iterator begin() { + return reinterpret_cast<char *>(_s); + } + + /** @brief Return an iterator for the end of the StringAccum. + * + * The return value points one character beyond the last character in the + * StringAccum. */ + inline StringAccum::const_iterator end() const { + return reinterpret_cast<char *>(_s + _len); + } + + /** @overload */ + inline iterator end() { + return reinterpret_cast<char *>(_s + _len); + } + + + typedef int (StringAccum::*unspecified_bool_type)() const; + + /** @brief Return true iff the StringAccum contains characters. + * + * Returns false for empty and out-of-memory StringAccums. */ + operator unspecified_bool_type() const { + return _len != 0 ? &StringAccum::capacity : 0; + } + + /** @brief Return true iff the StringAccum does not contain characters. + * + * Returns true for empty and out-of-memory StringAccums. */ + bool operator!() const { + return _len == 0; + } + + /** @brief Return true iff the StringAccum is out-of-memory. */ + bool out_of_memory() const { + return _cap < 0; + } + + + /** @brief Null-terminate this StringAccum and return its data. + * + * Note that the null character does not contribute to the StringAccum's + * length(), and later append() and similar operations can overwrite it. + * If appending the null character fails, the StringAccum becomes + * out-of-memory and the returned value is a null string. */ const char *c_str(); - - char operator[](int i) const{ assert(i>=0&&i<_len); return (char)_s[i]; } - char &operator[](int i) { assert(i>=0&&i<_len); return (char &)_s[i]; } - char back() const { assert(_len>0); return (char)_s[_len-1]; } - char &back() { assert(_len>0); return (char &)_s[_len-1]; } - - inline void clear(); - - inline char *extend(int, int = 0); - - inline void append(char); - inline void append(unsigned char); - inline void append_utf8(uint32_t); - inline void append(const char *, int); - inline void append(const char *begin, const char *end); - inline void append(const unsigned char *, int); + + + /** @brief Return the <a>i</a>th character in the string. + * @param i character index + * @pre 0 <= @a i < length() */ + char operator[](int i) const { + assert(i>=0 && i<_len); + return static_cast<char>(_s[i]); + } + + /** @brief Return a reference to the <a>i</a>th character in the string. + * @param i character index + * @pre 0 <= @a i < length() */ + char &operator[](int i) { + assert(i>=0 && i<_len); + return reinterpret_cast<char &>(_s[i]); + } + + /** @brief Return the first character in the string. + * @pre length() > 0 */ + char front() const { + assert(_len > 0); + return static_cast<char>(_s[0]); + } + + /** @brief Return a reference to the first character in the string. + * @pre length() > 0 */ + char &front() { + assert(_len > 0); + return reinterpret_cast<char &>(_s[0]); + } + + /** @brief Return the last character in the string. + * @pre length() > 0 */ + char back() const { + assert(_len > 0); + return static_cast<char>(_s[_len - 1]); + } + + /** @brief Return a reference to the last character in the string. + * @pre length() > 0 */ + char &back() { + assert(_len > 0); + return reinterpret_cast<char &>(_s[_len - 1]); + } + + + /** @brief Clear the StringAccum's comments. + * + * All characters in the StringAccum are erased. Also resets the + * StringAccum's out-of-memory status. */ + inline void clear() { + if (_cap < 0) + _cap = 0, _s = 0; + _len = 0; + } + + + /** @brief Reserve space for at least @a n characters. + * @return a pointer to at least @a n characters, or null if allocation + * fails + * @pre @a n >= 0 + * + * reserve() does not change the string's length(), only its capacity(). + * In a frequent usage pattern, code calls reserve(), passing an upper + * bound on the characters that could be written by a series of + * operations. After writing into the returned buffer, adjust_length() is + * called to account for the number of characters actually written. */ + inline char *reserve(int n) { + assert(n >= 0); + if (_len + n <= _cap || grow(_len + n)) + return (char *)(_s + _len); + else + return 0; + } + + /** @brief Set the StringAccum's length to @a len. + * @param len new length in characters + * @pre 0 <= @a len <= capacity() + * @sa adjust_length */ + inline void set_length(int len) { + assert(len >= 0 && _len <= _cap); + _len = len; + } + + /** @brief Adjust the StringAccum's length. + * @param delta length adjustment + * @pre If @a delta > 0, then length() + @a delta <= capacity(). + * If @a delta < 0, then length() + delta >= 0. + * + * The StringAccum's length after adjust_length(@a delta) equals its old + * length plus @a delta. Generally adjust_length() is used after a call + * to reserve(). @sa set_length */ + inline void adjust_length(int delta) { + assert(_len + delta >= 0 && _len + delta <= _cap); + _len += delta; + } + + /** @brief Reserve space and adjust length in one operation. + * @param nadjust number of characters to reserve and adjust length + * @param nreserve additional characters to reserve + * @pre @a nadjust >= 0 and @a nreserve >= 0 + * + * This operation combines the effects of reserve(@a nadjust + @a + * nreserve) and adjust_length(@a nadjust). Returns the result of the + * reserve() call. */ + inline char *extend(int nadjust, int nreserve = 0) { + assert(nadjust >= 0 && nreserve >= 0); + char *c = reserve(nadjust + nreserve); + if (c) + _len += nadjust; + return c; + } + + + /** @brief Remove characters from the end of the StringAccum. + * @param n number of characters to remove + * @pre @a n >= 0 and @a n <= length() + * + * Same as adjust_length(-@a n). */ + inline void pop_back(int n = 1) { + assert(n >= 0 && _len >= n); + _len -= n; + } + + + + /** @brief Append character @a c to the StringAccum. + * @param c character to append */ + inline void append(char c) { + if (_len < _cap || grow(_len)) + _s[_len++] = c; + } + /** @overload */ + inline void append(unsigned char c) { + append(static_cast<char>(c)); + } + + /** @brief Append @a len copies of character @a c to the StringAccum. */ + void append_fill(int c, int len); + + /** @brief Append the UTF-8 encoding of Unicode character @a ch. */ + inline void append_utf8(unsigned ch) { + if (ch < 0x80) + append((unsigned char) ch); + else + append_utf8_hard(ch); + } + + /** @brief Append the first @a len characters of @a s to this StringAccum. + * @param s data to append + * @param len length of data + * + * If @a len < 0, treats @a s as a null-terminated C string. */ + inline void append(const char *s, int len) { + if (len < 0) + len = strlen(s); + if (len == 0 && s == String::out_of_memory_data()) + assign_out_of_memory(); + append_data(s, len); + } + /** @overload */ + inline void append(const unsigned char *s, int len) { + append(reinterpret_cast<const char *>(s), len); + } + + /** @brief Append the data from @a begin to @a end to the end of this + * StringAccum. + * + * Does nothing if @a begin >= @a end. */ + inline void append(const char *begin, const char *end) { + if (begin < end) + append_data(begin, end - begin); + else if (begin == String::out_of_memory_data()) + assign_out_of_memory(); + } // word joining - void append_break_lines(const String& text, int linelen, const String& leftmargin = String()); + void append_break_lines(const String &text, int linelen, const String &leftmargin = String()); + + /** @brief Append result of snprintf() to this StringAccum. + * @param n maximum number of characters to print + * @param format format argument to snprintf() + * + * The terminating null character is not appended to the string. + * + * @note The safe vsnprintf() variant is called if it exists. It does in + * the Linux kernel, and on modern Unix variants. However, if it does not + * exist on your machine, then this function is actually unsafe, and you + * should make sure that the printf() invocation represented by your + * arguments will never write more than @a n characters, not including the + * terminating null. */ + StringAccum &snprintf(int n, const char *format, ...) LCDF_SNPRINTF_ATTR; + + + /** @brief Return a String object with this StringAccum's contents. + * + * This operation donates the StringAccum's memory to the returned String. + * After a call to take_string(), the StringAccum object becomes empty, + * and any future append() operations may cause memory allocations. If + * the StringAccum is out-of-memory, the returned String is also + * out-of-memory, but the StringAccum's out-of-memory state is reset. */ + String take_string(); - inline char *reserve(int); - void set_length(int l) { assert(l>=0 && _len<=_cap); _len = l; } - void forward(int n) { assert(n>=0 && _len+n<=_cap); _len += n; } - void pop_back(int n = 1) { assert(n>=0 && _len>=n); _len -= n; } - StringAccum &snprintf(int, const char *, ...); + /** @brief Assign this StringAccum to @a x. */ + StringAccum &operator=(const StringAccum &x) { + if (&x != this) { + if (out_of_memory()) + _s = 0, _cap = 0; + _len = 0; + append(x.data(), x.length()); + } + return *this; + } - inline unsigned char *take_bytes(); // returns array allocated by new[] - String take_string(); + /** @brief Swap this StringAccum's contents with @a x. */ + void swap(StringAccum &x); // see also operator<< declarations below - + + void forward(int n) { + assert(n>=0 && _len+n<=_cap); + _len += n; + } + private: - + unsigned char *_s; int _len; int _cap; - - void make_out_of_memory(); - inline void safe_append(const char *, int); - bool grow(int); - inline void erase(); - void append_utf8_hard(uint32_t); - - StringAccum(const StringAccum &); - StringAccum &operator=(const StringAccum &); - friend StringAccum &operator<<(StringAccum &, const char *); -#ifdef HAVE_PERMSTRING - friend StringAccum &operator<<(StringAccum &, PermString); + bool grow(int); + void assign_out_of_memory(); + inline void append_safe_data(const char *s, int len) { + if (char *x = extend(len)) + memcpy(x, s, len); + } + void append_unsafe_data(const char *s, int len); + inline void append_data(const char *s, int len) { + const char *my_s = reinterpret_cast<char *>(_s); + if (!(s >= my_s && s + len <= my_s + _len) + || len == 0 || _len + len <= _cap) + append_safe_data(s, len); + else + append_unsafe_data(s, len); + } + void append_utf8_hard(unsigned ch); + + + friend StringAccum &operator<<(StringAccum &sa, const char *s); +#if HAVE_PERMSTRING + friend StringAccum &operator<<(StringAccum &sa, PermString s); #endif - + }; inline StringAccum &operator<<(StringAccum &, char); @@ -103,112 +425,23 @@ StringAccum &operator<<(StringAccum &, double); inline -StringAccum::StringAccum(int cap) - : _s(new unsigned char[cap]), _len(0), _cap(cap) -{ - assert(cap > 0); - if (!_s) - _cap = -1; -} - -inline void -StringAccum::append(unsigned char c) -{ - if (_len < _cap || grow(_len)) - _s[_len++] = c; -} - -inline void -StringAccum::append(char c) -{ - append(static_cast<unsigned char>(c)); -} - -inline void -StringAccum::append_utf8(uint32_t ch) -{ - if (ch < 0x80) - append((unsigned char) ch); - else - append_utf8_hard(ch); -} - -inline char * -StringAccum::reserve(int hm) -{ - assert(hm >= 0); - if (_len + hm <= _cap || grow(_len + hm)) - return (char *)(_s + _len); - else - return 0; -} - -inline char * -StringAccum::extend(int amt, int extra) -{ - assert(extra >= 0); - char *c = reserve(amt + extra); - if (c) - _len += amt; - return c; -} - -inline void -StringAccum::safe_append(const char *s, int len) -{ - if (char *x = extend(len)) - memcpy(x, s, len); -} - -inline void -StringAccum::append(const char *s, int len) -{ - if (len < 0) - len = strlen(s); - else if (len == 0 && s == String::out_of_memory_data()) - make_out_of_memory(); - safe_append(s, len); -} - -inline void -StringAccum::append(const unsigned char *s, int len) -{ - append(reinterpret_cast<const char *>(s), len); -} - -inline void -StringAccum::append(const char *begin, const char *end) -{ - if (begin < end) - safe_append(begin, end - begin); - else if (begin == String::out_of_memory_data()) - make_out_of_memory(); -} - -inline void -StringAccum::erase() -{ - _s = 0; - _len = 0; - _cap = 0; -} - -inline unsigned char * -StringAccum::take_bytes() -{ - unsigned char *str = _s; - erase(); - return str; -} - -inline void -StringAccum::clear() +StringAccum::StringAccum(int capacity) + : _len(0) { - if (_cap < 0) - _cap = 0, _s = 0; - _len = 0; + assert(capacity >= 0); + if (capacity) { + _s = new unsigned char[capacity]; + _cap = (_s ? capacity : -1); + } else { + _s = 0; + _cap = 0; + } } +/** @relates StringAccum + @brief Append character @a c to StringAccum @a sa. + @return @a sa + @note Same as @a sa.append(@a c). */ inline StringAccum & operator<<(StringAccum &sa, char c) { @@ -216,6 +449,10 @@ operator<<(StringAccum &sa, char c) return sa; } +/** @relates StringAccum + @brief Append character @a c to StringAccum @a sa. + @return @a sa + @note Same as @a sa.append(@a c). */ inline StringAccum & operator<<(StringAccum &sa, unsigned char c) { @@ -223,47 +460,69 @@ operator<<(StringAccum &sa, unsigned char c) return sa; } +/** @relates StringAccum + @brief Append null-terminated C string @a cstr to StringAccum @a sa. + @return @a sa + @note Same as @a sa.append(@a cstr, -1). */ inline StringAccum & -operator<<(StringAccum &sa, const char *s) +operator<<(StringAccum &sa, const char *cstr) { - sa.safe_append(s, strlen(s)); + sa.append(cstr, -1); return sa; } +/** @relates StringAccum + @brief Append "true" or "false" to @a sa, depending on @a b. + @return @a sa */ inline StringAccum & operator<<(StringAccum &sa, bool b) { return sa << (b ? "true" : "false"); } +/** @relates StringAccum + @brief Append decimal representation of @a i to @a sa. + @return @a sa */ inline StringAccum & operator<<(StringAccum &sa, short i) { return sa << static_cast<long>(i); } +/** @relates StringAccum + @brief Append decimal representation of @a u to @a sa. + @return @a sa */ inline StringAccum & operator<<(StringAccum &sa, unsigned short u) { return sa << static_cast<unsigned long>(u); } +/** @relates StringAccum + @brief Append decimal representation of @a i to @a sa. + @return @a sa */ inline StringAccum & operator<<(StringAccum &sa, int i) { return sa << static_cast<long>(i); } +/** @relates StringAccum + @brief Append decimal representation of @a u to @a sa. + @return @a sa */ inline StringAccum & operator<<(StringAccum &sa, unsigned u) { return sa << static_cast<unsigned long>(u); } +/** @relates StringAccum + @brief Append the contents of @a str to @a sa. + @return @a sa */ inline StringAccum & -operator<<(StringAccum &sa, const String &s) +operator<<(StringAccum &sa, const String &str) { - sa.append(s.data(), s.length()); + sa.append(str.begin(), str.end()); return sa; } @@ -271,7 +530,7 @@ operator<<(StringAccum &sa, const String &s) inline StringAccum & operator<<(StringAccum &sa, PermString s) { - sa.safe_append(s.c_str(), s.length()); + sa.append_safe_data(s.c_str(), s.length()); return sa; } #endif @@ -279,7 +538,7 @@ operator<<(StringAccum &sa, PermString s) inline StringAccum & operator<<(StringAccum &sa, const StringAccum &sb) { - sa.append(sb.data(), sb.length()); + sa.append(sb.begin(), sb.end()); return sa; } @@ -295,4 +554,5 @@ operator!=(StringAccum &sa, const char *s) return strcmp(sa.c_str(), s) != 0; } +#undef LCDF_SNPRINTF_ATTR #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/string.hh b/Build/source/texk/lcdf-typetools/include/lcdf/string.hh index 34eb1af3ed9..6ef0308cd02 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/string.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/string.hh @@ -8,69 +8,271 @@ class StringAccum; class String { public: - - // Call static_initialize() before any function which might deal with - // Strings, and declare a String::Initializer in any file in which you - // declare static global Strings. - struct Initializer { Initializer(); }; - friend struct String::Initializer; - static void static_initialize(); - static void static_cleanup(); - - inline String(); - inline String(const String &s); - String(const char *cc) { assign(cc, -1); } - String(const char *cc, int l) { assign(cc, l); } -#ifdef HAVE_PERMSTRING - inline String(PermString p); + + /** @brief Construct an empty String (with length 0). */ + inline String() { + _r.data = null_memo.real_data; + _r.length = 0; + _r.memo = &null_memo; + ++_r.memo->refcount; + } + + /** @brief Construct a copy of the String @a x. */ + inline String(const String &x) { + assign(x); + } + + /** @brief Construct a String containing the C string @a cstr. + * @param cstr a null-terminated C string + * @return A String containing the characters of @a cstr, up to but not + * including the terminating null character. + * + * If @a cstr equals String::out_of_memory_data(), returns an + * out-of-memory string. */ + inline String(const char *cstr) { + assign(cstr, -1, false); + } + + /** @brief Construct a String containing the first @a len characters of + * string @a s. + * @param s a string + * @param len number of characters to take from @a s. If @a len @< 0, + * then takes @c strlen(@a s) characters. + * @return A String containing @a len characters of @a s. + * + * If @a s equals String::out_of_memory_data(), returns an out-of-memory + * string. */ + inline String(const char *s, int len) { + assign(s, len, false); + } + + /** @brief Construct a String containing the characters from @a begin + * to @a end. + * @param begin first character in string (begin iterator) + * @param end pointer one past last character in string (end iterator) + * @return A String containing the characters from @a begin to @a end. + * + * Returns a null string if @a begin @>= @a end. If @a begin equals + * String::out_of_memory_data(), returns an out-of-memory string. */ + inline String(const char *begin, const char *end) { + assign(begin, (end > begin ? end - begin : 0), false); + } + + /** @brief Construct a String equal to "true" or "false" depending on the + * value of @a b. */ + explicit inline String(bool b) { + _r.data = bool_data + (b ? 0 : 5); + _r.length = (b ? 4 : 5); + _r.memo = &permanent_memo; + ++_r.memo->refcount; + } + + /** @brief Construct a String containing the single character @a c. */ + explicit inline String(char c) { + assign(&c, 1, false); + } + + /** @overload */ + explicit inline String(unsigned char c) { + assign(reinterpret_cast<char *>(&c), 1, false); + } + + /** @brief Construct a base-10 string representation of @a x. */ + explicit String(int x); + /** @overload */ + explicit String(unsigned x); + /** @overload */ + explicit String(long x); + /** @overload */ + explicit String(unsigned long x); + /** @overload */ + explicit String(double x); +#if HAVE_PERMSTRING + inline String(PermString p) { + assign(p); + } #endif - explicit inline String(char); - explicit inline String(unsigned char); - explicit String(int); - explicit String(unsigned); - explicit String(long); - explicit String(unsigned long); - explicit String(double); - inline ~String(); - - static const String &null_string() { return *null_string_p; } - static const String &out_of_memory_string() { return *oom_string_p; } - static const char *out_of_memory_data() { return &oom_string_data; } - static String garbage_string(int n); // n garbage characters - static String fill_string(int c, int n); // n copies of c - static String stable_string(const char *, int = -1); // stable read-only memory - - bool out_of_memory() const { return _data == &oom_string_data; } - - int length() const { return _length; } - const char *data() const { return _data; } - const unsigned char *udata() const { return reinterpret_cast<const unsigned char *>(_data); } - + + /** @brief Destroy a String, freeing memory if necessary. */ + inline ~String() { + deref(); + } + + + /** @brief Return a const reference to an empty String. + * + * May be quicker than String::String(). */ + static inline const String &make_empty() { + return reinterpret_cast<const String &>(null_string_rep); + } + + /** @brief Return a String containing @a len unknown characters. */ + static String make_garbage(int len); + + /** @brief Return a String that directly references the first @a len + * characters of @a s. + * + * This function is suitable for static constant strings whose data is + * known to stay around forever, such as C string constants. If @a len @< + * 0, treats @a s as a null-terminated C string. */ + static String make_stable(const char *s, int len = -1); + + /** @brief Return a String that directly references the character data in + * [@a begin, @a end). + * @param begin pointer to the first character in the character data + * @param end pointer one beyond the last character in the character data + * + * This function is suitable for static constant strings whose data is + * known to stay around forever, such as C string constants. Returns an + * empty string if @a begin @>= @a end. */ + static inline String make_stable(const char *begin, const char *end) { + if (begin < end) + return String::make_stable(begin, end - begin); + else + return String(); + } + static String make_fill(int c, int n); // n copies of c + + + /** @brief Return the string's length. */ + inline int length() const { + return _r.length; + } + + /** @brief Return a pointer to the string's data. + * + * Only the first length() characters are valid, and the string data + * might not be null-terminated. */ + inline const char *data() const { + return _r.data; + } + + /** @brief Return a pointer to the string's data as unsigned chars. + * + * Only the first length() characters are valid, and the string data + * might not be null-terminated. @sa data() */ + inline const unsigned char *udata() const { + return reinterpret_cast<const unsigned char *>(_r.data); + } + + typedef const char *const_iterator; typedef const_iterator iterator; - const_iterator begin() const { return _data; } - const_iterator end() const { return _data + _length; } - - char *mutable_data(); - char *mutable_c_str(); - unsigned char *mutable_udata() { return reinterpret_cast<unsigned char *>(mutable_data()); } - - operator bool() const { return _length != 0; } - bool operator!() const { return _length == 0; } -#ifdef HAVE_PERMSTRING - operator PermString() const { return PermString(_data, _length); } + /** @brief Return an iterator for the first character in the string. + * + * String iterators are simply pointers into string data, so they are + * quite efficient. @sa String::data */ + inline const_iterator begin() const { + return _r.data; + } + + /** @brief Return an iterator for the end of the string. + * + * The return value points one character beyond the last character in the + * string. */ + inline const_iterator end() const { + return _r.data + _r.length; + } + + + typedef int (String::*unspecified_bool_type)() const; + /** @brief Return true iff the string is nonempty. */ + inline operator unspecified_bool_type() const { + return _r.length != 0 ? &String::length : 0; + } + + /** @brief Return true iff the string is empty. */ + inline bool operator!() const { + return _r.length == 0; + } + + + /** @brief Return the @a i th character in the string. + * + * Does not check bounds. @sa String::at */ + inline char operator[](int i) const { + return _r.data[i]; + } + + /** @brief Return the @a i th character in the string. + * + * Checks bounds: an assertion will fail if @a i is less than 0 or not + * less than length(). @sa String::operator[] */ + inline char at(int i) const { + assert((unsigned) i < (unsigned) _r.length); + return _r.data[i]; + } + + /** @brief Return the first character in the string. + * + * Does not check bounds. Same as (*this)[0]. */ + inline char front() const { + return _r.data[0]; + } + + /** @brief Return the last character in the string. + * + * Does not check bounds. Same as (*this)[length() - 1]. */ + inline char back() const { + return _r.data[_r.length - 1]; + } + + + /** @brief Null-terminate the string. + * + * The terminating null character isn't considered part of the string, so + * this->length() doesn't change. Returns a corresponding C string + * pointer. The returned pointer is semi-temporary; it will persist until + * the string is destroyed or appended to. */ + const char *c_str() const; + +#if HAVE_PERMSTRING + operator PermString() const { + return PermString(_r.data, _r.length); + } #endif - - const char *c_str() const; // pointer returned is semi-transient - - char operator[](int i) const { return _data[i]; } - char back() const { return _data[_length - 1]; } - int find_left(int c, int start = 0) const; - int find_left(const String &s, int start = 0) const; - int find_right(int c, int start = 0x7FFFFFFF) const; - - bool equals(const char *, int) const; + + + /** @brief Return a 32-bit hash function of the characters in [begin, end). + * + * Uses Paul Hsieh's "SuperFastHash" algorithm, described at + * http://www.azillionmonkeys.com/qed/hash.html + * This hash function uses all characters in the string. + * + * @invariant If end1 - begin1 == end2 - begin2 and memcmp(begin1, begin2, + * end1 - begin1) == 0, then hashcode(begin1, end1) == hashcode(begin2, + * end2). */ + static unsigned hashcode(const char *begin, const char *end); + + /** @overload */ + static inline unsigned hashcode(const unsigned char *begin, + const unsigned char *end) { + return hashcode(reinterpret_cast<const char *>(begin), + reinterpret_cast<const char *>(end)); + } + + /** @brief Returns a 32-bit hash function of this string's characters. + * + * Equivalent to String::hashcode(begin(), end()). Uses Paul Hsieh's + * "SuperFastHash." + * + * @invariant If s1 == s2, then s1.hashcode() == s2.hashcode(). */ + inline unsigned hashcode() const { + return length() ? hashcode(begin(), end()) : 0; + } + + + /** @brief Return true iff this string is equal to the data in @a s. + * @param s string data to compare to + * @param len length of @a s + * + * Same as String::compare(*this, String(s, len)) == 0. If @a len @< 0, + * then treats @a s as a null-terminated C string. + * + * @sa String::compare(const String &a, const String &b) */ + bool equals(const char *s, int len) const; + // bool operator==(const String &, const String &); // bool operator==(const String &, const char *); // bool operator==(const char *, const String &); @@ -78,38 +280,237 @@ class String { public: // bool operator!=(const String &, const char *); // bool operator!=(const char *, const String &); - int compare(const char *, int) const; - int compare(const String &x) const { return compare(x._data, x._length); } - static inline int compare(const String &a, const String &b); + + /** @brief Compare two strings. + * @param a first string to compare + * @param b second string to compare + * + * Returns 0 if @a a == @a b, negative if @a a @< @a b in lexicographic + * order, and positive if @a a @> @a b in lexicographic order. The + * lexicographic order treats all characters as unsigned. */ + static inline int compare(const String &a, const String &b) { + return a.compare(b); + } + + /** @brief Compare this string with string @a x. + * + * Same as String::compare(*this, @a x). + * @sa String::compare(const String &a, const String &b) */ + inline int compare(const String &x) const { + return compare(x._r.data, x._r.length); + } + + /** @brief Compare this string with the data in @a s. + * @param s string data to compare to + * @param len length of @a s + * + * Same as String::compare(*this, String(s, len)). If @a len @< 0, then + * treats @a s as a null-terminated C string. + * + * @sa String::compare(const String &a, const String &b) */ + int compare(const char *s, int len) const; + // bool operator<(const String &, const String &); // bool operator<=(const String &, const String &); // bool operator>(const String &, const String &); // bool operator>=(const String &, const String &); - - String substring(const char *begin, const char *end) const; + + + /** @brief Return a substring of the current string starting at @a begin + * and ending before @a end. + * @param begin pointer to the first substring character + * @param end pointer one beyond the last substring character + * + * Returns an empty string if @a begin @>= @a end. Also returns an empty + * string if @a begin or @a end is out of range (i.e., either less than + * this->begin() or greater than this->end()), but this should be + * considered a programming error; a future version may generate a warning + * for this case. */ + inline String substring(const char *begin, const char *end) const { + if (begin < end && begin >= _r.data && end <= _r.data + _r.length) + return String(begin, end - begin, _r.memo); + else + return String(); + } + + /** @brief Return a substring of this string, consisting of the @a len + * characters starting at index @a pos. + * @param pos substring's first position relative to the string + * @param len length of substring + * + * If @a pos is negative, starts that far from the end of the string. If + * @a len is negative, leaves that many characters off the end of the + * string. If @a pos and @a len specify a substring that is partly + * outside the string, only the part within the string is returned. If + * the substring is beyond either end of the string, returns an empty + * string (but this should be considered a programming error; a future + * version may generate a warning for this case). + * + * @note String::substring() is intended to behave like Perl's substr(). */ String substring(int pos, int len) const; - String substring(int pos) const { return substring(pos, _length); } + /** @brief Return the suffix of the current string starting at index @a pos. + * + * If @a pos is negative, starts that far from the end of the string. If + * @a pos is so negative that the suffix starts outside the string, then + * the entire string is returned. If the substring is beyond the end of + * the string (@a pos > length()), returns an empty string (but this + * should be considered a programming error; a future version may generate + * a warning for this case). + * + * @note String::substring() is intended to behave like Perl's substr(). */ + inline String substring(int pos) const { + return substring((pos <= -_r.length ? 0 : pos), _r.length); + } + + + /** @brief Search for a character in a string. + * @param c character to search for + * @param start initial search position + * + * Return the index of the leftmost occurence of @a c, starting at index + * @a start and working up to the end of the string. Returns -1 if @a c + * is not found. */ + int find_left(char c, int start = 0) const; + + /** @brief Search for a substring in a string. + * @param x substring to search for + * @param start initial search position + * + * Return the index of the leftmost occurence of the substring @a str, + * starting at index @a start and working up to the end of the string. + * Returns -1 if @a str is not found. */ + int find_left(const String &x, int start = 0) const; + + /** @brief Search for a character in a string. + * @param c character to search for + * @param start initial search position + * + * Return the index of the rightmost occurence of the character @a c, + * starting at index @a start and working back to the beginning of the + * string. Returns -1 if @a c is not found. @a start may start beyond + * the end of the string. */ + int find_right(char c, int start = 0x7FFFFFFF) const; + + /** @brief Return true iff this string begins with prefix @a x. + * + * Same as String::starts_with(@a x.data(), @a x.length()). */ + inline bool starts_with(const String &x) const { + return starts_with(x._r.data, x._r.length); + } + + /** @brief Return true iff this string begins with the data in @a s. + * @param s string data to compare to + * @param len length of @a s + * + * If @a len @< 0, then treats @a s as a null-terminated C string. + * + * @sa String::compare(const String &a, const String &b) */ + bool starts_with(const char *s, int len) const; + + + /** @brief Return a lowercased version of this string. + * + * Translates the ASCII characters 'A' through 'Z' into their lowercase + * equivalents. */ String lower() const; + + /** @brief Return an uppercased version of this string. + * + * Translates the ASCII characters 'a' through 'z' into their uppercase + * equivalents. */ String upper() const; + + /** @brief Return a "printable" version of this string. + * + * Translates control characters 0-31 into "control" sequences, such as + * "^@" for the null character, and characters 127-255 into octal escape + * sequences, such as "\377" for 255. */ String printable() const; - - inline String &operator=(const String &); - inline String &operator=(const char *); + + + /** @brief Assign this string to @a x. */ + inline String &operator=(const String &x) { + if (&x != this) { + deref(); + assign(x); + } + return *this; + } + + /** @brief Assign this string to the C string @a cstr. */ + inline String &operator=(const char *cstr) { + assign(cstr, -1, true); + return *this; + } + #ifdef HAVE_PERMSTRING - inline String &operator=(PermString); + inline String &operator=(PermString p) { + deref(); + assign(p); + return *this; + } #endif - void append(const char *, int len); + /** @brief Append the first @a len characters of @a s to this string. + * @param s data to append + * @param len length of data + * + * If @a len @< 0, treats @a s as a null-terminated C string. */ + void append(const char *s, int len); + + /** @brief Appends the data from @a begin to @a end to the end of this + * string. + * + * Does nothing if @a begin @>= @a end. */ + inline void append(const char *begin, const char *end) { + if (begin < end) + append(begin, end - begin); + } + + /** @brief Append @a len copies of character @a c to this string. */ void append_fill(int c, int len); + + /** @brief Append @a len unknown characters to this string. + * @return Modifiable pointer to the appended characters. + * + * The caller may safely modify the returned memory. Null is returned if + * the string becomes out-of-memory. */ char *append_garbage(int len); - inline String &operator+=(const String &); - inline String &operator+=(const char *); - inline String &operator+=(char); -#ifdef HAVE_PERMSTRING - inline String &operator+=(PermString p); + + + /** @brief Append a copy of @a x to the end of this string. + * + * Returns the result. */ + inline String &operator+=(const String &x) { + append(x._r.data, x._r.length); + return *this; + } + + /** @brief Append a copy of the C string @a cstr to the end of this string. + * + * Returns the result. */ + inline String &operator+=(const char *cstr) { + append(cstr, -1); + return *this; + } + + /** @brief Append the character @a c to the end of this string. + * + * Returns the result. */ + inline String &operator+=(char c) { + append(&c, 1); + return *this; + } + +#if HAVE_PERMSTRING + inline String &operator+=(PermString p) { + append(p.c_str(), p.length()); + return *this; + } #endif + // String operator+(String, const String &); // String operator+(String, const char *); // String operator+(const char *, const String &); @@ -120,341 +521,269 @@ class String { public: // String operator+(PermString, PermString); // String operator+(String, char); + + /** @brief Return true iff the String's data is shared or immutable. */ + inline bool data_shared() const { + return !_r.memo->capacity || _r.memo->refcount != 1; + } + + /** @brief Ensure the string's data is unshared and return a mutable + * pointer to it. */ + char *mutable_data(); + + /** @brief Null-terminate the string and return a mutable pointer to its + * data. + * @sa String::c_str */ + char *mutable_c_str(); + + unsigned char *mutable_udata() { + return reinterpret_cast<unsigned char *>(mutable_data()); + } + void align(int); - - private: - - struct Memo { - int _refcount; - int _capacity; - int _dirty; - char *_real_data; - - inline Memo(); - inline Memo(char *, int, int); - Memo(int, int); - ~Memo(); - }; - - mutable const char *_data; // mutable for c_str() - mutable int _length; - mutable Memo *_memo; - - inline String(const char *, int, Memo *); - - inline void assign(const String &) const; - void assign(const char *, int); -#ifdef HAVE_PERMSTRING - inline void assign(PermString) const; -#endif - inline void deref() const; - void make_out_of_memory(); - - static Memo *null_memo; - static Memo *permanent_memo; - static Memo *oom_memo; - static String *null_string_p; - static String *oom_string_p; - static const char oom_string_data; - static String claim_string(char *, int, int); // claim memory - friend class StringAccum; - -}; + /** @brief Return true iff this is an out-of-memory string. */ + inline bool out_of_memory() const { + return _r.data == &oom_string_data; + } + /** @brief Return a const reference to an out-of-memory String. */ + static inline const String &make_out_of_memory() { + return reinterpret_cast<const String &>(oom_string_rep); + } -inline -String::String(const char *data, int length, Memo *memo) - : _data(data), _length(length), _memo(memo) -{ - _memo->_refcount++; -} + /** @brief Return the data pointer used for out-of-memory strings. + * + * The returned value may be dereferenced; it points to a null + * character. */ + static inline const char *out_of_memory_data() { + return &oom_string_data; + } -inline void -String::assign(const String &s) const -{ - _data = s._data; - _length = s._length; - _memo = s._memo; - _memo->_refcount++; -} + private: -inline void -String::deref() const -{ - if (--_memo->_refcount == 0) - delete _memo; -} + /** @cond never */ + struct memo_t { + volatile uint32_t refcount; + uint32_t capacity; + volatile uint32_t dirty; + char *real_data; + }; -inline -String::String() - : _data(null_memo->_real_data), _length(0), _memo(null_memo) -{ - _memo->_refcount++; -} + struct rep_t { + const char *data; + int length; + memo_t *memo; + }; + /** @endcond never */ -inline -String::String(char c) -{ - assign(&c, 1); -} + mutable rep_t _r; // mutable for c_str() -inline -String::String(unsigned char c) -{ - assign(reinterpret_cast<char *>(&c), 1); -} + inline String(const char *data, int length, memo_t *memo) { + _r.data = data; + _r.length = length; + _r.memo = memo; + ++memo->refcount; + } -inline -String::String(const String &s) -{ - assign(s); -} + inline void assign(const String &x) const { + _r.data = x._r.data; + _r.length = x._r.length; + _r.memo = x._r.memo; + ++_r.memo->refcount; + } -inline -String::~String() -{ - deref(); -} + inline void deref() const { + if (--_r.memo->refcount == 0) + delete_memo(_r.memo); + } -inline String -String::substring(const char *begin, const char *end) const -{ - if (begin < end && begin >= _data && end <= _data + _length) - return String(begin, end - begin, _memo); - else - return String(); -} + void assign(const char *cstr, int len, bool need_deref); +#if HAVE_PERMSTRING + inline void assign(PermString x) const { + _r.data = x.c_str(); + _r.length = x.length(); + _r.memo = &permanent_memo; + ++_r.memo->refcount; + } +#endif + void assign_out_of_memory(); + static memo_t *create_memo(char *data, int dirty, int capacity); + static void delete_memo(memo_t *memo); -inline int -String::compare(const String &a, const String &b) -{ - return a.compare(b); -} + static const char null_string_data; + static const char oom_string_data; + static const char bool_data[11]; + static memo_t null_memo; + static memo_t permanent_memo; + static memo_t oom_memo; + static const rep_t null_string_rep; + static const rep_t oom_string_rep; -inline bool -operator==(const String &s1, const String &s2) -{ - return s1.equals(s2.data(), s2.length()); -} + static String make_claim(char *, int, int); // claim memory -inline bool -operator==(const char *cc1, const String &s2) -{ - return s2.equals(cc1, -1); -} + friend class rep_t; + friend class StringAccum; -inline bool -operator==(const String &s1, const char *cc2) -{ - return s1.equals(cc2, -1); -} +}; -inline bool -operator!=(const String &s1, const String &s2) -{ - return !s1.equals(s2.data(), s2.length()); -} -inline bool -operator!=(const char *cc1, const String &s2) -{ - return !s2.equals(cc1, -1); +/** @relates String + * @brief Compares two strings for equality. + * + * Returns true iff the two operands have the same lengths and the same + * characters in the same order. At most one of the operands can be a + * null-terminated C string. + * @sa String::compare + */ +inline bool operator==(const String &a, const String &b) { + return a.equals(b.data(), b.length()); } -inline bool -operator!=(const String &s1, const char *cc2) -{ - return !s1.equals(cc2, -1); +/** @relates String */ +inline bool operator==(const char *a, const String &b) { + return b.equals(a, -1); } -inline bool -operator<(const String &s1, const String &s2) -{ - return s1.compare(s2.data(), s2.length()) < 0; +/** @relates String */ +inline bool operator==(const String &a, const char *b) { + return a.equals(b, -1); } -inline bool -operator<=(const String &s1, const String &s2) -{ - return s1.compare(s2.data(), s2.length()) <= 0; +/** @relates String + * @brief Compare two Strings for inequality. + * + * Returns true iff !(@a a == @a b). At most one of the operands can be a + * null-terminated C string. */ +inline bool operator!=(const String &a, const String &b) { + return !a.equals(b.data(), b.length()); } -inline bool -operator>(const String &s1, const String &s2) -{ - return s1.compare(s2.data(), s2.length()) > 0; +/** @relates String */ +inline bool operator!=(const char *a, const String &b) { + return !b.equals(a, -1); } -inline bool -operator>=(const String &s1, const String &s2) -{ - return s1.compare(s2.data(), s2.length()) >= 0; +/** @relates String */ +inline bool operator!=(const String &a, const char *b) { + return !a.equals(b, -1); } - -inline String & -String::operator=(const String &s) -{ - if (&s != this) { - deref(); - assign(s); - } - return *this; +/** @relates String + * @brief Compare two Strings. + * + * Returns true iff @a a @< @a b in lexicographic order. + * @sa String::compare + */ +inline bool operator<(const String &a, const String &b) { + return a.compare(b.data(), b.length()) < 0; } -inline String & -String::operator=(const char *cc) -{ - deref(); - assign(cc, -1); - return *this; +/** @relates String + * @brief Compare two Strings. + * + * Returns true iff @a a @<= @a b in lexicographic order. + * @sa String::compare + */ +inline bool operator<=(const String &a, const String &b) { + return a.compare(b.data(), b.length()) <= 0; } -inline String & -String::operator+=(const String &s) -{ - append(s._data, s._length); - return *this; +/** @relates String + * @brief Compare two Strings. + * + * Returns true iff @a a @> @a b in lexicographic order. + * @sa String::compare + */ +inline bool operator>(const String &a, const String &b) { + return a.compare(b.data(), b.length()) > 0; } -inline String & -String::operator+=(const char *cc) -{ - append(cc, -1); - return *this; +/** @relates String + * @brief Compare two Strings. + * + * Returns true iff @a a @>= @a b in lexicographic order. + * @sa String::compare + */ +inline bool operator>=(const String &a, const String &b) { + return a.compare(b.data(), b.length()) >= 0; } -inline String & -String::operator+=(char c) -{ - append_fill(c, 1); - return *this; +/** @relates String + * @brief Concatenate the operands and return the result. + * + * At most one of the two operands can be a null-terminated C string. */ +inline String operator+(String a, const String &b) { + a += b; + return a; } -inline String -operator+(String s1, const String &s2) -{ - s1 += s2; - return s1; +/** @relates String */ +inline String operator+(String a, const char *b) { + a.append(b, -1); + return a; } -inline String -operator+(String s1, const char *cc2) -{ - s1.append(cc2, -1); - return s1; -} - -inline String -operator+(const char *cc1, const String &s2) -{ - String s1(cc1); - s1 += s2; +/** @relates String */ +inline String operator+(const char *a, const String &b) { + String s1(a); + s1 += b; return s1; } -inline String -operator+(String s1, char c2) -{ - s1.append(&c2, 1); - return s1; -} +/** @relates String + * @brief Concatenate the operands and return the result. + * + * The second operand is a single character. */ +inline String operator+(String a, char b) { + a.append(&b, 1); + return a; +} -#ifdef HAVE_PERMSTRING +#if HAVE_PERMSTRING -inline void -String::assign(PermString p) const -{ - _data = p.c_str(); - _length = p.length(); - _memo = permanent_memo; - _memo->_refcount++; +inline bool operator==(PermString a, const String &b) { + return b.equals(a.c_str(), a.length()); } -inline -String::String(PermString p) -{ - assign(p); +inline bool operator==(const String &a, PermString b) { + return a.equals(b.c_str(), b.length()); } -inline bool -operator==(PermString p1, const String &s2) -{ - return s2.equals(p1.c_str(), p1.length()); +inline bool operator!=(PermString a, const String &b) { + return !b.equals(a.c_str(), a.length()); } -inline bool -operator==(const String &s1, PermString p2) -{ - return s1.equals(p2.c_str(), p2.length()); +inline bool operator!=(const String &a, PermString b) { + return !a.equals(b.c_str(), b.length()); } -inline bool -operator!=(PermString p1, const String &s2) -{ - return !s2.equals(p1.c_str(), p1.length()); +inline String operator+(String a, PermString b) { + a.append(b.c_str(), b.length()); + return a; } -inline bool -operator!=(const String &s1, PermString p2) -{ - return !s1.equals(p2.c_str(), p2.length()); +inline String operator+(PermString a, String b) { + return String(a) + b; } -inline String & -String::operator=(PermString p) -{ - deref(); - assign(p); - return *this; +inline String operator+(PermString a, const char *b) { + return String(a) + b; } -inline String & -String::operator+=(PermString p) -{ - append(p.c_str(), p.length()); - return *this; +inline String operator+(const char *a, PermString b) { + return String(a) + b; } -inline String -operator+(String s1, PermString p2) -{ - s1.append(p2.c_str(), p2.length()); - return s1; -} - -inline String -operator+(PermString p1, String s2) -{ - String s1(p1); - return s1 + s2; -} - -inline String -operator+(PermString p1, const char *cc2) -{ - String s1(p1); - return s1 + cc2; -} - -inline String -operator+(const char *cc1, PermString p2) -{ - String s1(cc1); - return s1 + p2; -} - -inline String -operator+(PermString p1, PermString p2) -{ - String s1(p1); - return s1 + p2; +inline String operator+(PermString a, PermString b) { + return String(a) + b; } #endif -unsigned hashcode(const String &); +inline unsigned hashcode(const String &str) { + return str.hashcode(); +} #endif diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/transform.hh b/Build/source/texk/lcdf-typetools/include/lcdf/transform.hh index 64c8dc384b7..496658a4911 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/transform.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/transform.hh @@ -16,7 +16,7 @@ class Transform { public: double operator[](int i) const { assert(i>=0&&i<6); return _m[i]; } bool null() const { return _null; } void check_null(double tolerance); - + void scale(double, double); void scale(const Point &p) { scale(p.x, p.y); } void scale(double d) { scale(d, d); } diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc b/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc index 0097edb2e47..0c7fedba22e 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc +++ b/Build/source/texk/lcdf-typetools/include/lcdf/vector.cc @@ -85,17 +85,17 @@ Vector<T>::reserve(int want) want = _capacity > 0 ? _capacity * 2 : 4; if (want <= _capacity) return true; - + T *new_l = (T *)new unsigned char[sizeof(T) * want]; if (!new_l) return false; - + for (int i = 0; i < _n; i++) { new(velt(new_l, i)) T(_l[i]); _l[i].~T(); } delete[] (unsigned char *)_l; - + _l = new_l; _capacity = want; return true; diff --git a/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh b/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh index 672abb88036..8b390c0a2f6 100644 --- a/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh +++ b/Build/source/texk/lcdf-typetools/include/lcdf/vector.hh @@ -18,12 +18,12 @@ class Vector { public: typedef const T& const_reference; typedef T* pointer; typedef const T* const_pointer; - + typedef int size_type; - + typedef T* iterator; typedef const T* const_iterator; - + explicit Vector() : _l(0), _n(0), _capacity(0) { } explicit Vector(size_type n, const T &e) : _l(0), _n(0), _capacity(0) { resize(n, e); } // template <class In> ... @@ -33,7 +33,7 @@ class Vector { public: Vector<T>& operator=(const Vector<T>&); Vector<T>& assign(size_type n, const T& e = T()); // template <class In> ... - + // iterators iterator begin() { return _l; } const_iterator begin() const { return _l; } @@ -66,9 +66,9 @@ class Vector { public: iterator erase(iterator, iterator); void swap(Vector<T> &); void clear() { erase(begin(), end()); } - + private: - + T *_l; size_type _n; size_type _capacity; @@ -112,7 +112,7 @@ class Vector<void*> { public: typedef void* const* const_pointer; typedef int size_type; - + typedef void** iterator; typedef void* const* const_iterator; @@ -120,10 +120,10 @@ class Vector<void*> { public: explicit Vector(size_type n, void* e) : _l(0), _n(0), _capacity(0) { resize(n, e); } Vector(const Vector<void*> &); ~Vector(); - + Vector<void*> &operator=(const Vector<void*> &); Vector<void*> &assign(size_type n, void* e = 0); - + // iterators iterator begin() { return _l; } const_iterator begin() const { return _l; } @@ -158,7 +158,7 @@ class Vector<void*> { public: void clear() { _n = 0; } private: - + void **_l; size_type _n; size_type _capacity; @@ -181,7 +181,7 @@ Vector<void*>::pop_back() --_n; } -inline Vector<void*>::iterator +inline Vector<void*>::iterator Vector<void*>::erase(Vector<void*>::iterator e) { return (e < end() ? erase(e, e + 1) : e); @@ -190,9 +190,9 @@ Vector<void*>::erase(Vector<void*>::iterator e) template <class T> class Vector<T*>: private Vector<void*> { - + typedef Vector<void*> Base; - + public: typedef T* value_type; @@ -202,20 +202,20 @@ class Vector<T*>: private Vector<void*> { typedef T* const* const_pointer; typedef int size_type; - + typedef T** iterator; typedef T* const* const_iterator; - + explicit Vector() : Base() { } explicit Vector(size_type n, T* e) : Base(n, (void *)e) { } Vector(const Vector<T *> &o) : Base(o) { } ~Vector() { } Vector<T *> &operator=(const Vector<T *> &o) - { Base::operator=(o); return *this; } + { Base::operator=(o); return *this; } Vector<T *> &assign(size_type n, T *e = 0) - { Base::assign(n, (void *)e); return *this; } - + { Base::assign(n, (void *)e); return *this; } + // iterators const_iterator begin() const { return (const_iterator)(Base::begin()); } iterator begin() { return (iterator)(Base::begin()); } @@ -240,7 +240,7 @@ class Vector<T*>: private Vector<void*> { T* back() const { return (T*)(Base::back()); } T*& at_u(size_type i) { return (T*&)(Base::at_u(i)); } T* at_u(size_type i) const { return (T*)(Base::at_u(i)); } - + // modifiers void push_back(T* e) { Base::push_back((void*)e); } void pop_back() { Base::pop_back(); } @@ -248,7 +248,7 @@ class Vector<T*>: private Vector<void*> { iterator erase(iterator i, iterator j) { return Base::erase((void**)i, (void**)j); } void swap(Vector<T *> &o) { Base::swap(o); } void clear() { Base::clear(); } - + }; #include <lcdf/vector.cc> // necessary to support GCC 3.3 diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools.spec b/Build/source/texk/lcdf-typetools/lcdf-typetools.spec index 268579058fc..10362490750 100644 --- a/Build/source/texk/lcdf-typetools/lcdf-typetools.spec +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools.spec @@ -1,6 +1,6 @@ Summary: Programs to manipulate OpenType and multiple-master fonts Name: lcdf-typetools -Version: 2.69 +Version: 2.75 Copyright: GPL Vendor: Little Cambridgeport Design Factory <http://www.lcdf.org/> Group: Utilities/Printing diff --git a/Build/source/texk/lcdf-typetools/libefont/Makefile.am b/Build/source/texk/lcdf-typetools/libefont/Makefile.am index b28d0e4ad4f..f77822b366e 100644 --- a/Build/source/texk/lcdf-typetools/libefont/Makefile.am +++ b/Build/source/texk/lcdf-typetools/libefont/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - noinst_LIBRARIES = libefont.a libefont_a_SOURCES = \ diff --git a/Build/source/texk/lcdf-typetools/libefont/Makefile.in b/Build/source/texk/lcdf-typetools/libefont/Makefile.in index 26bba7ed5db..f89d6125f35 100644 --- a/Build/source/texk/lcdf-typetools/libefont/Makefile.in +++ b/Build/source/texk/lcdf-typetools/libefont/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,17 +30,24 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = libefont DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru libefont_a_AR = $(AR) $(ARFLAGS) libefont_a_DEPENDENCIES = @@ -57,13 +64,17 @@ am_libefont_a_OBJECTS = afm.$(OBJEXT) afmparse.$(OBJEXT) \ ttfhead.$(OBJEXT) libefont_a_OBJECTS = $(am_libefont_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libefont_a_SOURCES) DIST_SOURCES = $(libefont_a_SOURCES) ETAGS = etags @@ -71,6 +82,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -87,29 +99,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -118,6 +141,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -130,20 +154,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -152,6 +185,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -167,7 +201,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libefont.a libefont_a_SOURCES = \ afm.cc \ @@ -208,13 +241,13 @@ INCLUDES = -I$(top_srcdir)/include all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -298,12 +331,25 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -402,7 +448,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -445,7 +492,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -460,17 +508,17 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am srclinks: diff --git a/Build/source/texk/lcdf-typetools/libefont/afm.cc b/Build/source/texk/lcdf-typetools/libefont/afm.cc index 42110ba8d5b..be7a7aa6cec 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afm.cc @@ -29,7 +29,7 @@ AfmReader::AfmReader(AfmParser &parser, Metrics *afm, AfmMetricsXt *afm_xt, : _afm(afm), _afm_xt(afm_xt), _l(parser), _composite_warned(false), _metrics_sets_warned(false), _y_width_warned(0) { - _errh = errh ? errh : ErrorHandler::ignore_handler(); + _errh = errh ? errh : ErrorHandler::silent_handler(); } Metrics * @@ -38,12 +38,12 @@ AfmReader::read(Slurper &slurp, ErrorHandler *errh) AfmParser p(slurp); if (!p.ok()) return 0; - + Metrics *afm = new Metrics; AfmMetricsXt *afm_xt = new AfmMetricsXt; afm->add_xt(afm_xt); AfmReader reader(p, afm, afm_xt, errh); - + if (!reader.read()) { delete afm; return 0; @@ -64,7 +64,7 @@ AfmReader::lwarning(const char *format, ...) const { va_list val; va_start(val, format); - _errh->verror(ErrorHandler::ERR_WARNING, _l.landmark(), format, val); + _errh->vxmessage(_l.landmark(), ErrorHandler::e_warning, format, val); va_end(val); } @@ -73,7 +73,7 @@ AfmReader::lerror(const char *format, ...) const { va_list val; va_start(val, format); - _errh->verror(ErrorHandler::ERR_ERROR, _l.landmark(), format, val); + _errh->vxmessage(_l.landmark(), ErrorHandler::e_error, format, val); va_end(val); } @@ -136,7 +136,7 @@ AfmReader::read() { AfmParser &l = _l; assert(_afm && _afm_xt); - + // First, read all opening comments into an array so we can print them out // later. PermString comment; @@ -150,22 +150,22 @@ AfmReader::read() break; } } - + _afm->set_scale(1000); unsigned invalid_lines = 0; PermString s; bool isbasefont; int metrics_sets; int direction; - + while (l.next_line()) switch (l.first()) { - + case 'A': if (l.isall("Ascender %g", &fd( fdAscender ))) break; goto invalid; - + case 'C': if (l.isall("Characters %d", (int *)0)) break; @@ -178,12 +178,12 @@ AfmReader::read() if (l.isall("Comment %+s", (PermString *) 0)) break; goto invalid; - + case 'D': if (l.isall("Descender %g", &fd( fdDescender ))) break; goto invalid; - + case 'E': if (l.isall("EncodingScheme %+s", &_afm_xt->encoding_scheme)) break; @@ -196,7 +196,7 @@ AfmReader::read() break; } goto invalid; - + case 'F': if (l.isall("FontName %+s", &s)) { _afm->set_font_name(s); @@ -215,7 +215,7 @@ AfmReader::read() &fd( fdFontBBurx ), &fd( fdFontBBury ))) break; goto invalid; - + case 'I': if (l.isall("ItalicAngle %g", &fd( fdItalicAngle ))) break; @@ -231,7 +231,7 @@ AfmReader::read() if (l.isall("IsFixedPitch %b", (bool *)0)) break; goto invalid; - + case 'M': if (l.isall("MappingScheme %d", (int *)0)) { composite_warning(); @@ -243,12 +243,12 @@ AfmReader::read() break; } goto invalid; - + case 'N': if (l.isall("Notice %+s", &_afm_xt->notice)) break; goto invalid; - + case 'S': if (l.isall("StartDirection %d", &direction)) { if (direction != 0) @@ -274,14 +274,14 @@ AfmReader::read() if (l.isall("StartFontMetrics %g", (double *)0)) break; goto invalid; - + case 'U': if (l.isall("UnderlinePosition %g", &fd( fdUnderlinePosition ))) break; if (l.isall("UnderlineThickness %g", &fd( fdUnderlineThickness ))) break; goto invalid; - + case 'V': if (l.isall("Version %+s", &s)) { _afm->set_version(s); @@ -292,26 +292,26 @@ AfmReader::read() break; } goto invalid; - + case 'W': if (l.isall("Weight %+s", &s)) { _afm->set_weight(s); break; } goto invalid; - + case 'X': if (l.isall("XHeight %g", &fd( fdXHeight ))) break; goto invalid; - + default: invalid: invalid_lines++; no_match_warning(); - + } - + done: if (invalid_lines >= l.lineno() - 10) return false; @@ -332,33 +332,33 @@ AfmReader::read_char_metric_data() const double bllx = UNKDOUBLE, blly = 0, burx = 0, bury = 0; PermString n; PermString ligright, ligresult; - + AfmParser &l = _l; - + l.is("C %d ; WX %g ; N %/s ; B %g %g %g %g ;", &c, &wx, &n, &bllx, &blly, &burx, &bury); - + while (l.left()) { - + switch (l.first()) { - + case 'B': if (l.is("B %g %g %g %g", &bllx, &blly, &burx, &bury)) break; goto invalid; - + case 'C': if (l.is("C %d", &c)) break; if (l.is("CH <%x>", &c)) break; goto invalid; - + case 'E': if (l.isall("EndCharMetrics")) return; goto invalid; - + case 'L': if (l.is("L %/s %/s", &ligright, &ligresult)) { if (!n) @@ -371,12 +371,12 @@ AfmReader::read_char_metric_data() const break; } goto invalid; - + case 'N': if (l.is("N %/s", &n)) break; goto invalid; - + case 'W': if (l.is("WX %g", &wx) || l.is("W0X %g", &wx)) @@ -394,34 +394,34 @@ AfmReader::read_char_metric_data() const break; } goto invalid; - + default: invalid: // always warn about unknown directives here! no_match_warning("character metrics"); l.skip_until(';'); break; - + } - + l.is(";"); // get rid of any possible semicolon } - + // create the character if (!n) lwarning("character without a name ignored"); else { if (_afm->find(n) != -1) lwarning("character %s defined twice", n.c_str()); - + GlyphIndex gi = _afm->add_glyph(n); - + _afm->wd(gi) = wx; _afm->lf(gi) = bllx; _afm->rt(gi) = burx; _afm->tp(gi) = bury; _afm->bt(gi) = blly; - + if (c != -1) _afm->set_code(gi, c); } @@ -432,33 +432,33 @@ void AfmReader::read_char_metrics() const { assert(!ligature_left.size()); - + while (_l.next_line()) // Grok the whole line. Are we on a character metric data line? switch (_l.first()) { - + case 'C': - if (isspace(_l[1]) || _l[1] == 'H' && isspace(_l[2])) { + if (isspace(_l[1]) || (_l[1] == 'H' && isspace(_l[2]))) { read_char_metric_data(); break; } if (_l.is("Comment")) break; goto invalid; - + case 'E': if (_l.isall("EndCharMetrics")) goto end_char_metrics; goto invalid; - + default: invalid: no_match_warning(); - + } - + end_char_metrics: - + for (int i = 0; i < ligature_left.size(); i++) { GlyphIndex leftgi = find_err(ligature_left[i], "ligature"); GlyphIndex rightgi = find_err(ligature_right[i], "ligature"); @@ -479,19 +479,19 @@ AfmReader::read_kerns() const double kx; PermString left, right; GlyphIndex leftgi, rightgi; - + AfmParser &l = _l; // AFM files have reversed pair programs when read. _afm->pair_program()->set_reversed(true); - + while (l.next_line()) switch (l.first()) { - + case 'C': if (l.is("Comment")) break; goto invalid; - + case 'E': if (l.isall("EndKernPairs")) break; @@ -500,7 +500,7 @@ AfmReader::read_kerns() const if (l.isall("EndTrackKern")) break; goto invalid; - + case 'K': if (l.isall("KPX %/s %/s %g", &left, &right, &kx)) { goto validkern; @@ -519,7 +519,7 @@ AfmReader::read_kerns() const break; } goto invalid; - + validkern: leftgi = find_err(left, "kern"); rightgi = find_err(right, "kern"); @@ -529,7 +529,7 @@ AfmReader::read_kerns() const if (_afm->add_kern(leftgi, rightgi, _afm->add_kv(kx))) lwarning("duplicate kern; first pair ignored"); break; - + case 'S': if (l.isall("StartKernPairs %d", (int *)0) || l.isall("StartKernPairs0 %d", (int *)0)) @@ -541,18 +541,18 @@ AfmReader::read_kerns() const if (l.isall("StartTrackKern %d", (int *)0)) break; goto invalid; - + case 'T': if (l.isall("TrackKern %g %g %g %g %g", (double *)0, (double *)0, (double *)0, (double *)0, (double *)0)) break; // FIXME: implement TrackKern goto invalid; - + default: invalid: no_match_warning(); break; - + } } @@ -562,24 +562,24 @@ AfmReader::read_composites() const { while (_l.next_line()) switch (_l.first()) { - + case 'C': if (_l.is("Comment")) break; if (_l.is("CC")) break; goto invalid; - + case 'E': if (_l.isall("EndComposites")) return; goto invalid; - + default: invalid: no_match_warning(); break; - + } } diff --git a/Build/source/texk/lcdf-typetools/libefont/afmparse.cc b/Build/source/texk/lcdf-typetools/libefont/afmparse.cc index 06dfa548916..dd379689d0c 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afmparse.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afmparse.cc @@ -115,7 +115,7 @@ AfmParser::vis(const char *formatsigned, va_list valist) { const unsigned char *format = (const unsigned char *)formatsigned; unsigned char *str = _pos; - + // Oftentimes, we'll get a keyword first. So handle that simple case // with a tight loop for (possibly) better performance and slightly different // semantics. (A keyword that comes first in the format must be followed @@ -132,23 +132,23 @@ AfmParser::vis(const char *formatsigned, va_list valist) FAIL("keyword mismatch"); } } - + int fplus, fslash; _fail_field = 0; _message = PermString(); - + while (1) { - + switch (*format) { - + /* - - - - - - - - percent specifications - - - - - - - */ case '%': fplus = fslash = 0; _fail_field++; - + percentspec: switch (*++format) { - + // FLAGS case '+': fplus++; @@ -156,14 +156,14 @@ AfmParser::vis(const char *formatsigned, va_list valist) case '/': fslash++; goto percentspec; - + case '%': goto matchchar; - + case 'b': case 's': { int len; - + if (fplus) len = strlen((char *)str); else if (fslash) { @@ -177,13 +177,13 @@ AfmParser::vis(const char *formatsigned, va_list valist) if (len == 0) FAIL("should be a string"); } - + PermString s = PermString((char *)str, len); str += len; - + // Now we have the string. What to do with it? Depends on format. if (*format == 'b') { - + bool *bstore = va_arg(valist, bool *); if (s == "true") { if (bstore) *bstore = 1; @@ -191,14 +191,14 @@ AfmParser::vis(const char *formatsigned, va_list valist) if (bstore) *bstore = 0; } else FAIL("should be `true' or `false'"); - + } else { PermString *sstore = va_arg(valist, PermString *); if (sstore) *sstore = s; } break; } - + case '(': { if (*str++ != '(') FAIL("should be a parenthesized string"); unsigned char *last = str; @@ -209,36 +209,36 @@ AfmParser::vis(const char *formatsigned, va_list valist) last++; } if (paren_level >= 0) FAIL("had unbalanced parentheses"); - + PermString *sstore = va_arg(valist, PermString *); if (sstore) *sstore = PermString((char *)str, last - str - 1); str = last; break; } - + case 'd': case 'i': { union { unsigned char *uc; char *c; } new_str; int v = strtol((char *)str, &new_str.c, 10); if (new_str.uc == str) FAIL("should be an integer"); - + str = new_str.uc; int *istore = va_arg(valist, int *); if (istore) *istore = v; break; } - + case 'x': { union { unsigned char *uc; char *c; } new_str; int v = strtol((char *)str, &new_str.c, 16); if (new_str.uc == str) FAIL("should be a hex integer"); - + str = new_str.uc; int *istore = va_arg(valist, int *); if (istore) *istore = v; break; } - + case 'e': case 'f': case 'g': { @@ -246,22 +246,22 @@ AfmParser::vis(const char *formatsigned, va_list valist) double v = strtonumber((char *)str, &new_str.c); if (v < MIN_KNOWN_DOUBLE) v = MIN_KNOWN_DOUBLE; if (new_str.uc == str) FAIL("should be a real number"); - + str = new_str.uc; double *dstore = va_arg(valist, double *); if (dstore) *dstore = v; break; } - + case '<': { unsigned char *endbrack = (unsigned char *)strchr((char *)str, '>'); int n = (endbrack ? endbrack - (str + 1) : 0); if (!endbrack || n % 2 != 0) FAIL("should be hex values in <angle brackets>"); - String s = String::garbage_string(n/2); + String s = String::make_garbage(n/2); unsigned char *data = s.mutable_udata(); - + str++; while (*str != '>') { if (isxdigit(str[0]) && isxdigit(str[1])) { @@ -271,7 +271,7 @@ AfmParser::vis(const char *formatsigned, va_list valist) FAIL("had non-hex digits in the angle brackets"); } str++; - + if (String *datastore = va_arg(valist, String *)) *datastore = s; break; @@ -280,33 +280,33 @@ AfmParser::vis(const char *formatsigned, va_list valist) default: assert(0 /* internal error: bad % */); FAIL(""); - + } break; /* - - - - - - - - end percent specifications - - - - - - - */ - + case ' ': if (!isspace(*str)) FAIL("should be followed by whitespace"); /* FALLTHRU */ - + case '-': while (isspace(*str)) str++; break; - + case 0: // always eat space at end of format while (isspace(*str)) str++; return str; - + default: matchchar: if (*str++ != *format) FAIL(permprintf("- expected `%c'", *format)); break; - + } - + format++; } } diff --git a/Build/source/texk/lcdf-typetools/libefont/afmw.cc b/Build/source/texk/lcdf-typetools/libefont/afmw.cc index 6044b001551..023fe9bea0e 100644 --- a/Build/source/texk/lcdf-typetools/libefont/afmw.cc +++ b/Build/source/texk/lcdf-typetools/libefont/afmw.cc @@ -38,16 +38,16 @@ AfmWriter::write() { _m->pair_program()->unreverse(); _m->pair_program()->optimize(); - + fprintf(_f, "StartFontMetrics 4.1\n"); if (_afm_xt) for (int i = 0; i < _afm_xt->opening_comments.size(); i++) fprintf(_f, "Comment %s\n", _afm_xt->opening_comments[i].c_str()); - + write_prologue(); - + fprintf(_f, "StartCharMetrics %d\n", _m->nglyphs()); - + GlyphIndex gi; for (int i = 0; i < 256; i++) //FIXME if ((gi = _m->find_code(i)) >= 0) @@ -55,11 +55,11 @@ AfmWriter::write() for (gi = 0; gi < _m->nglyphs(); gi++) if (_m->code(gi) == -1) write_char_metric_data(gi, -1); - + fprintf(_f, "EndCharMetrics\n"); - + write_kerns(); - + fprintf(_f, "EndFontMetrics\n"); } @@ -71,34 +71,34 @@ AfmWriter::write_prologue() const fprintf(_f, "FontName %s\n", _m->font_name().c_str()); else fprintf(_f, "FontName No-Font-Name-Given\n"); - + if (_m->full_name()) fprintf(_f, "FullName %s\n", _m->full_name().c_str()); if (_m->family()) fprintf(_f, "FamilyName %s\n", _m->family().c_str()); if (_m->weight()) fprintf(_f, "Weight %s\n", _m->weight().c_str()); - + if (KNOWN(fd( fdItalicAngle ))) fprintf(_f, "ItalicAngle %.8g\n", fd( fdItalicAngle )); - + fprintf(_f, "FontBBox %.8g %.8g %.8g %.8g\n", fd( fdFontBBllx ), fd( fdFontBBlly ), fd( fdFontBBurx ), fd( fdFontBBury )); - + if (KNOWN(fd( fdUnderlinePosition ))) fprintf(_f, "UnderlinePosition %.8g\n", fd( fdUnderlinePosition )); if (KNOWN(fd( fdUnderlineThickness ))) fprintf(_f, "UnderlineThickness %.8g\n", fd( fdUnderlineThickness )); - + if (_m->version()) fprintf(_f, "Version %s\n", _m->version().c_str()); if (_afm_xt && _afm_xt->notice) fprintf(_f, "Notice %s\n", _afm_xt->notice.c_str()); - + if (_afm_xt && _afm_xt->encoding_scheme) fprintf(_f, "EncodingScheme %s\n", _afm_xt->encoding_scheme.c_str()); - + if (KNOWN(fd( fdCapHeight ))) fprintf(_f, "CapHeight %.8g\n", fd( fdCapHeight )); if (KNOWN(fd( fdXHeight ))) @@ -121,19 +121,19 @@ AfmWriter::write_char_metric_data(GlyphIndex gi, int e) const fprintf(_f, "C %d ;", e); else fprintf(_f, "CH <%04X> ;", e); - + double w = _m->wd(gi); if (KNOWN(w)) fprintf(_f, " WX %.8g ;", w); else w = 0; - + fprintf(_f, " N %s ;", _m->name(gi).c_str()); - + if (KNOWN(_m->lf(gi))) fprintf(_f, " B %.8g %.8g %.8g %.8g ;", _m->lf(gi), _m->bt(gi), _m->rt(gi), _m->tp(gi)); - + // Run through the ligature/kern program to find ligatures. PairProgram &pairp = *_m->pair_program(); PairOpIndex opi = pairp.find_left(gi); @@ -149,7 +149,7 @@ AfmWriter::write_char_metric_data(GlyphIndex gi, int e) const } opi = op.next_left(); } - + fputc('\n', _f); } @@ -158,7 +158,7 @@ void AfmWriter::write_kerns() const { PairProgram &pairp = *_m->pair_program(); - + // Damn. First we have to count how many kerning pairs there are. int numkerns = 0; for (PairOpIndex opi = 0; opi < pairp.op_count(); opi++) { @@ -166,9 +166,9 @@ AfmWriter::write_kerns() const if (op.is_kern() && _m->kv( op.value() )) numkerns++; } - + if (numkerns == 0) return; - + fprintf(_f, "StartKernData\n"); fprintf(_f, "StartKernPairs %d\n", numkerns); for (GlyphIndex gi = 0; gi < _m->nglyphs(); gi++) { diff --git a/Build/source/texk/lcdf-typetools/libefont/amfm.cc b/Build/source/texk/lcdf-typetools/libefont/amfm.cc index 6d2346b35d3..731fc673172 100644 --- a/Build/source/texk/lcdf-typetools/libefont/amfm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/amfm.cc @@ -61,7 +61,7 @@ AmfmMetrics::sanity(ErrorHandler *errh) const errh->error("AMFM sanity: no multiple master interpolation information"); return false; } - + bool ok = true; for (int m = 0; m < _nmasters; m++) if (!_masters[m].font_name @@ -69,10 +69,10 @@ AmfmMetrics::sanity(ErrorHandler *errh) const errh->error("AMFM sanity: no information for master %d", m); ok = false; } - + if (!_mmspace->check(errh)) ok = false; - + return ok; } @@ -85,7 +85,7 @@ AmfmMetrics::primary_label_value(int ax, PermString label) const if (pf->labels[ax] == label) return pf->design_vector[ax]; } - return -1; + return -1; } @@ -99,18 +99,18 @@ Metrics * AmfmMetrics::master(int m, ErrorHandler *errh) { AmfmMaster &master = _masters[m]; - + if (!master.loaded) { master.loaded = true; DirectoryMetricsFinder directory_finder(_directory); _finder->add_finder(&directory_finder); Metrics *afm = _finder->find_metrics(master.font_name); - + if (!afm) { if (errh) errh->error("%s: can't find AFM file for master `%s'", _font_name.c_str(), master.font_name.c_str()); - + } else if (!strcompat(afm->font_name(), master.font_name) || !strcompat(afm->family(), master.family) || !strcompat(afm->full_name(), master.full_name) @@ -118,18 +118,18 @@ AmfmMetrics::master(int m, ErrorHandler *errh) if (errh) errh->error("%s: AFM for master `%s' doesn't match AMFM", _font_name.c_str(), master.font_name.c_str()); - + } else if (!_sanity_afm) { master.afm = afm; _sanity_afm = afm; afm->use(); - + } else { PairProgram *sanity_pairp = _sanity_afm->pair_program(); PairProgram *pairp = afm->pair_program(); char buf[1024]; buf[0] = 0; - + if (afm->nglyphs() != _sanity_afm->nglyphs()) sprintf(buf, "glyph count (%d vs. %d)", afm->nglyphs(), _sanity_afm->nglyphs()); if (afm->nfd() != _sanity_afm->nfd()) @@ -146,7 +146,7 @@ AmfmMetrics::master(int m, ErrorHandler *errh) errh->error("%s: AFM for master `%s' failed sanity checks (%s)", _font_name.c_str(), master.font_name.c_str(), buf); } } - + return master.afm; } @@ -156,12 +156,12 @@ AmfmMetrics::find_primary_font(const Vector<double> &design_vector) const { assert(design_vector.size() == _naxes); for (AmfmPrimaryFont *pf = _primary_fonts; pf; pf = pf->next) { - + for (int a = 0; a < _naxes; a++) if ((int)design_vector[a] != pf->design_vector[a]) goto loser; return pf; - + loser: ; } return 0; @@ -175,9 +175,9 @@ AmfmMetrics::interpolate(const Vector<double> &design_vector, { assert(design_vector.size() == _naxes); assert(weight_vector.size() == _nmasters); - + // FIXME: check masters for correspondence. - + /* 0. * Make sure all necessary AFMs have been loaded. */ int m; @@ -185,10 +185,10 @@ AmfmMetrics::interpolate(const Vector<double> &design_vector, if (weight_vector[m]) if (!master(m, errh)) return 0; - + /* 1. * Use the design vector to generate new FontName and FullName. */ - + AmfmPrimaryFont *pf = find_primary_font(design_vector); // The primary font is useless to us if it doesn't have axis labels. if (pf && !pf->labels.size()) @@ -201,7 +201,7 @@ AmfmMetrics::interpolate(const Vector<double> &design_vector, double dv = design_vector[a]; font_name_sa << '_' << dv; full_name_sa << (a == 0 ? '_' : ' ') << dv; - + PermString label; if (pf) label = pf->labels[a]; @@ -215,7 +215,7 @@ AmfmMetrics::interpolate(const Vector<double> &design_vector, /* 2. * Set up the new AFM with the special constructor. */ - + // Find the first master with a non-zero component. for (m = 0; m < _nmasters && weight_vector[m] == 0; m++) ; @@ -224,16 +224,16 @@ AmfmMetrics::interpolate(const Vector<double> &design_vector, AfmMetricsXt *new_xt = new AfmMetricsXt((AfmMetricsXt &)*xt); afm->add_xt(new_xt); } - + /* 2. * Interpolate the old AFM data into the new. */ - + afm->interpolate_dimens(*_masters[m].afm, weight_vector[m], false); - + for (m++; m < _nmasters; m++) if (weight_vector[m]) afm->interpolate_dimens(*_masters[m].afm, weight_vector[m], true); - + return afm; } @@ -246,7 +246,7 @@ AmfmReader::AmfmReader(AfmParser &afmp, AmfmMetrics *amfm, ErrorHandler *errh) : _amfm(amfm), _finder(amfm->_finder), _l(afmp), _mmspace(amfm->_mmspace) { - _errh = errh ? errh : ErrorHandler::ignore_handler(); + _errh = errh ? errh : ErrorHandler::silent_handler(); } AmfmMetrics * @@ -285,7 +285,7 @@ AmfmReader::lwarning(const char *format, ...) const { va_list val; va_start(val, format); - _errh->verror(ErrorHandler::ERR_WARNING, _l.landmark(), format, val); + _errh->vxmessage(_l.landmark(), ErrorHandler::e_warning, format, val); va_end(val); } @@ -294,7 +294,7 @@ AmfmReader::lerror(const char *format, ...) const { va_list val; va_start(val, format); - _errh->verror(ErrorHandler::ERR_ERROR, _l.landmark(), format, val); + _errh->vxmessage(_l.landmark(), ErrorHandler::e_error, format, val); va_end(val); } @@ -332,10 +332,10 @@ AmfmReader::read() { assert(_amfm != 0); _mmspace = _amfm->_mmspace; - + AfmParser &l = _l; _amfm->_directory = l.filename().directory(); - + // First, read all opening comments into an array so we can print them out // later. PermString comment; @@ -349,12 +349,12 @@ AmfmReader::read() break; } } - + int master = 0, axis = 0; - + while (l.next_line()) switch (l[0]) { - + case 'A': if (l.isall("Ascender %g", &fd( fdAscender ))) break; @@ -363,7 +363,7 @@ AmfmReader::read() break; } goto invalid; - + case 'B': if (l.is("BlendDesignPositions")) { read_positions(); @@ -378,26 +378,26 @@ AmfmReader::read() break; } goto invalid; - + case 'C': if (l.isall("CapHeight %g", &fd( fdCapHeight ))) break; if (l.is("Comment")) break; goto invalid; - + case 'D': if (l.isall("Descender %g", &fd( fdDescender ))) break; goto invalid; - + case 'E': if (l.isall("EncodingScheme %+s", &_amfm->_encoding_scheme)) break; if (l.isall("EndMasterFontMetrics")) goto done; goto invalid; - + case 'F': if (l.isall("FontName %+s", &_amfm->_font_name)) { check_mmspace(); @@ -412,26 +412,26 @@ AmfmReader::read() &fd( fdFontBBurx ), &fd( fdFontBBury ))) break; goto invalid; - + case 'I': if (l.isall("IsFixedPitch %b", (bool *)0)) break; if (l.isall("ItalicAngle %g", &fd( fdItalicAngle ))) break; goto invalid; - + case 'M': if (l.isall("Masters %d", &_amfm->_nmasters)) { check_mmspace(); break; } goto invalid; - + case 'N': if (l.isall("Notice %+s", &_amfm->_notice)) break; goto invalid; - + case 'S': if (l.isall("StartAxis")) { read_axis(axis++); @@ -452,19 +452,19 @@ AmfmReader::read() if (l.isall("StartMasterFontMetrics %g", (double *)0)) break; goto invalid; - + case 'U': if (l.isall("UnderlinePosition %g", &fd( fdUnderlinePosition ))) break; else if (l.isall("UnderlineThickness %g", &fd( fdUnderlineThickness ))) break; goto invalid; - + case 'V': if (l.isall("Version %+s", &_amfm->_version)) break; goto invalid; - + case 'W': if (l.isall("Weight %+s", &_amfm->_weight)) break; @@ -477,37 +477,37 @@ AmfmReader::read() break; } goto invalid; - + case 'X': if (l.isall("XHeight %g", &fd( fdXHeight ))) break; goto invalid; - + default: invalid: no_match_warning(); - + } - + done: if (!_mmspace) { _errh->error("`%s' is not an AMFM file", String(_l.landmark().file()).c_str()); return false; } - + LandmarkErrorHandler pin_errh(_errh, _l.landmark()); if (!_amfm->sanity(&pin_errh)) { _errh->lerror(_l.landmark().whole_file(), "bad AMFM file (missing or inconsistent information)"); return false; } - + if (!_mmspace->check_intermediate() && _l.filename().directory()) { String name = l.filename().base() + ".amcp"; Slurper slurp(_l.filename().from_directory(name)); add_amcp_file(slurp, _amfm, _errh); } - + return true; } @@ -516,30 +516,30 @@ void AmfmReader::read_amcp_file() { int lines_read = 0; - + while (_l.next_line()) { lines_read++; switch (_l[0]) { - + case 'C': if (_l.is("Comment")) break; goto invalid; - + case 'S': if (_l.isall("StartConversionPrograms %d %d", (int *)0, (int *)0)) { read_conversion_programs(); break; } goto invalid; - + default: invalid: no_match_warning("AMCP file"); - + } } - + if (_mmspace && !_mmspace->ndv() && !_mmspace->cdv() && lines_read) lwarning("no conversion programs in .amcp file"); } @@ -549,12 +549,12 @@ bool AmfmReader::read_simple_array(Vector<double> &vec) const { if (!_l.is("[")) return false; - + vec.clear(); double d; while (_l.is("%g", &d)) vec.push_back(d); - + return _l.is("]"); } @@ -565,17 +565,17 @@ AmfmReader::read_positions() const if (nmasters() < 2 || naxes() < 1) return; Vector<NumVector> positions; if (!_l.is("[") || !_mmspace) goto error; - + for (int i = 0; i < nmasters(); i++) { positions.push_back(NumVector()); if (!read_simple_array(positions.back())) goto error; } - + if (!_l.is("]")) goto error; _mmspace->set_master_positions(positions); return; - + error: lerror("bad BlendDesignPositions"); } @@ -587,7 +587,7 @@ AmfmReader::read_normalize() const if (naxes() < 1) return; Vector<NumVector> normalize_in, normalize_out; if (!_l.is("[") || !_mmspace) goto error; - + for (int a = 0; a < naxes(); a++) { if (!_l.is("[")) goto error; normalize_in.push_back(NumVector()); @@ -599,11 +599,11 @@ AmfmReader::read_normalize() const } if (!_l.is("]")) goto error; } - + if (!_l.is("]")) goto error; _mmspace->set_normalize(normalize_in, normalize_out); return; - + error: lerror("bad BlendDesignPositions"); } @@ -621,10 +621,10 @@ AmfmReader::read_axis_types() const while (_l.is("/%/s", &s)) _mmspace->set_axis_type(ax++, s); - + if (!_l.is("]")) goto error; return; - + error: lerror("bad BlendAxisTypes"); } @@ -638,11 +638,11 @@ AmfmReader::read_axis(int ax) const lerror("bad axis number %d", ax); else _mmspace->check(); - + PermString s; while (_l.next_line()) switch (_l[0]) { - + case 'A': if (_l.is("AxisType %+s", &s)) { if (ok) @@ -655,23 +655,23 @@ AmfmReader::read_axis(int ax) const break; } goto invalid; - + case 'C': if (_l.is("Comment")) break; goto invalid; - + case 'E': if (_l.isall("EndAxis")) goto endaxis; goto invalid; - + default: invalid: no_match_warning(); - + } - + endaxis: ; } @@ -689,21 +689,21 @@ AmfmReader::read_master(int m) const _amfm->_masters = new AmfmMaster[ nmasters() ]; amfmm = &_amfm->_masters[m]; } - + while (_l.next_line()) // Grok the whole line. Are we on a character metric data line? switch (_l[0]) { - + case 'C': if (_l.is("Comment")) break; goto invalid; - + case 'E': if (_l.isall("EndMaster")) goto endmaster; goto invalid; - + case 'F': if (_l.isall("FontName %+s", &amfmm->font_name)) break; @@ -712,12 +712,12 @@ AmfmReader::read_master(int m) const if (_l.isall("FamilyName %+s", &amfmm->family)) break; goto invalid; - + case 'V': if (_l.isall("Version %+s", &amfmm->version)) break; goto invalid; - + case 'W': if (_l.is("WeightVector")) { if (!(read_simple_array(amfmm->weight_vector) && @@ -728,13 +728,13 @@ AmfmReader::read_master(int m) const break; } goto invalid; - + default: invalid: no_match_warning(); - + } - + endmaster: ; } @@ -745,9 +745,9 @@ AmfmReader::read_one_primary_font() const AmfmPrimaryFont *pf = new AmfmPrimaryFont; pf->design_vector.resize(naxes()); pf->labels.resize(naxes()); - + while (_l.left()) { - + if (_l.is("PC")) { for (int a = 0; a < naxes(); a++) if (!_l.is("%d", &pf->design_vector[a])) @@ -760,14 +760,14 @@ AmfmReader::read_one_primary_font() const ; else no_match_warning("primary font"); - + _l.is(";"); // get rid of any possible semicolon } - + pf->next = _amfm->_primary_fonts; _amfm->_primary_fonts = pf; return; - + error: delete pf; } @@ -778,30 +778,30 @@ AmfmReader::read_primary_fonts() const { while (_l.next_line()) switch (_l[0]) { - + case 'C': if (_l.is("Comment")) break; goto invalid; - + case 'E': if (_l.isall("EndPrimaryFonts")) goto end_primary_fonts; goto invalid; - + case 'P': if (_l[1] == 'C' && isspace(_l[2])) { read_one_primary_font(); break; } goto invalid; - + default: invalid: no_match_warning(); - + } - + end_primary_fonts: ; } @@ -810,36 +810,36 @@ void AmfmReader::read_conversion_programs() const { String ndv, cdv, s; - + while (_l.next_line()) switch (_l[0]) { - + case 'C': if (_l.isall("CDV %<", &s)) { cdv += s; break; } goto invalid; - + case 'E': if (_l.isall("EndConversionPrograms")) goto end_conversion_programs; goto invalid; - + case 'N': if (_l.isall("NDV %<", &s)) { ndv += s; break; } goto invalid; - + default: invalid: no_match_warning(); break; - + } - + end_conversion_programs: if (_mmspace) { _mmspace->set_ndv(Type1Charstring(ndv)); diff --git a/Build/source/texk/lcdf-typetools/libefont/cff.cc b/Build/source/texk/lcdf-typetools/libefont/cff.cc index d654b4fea93..219f781abf4 100644 --- a/Build/source/texk/lcdf-typetools/libefont/cff.cc +++ b/Build/source/texk/lcdf-typetools/libefont/cff.cc @@ -332,7 +332,7 @@ default_dict() static Cff *cff; static Cff::Font *cfffont; if (!cfffont) { - cff = new Cff(String::stable_string((const char *) default_dict_cff_data, sizeof(default_dict_cff_data)), ErrorHandler::default_handler()); + cff = new Cff(String::make_stable((const char *) default_dict_cff_data, sizeof(default_dict_cff_data)), ErrorHandler::default_handler()); cfffont = (Cff::Font *) cff->font(); } return cfffont->top_dict(); @@ -349,7 +349,7 @@ Cff::Cff(const String &s, ErrorHandler *errh) static_assert((sizeof(standard_strings) / sizeof(standard_strings[0])) == NSTANDARD_STRINGS); static_assert((sizeof(standard_encoding) / sizeof(standard_encoding[0])) == 256); static_assert((sizeof(expert_encoding) / sizeof(expert_encoding[0])) == 256); - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } Cff::~Cff() @@ -417,7 +417,7 @@ Cff::parse_header(ErrorHandler *errh) if (_gsubrs_index.error() < 0) return _gsubrs_index.error(); _gsubrs_cs.assign(ngsubrs(), 0); - + return 0; } @@ -426,7 +426,7 @@ Cff::sid(PermString s) { if (!s) // XXX? return -1; - + // check standard strings if (standard_permstrings_map["a"] < 0) for (int i = 0; i < NSTANDARD_STRINGS; i++) { @@ -519,7 +519,7 @@ Cff::FontParent * Cff::font(PermString font_name, ErrorHandler *errh) { if (!errh) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); if (!ok()) return errh->error("invalid CFF"), (FontParent *) 0; @@ -590,10 +590,10 @@ void Cff::Charset::assign(const Cff *cff, int pos, int nglyphs, int max_sid, ErrorHandler *errh) { if (!errh) - errh = ErrorHandler::ignore_handler(); - + errh = ErrorHandler::silent_handler(); + _sids.reserve(nglyphs); - + if (pos == 0) assign(iso_adobe_charset, sizeof(iso_adobe_charset) / sizeof(int), nglyphs); else if (pos == 1) @@ -629,7 +629,7 @@ Cff::Charset::parse(const Cff *cff, int pos, int nglyphs, int max_sid, ErrorHand { const uint8_t *data = cff->data(); int len = cff->length(); - + if (pos + 1 > len) return errh->error("charset position out of range"), -EFAULT; @@ -647,7 +647,7 @@ Cff::Charset::parse(const Cff *cff, int pos, int nglyphs, int max_sid, ErrorHand actual_max_sid = sid; _sids.push_back(sid); } - + } else if (format == 1) { const uint8_t *p = data + pos + 1; for (; _sids.size() < nglyphs; p += 3) { @@ -673,7 +673,7 @@ Cff::Charset::parse(const Cff *cff, int pos, int nglyphs, int max_sid, ErrorHand for (int i = 0; i <= n; i++) _sids.push_back(sid + i); } - + } else return errh->error("unknown charset format %d", format), -EINVAL; @@ -693,7 +693,7 @@ void Cff::FDSelect::assign(const Cff *cff, int pos, int nglyphs, ErrorHandler *errh) { if (!errh) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); if (_my_fds) delete[] _fds; _fds = 0; @@ -713,7 +713,7 @@ Cff::FDSelect::parse(const Cff *cff, int pos, int nglyphs, ErrorHandler *errh) { const uint8_t *data = cff->data(); int len = cff->length(); - + if (pos + 1 > len) return errh->error("FDSelect position out of range"), -EFAULT; @@ -724,7 +724,7 @@ Cff::FDSelect::parse(const Cff *cff, int pos, int nglyphs, ErrorHandler *errh) _fds = data + pos + 1; _my_fds = false; return 0; - + } else if (format == 3) { int nranges = (data[pos+1] << 8) | data[pos+2]; if (pos + 3 + 3*nranges + 2 > len) @@ -734,7 +734,7 @@ Cff::FDSelect::parse(const Cff *cff, int pos, int nglyphs, ErrorHandler *errh) int last_glyph = (p[3*nranges] << 8) | p[3*nranges + 1]; if (p[0] || p[1] || last_glyph != nglyphs) return errh->error("FDSelect [format 3] bad values"), -EINVAL; - + _fds = new uint8_t[nglyphs]; _my_fds = true; int curglyph = 0; @@ -746,7 +746,7 @@ Cff::FDSelect::parse(const Cff *cff, int pos, int nglyphs, ErrorHandler *errh) curglyph = nextglyph; } return 0; - + } else return errh->error("unknown charset format %d", format), -EINVAL; } @@ -760,8 +760,8 @@ Cff::IndexIterator::IndexIterator(const uint8_t *data, int pos, int len, ErrorHa : _contents(0), _offset(0), _last_offset(0) { if (!errh) - errh = ErrorHandler::ignore_handler(); - + errh = ErrorHandler::silent_handler(); + // check header int nitems = 0; if (POS_GT(pos + 2, len)) { @@ -846,17 +846,17 @@ Cff::Dict::assign(Cff *cff, int pos, int dict_len, ErrorHandler *errh, const cha _operators.clear(); _pointers.clear(); _operands.clear(); - + if (!errh) - errh = ErrorHandler::ignore_handler(); - + errh = ErrorHandler::silent_handler(); + const uint8_t *data = cff->data() + pos; const uint8_t *end_data = data + dict_len; - + _pointers.push_back(0); while (data < end_data) switch (data[0]) { - + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: @@ -864,12 +864,12 @@ Cff::Dict::assign(Cff *cff, int pos, int dict_len, ErrorHandler *errh, const cha _pointers.push_back(_operands.size()); data++; break; - + case 22: case 23: case 24: case 25: case 26: case 27: case 31: case 255: // reserved errh->error("%s: reserved operator %d", dict_name, data[0]); return (_error = -ERANGE); - + case 12: if (data + 1 >= end_data) goto runoff; @@ -943,7 +943,7 @@ Cff::Dict::assign(Cff *cff, int pos, int dict_len, ErrorHandler *errh, const cha data++; break; } - + case 247: case 248: case 249: case 250: { if (data + 1 >= end_data) goto runoff; @@ -952,7 +952,7 @@ Cff::Dict::assign(Cff *cff, int pos, int dict_len, ErrorHandler *errh, const cha data += 2; break; } - + case 251: case 252: case 253: case 254: { if (data + 1 >= end_data) goto runoff; @@ -980,7 +980,7 @@ Cff::Dict::assign(Cff *cff, int pos, int dict_len, ErrorHandler *errh, const cha runoff: errh->error("%s: runoff end of DICT", dict_name); return (_error = -EFAULT); - + invalid: return (_error = -EINVAL); } @@ -989,12 +989,12 @@ int Cff::Dict::check(bool is_private, ErrorHandler *errh, const char *dict_name) const { if (!errh) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); int before_nerrors = errh->nerrors(); // keep track of operator reuse Vector<int> operators_used; - + for (int i = 0; i < _operators.size(); i++) { int arity = _pointers[i+1] - _pointers[i]; double num = (arity == 0 ? 0 : _operands[_pointers[i]]); @@ -1008,22 +1008,22 @@ Cff::Dict::check(bool is_private, ErrorHandler *errh, const char *dict_name) con if (operators_used[op] && (type & tTypeMask) != tNone) errh->error("%s: operator '%s' specified twice", dict_name, operator_names[op]); operators_used[op]++; - + // check data switch (type & tTypeMask) { - + case tNone: if (op >= 32) errh->warning("%s: unknown operator '12 %d'", dict_name, op - 32); else errh->warning("%s: unknown operator '%d'", dict_name, op); continue; - + case tSID: if (arity != 1 || num != truncnum || num < 0 || num > _cff->max_sid()) goto bad_data; break; - + case tFontNumber: if (arity != 1 || num != truncnum || num < 0 || num >= _cff->nfonts()) goto bad_data; @@ -1035,17 +1035,17 @@ Cff::Dict::check(bool is_private, ErrorHandler *errh, const char *dict_name) con else if (num != 0 && num != 1) errh->warning("%s: data for Boolean operator '%s' not 0 or 1", dict_name, operator_names[op]); break; - + case tNumber: if (arity != 1) goto bad_data; break; - + case tOffset: if (arity != 1 || num != truncnum || num < 0 || num >= _cff->length()) goto bad_data; break; - + case tLocalOffset: if (arity != 1 || num != truncnum || _pos + num < 0 || _pos + num >= _cff->length()) goto bad_data; @@ -1059,7 +1059,7 @@ Cff::Dict::check(bool is_private, ErrorHandler *errh, const char *dict_name) con goto bad_data; break; } - + case tArray2: case tArray3: case tArray4: case tArray5: case tArray6: if (arity != (type & tTypeMask) - tArray2 + 2) @@ -1068,13 +1068,13 @@ Cff::Dict::check(bool is_private, ErrorHandler *errh, const char *dict_name) con case tArray: break; - + } // check dict location if (((type & tPrivate) != 0) != is_private) errh->warning("%s: operator '%s' in wrong DICT", dict_name, operator_names[op]); - + continue; bad_data: @@ -1198,7 +1198,7 @@ handle_private(Cff *cff, const Cff::Dict &top_dict, Cff::Dict &private_dict, subrs_cs.assign(subrs_index.nitems(), 0); return 0; } - + Cff::FontParent::FontParent(Cff *cff) : _cff(cff), _error(-1) @@ -1285,7 +1285,7 @@ Cff::Font::parse_encoding(int pos, ErrorHandler *errh) _encoding_pos = pos; for (int i = 0; i < 256; i++) _encoding[i] = 0; - + // check for standard encodings if (pos == 0) return assign_standard_encoding(standard_encoding); @@ -1314,7 +1314,7 @@ Cff::Font::parse_encoding(int pos, ErrorHandler *errh) retval = 1; _encoding[e] = g; } - + } else if (format == 1) { endpos = pos + 2 + data[pos + 1] * 2; if (endpos > len) @@ -1336,7 +1336,7 @@ Cff::Font::parse_encoding(int pos, ErrorHandler *errh) if (g > _charset.nglyphs()) return errh->error("Encoding glyph %d out of range", g), -EINVAL; - + // check supplements if (supplemented) { if (endpos + data[endpos] * 3 > len) @@ -1414,7 +1414,7 @@ Cff::Font::glyph(PermString name) const return 0; if (!_charstrings_cs[gid]) _charstrings_cs[gid] = charstring(_charstrings_index, gid); - return _charstrings_cs[gid]; + return _charstrings_cs[gid]; } int @@ -1471,7 +1471,7 @@ Cff::CIDFont::CIDFont(Cff *cff, PermString font_name, const Dict &top_dict, Erro : FontParent(cff), _font_name(font_name), _top_dict(top_dict) { assert(_top_dict.has_first(oROS)); - + // parse top DICT _error = -EINVAL; if (_top_dict.check(false, errh, "Top DICT") < 0) @@ -1488,7 +1488,7 @@ Cff::CIDFont::CIDFont(Cff *cff, PermString font_name, const Dict &top_dict, Erro errh->error("unknown CharString type %d", _charstring_type); return; } - + int charstrings_offset = 0; _top_dict.value(oCharStrings, &charstrings_offset); _charstrings_index = Cff::IndexIterator(cff->data(), charstrings_offset, cff->length(), errh, "CharStrings INDEX"); @@ -1618,7 +1618,7 @@ Cff::ChildFont::ChildFont(Cff *cff, Cff::CIDFont *parent, int charstring_type, c : FontParent(cff), _parent(parent), _top_dict(top_dict) { if (!errh) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); if (!cff->ok() || !_top_dict.ok()) { errh->error("invalid CFF"); @@ -1633,7 +1633,7 @@ Cff::ChildFont::ChildFont(Cff *cff, Cff::CIDFont *parent, int charstring_type, c errh->error("unknown CharString type %d", _charstring_type); return; } - + // extract information from Private DICT if (_top_dict.has(oPrivate) && (_error = handle_private(cff, _top_dict, _private_dict, _default_width_x, _nominal_width_x, _subrs_index, _subrs_cs, errh)) < 0) diff --git a/Build/source/texk/lcdf-typetools/libefont/findmet.cc b/Build/source/texk/lcdf-typetools/libefont/findmet.cc index d0b6ce3a5c9..10a39fffa93 100644 --- a/Build/source/texk/lcdf-typetools/libefont/findmet.cc +++ b/Build/source/texk/lcdf-typetools/libefont/findmet.cc @@ -205,15 +205,15 @@ InstanceMetricsFinder::find_metrics_instance(PermString name, const char *underscore = strchr(name.c_str(), '_'); PermString amfm_name = PermString(name.c_str(), underscore - name.c_str()); - + AmfmMetrics *amfm = finder->find_amfm(amfm_name, errh); if (!amfm) return 0; - + MultipleMasterSpace *mmspace = amfm->mmspace(); if (!mmspace->check_intermediate() && _call_mmpfb) { char *buf = new char[amfm->font_name().length() + 30]; sprintf(buf, "mmpfb -q --amcp-info '%s'", amfm->font_name().c_str()); - + FILE *f = popen(buf, "r"); if (f) { Filename fake("<mmpfb output>"); @@ -221,10 +221,10 @@ InstanceMetricsFinder::find_metrics_instance(PermString name, AmfmReader::add_amcp_file(slurpy, amfm, errh); pclose(f); } - + delete[] buf; } - + Vector<double> design = mmspace->default_design_vector(); int i = 0; while (underscore[0] == '_' && underscore[1]) { @@ -232,7 +232,7 @@ InstanceMetricsFinder::find_metrics_instance(PermString name, mmspace->set_design(design, i, x, errh); i++; } - + Vector<double> weight; if (!mmspace->design_to_weight(design, weight, errh)) return 0; diff --git a/Build/source/texk/lcdf-typetools/libefont/otf.cc b/Build/source/texk/lcdf-typetools/libefont/otf.cc index 80702ee2901..c62d7ebf5e4 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otf.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otf.cc @@ -42,7 +42,7 @@ Font::Font(const String &s, ErrorHandler *errh) : _str(s) { _str.align(4); - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } int @@ -84,7 +84,7 @@ Font::parse_header(ErrorHandler *errh) return errh->error("OTF data for '%s' out of range", Tag(tag).text().c_str()), -EFAULT; last_tag = tag; } - + return 0; } @@ -136,7 +136,7 @@ uint32_t Font::table_checksum(Tag tag) const { if (error() < 0) - return String(); + return 0; const uint8_t *entry = tag.table_entry(data() + HEADER_SIZE, USHORT_AT(data() + 4), TABLE_DIR_ENTRY_SIZE); if (entry) return ULONG_AT(entry + 4); @@ -168,7 +168,7 @@ Font::checksum(const uint8_t *begin, const uint8_t *end) leftover = (leftover << 8) + (begin < end ? *begin++ : 0); return sum + leftover; } - + uint32_t Font::checksum(const String &s) { @@ -220,7 +220,7 @@ Font::make(bool truetype, const Vector<Tag>& tags, const Vector<String>& data) uint32_t l[TABLE_DIR_ENTRY_SIZE / 4]; } tdir; tdir.l[0] = htonl(tags[*tp].value()); - + // discount current checksum adjustment in head table uint32_t sum = checksum(data[*tp]); if (tags[*tp] == Tag("head") && data[*tp].length() >= 12) { @@ -228,7 +228,7 @@ Font::make(bool truetype, const Vector<Tag>& tags, const Vector<String>& data) sum -= (x[0] << 24) + (x[1] << 16) + (x[2] << 8) + x[3]; } tdir.l[1] = htonl(sum); - + tdir.l[2] = htonl(offset); tdir.l[3] = htonl(data[*tp].length()); sa.append(&tdir.c[0], TABLE_DIR_ENTRY_SIZE); @@ -364,7 +364,7 @@ ScriptList::assign(const String &str, ErrorHandler *errh) { _str = str; _str.align(4); - int result = check_header(errh ? errh : ErrorHandler::ignore_handler()); + int result = check_header(errh ? errh : ErrorHandler::silent_handler()); if (result < 0) _str = String(); return result; @@ -446,7 +446,7 @@ ScriptList::language_systems(Vector<Tag> &script, Vector<Tag> &langsys, ErrorHan { script.clear(); langsys.clear(); - + const uint8_t *data = _str.udata(); int nscripts = USHORT_AT(data); for (int i = 0; i < nscripts; i++) { @@ -463,7 +463,7 @@ ScriptList::language_systems(Vector<Tag> &script, Vector<Tag> &langsys, ErrorHan script.push_back(script_tag), langsys.push_back(langsys_tag); } } - + return 0; } @@ -473,7 +473,7 @@ ScriptList::features(Tag script, Tag langsys, int &required_fid, Vector<int> &fi required_fid = -1; if (clear_fids) fids.clear(); - + int offset = langsys_offset(script, langsys); if (offset <= 0) return offset; @@ -493,7 +493,7 @@ ScriptList::features(Tag script, Tag langsys, int &required_fid, Vector<int> &fi data += offset + 6; for (int i = 0; i < featureCount; i++, data += FEATURE_RECSIZE) fids.push_back(USHORT_AT(data)); - + return 0; } @@ -509,7 +509,7 @@ FeatureList::assign(const String &str, ErrorHandler *errh) { _str = str; _str.align(2); - int result = check_header(errh ? errh : ErrorHandler::ignore_handler()); + int result = check_header(errh ? errh : ErrorHandler::silent_handler()); if (result < 0) _str = String(); return result; @@ -545,7 +545,7 @@ FeatureList::params(int fid, int length, ErrorHandler *errh, bool old_style_offs if (_str.length() == 0 || length < 0) return String(); if (errh == 0) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); const uint8_t *data = _str.udata(); int len = _str.length(); @@ -629,13 +629,13 @@ FeatureList::filter(Vector<int> &fids, const Vector<Tag> &sorted_ftags) const fids.clear(); else { std::sort(fids.begin(), fids.end()); // sort fids - + int i = 0, j = 0; while (i < fids.size() && fids[i] < 0) fids[i++] = 0x7FFFFFFF; // XXX check that feature list is in alphabetical order - + const uint8_t *data = _str.udata(); int nfeatures = USHORT_AT(data); while (i < fids.size() && j < sorted_ftags.size() && fids[i] < nfeatures) { @@ -665,7 +665,7 @@ FeatureList::lookups(int fid, Vector<int> &results, ErrorHandler *errh, bool cle if (_str.length() == 0) return -1; if (errh == 0) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); const uint8_t *data = _str.udata(); int len = _str.length(); @@ -766,7 +766,7 @@ Coverage::Coverage(const String &str, ErrorHandler *errh, bool do_check) throw ( { _str.align(2); if (do_check) { - if (check(errh ? errh : ErrorHandler::ignore_handler()) < 0) + if (check(errh ? errh : ErrorHandler::silent_handler()) < 0) _str = String(); } else { // check()'s shorten-string side effect const uint8_t *data = _str.udata(); @@ -834,7 +834,7 @@ Coverage::coverage_index(Glyph g) const throw () { if (_str.length() == 0) return -1; - + const uint8_t *data = _str.udata(); int count = USHORT_AT(data + 2); if (data[1] == T_LIST) { @@ -874,7 +874,7 @@ Coverage::operator[](int cindex) const throw () { if (_str.length() == 0 || cindex < 0) return 0; - + const uint8_t *data = _str.udata(); int count = USHORT_AT(data + 2); if (data[1] == T_LIST) @@ -1026,7 +1026,7 @@ bool Coverage::iterator::forward_to(Glyph find) { // XXX really should check that this works - + if (find <= _value) return find == _value; else if (_pos >= _str.length()) @@ -1042,7 +1042,7 @@ Coverage::iterator::forward_to(Glyph find) _value = USHORT_AT(data + _pos); return find == _value; } - + // otherwise, binary search over remaining area int l = ((_pos - HEADERSIZE) / LIST_RECSIZE) + 1; int r = (_str.length() - HEADERSIZE) / LIST_RECSIZE - 1; @@ -1166,7 +1166,7 @@ ClassDef::ClassDef(const String &str, ErrorHandler *errh) throw () : _str(str) { _str.align(2); - if (check(errh ? errh : ErrorHandler::ignore_handler()) < 0) + if (check(errh ? errh : ErrorHandler::silent_handler()) < 0) _str = String(); } @@ -1206,10 +1206,10 @@ ClassDef::lookup(Glyph g) const throw () { if (_str.length() == 0) return -1; - + const uint8_t *data = _str.udata(); int coverageFormat = USHORT_AT(data); - + if (coverageFormat == T_LIST) { Glyph start = USHORT_AT(data + 2); int count = USHORT_AT(data + 4); @@ -1331,7 +1331,7 @@ ClassDef::class_iterator::increment_class0() const uint8_t *data = _str.udata(); int len = _str.length(); bool is_list = (data[1] == T_LIST); - + if (_pos != 0) _coviter++; else @@ -1377,7 +1377,7 @@ ClassDef::class_iterator::operator++(int) increment_class0(); return; } - + const uint8_t *data = _str.udata(); int len = _str.length(); bool is_list = (data[1] == T_LIST); diff --git a/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc b/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc index d1b24f33872..f0d03e22923 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfcmap.cc @@ -33,7 +33,7 @@ Cmap::Cmap(const String &s, ErrorHandler *errh) : _str(s) { _str.align(4); - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } int @@ -120,29 +120,29 @@ int Cmap::check_table(int t, ErrorHandler *errh) const { if (!errh) - errh = ErrorHandler::ignore_handler(); + errh = ErrorHandler::silent_handler(); if (_error < 0 || t < 0 || t >= _ntables) return errh->error("no such table"); if (_table_error[t] > -2) return _table_error[t]; _table_error[t] = -1; - + const uint8_t *data = _str.udata(); uint32_t offset = ULONG_AT(data + HEADER_SIZE + t * ENCODING_SIZE + 4); uint32_t left = _str.length() - offset; data += offset; int format = USHORT_AT(data); uint32_t length = 0; // value not used - + switch (format) { - + case F_BYTE: if (left < 4 || (length = USHORT_AT(data + 2)) > left || length != 259) return errh->error("bad table %d length (format %d)", t, format); break; - + case F_HIBYTE: if (left < 4 || (length = USHORT_AT(data + 2)) > left @@ -163,7 +163,7 @@ Cmap::check_table(int t, ErrorHandler *errh) const return errh->error("bad table %d subheader %d length (format 2)", t, hi_byte); } break; - + case F_SEGMENTED: { if (left < 4 || (length = USHORT_AT(data + 2)) > left @@ -205,7 +205,7 @@ Cmap::check_table(int t, ErrorHandler *errh) const return errh->error("bad table %d incorrect final endCode (format 4)", t); break; } - + case F_TRIMMED: { if (left < 4 || (length = USHORT_AT(data + 2)) > left @@ -241,7 +241,7 @@ Cmap::check_table(int t, ErrorHandler *errh) const case F_TRIMMED32: default: return errh->error("bad table %d unsupported format %d", t, format); - + } _table_error[t] = 0; @@ -253,18 +253,18 @@ Cmap::map_table(int t, uint32_t uni, ErrorHandler *errh) const { if (check_table(t, errh) < 0) return 0; - + const uint8_t *data = _str.udata(); data += ULONG_AT(data + HEADER_SIZE + t * ENCODING_SIZE + 4); - + switch (USHORT_AT(data)) { - + case F_BYTE: if (uni < 256) return data[6 + uni]; else return 0; - + case F_HIBYTE: { if (uni >= 65536) return 0; @@ -285,7 +285,7 @@ Cmap::map_table(int t, uint32_t uni, ErrorHandler *errh) const return 0; return (answer + idDelta) & 65535; } - + case F_SEGMENTED: { if (uni >= 65536) return 0; @@ -323,7 +323,7 @@ Cmap::map_table(int t, uint32_t uni, ErrorHandler *errh) const return 0; return USHORT_AT(data + 10 + ((uni - firstCode) << 1)); } - + case F_SEGMENTED32: { uint32_t nGroups = ULONG_AT(data + 12); uint32_t l = 0, r = nGroups - 1; @@ -341,7 +341,7 @@ Cmap::map_table(int t, uint32_t uni, ErrorHandler *errh) const } return 0; } - + default: return 0; @@ -353,12 +353,12 @@ Cmap::dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler *errh) const { if (check_table(t, errh) < 0) return; - + const uint8_t *data = _str.udata(); data += ULONG_AT(data + HEADER_SIZE + t * ENCODING_SIZE + 4); - + switch (USHORT_AT(data)) { - + case F_BYTE: g2c.resize(256, 0); for (int c = 0; c < 256; c++) @@ -366,7 +366,7 @@ Cmap::dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler *errh) const if (!g2c[g]) g2c[g] = c; break; - + case F_HIBYTE: assert(USHORT_AT(data + 6) == 0); for (int hi_byte = 0; hi_byte < 256; hi_byte++) { @@ -385,11 +385,11 @@ Cmap::dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler *errh) const if (g >= g2c.size()) g2c.resize(g + 1, 0); if (!g2c[g]) - g2c[g] = (hi_byte << 8 + firstCode + i); + g2c[g] = (hi_byte << 8) + firstCode + i; } } break; - + case F_SEGMENTED: { int segCountX2 = USHORT_AT(data + 6); const uint8_t *endCounts = data + 14; @@ -436,7 +436,7 @@ Cmap::dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler *errh) const } break; } - + case F_SEGMENTED32: { uint32_t nGroups = ULONG_AT(data + 12); const uint8_t *groups = data + 16; @@ -452,7 +452,7 @@ Cmap::dump_table(int t, Vector<uint32_t> &g2c, ErrorHandler *errh) const } break; } - + default: break; diff --git a/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc b/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc index 2b1719adaa3..2e15c29a5e6 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfgpos.cc @@ -225,13 +225,13 @@ GposPair::unparse(Vector<Positioning> &v) const int recsize = f2_pos + GposValue::size(format2); ClassDef class1(_d.offset_subtable(8)); ClassDef class2(_d.offset_subtable(10)); - Coverage coverage = this->coverage(); + Coverage coverage = this->coverage(); int nclass1 = _d.u16(12); int nclass2 = _d.u16(14); int offset = F2_HEADERSIZE; for (int c1 = 0; c1 < nclass1; c1++) for (int c2 = 0; c2 < nclass2; c2++, offset += recsize) { - Position p1(format1, _d.subtable(offset)); + Position p1(format1, _d.subtable(offset)); Position p2(format2, _d.subtable(offset + f2_pos)); if (p1 || p2) { for (ClassDef::class_iterator c1i = class1.begin(c1, coverage); c1i; c1i++) diff --git a/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc b/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc index 9b688bb527f..eeb7e506800 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfgsub.cc @@ -469,7 +469,7 @@ Substitution::out_alter(const Substitution &o, int pos) throw () int in_ng = o.in_nglyphs(); if (pos + in_ng > ng || out_ng == 0) return false; - + // check that input substitution actually matches us for (int i = 0; i < in_ng; i++) if (!o.in_matches(i, g[pos+i])) @@ -484,7 +484,7 @@ Substitution::out_alter(const Substitution &o, int pos) throw () for (int i = pos + in_ng; i < ng; i++) new_g.push_back(g[i]); assign(_out, _out_is, new_g.size(), &new_g[0]); - + return true; } @@ -587,7 +587,7 @@ Gsub::Gsub(const Data &d, const Font *otf, ErrorHandler *errh) throw (Error) // Check for "correct" chaining context rules, as suggested by Adobe's // OpenType FDK try { - Name nametable(otf->table("name"), ErrorHandler::ignore_handler()); + Name nametable(otf->table("name"), ErrorHandler::silent_handler()); _chaincontext_reverse_backtrack = nametable.version_chaincontext_reverse_backtrack(); } catch (Error) { } @@ -1082,7 +1082,7 @@ GsubChainContext::unparse(const Gsub &gsub, Vector<Substitution> &v) const { if (_d.u16(0) != 3) return false; - + int nbacktrack = _d.u16(2); int input_offset = F3_HSIZE + nbacktrack*2; int ninput = _d.u16(input_offset); @@ -1102,7 +1102,7 @@ GsubChainContext::unparse(const Gsub &gsub, Vector<Substitution> &v) const } for (int i = 0; i < nlookahead; i++) lookaheadc.push_back(Coverage(_d.offset_subtable(lookahead_offset + F3_LOOKAHEAD_HSIZE + i*2))); - + Vector<Coverage::iterator> backtracki; Vector<Coverage::iterator> lookaheadi; for (int i = 0; i < nbacktrack; i++) @@ -1111,7 +1111,7 @@ GsubChainContext::unparse(const Gsub &gsub, Vector<Substitution> &v) const lookaheadi.push_back(lookaheadc[i].begin()); bool any = false; - + while (1) { // run GsubContext @@ -1124,7 +1124,7 @@ GsubChainContext::unparse(const Gsub &gsub, Vector<Substitution> &v) const right_begin[i] = *lookaheadi[i]; any |= GsubContext::f3_unparse(_d, ninput, input_offset + F3_INPUT_HSIZE, nsubst, subst_offset + F3_SUBST_HSIZE, gsub, v, s); - + // step iterators for (int i = nlookahead - 1; i >= 0; i--) { lookaheadi[i]++; diff --git a/Build/source/texk/lcdf-typetools/libefont/otfname.cc b/Build/source/texk/lcdf-typetools/libefont/otfname.cc index 58de17610f7..55e161ea963 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfname.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfname.cc @@ -76,7 +76,7 @@ Name::Name(const String &s, ErrorHandler *errh) : _str(s) { _str.align(2); - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } int diff --git a/Build/source/texk/lcdf-typetools/libefont/otfos2.cc b/Build/source/texk/lcdf-typetools/libefont/otfos2.cc index 094387548a7..f7c5641dc8a 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfos2.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfos2.cc @@ -27,7 +27,7 @@ namespace Efont { namespace OpenType { Os2::Os2(const Data &data, ErrorHandler *errh) : _data(data) { - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); if (_error < 0) _data = Data(); } diff --git a/Build/source/texk/lcdf-typetools/libefont/otfpost.cc b/Build/source/texk/lcdf-typetools/libefont/otfpost.cc index 37358095a8c..829ca9a199b 100644 --- a/Build/source/texk/lcdf-typetools/libefont/otfpost.cc +++ b/Build/source/texk/lcdf-typetools/libefont/otfpost.cc @@ -103,7 +103,7 @@ Post::Post(const String &s, ErrorHandler *errh) : _str(s), _version(0) { _str.align_long(); - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } int @@ -124,7 +124,7 @@ Post::parse_header(ErrorHandler *errh) if (HEADER_SIZE > len) return errh->error("OTF post too small for header"), -EFAULT; _version = USHORT_AT(data); // ignore minor version number - // except that version 2.5 isn't compatible + // except that version 2.5 isn't compatible if (_version < 1 || _version > 3 || (_version == 2 && USHORT_AT(data + 2) == 0x5000)) return errh->error("bad post version number"), -ERANGE; diff --git a/Build/source/texk/lcdf-typetools/libefont/pairop.cc b/Build/source/texk/lcdf-typetools/libefont/pairop.cc index b2a5ce1f7bb..7ec07bf8938 100644 --- a/Build/source/texk/lcdf-typetools/libefont/pairop.cc +++ b/Build/source/texk/lcdf-typetools/libefont/pairop.cc @@ -56,10 +56,10 @@ PairProgram::add_kern(GlyphIndex left, GlyphIndex right, int ki) int newopi = _op.size(); _op.push_back(newop); _left_map[left] = newopi; - + //PairOpIndex duplicate = map[newop]; //map.add(newop, newopi); - + return false; } @@ -72,10 +72,10 @@ PairProgram::add_lig(GlyphIndex left, GlyphIndex right, GlyphIndex result, int newopi = _op.size(); _op.push_back(newop); _left_map[left] = newopi; - + //PairOpIndex duplicate = map[newop]; //map.add(newop, newopi); - + return false; } @@ -84,9 +84,9 @@ void PairProgram::unreverse() { if (!_reversed) return; - + _left_map.assign(_left_map.size(), -1); - + for (PairOpIndex opi = _op.size() - 1; opi >= 0; opi--) { PairOp &o = _op[opi]; PairOpIndex l = o.left(); @@ -102,7 +102,7 @@ void PairProgram::optimize() { /* PairOpIndex opi; - + // Get rid of 0-valued kerns. for (opi = 0; opi < opcount(); opi++) { PairOp &o = op(opi); @@ -131,7 +131,7 @@ PairProgram::print() const if (glyphblock[gi] != -1) printf("%s->B%d ", glyph(gi).name().c_str(), glyphblock[gi]); printf("\n"); - + for (int i = 0; i < blocks.size(); i++) { printf("B%-2d: ", i); PairOpBlock &opb = *blocks[i]; diff --git a/Build/source/texk/lcdf-typetools/libefont/psres.cc b/Build/source/texk/lcdf-typetools/libefont/psres.cc index adb0e992617..48f4be7b82b 100644 --- a/Build/source/texk/lcdf-typetools/libefont/psres.cc +++ b/Build/source/texk/lcdf-typetools/libefont/psres.cc @@ -18,7 +18,7 @@ #endif #include <efont/psres.hh> #include <lcdf/slurper.hh> -/* Get the correct functions for directory searching */ +/* Get the correct functions for directory searching */ #if HAVE_DIRENT_H # include <dirent.h> # define DIR_NAMLEN(dirent) strlen((dirent)->d_name) @@ -38,9 +38,6 @@ #include <string.h> namespace Efont { -static String::Initializer initializer; -static String empty_string; - PsresDatabase::PsresDatabase() : _section_map(0) { @@ -72,18 +69,18 @@ static bool read_psres_line(Slurper &slurper, int *equals_pos) { if (equals_pos) *equals_pos = -1; - + char *s = slurper.next_line(); if (!s) return false; - + bool is_terminator = s[0] == '.'; unsigned len, pos = 0, last_escape = ~0; bool found_eq = false; - + while (true) { len = slurper.cur_line_length(); if (len == 0) break; - + // process backslash escapes for (; pos < len - 1; pos++) { if (s[pos] == '\\') { @@ -100,17 +97,17 @@ read_psres_line(Slurper &slurper, int *equals_pos) goto done; } } - + // stop processing if not a continuation line if (pos == len || s[pos] != '\\') break; slurper.shorten_line(pos); s = slurper.append_next_line(); } - + if (pos < len && !found_eq && s[pos] == '=' && equals_pos) *equals_pos = pos; - + done: // eat trailing whitespace, except for the space in `\ ' if it ends the line // -- unless the `\' is the second `\' in a `\\'! @@ -143,10 +140,10 @@ PsresDatabaseSection::add_psres_file_section { int equals_pos; bool first_line = true; - + while (read_psres_line(slurper, &equals_pos)) { char *s = slurper.cur_line(); - + // check for a directory line if (first_line) { first_line = false; @@ -156,27 +153,27 @@ PsresDatabaseSection::add_psres_file_section continue; } } - + if (equals_pos < 0) { // report error? continue; } - + // get the key unsigned len = psres_escape(s, equals_pos); PermString key = PermString(s, len); int index = _map[key]; if (!override && index > 0) continue; - + // double equals means absolute pathname if (s[equals_pos + 1] == '=') equals_pos++; - + // get the value. Don't escape it yet len = slurper.cur_line_length() - (equals_pos + 1); String value = String(s + equals_pos + 1, len); - + // stick key and value into our data structure if (index == 0) { index = _directories.size(); @@ -212,28 +209,28 @@ PsresDatabase::add_one_psres_file(Slurper &slurper, bool override) { if (!read_psres_line(slurper, 0)) return /* error */ false; - + char *s = slurper.cur_line(); unsigned len = slurper.cur_line_length(); if (len < 12 || memcmp(s, "PS-Resources", 12) != 0) return /* error */ false; - + bool exclusive = (len >= 22 && memcmp(s+12, "-Exclusive", 10) == 0); - + // skip list of sections while (read_psres_line(slurper, 0)) /* nada */; - + // now, read each section PermString directory = slurper.filename().directory(); - + while (read_psres_line(slurper, 0)) { s = slurper.cur_line(); len = psres_escape(s, slurper.cur_line_length()); PsresDatabaseSection *section = force_section(PermString(s, len)); section->add_psres_file_section(slurper, directory, override); } - + return exclusive; } @@ -252,7 +249,7 @@ PsresDatabase::add_psres_directory(PermString directory) { DIR *dir = opendir(directory.c_str()); if (!dir) return; - + while (struct dirent *dirent = readdir(dir)) { int len = DIR_NAMLEN(dirent); if (len > 4 && dirent->d_name[0] != '.' @@ -262,7 +259,7 @@ PsresDatabase::add_psres_directory(PermString directory) add_psres_file(fn, false); } } - + closedir(dir); } @@ -307,18 +304,18 @@ PsresDatabase::add_psres_path(const char *path, const char *default_path, path = default_path; default_path = 0; } - + if (override && _sections.size() > 1) { PsresDatabase new_db; new_db.add_psres_path(path, default_path, false); add_database(&new_db, true); return; } - + while (*path) { const char *epath = path; while (*epath && *epath != ':') epath++; - + PermString directory(path, epath - path); Filename filename(directory, "PSres.upr"); if (epath == path) { @@ -326,7 +323,7 @@ PsresDatabase::add_psres_path(const char *path, const char *default_path, default_path = 0; // don't use default path twice } else if (!filename.readable() || !add_psres_file(filename, false)) add_psres_directory(directory); - + path = (*epath ? epath+1 : epath); } } @@ -392,21 +389,21 @@ PsresDatabaseSection::filename_value(PermString key) const String & PsresDatabase::value(PermString sec, PermString key) const { - PsresDatabaseSection *s = section(sec); - if (s) - return s->value(key); - else - return empty_string; + PsresDatabaseSection *s = section(sec); + if (s) + return s->value(key); + else + return String::make_empty(); } const String & PsresDatabase::unescaped_value(PermString sec, PermString key) const { - PsresDatabaseSection *s = section(sec); - if (s) - return s->unescaped_value(key); - else - return empty_string; + PsresDatabaseSection *s = section(sec); + if (s) + return s->unescaped_value(key); + else + return String::make_empty(); } Filename diff --git a/Build/source/texk/lcdf-typetools/libefont/t1cs.cc b/Build/source/texk/lcdf-typetools/libefont/t1cs.cc index dc35b8659e8..69072ff3504 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1cs.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1cs.cc @@ -24,22 +24,22 @@ namespace Efont { const char * const Charstring::command_names[] = { "error", "hstem", "UNKNOWN_2", "vstem", "vmoveto", "rlineto", "hlineto", "vlineto", "rrcurveto", "closepath", - + "callsubr", "return", "escape", "hsbw", "endchar", "UNKNOWN_15", "blend", "UNKNOWN_17", "hstemhm", "hintmask", - + "cntrmask", "rmoveto", "hmoveto", "vstemhm", "rcurveline", "rlinecurve", "vvcurveto", "hhcurveto", "shortint", "callgsubr", - + "vhcurveto", "hvcurveto", "dotsection", "vstem3", "hstem3", "and", "or", "not", "seac", "sbw", - + "store", "abs", "add", "sub", "div", "load", "neg", "eq", "callothersubr", "pop", - + "drop", "UNKNOWN_12_19", "put", "get", "ifelse", "random", "mul", "UNKNOWN_12_25", "sqrt", "dup", - + "exch", "index", "roll", "UNKNOWN_12_31", "UNKNOWN_12_32", "setcurrentpoint", "hflex", "flex", "hflex1", "flex1" }; @@ -154,11 +154,11 @@ Type1Charstring::process(CharstringInterp &interp) const while (left > 0) { bool more; int ahead; - + if (*data >= 32 && *data <= 246) { // push small number more = interp.number(data[0] - 139); ahead = 1; - + } else if (*data < 32) { // a command if (*data == cEscape) { if (left < 2) @@ -175,21 +175,21 @@ Type1Charstring::process(CharstringInterp &interp) const more = interp.type1_command(data[0]); ahead = 1; } - + } else if (*data >= 247 && *data <= 250) { // push medium number if (left < 2) goto runoff_error; int val = + ((data[0] - 247) << 8) + 108 + data[1]; more = interp.number(val); ahead = 2; - + } else if (*data >= 251 && *data <= 254) { // push negative medium number if (left < 2) goto runoff_error; int val = - ((data[0] - 251) << 8) - 108 - data[1]; more = interp.number(val); ahead = 2; - + } else { // 255: push huge number if (left < 5) goto runoff_error; @@ -197,14 +197,14 @@ Type1Charstring::process(CharstringInterp &interp) const more = interp.number(val); ahead = 5; } - + if (!more) return interp.error() == CharstringInterp::errOK; - + data += ahead; left -= ahead; } - + runoff_error: interp.error(CharstringInterp::errRunoff); return false; @@ -261,15 +261,15 @@ Type2Charstring::process(CharstringInterp &interp) const { const uint8_t *data = Type2Charstring::data(); int left = _s.length(); - + while (left > 0) { bool more; int ahead; - + if (*data >= 32 && *data <= 246) { // push small number more = interp.number(data[0] - 139); ahead = 1; - + } else if (*data < 32) { // a command if (*data == cEscape) { if (left < 2) @@ -297,14 +297,14 @@ Type2Charstring::process(CharstringInterp &interp) const int val = + ((data[0] - 247) << 8) + 108 + data[1]; more = interp.number(val); ahead = 2; - + } else if (*data >= 251 && *data <= 254) { // push negative medium number if (left < 2) goto runoff_error; int val = - ((data[0] - 251) << 8) - 108 - data[1]; more = interp.number(val); ahead = 2; - + } else { // 255: push huge number if (left < 5) goto runoff_error; @@ -319,7 +319,7 @@ Type2Charstring::process(CharstringInterp &interp) const data += ahead; left -= ahead; } - + runoff_error: interp.error(CharstringInterp::errRunoff); return false; diff --git a/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc b/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc index c491e1952b4..debb587955f 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1csgen.cc @@ -2,7 +2,7 @@ /* t1csgen.{cc,hh} -- Type 1 charstring generation * - * Copyright (c) 1998-2007 Eddie Kohler + * Copyright (c) 1998-2009 Eddie Kohler * * 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 @@ -37,10 +37,10 @@ static const char * const command_desc[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 0, 0, 0, 0, 0, "XY", 0, 0, 0, 0 }; @@ -166,11 +166,10 @@ void Type1CharstringGen::gen_moveto(const Point &p, bool closepath, bool always) { // make sure we generate some moveto on the first command - - double dx = p.x - _false.x; - double dy = p.y - _false.y; - int big_dx = (int)floor(dx * _f_precision + 0.50001); - int big_dy = (int)floor(dy * _f_precision + 0.50001); + + Point d = p - _true; + int big_dx = (int)floor(d.x * _f_precision + 0.50001); + int big_dy = (int)floor(d.y * _f_precision + 0.50001); if (big_dx == 0 && big_dy == 0 && _state != S_INITIAL && !always) /* do nothing */; @@ -178,20 +177,19 @@ Type1CharstringGen::gen_moveto(const Point &p, bool closepath, bool always) if (closepath) gen_command(Charstring::cClosepath); if (big_dy == 0) { - gen_number(dx, 'x'); + gen_number(d.x, 'x'); gen_command(Charstring::cHmoveto); } else if (big_dx == 0) { - gen_number(dy, 'y'); + gen_number(d.y, 'y'); gen_command(Charstring::cVmoveto); } else { - gen_number(dx, 'x'); - gen_number(dy, 'y'); + gen_number(d.x, 'x'); + gen_number(d.y, 'y'); gen_command(Charstring::cRmoveto); } } - _true.x = p.x; - _true.y = p.y; + _true = p; } void @@ -346,16 +344,16 @@ Type1CharstringGenInterp::act_hintmask(int cmd, const unsigned char *data, int n { if (cmd == Cs::cCntrmask || nhints > Type1CharstringGenInterp::nhints()) return; - + String data_holder; if (!data) { - data_holder = String::fill_string('\377', ((nhints - 1) >> 3) + 1); + data_holder = String::make_fill('\377', ((nhints - 1) >> 3) + 1); data = data_holder.udata(); } String hints = gen_hints(data, nhints); _in_hr = false; - + if (_state == S_INITIAL || _direct_hr) { _last_hints = hints; if (_state == S_INITIAL) @@ -372,7 +370,7 @@ Type1CharstringGenInterp::act_hintmask(int cmd, const unsigned char *data, int n subrno = i; break; } - + if (subrno < 0 && _hr_storage->set_subr(nsubrs, Type1Charstring(hints))) subrno = nsubrs; @@ -451,7 +449,7 @@ Type1CharstringGenInterp::act_flex(int cmd, const Point &p0, const Point &p1, co // 1. Outer endpoints must have same x (or y) coordinate bool v_ok = (p0.x == p7.x); bool h_ok = (p0.y == p7.y); - + // 2. Join point and its neighboring controls must be at an extreme if (v_ok && p2.x == p3_4.x && p3_4.x == p5.x) { double distance = fabs(p3_4.x - p0.x); @@ -553,16 +551,16 @@ Type1CharstringGenInterp::run(const CharstringContext &g, Type1Charstring &out) swap_stem_hints(); _state = S_INITIAL; _in_hr = false; - + CharstringInterp::interpret(g); - + if (_state == S_INITIAL) gen_sbw(false); else if (_in_hr) act_hintmask(Cs::cEndchar, 0, nhints()); if (_state != S_SEAC) _csgen.gen_command(Cs::cEndchar); - + _csgen.output(out); } diff --git a/Build/source/texk/lcdf-typetools/libefont/t1font.cc b/Build/source/texk/lcdf-typetools/libefont/t1font.cc index 8dd504e2c61..573c7823ae5 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1font.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1font.cc @@ -2,7 +2,7 @@ /* t1font.{cc,hh} -- Type 1 font * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2008 Eddie Kohler * * 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 @@ -123,20 +123,20 @@ Type1Font::read(Type1Reader &reader) int lenIV = 4; Type1SubrGroupItem *cur_group = 0; int cur_group_count = 0; - + StringAccum accum; while (reader.next_line(accum)) { - + // check for NULL STRING int x_length = accum.length(); if (!x_length) continue; const char *x = accum.c_str(); // ensure we don't run off the string - + // check for CHARSTRINGS if (reader.was_charstring()) { Type1Subr *fcs = Type1Subr::make(x, x_length, reader.charstring_start(), reader.charstring_length(), lenIV); - + if (fcs->is_subr()) { if (fcs->subrno() >= _subrs.size()) _subrs.resize(fcs->subrno() + 30, (Type1Subr *)0); @@ -151,7 +151,7 @@ Type1Font::read(Type1Reader &reader) } have_subrs = true; } - + } else { add_glyph(fcs); if (!have_charstrings && _items.size()) { @@ -165,17 +165,17 @@ Type1Font::read(Type1Reader &reader) have_charstrings = true; } } - + accum.clear(); continue; } - + // check for COMMENTS if (x[0] == '%') { add_item(new Type1CopyItem(accum.take_string())); continue; } - + // check for CHARSTRING START // 5/29/1999: beware of charstring start-like things that don't have // `readstring' in them! @@ -195,14 +195,14 @@ Type1Font::read(Type1Reader &reader) continue; } } - + // check for ENCODING if (!_encoding && strncmp(x, "/Encoding ", 10) == 0) { read_encoding(reader, x + 10); accum.clear(); continue; } - + // check for a DEFINITION if (x[0] == '/') { definition_succeed: @@ -221,9 +221,9 @@ Type1Font::read(Type1Reader &reader) if (y[0] == '/') goto definition_succeed; } - + definition_fail: - + // check for ZEROS special case if (eexec_state == 2) { // In eexec_state 2 (right after turning off eexec), the opening @@ -232,7 +232,7 @@ Type1Font::read(Type1Reader &reader) int zeros = 0; while (x[zeros] == 0 && x_length > 0) zeros++, x_length--; - add_item(new Type1CopyItem(String::fill_string('0', zeros * 2 + x_length))); + add_item(new Type1CopyItem(String::make_fill('0', zeros * 2 + x_length))); eexec_state = 3; accum.clear(); continue; @@ -311,6 +311,18 @@ Type1Font::ok() const return font_name() && _glyphs.size() > 0; } +static char *skip_comment_space(char *s) +{ + while (1) { + if (isspace((unsigned char) *s)) + ++s; + else if (*s == '%') { + for (++s; *s != '\r' && *s != '\n' && *s != '\0'; ++s) + /* nada */; + } else + return s; + } +} void Type1Font::read_encoding(Type1Reader &reader, const char *first_line) @@ -323,18 +335,18 @@ Type1Font::read_encoding(Type1Reader &reader, const char *first_line) } add_type1_encoding(new Type1Encoding); - + bool got_any = false; StringAccum accum; - + while (reader.next_line(accum)) { - + // check for NULL STRING if (!accum.length()) continue; accum.append('\0'); // ensure we don't run off the string char *pos = accum.data(); - + // skip to first `dup' token if (!got_any) { if (!(pos = strstr(pos, "dup"))) { @@ -342,31 +354,39 @@ Type1Font::read_encoding(Type1Reader &reader, const char *first_line) goto check_done; } } - + // parse as many `dup INDEX */CHARNAME put' as there are in the line while (1) { // skip spaces, look for `dup ' while (isspace((unsigned char) pos[0])) - pos++; + ++pos; + if (pos[0] == '%') + pos = skip_comment_space(pos); if (pos[0] != 'd' || pos[1] != 'u' || pos[2] != 'p' || !isspace((unsigned char) pos[3])) break; - + // look for `INDEX */' char *scan; int char_value = strtol(pos + 4, &scan, 10); - while (scan[0] == ' ') scan++; + if (scan[0] == '#' && char_value > 0 && char_value < 37 + && isalnum((unsigned char) scan[1])) + char_value = strtol(scan + 1, &scan, char_value); + while (isspace((unsigned char) scan[0])) + scan++; if (char_value < 0 || char_value >= 256 || scan[0] != '/') break; - + // look for `CHARNAME put' scan++; char *name_pos = scan; - while (scan[0] != ' ' && scan[0]) scan++; + while (!isspace((unsigned char) scan[0]) && scan[0] != '\0') + ++scan; char *name_end = scan; - while (scan[0] == ' ') scan++; + while (isspace((unsigned char) scan[0])) + ++scan; if (scan[0] != 'p' || scan[1] != 'u' || scan[2] != 't') break; - + _encoding->put(char_value, PermString(name_pos, name_end - name_pos)); got_any = true; pos = scan + 3; @@ -482,10 +502,10 @@ Type1Font::undo_synthetic() // A synthetic font doesn't share arbitrary code with its base font; it // shares just the CharStrings dictionary, according to Adobe Type 1 Font // Format. We take advantage of this. - + if (!_synthetic_item) return; - + int mod_ii; for (mod_ii = nitems() - 1; mod_ii >= 0; mod_ii--) if (_items[mod_ii] == _synthetic_item) @@ -515,7 +535,7 @@ Type1Font::undo_synthetic() } assert(oth_glyphs != 0); - + for (int i = nitems() - 1; i >= 0; i--) if (Type1SubrGroupItem *subr_grp = _items[i]->cast_subr_group()) { assert(subr_grp->is_subrs()); @@ -588,7 +608,7 @@ Type1Font::set_subr(int e, const Type1Charstring &t1cs, PermString definer) return false; definer = pattern_subr->definer(); } - + delete _subrs[e]; _subrs[e] = Type1Subr::make_subr(e, t1cs, definer); return true; @@ -611,7 +631,7 @@ Type1Font::fill_in_subrs() _subrs.pop_back(); for (int i = 0; i < _subrs.size(); i++) if (!_subrs[i]) - set_subr(i, Type1Charstring(String::stable_string("\013", 1))); + set_subr(i, Type1Charstring(String::make_stable("\013", 1))); } void @@ -639,16 +659,16 @@ Type1Font::shift_indices(int move_index, int delta) _items.resize(_items.size() + delta, (Type1Item *)0); memmove(&_items[move_index + delta], &_items[move_index], sizeof(Type1Item *) * (_items.size() - move_index - delta)); - + for (int i = dFont; i < dLast; i++) if (_index[i] > move_index) _index[i] += delta; - + } else { memmove(&_items[move_index], &_items[move_index - delta], sizeof(Type1Item *) * (_items.size() - (move_index - delta))); _items.resize(_items.size() + delta); - + for (int i = dFont; i < dLast; i++) if (_index[i] >= move_index) { if (_index[i] < move_index - delta) @@ -776,15 +796,15 @@ Type1Font::write(Type1Writer &w) lenIV_def->value_int(lenIV); w.set_charstring_start(_charstring_definer); w.set_lenIV(lenIV); - + // change dict sizes for (int i = dF; i < dLast; i++) set_dict_size(i, _dict[i].size() + _dict_deltas[i]); // XXX what if dict had nothing, but now has something? - + for (int i = 0; i < _items.size(); i++) _items[i]->gen(w); - + w.flush(); } @@ -818,7 +838,7 @@ Type1Font::create_mmspace(ErrorHandler *errh) const t1d = fi_dict("BlendDesignPositions"); if (!t1d || !t1d->value_numvec_vec(master_positions)) return 0; - + int nmasters = master_positions.size(); if (nmasters <= 0) { errh->error("bad BlendDesignPositions"); @@ -827,18 +847,18 @@ Type1Font::create_mmspace(ErrorHandler *errh) const int naxes = master_positions[0].size(); _mmspace = new MultipleMasterSpace(font_name(), naxes, nmasters); _mmspace->set_master_positions(master_positions); - + Vector< Vector<double> > normalize_in, normalize_out; t1d = fi_dict("BlendDesignMap"); if (t1d && t1d->value_normalize(normalize_in, normalize_out)) _mmspace->set_normalize(normalize_in, normalize_out); - + Vector<PermString> axis_types; t1d = fi_dict("BlendAxisTypes"); if (t1d && t1d->value_namevec(axis_types) && axis_types.size() == naxes) for (int a = 0; a < naxes; a++) _mmspace->set_axis_type(a, axis_types[a]); - + int ndv, cdv; Type1Charstring *cs; t1d = p_dict("NDV"); @@ -847,17 +867,17 @@ Type1Font::create_mmspace(ErrorHandler *errh) const t1d = p_dict("CDV"); if (t1d && t1d->value_int(cdv) && (cs = subr(cdv))) _mmspace->set_cdv(*cs); - + Vector<double> design_vector; t1d = dict("DesignVector"); if (t1d && t1d->value_numvec(design_vector)) _mmspace->set_design_vector(design_vector); - + Vector<double> weight_vector; t1d = dict("WeightVector"); if (t1d && t1d->value_numvec(weight_vector)) _mmspace->set_weight_vector(weight_vector); - + if (!_mmspace->check(errh)) { delete _mmspace; _mmspace = 0; diff --git a/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc b/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc index 6f7835e4212..aededff03ae 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1fontskel.cc @@ -265,7 +265,7 @@ Type1Font::skeleton_private_end() // Subrs add_item(new Type1SubrGroupItem(this, true, "/Subrs 0 array")); add_item(new Type1CopyItem("|-")); - + // CharStrings add_item(new Type1SubrGroupItem(this, false, "2 index /CharStrings 0 dict dup begin")); @@ -294,15 +294,15 @@ Type1Font::skeleton_common_subrs() { // - first four Subrs have fixed definitions // - 0: "3 0 callothersubr pop pop setcurrentpoint return" - set_subr(0, Type1Charstring(String::stable_string("\216\213\014\020\014\021\014\021\014\041\013", 11)), " |"); + set_subr(0, Type1Charstring(String::make_stable("\216\213\014\020\014\021\014\021\014\041\013", 11)), " |"); // - 1: "0 1 callothersubr return" - set_subr(1, Type1Charstring(String::stable_string("\213\214\014\020\013", 5)), " |"); + set_subr(1, Type1Charstring(String::make_stable("\213\214\014\020\013", 5)), " |"); // - 2: "0 2 callothersubr return" - set_subr(2, Type1Charstring(String::stable_string("\213\215\014\020\013", 5)), " |"); + set_subr(2, Type1Charstring(String::make_stable("\213\215\014\020\013", 5)), " |"); // - 3: "return" - set_subr(3, Type1Charstring(String::stable_string("\013", 1)), " |"); + set_subr(3, Type1Charstring(String::make_stable("\013", 1)), " |"); // - 4: "1 3 callothersubr pop callsubr return" - set_subr(4, Type1Charstring(String::stable_string("\214\216\014\020\014\021\012\013", 8)), " |"); + set_subr(4, Type1Charstring(String::make_stable("\214\216\014\020\014\021\012\013", 8)), " |"); } @@ -373,7 +373,7 @@ Type1Font::skeleton_make_copy(const Type1Font *font, PermString font_name, const add_number_def(output, dFI, "UnderlinePosition", font); add_number_def(output, dFI, "UnderlineThickness", font); output->skeleton_fontinfo_end(); - + // Encoding, other font dictionary entries output->add_type1_encoding(new Type1Encoding(*font->type1_encoding())); add_number_def(output, dF, "PaintType", font); diff --git a/Build/source/texk/lcdf-typetools/libefont/t1interp.cc b/Build/source/texk/lcdf-typetools/libefont/t1interp.cc index 478235dd158..4d42f731d26 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1interp.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1interp.cc @@ -147,22 +147,22 @@ CharstringInterp::vector_command(int cmd) CharstringProgram::VectorType which_vector; int vectoroff, offset, num, i; Vector<double> *v = 0; - + switch (cmd) { - + case Cs::cPut: CHECK_STACK(2); offset = (int)top(0); vec(&_scratch_vector, offset) = top(1); pop(2); break; - + case Cs::cGet: CHECK_STACK(1); offset = (int)top(); top() = vec(&_scratch_vector, offset); break; - + case Cs::cStore: CHECK_STACK(4); which_vector = (CharstringProgram::VectorType)((int)top(3)); @@ -176,7 +176,7 @@ CharstringInterp::vector_command(int cmd) v = _program->mm_vector(which_vector, true); if (!v) return error(errVector, cmd); - + for (i = 0; i < num; i++, offset++, vectoroff++) vec(v, vectoroff) = vec(&_scratch_vector, offset); // erase our weight vector if the global weight vector has changed @@ -199,16 +199,16 @@ CharstringInterp::vector_command(int cmd) v = &_weight_vector; if (!v) return error(errVector, cmd); - + for (i = 0; i < num; i++, offset++) vec(&_scratch_vector, offset) = vec(v, i); break; - + default: return error(errUnimplemented, cmd); - + } - + return true; } @@ -222,10 +222,10 @@ CharstringInterp::blend_command() ensure_weight_vector(); if (!_weight_vector.size()) return error(errVector, cmd); - + int nmasters = _weight_vector.size(); CHECK_STACK(nargs * nmasters); - + int base = _sp - nargs * nmasters; int off = base + nargs; for (int j = 0; j < nargs; j++) { @@ -233,7 +233,7 @@ CharstringInterp::blend_command() for (int i = 1; i < nmasters; i++, off++) val += _weight_vector.at_u(i) * _s[off]; } - + pop(nargs * (nmasters - 1)); return true; } @@ -248,18 +248,18 @@ CharstringInterp::roll_command() if (n <= 0) return error(errValue, cmd); CHECK_STACK(n); - + int base = _sp - n; while (amount < 0) amount += n; - + int i; double copy_stack[STACK_SIZE]; for (i = 0; i < n; i++) copy_stack[i] = _s[ base + (i+amount) % n ]; for (i = 0; i < n; i++) _s[base + i] = copy_stack[i]; - + return true; } @@ -268,41 +268,41 @@ CharstringInterp::arith_command(int cmd) { int i; double d; - + switch (cmd) { - + case Cs::cBlend: return blend_command(); - + case Cs::cAbs: CHECK_STACK(1); if (top() < 0) top() = -top(); break; - + case Cs::cAdd: CHECK_STACK(1); d = pop(); top() += d; break; - + case Cs::cSub: CHECK_STACK(1); d = pop(); top() -= d; break; - + case Cs::cDiv: CHECK_STACK(2); d = pop(); top() /= d; break; - + case Cs::cNeg: CHECK_STACK(1); top() = -top(); break; - + case Cs::cRandom: { double d; do { @@ -311,32 +311,32 @@ CharstringInterp::arith_command(int cmd) push(d); break; } - + case Cs::cMul: CHECK_STACK(2); d = pop(); top() *= d; break; - + case Cs::cSqrt: CHECK_STACK(1); if (top() < 0) return error(errValue, cmd); top() = sqrt(top()); break; - + case Cs::cDrop: CHECK_STACK(1); pop(); break; - + case Cs::cExch: CHECK_STACK(2); d = top(0); top(0) = top(1); top(1) = d; break; - + case Cs::cIndex: CHECK_STACK(1); i = (int)top(); @@ -345,62 +345,62 @@ CharstringInterp::arith_command(int cmd) CHECK_STACK(i + 2); top() = top(i+1); break; - + case Cs::cRoll: return roll_command(); - + case Cs::cDup: CHECK_STACK(1); push(top()); break; - + case Cs::cAnd: CHECK_STACK(2); d = pop(); top() = (top() != 0) && (d != 0); break; - + case Cs::cOr: CHECK_STACK(2); d = pop(); top() = (top() != 0) || (d != 0); break; - + case Cs::cNot: CHECK_STACK(1); top() = (top() == 0); break; - + case Cs::cEq: CHECK_STACK(2); d = pop(); top() = (top() == d); break; - + case Cs::cIfelse: CHECK_STACK(4); if (top(1) > top(0)) top(3) = top(2); pop(3); break; - + case Cs::cPop: if (ps_size() < 1) return error(errUnderflow, cmd); push(ps_pop()); break; - + case 15: // this command is found with no explanation in JansonText-Roman CHECK_STACK(2); pop(2); return true; - + default: return error(errUnimplemented, cmd); - + } - + return true; } @@ -456,7 +456,7 @@ CharstringInterp::mm_command(int command, int on_stack) ensure_weight_vector(); if (!_weight_vector.size()) return error(errVector, command); - + int nargs; switch (command) { case Cs::othcMM1: nargs = 1; break; @@ -466,21 +466,21 @@ CharstringInterp::mm_command(int command, int on_stack) case Cs::othcMM6: nargs = 6; break; default: return error(errInternal, command); } - + int nmasters = _weight_vector.size(); if (size() < nargs * nmasters || on_stack != nargs * nmasters) return error(errMultipleMaster, command); - + int base = size() - on_stack; - + int off = base + nargs; for (int j = 0; j < nargs; j++) { double &val = at(base + j); for (int i = 1; i < nmasters; i++, off++) val += _weight_vector.at_u(i) * at(off); } - + for (int i = nargs - 1; i >= 0; i--) ps_push(at(base + i)); @@ -514,7 +514,7 @@ CharstringInterp::itc_command(int command, int on_stack) vec(&_scratch_vector, offset) = at(base); break; } - + case Cs::othcITC_get: { if (on_stack != 1) return error(errOthersubr, command); @@ -522,35 +522,35 @@ CharstringInterp::itc_command(int command, int on_stack) ps_push(vec(&_scratch_vector, offset)); break; } - + case Cs::othcITC_add: { if (on_stack != 2) return error(errOthersubr, command); ps_push(at(base) + at(base+1)); break; } - + case Cs::othcITC_sub: { if (on_stack != 2) return error(errOthersubr, command); ps_push(at(base) - at(base+1)); break; } - + case Cs::othcITC_mul: { if (on_stack != 2) return error(errOthersubr, command); ps_push(at(base) * at(base+1)); break; } - + case Cs::othcITC_div: { if (on_stack != 2) return error(errOthersubr, command); ps_push(at(base) / at(base+1)); break; } - + case Cs::othcITC_ifelse: { if (on_stack != 4) return error(errOthersubr, command); @@ -560,12 +560,12 @@ CharstringInterp::itc_command(int command, int on_stack) ps_push(at(base+1)); break; } - + default: return error(errOthersubr, command); } - + pop(on_stack); return true; } @@ -613,7 +613,7 @@ bool CharstringInterp::callothersubr_command(int othersubrnum, int n) { switch (othersubrnum) { - + case Cs::othcFlexend: if (n != 3) goto unknown; @@ -631,7 +631,7 @@ CharstringInterp::callothersubr_command(int othersubrnum, int n) _flex = false; _state = S_PATH; break; - + case Cs::othcFlexbegin: if (n != 0) goto unknown; @@ -652,14 +652,14 @@ CharstringInterp::callothersubr_command(int othersubrnum, int n) ps_push(_cp.x); ps_push(_cp.y); break; - + case Cs::othcReplacehints: if (n != 1) goto unknown; ps_clear(); ps_push(top()); break; - + case Cs::othcMM1: case Cs::othcMM2: case Cs::othcMM3: @@ -678,16 +678,16 @@ CharstringInterp::callothersubr_command(int othersubrnum, int n) case Cs::othcITC_ifelse: case Cs::othcITC_random: return itc_command(othersubrnum, n); - + default: // unknown unknown: ps_clear(); for (int i = 0; i < n; i++) ps_push(top(i)); break; - + } - + pop(n); return true; } @@ -696,7 +696,7 @@ bool CharstringInterp::type1_command(int cmd) { switch (cmd) { - + case Cs::cReturn: return false; @@ -729,7 +729,7 @@ CharstringInterp::type1_command(int cmd) _state = S_SBW; } break; - + case Cs::cSeac: CHECK_STACK(5); if (_state > S_SBW) @@ -740,7 +740,7 @@ CharstringInterp::type1_command(int cmd) case Cs::cCallsubr: return callsubr_command(); - + case Cs::cCallothersubr: { CHECK_STACK(2); int othersubrnum = (int)top(0); @@ -750,13 +750,13 @@ CharstringInterp::type1_command(int cmd) return error(errOthersubr, cmd); return callothersubr_command(othersubrnum, n); } - + case Cs::cPut: case Cs::cGet: case Cs::cStore: case Cs::cLoad: return vector_command(cmd); - + case Cs::cBlend: case Cs::cAbs: case Cs::cAdd: @@ -784,13 +784,13 @@ CharstringInterp::type1_command(int cmd) CHECK_PATH_START(); actp_rlineto(cmd, at(0), 0); break; - + case Cs::cHmoveto: CHECK_STACK(1); CHECK_PATH_END(); actp_rmoveto(cmd, at(0), 0); break; - + case Cs::cHvcurveto: CHECK_STACK(4); CHECK_PATH_START(); @@ -864,16 +864,16 @@ CharstringInterp::type1_command(int cmd) case Cs::cClosepath: CHECK_PATH_END(); break; - + case Cs::cEndchar: CHECK_PATH_END(); set_done(); return false; - + case Cs::cError: default: return error(errUnimplemented, cmd); - + } clear(); @@ -904,7 +904,7 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) #ifdef DEBUG_TYPE2 fprintf(stderr, "%s [%d/%d]\n", Charstring::command_name(cmd).c_str(), _t2nhints, size()); #endif - + switch (cmd) { case Cs::cHstem: @@ -1005,7 +1005,7 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) for (; bottom + 1 < size(); bottom += 2) actp_rlineto(cmd, at(bottom), at(bottom + 1)); break; - + case Cs::cHlineto: CHECK_STACK(1); CHECK_STATE(); @@ -1016,7 +1016,7 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) actp_rlineto(cmd, 0, at(bottom++)); } break; - + case Cs::cVlineto: CHECK_STACK(1); CHECK_STATE(); @@ -1188,7 +1188,7 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) bottom += 11; #endif } - + case Cs::cEndchar: if (_state <= S_SEAC) bottom = type2_handle_width(cmd, size() > 0 && size() != 4); @@ -1198,7 +1198,7 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) set_done(); clear(); return false; - + case Cs::cReturn: return false; @@ -1207,13 +1207,13 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) case Cs::cCallgsubr: return callgsubr_command(); - + case Cs::cPut: case Cs::cGet: case Cs::cStore: case Cs::cLoad: return vector_command(cmd); - + case Cs::cBlend: case Cs::cAbs: case Cs::cAdd: @@ -1242,14 +1242,14 @@ CharstringInterp::type2_command(int cmd, const uint8_t *data, int *left) case Cs::cError: default: return error(errUnimplemented, cmd); - + } #if DEBUG_TYPE2 if (bottom != size()) fprintf(stderr, "[left %d on stack] ", size() - bottom); #endif - + clear(); return error() >= 0; } @@ -1294,11 +1294,11 @@ CharstringInterp::act_seac(int cmd, double asb, double adx, double ady, int bcha error(errGlyph, cmd); return; } - + Point apos = Point(adx + _lsb.x - asb, ady + _lsb.y); Point save_lsb = _lsb; Point save_seac_origin = _seac_origin; - + CharstringInterp::initialize(); _seac_origin = apos; _state = S_SEAC; diff --git a/Build/source/texk/lcdf-typetools/libefont/t1item.cc b/Build/source/texk/lcdf-typetools/libefont/t1item.cc index 3fb71edb1ad..5b7171e4b3f 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1item.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1item.cc @@ -2,7 +2,7 @@ /* t1item.{cc,hh} -- items in a Type 1 font * - * Copyright (c) 1998-2006 Eddie Kohler + * Copyright (c) 1998-2008 Eddie Kohler * * 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 @@ -91,7 +91,7 @@ Type1Definition::slurp_string(StringAccum &accum, int pos, Type1Reader *reader) { int paren_level = 0; char *s = accum.data() + pos; - + do { switch (*s++) { case '(': paren_level++; break; @@ -107,7 +107,7 @@ Type1Definition::slurp_string(StringAccum &accum, int pos, Type1Reader *reader) break; } } while (paren_level); - + return s - accum.data(); } @@ -117,7 +117,7 @@ Type1Definition::slurp_proc(StringAccum &accum, int pos, Type1Reader *reader) int paren_level = 0; int brace_level = 0; char *s = accum.data() + pos; - + do { switch (*s++) { case '{': if (!paren_level) brace_level++; break; @@ -140,7 +140,7 @@ Type1Definition::slurp_proc(StringAccum &accum, int pos, Type1Reader *reader) break; } } while (brace_level); - + return s - accum.data(); } @@ -155,7 +155,7 @@ Type1Definition::make(StringAccum &accum, Type1Reader *reader, return 0; s++; int name_start_pos = s - accum.data(); - + // find NAME LENGTH while (!isspace((unsigned char) *s) && *s != '[' && *s != '{' && *s != '(' && *s != ']' && *s != '}' && *s != ')' && *s) @@ -163,22 +163,22 @@ Type1Definition::make(StringAccum &accum, Type1Reader *reader, if (!*s) return 0; int name_end_pos = s - accum.data(); - + while (isspace((unsigned char) *s)) s++; int val_pos = s - accum.data(); int val_end_pos = -1; bool check_def = false; - + if (*s == '}' || *s == ']' || *s == ')' || *s == 0) return 0; - + else if (*s == '(') val_end_pos = slurp_string(accum, val_pos, reader); - + else if (*s == '{') val_end_pos = slurp_proc(accum, val_pos, reader); - + else if (*s == '[') { int brack_level = 0; do { @@ -189,14 +189,14 @@ Type1Definition::make(StringAccum &accum, Type1Reader *reader, } } while (brack_level); val_end_pos = s - accum.data(); - + } else { while (!isspace((unsigned char) *s) && *s) s++; val_end_pos = s - accum.data(); if (!force_definition) check_def = true; } - + if (val_end_pos < 0) return 0; s = accum.data() + val_end_pos; @@ -205,7 +205,7 @@ Type1Definition::make(StringAccum &accum, Type1Reader *reader, if (check_def && (s[0] != 'd' || s[1] != 'e' || s[2] != 'f')) if (strncmp(s, "dict def", 8) != 0) return 0; - + PermString name(accum.data()+name_start_pos, name_end_pos - name_start_pos); PermString def(s, accum.length() - (s - accum.data())); String value = String(accum.data() + val_pos, val_end_pos - val_pos); @@ -400,7 +400,7 @@ Type1Definition::value_normalize(Vector<NumVector> &in, Vector<NumVector> sub; if (!strtonumvec_vec(s, &s, sub)) return false; - + NumVector subin; NumVector subout; for (int i = 0; i < sub.size(); i++) @@ -665,18 +665,18 @@ Type1Subr::make(const char *s_in, int s_len, int cs_pos, int cs_len, int lenIV) A valid subroutine string is one of the following: /[char_name] ### charstring_start ........ dup [subrno] ### charstring_start .... */ - + const char *s = s_in; PermString name; int subrno = 0; - + // Force literal spaces rather than isspace(). if (*s == '/') { const char *nstart = ++s; while (!isspace((unsigned char) *s) && *s) s++; name = PermString(nstart, s - nstart); - + } else { // dup [subrno] ... s += 3; @@ -684,7 +684,7 @@ Type1Subr::make(const char *s_in, int s_len, int cs_pos, int cs_len, int lenIV) s++; subrno = strtol(s, (char **)&s, 10); } - + s = s_in + cs_pos; // Lazily decrypt the charstring. @@ -710,23 +710,23 @@ Type1Subr::gen(Type1Writer &w) { int len = _cs.length(); const unsigned char *data = _cs.data(); - + if (is_subr()) w << "dup " << _subrno << ' ' << len + w.lenIV() << w.charstring_start(); else w << '/' << _name << ' ' << len + w.lenIV() << w.charstring_start(); - + if (w.lenIV() < 0) { // lenIV < 0 means charstrings are unencrypted w.print((const char *)data, len); - + } else { // PERFORMANCE NOTE: Putting the charstring in a buffer of known length // and printing that buffer rather than one char at a time is an OK // optimization. (around 10%) unsigned char *buf = new unsigned char[len + w.lenIV()]; unsigned char *t = buf; - + int r = t1R_cs; for (int i = 0; i < w.lenIV(); i++) { unsigned char c = (unsigned char)(r >> 8); @@ -738,11 +738,11 @@ Type1Subr::gen(Type1Writer &w) *t++ = c; r = ((c + r) * t1C1 + t1C2) & 0xFFFF; } - + w.print((char *)buf, len + w.lenIV()); delete[] buf; } - + w << _definer << '\n'; } @@ -771,13 +771,13 @@ void Type1SubrGroupItem::gen(Type1Writer &w) { Type1Font *font = _font; - + int pos = _value.find_left(_is_subrs ? " array" : " dict"); if (pos >= 1 && isdigit((unsigned char) _value[pos - 1])) { int numpos = pos - 1; while (numpos >= 1 && isdigit((unsigned char) _value[numpos - 1])) numpos--; - + int n; if (_is_subrs) { n = font->nsubrs(); @@ -789,9 +789,9 @@ Type1SubrGroupItem::gen(Type1Writer &w) w << _value.substring(0, numpos) << n << _value.substring(pos); } else w << _value; - + w << '\n'; - + if (_is_subrs) { int count = font->nsubrs(); for (int i = 0; i < count; i++) diff --git a/Build/source/texk/lcdf-typetools/libefont/t1mm.cc b/Build/source/texk/lcdf-typetools/libefont/t1mm.cc index 8743479e4fa..c94ba479ce3 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1mm.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1mm.cc @@ -97,7 +97,7 @@ MultipleMasterSpace::error(ErrorHandler *errh, const char *s, ...) const assert(strlen(s) < 800); sprintf(buf, (s[0] == ' ' ? "%.200s%s" : "%.200s: %s"), _font_name.c_str(), s); - errh->verror(ErrorHandler::ERR_ERROR, String(), buf, val); + errh->vxmessage(ErrorHandler::e_error, buf, val); va_end(val); } return false; @@ -109,44 +109,44 @@ MultipleMasterSpace::check(ErrorHandler *errh) { if (_ok) return true; - + if (_nmasters <= 0 || _nmasters > 16) return error(errh, "number of masters must be between 1 and 16"); if (_naxes <= 0 || _naxes > 4) return error(errh, "number of axes must be between 1 and 4"); - + if (_master_positions.size() != _nmasters) return error(errh, "bad BlendDesignPositions"); for (int i = 0; i < _nmasters; i++) if (_master_positions[i].size() != _naxes) return error(errh, "inconsistent BlendDesignPositions"); - + if (_normalize_in.size() != _naxes || _normalize_out.size() != _naxes) return error(errh, "bad BlendDesignMap"); for (int i = 0; i < _naxes; i++) if (_normalize_in[i].size() != _normalize_out[i].size()) return error(errh, "bad BlendDesignMap"); - + if (!_axis_types.size()) _axis_types.assign(_naxes, PermString()); if (_axis_types.size() != _naxes) return error(errh, "bad BlendAxisTypes"); - + if (!_axis_labels.size()) _axis_labels.assign(_naxes, PermString()); if (_axis_labels.size() != _naxes) return error(errh, "bad axis labels"); - + if (!_default_design_vector.size()) _default_design_vector.assign(_naxes, UNKDOUBLE); if (_default_design_vector.size() != _naxes) return error(errh, "inconsistent design vector"); - + if (!_default_weight_vector.size()) _default_weight_vector.assign(_nmasters, UNKDOUBLE); if (_default_weight_vector.size() != _nmasters) return error(errh, "inconsistent weight vector"); - + _ok = true; return true; } @@ -156,7 +156,7 @@ MultipleMasterSpace::check_intermediate(ErrorHandler *errh) { if (!_ok || _cdv) return true; - + for (int a = 0; a < _naxes; a++) for (int m = 0; m < _nmasters; m++) if (_master_positions[m][a] != 0 && _master_positions[m][a] != 1) { @@ -204,7 +204,7 @@ MultipleMasterSpace::set_design(NumVector &design_vector, int ax, double value, { if (ax < 0 || ax >= _naxes) return error(errh, " has only %d axes", _naxes); - + if (value < axis_low(ax)) { value = axis_low(ax); if (errh) @@ -217,7 +217,7 @@ MultipleMasterSpace::set_design(NumVector &design_vector, int ax, double value, errh->warning("lowering %s's %s to %g", _font_name.c_str(), _axis_types[ax].c_str(), value); } - + design_vector[ax] = value; return true; } @@ -239,29 +239,29 @@ MultipleMasterSpace::normalize_vector(ErrorHandler *errh) const { NumVector &design = *_design_vector; NumVector &norm_design = *_norm_design_vector; - + for (int a = 0; a < _naxes; a++) if (!KNOWN(design[a])) { if (errh) errh->error("must specify %s's %s coordinate", _font_name.c_str(), _axis_types[a].c_str()); return false; } - + // Move to normalized design coordinates. norm_design.assign(_naxes, UNKDOUBLE); - + if (_ndv) { CharstringInterp ai; if (!ai.interpret(this, &_ndv)) return error(errh, "%s in NDV program", ai.error_string().c_str()); - + } else for (int a = 0; a < _naxes; a++) { double d = design[a]; double nd = UNKDOUBLE; const Vector<double> &norm_in = _normalize_in[a]; const Vector<double> &norm_out = _normalize_out[a]; - + if (d < norm_in[0]) nd = norm_out[0]; for (int i = 1; i < norm_in.size(); i++) @@ -274,15 +274,15 @@ MultipleMasterSpace::normalize_vector(ErrorHandler *errh) const } if (d >= norm_in.back()) nd = norm_out.back(); - + done: norm_design[a] = nd; } - + for (int a = 0; a < _naxes; a++) if (!KNOWN(norm_design[a])) return error(errh, "bad normalization"); - + return true; } @@ -292,14 +292,14 @@ MultipleMasterSpace::convert_vector(ErrorHandler *errh) const { NumVector &norm_design = *_norm_design_vector; NumVector &weight = *_weight_vector; - + weight.assign(_nmasters, 1); - + if (_cdv) { CharstringInterp ai; if (!ai.interpret(this, &_cdv)) return error(errh, "%s in CDV program", ai.error_string().c_str()); - + } else for (int a = 0; a < _naxes; a++) for (int m = 0; m < _nmasters; m++) { @@ -310,7 +310,7 @@ MultipleMasterSpace::convert_vector(ErrorHandler *errh) const else return error(errh, " requires intermediate master conversion programs"); } - + return true; } @@ -322,14 +322,14 @@ MultipleMasterSpace::design_to_norm_design(const NumVector &design_in, { NumVector design(design_in); NumVector weight; - + _design_vector = &design; _norm_design_vector = &norm_design; _weight_vector = &weight; if (!normalize_vector(errh)) return false; _design_vector = _norm_design_vector = _weight_vector = 0; - + return true; } @@ -339,12 +339,12 @@ MultipleMasterSpace::design_to_weight(const NumVector &design_in, NumVector &wei { NumVector design(design_in); NumVector norm_design; - + bool dirty = false; for (int i = 0; i < _naxes; i++) if (design[i] != _default_design_vector[i]) dirty = true; - + if (dirty) { _design_vector = &design; _norm_design_vector = &norm_design; @@ -356,7 +356,7 @@ MultipleMasterSpace::design_to_weight(const NumVector &design_in, NumVector &wei _design_vector = _norm_design_vector = _weight_vector = 0; } else weight = _default_weight_vector; - + double sum = 0; for (int m = 0; m < _nmasters; m++) sum += weight[m]; @@ -371,7 +371,7 @@ MultipleMasterSpace::design_to_weight(const NumVector &design_in, NumVector &wei sum += weight[m]; } weight[_nmasters - 1] = 1 - sum; - + return true; } diff --git a/Build/source/texk/lcdf-typetools/libefont/t1rw.cc b/Build/source/texk/lcdf-typetools/libefont/t1rw.cc index 593b6266630..e39ff1473f4 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1rw.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1rw.cc @@ -128,13 +128,13 @@ Type1Reader::ascii_eexec_get() int d1 = get_base(); while (isspace(d1)) d1 = get_base(); - + int d2 = get_base(); while (isspace(d2)) d2 = get_base(); if (d2 < 0) return -1; - + return eexec((xvalue[d1] << 4) | (xvalue[d2])); } @@ -144,11 +144,11 @@ Type1Reader::get() { if (!_eexec) return get_base(); - + else if (_binary_eexec) { int c = get_base(); return c < 0 ? c : eexec(c); - + } else return ascii_eexec_get(); } @@ -164,13 +164,13 @@ Type1Reader::start_eexec(int initial_ascii) int c = _ungot < 0 ? get_base() : _ungot; initial_ascii--; _ungot = -1; - + /* Strictly speaking, I should look for whitespace even in binary sections of PFB fonts; but it turns out some PFBs would be unreadable with that pedantic rule. */ while (isspace(c) && (initial_ascii >= 0 || !preserve_whitespace())) c = get_base(), initial_ascii--; - + /* Differentiate between ASCII eexec and binary eexec. */ int rand_bytes[4]; _binary_eexec = false; @@ -181,7 +181,7 @@ Type1Reader::start_eexec(int initial_ascii) if (!isxdigit(c)) _binary_eexec = true; } - + _r = t1R_ee; if (_binary_eexec) for (int i = 0; i < 4; i++) @@ -202,18 +202,18 @@ Type1Reader::test_charstring(StringAccum &str) { /* PERFORMANCE NOTE: This function is definitely a bottleneck. Making it more efficient cut time by about 40%. */ - + if (!_charstring_definer) return false; if (_charstring_len >= 0) return str.length() <= _charstring_start + _charstring_len; - + str.append('\0'); // protect against running off end of string char *s = str.data(); char *start; while (*s == ' ') s++; - + if (s[0] == '/') s++; else if (s[0] == 'd' && s[1] == 'u' && s[2] == 'p' && isspace((unsigned char) s[3])) { @@ -236,12 +236,12 @@ Type1Reader::test_charstring(StringAccum &str) s++; if (strncmp(s, _charstring_definer.c_str(), _charstring_definer.length()) != 0) goto not_charstring; - + _charstring_len = strtol(start, 0, 10); _charstring_start = (s - str.data()) + _charstring_definer.length(); str.pop_back(); return str.length() <= _charstring_start + _charstring_len; - + not_charstring: str.pop_back(); return false; @@ -258,7 +258,7 @@ Type1Reader::next_line(StringAccum &s) { if (_len < 0) return false; - + // Can't be a charstring if incoming accumulator has nonzero length. _charstring_start = 0; _charstring_len = (s.length() > 0 ? 0 : -1); @@ -268,7 +268,7 @@ Type1Reader::next_line(StringAccum &s) for (int c = first_char; c >= 0; c = get()) switch (c) { - + case '\n': if (test_charstring(s)) goto normal; @@ -276,7 +276,7 @@ Type1Reader::next_line(StringAccum &s) _crlf = 0; goto done; } - + case '\r': // check for \r\n (counts as only one line ending) if (test_charstring(s)) @@ -287,14 +287,14 @@ Type1Reader::next_line(StringAccum &s) else _crlf = 2; goto done; - + normal: default: s.append((char)c); break; - + } - + done: return true; } @@ -359,25 +359,25 @@ Type1PFBReader::more_data(unsigned char *data, int len) int c = getc(_f); if (c != 128) return -1; - + c = getc(_f); if (c == 3 || c < 1 || c > 3) return -1; _binary = (c == 2); - + _left = getc(_f); _left |= getc(_f) << 8; _left |= getc(_f) << 16; _left |= getc(_f) << 24; } - + if (_left < 0) return -1; - + if (len > _left) len = _left; _left -= len; - + return fread(data, 1, len, _f); } diff --git a/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc b/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc index a976155341e..f3e788d5d94 100644 --- a/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc +++ b/Build/source/texk/lcdf-typetools/libefont/t1unparser.cc @@ -78,7 +78,7 @@ CharstringUnparser::type2_command(int cmd, const unsigned char *data, int *left) _start_of_line = false; } else _sa << ' '; - + if (cmd >= 0 && cmd <= Cs::cLastCommand) _sa << Cs::command_names[cmd]; else @@ -90,7 +90,7 @@ CharstringUnparser::type2_command(int cmd, const unsigned char *data, int *left) CharstringInterp::type2_command(cmd, data, left); break; } - + if (_one_command_per_line) { _sa << '\n'; _start_of_line = true; diff --git a/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc b/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc index 1a08e1f85a8..d1c25846882 100644 --- a/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc +++ b/Build/source/texk/lcdf-typetools/libefont/ttfcs.cc @@ -32,7 +32,7 @@ TrueTypeBoundsCharstringProgram::TrueTypeBoundsCharstringProgram(const OpenType: OpenType::Data maxp(otf->table("maxp")); if (maxp.length() >= 6) _nglyphs = maxp.u16(4); - + OpenType::Head head(otf->table("head"), 0); if (head.ok()) { _loca_long = head.index_to_loc_format() != 0; @@ -47,23 +47,23 @@ TrueTypeBoundsCharstringProgram::TrueTypeBoundsCharstringProgram(const OpenType: // horizontal metrics OpenType::Data hhea(_otf->table("hhea")); // HHEA format: - // 0 Fixed Table version number 0x00010000 for version 1.0. - // 4 FWORD Ascender - // 6 FWORD Descender - // 8 FWORD LineGap - // 10 UFWORD advanceWidthMax - // 12 FWORD minLeftSideBearing - // 14 FWORD minRightSideBearing - // 16 FWORD xMaxExtent - // 18 SHORT caretSlopeRise - // 20 SHORT caretSlopeRun - // 22 SHORT caretOffset - // 24 SHORT (reserved) - // 26 SHORT (reserved) - // 28 SHORT (reserved) - // 30 SHORT (reserved) - // 32 SHORT metricDataFormat - // 34 USHORT numberOfHMetrics + // 0 Fixed Table version number 0x00010000 for version 1.0. + // 4 FWORD Ascender + // 6 FWORD Descender + // 8 FWORD LineGap + // 10 UFWORD advanceWidthMax + // 12 FWORD minLeftSideBearing + // 14 FWORD minRightSideBearing + // 16 FWORD xMaxExtent + // 18 SHORT caretSlopeRise + // 20 SHORT caretSlopeRun + // 22 SHORT caretOffset + // 24 SHORT (reserved) + // 26 SHORT (reserved) + // 28 SHORT (reserved) + // 30 SHORT (reserved) + // 32 SHORT metricDataFormat + // 34 USHORT numberOfHMetrics if (hhea.length() >= 36 && hhea.u32(0) == 0x10000) _nhmtx = hhea.u16(34); @@ -95,7 +95,7 @@ TrueTypeBoundsCharstringProgram::glyph_name(int gi) const // generate glyph names based on what pdftex can understand if (gi == 0) return PermString(".notdef"); - + // try 'post' table glyph names if (!_got_glyph_names) { OpenType::Post post(_otf->table("post")); diff --git a/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc b/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc index 9f41714fc3d..be415c1ad0d 100644 --- a/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc +++ b/Build/source/texk/lcdf-typetools/libefont/ttfhead.cc @@ -29,30 +29,30 @@ namespace Efont { namespace OpenType { Head::Head(const String &s, ErrorHandler *errh) : _d(s) { - _error = parse_header(errh ? errh : ErrorHandler::ignore_handler()); + _error = parse_header(errh ? errh : ErrorHandler::silent_handler()); } int Head::parse_header(ErrorHandler *errh) { // HEAD format: - // 0 Fixed Table version number 0x00010000 (ver. 1.0) - // 4 Fixed fontRevision - // 8 ULONG checkSumAdjustment - // 12 ULONG magicNumber Set to 0x5F0F3CF5 - // 16 USHORT flags - // 18 USHORT unitsPerEm - // 20 LONGDATETIME created - // 28 LONGDATETIME modified - // 36 USHORT xMin - // 38 SHORT yMin - // 40 SHORT xMax - // 42 SHORT yMax - // 44 USHORT macStyle - // 46 USHORT lowestRecPPEM - // 48 SHORT fontDirectionHint - // 50 SHORT indexToLocFormat - // 52 SHORT glyphDataFormat + // 0 Fixed Table version number 0x00010000 (ver. 1.0) + // 4 Fixed fontRevision + // 8 ULONG checkSumAdjustment + // 12 ULONG magicNumber Set to 0x5F0F3CF5 + // 16 USHORT flags + // 18 USHORT unitsPerEm + // 20 LONGDATETIME created + // 28 LONGDATETIME modified + // 36 USHORT xMin + // 38 SHORT yMin + // 40 SHORT xMax + // 42 SHORT yMax + // 44 USHORT macStyle + // 46 USHORT lowestRecPPEM + // 48 SHORT fontDirectionHint + // 50 SHORT indexToLocFormat + // 52 SHORT glyphDataFormat int len = _d.length(); const uint8_t *data = _d.udata(); if (len == 0) diff --git a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am index 6531d5186e5..4059860d0cc 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am +++ b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.am @@ -1,12 +1,11 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - noinst_LIBRARIES = liblcdf.a liblcdf_a_SOURCES = bezier.cc \ clp.c \ error.cc \ filename.cc \ + fixlibc.c \ globmatch.cc \ landmark.cc \ md5.c \ @@ -19,14 +18,11 @@ liblcdf_a_SOURCES = bezier.cc \ transform.cc \ vectorv.cc -liblcdf_a_DEPENDENCIES = @FIXLIBC_O@ -liblcdf_a_LIBADD = @FIXLIBC_O@ @TEMPLATE_OBJS@ +liblcdf_a_LIBADD = @TEMPLATE_OBJS@ CLEANFILES = @TEMPLATE_OBJS@ INCLUDES = -I$(top_srcdir)/include -EXTRA_DIST = fixlibc.c - srclinks: test -d $(top_srcdir)/include || mkdir $(top_srcdir)/include test -d $(top_srcdir)/include/lcdf || mkdir $(top_srcdir)/include/lcdf diff --git a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in index 9acdcfd9c47..e0fe8d0f541 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in +++ b/Build/source/texk/lcdf-typetools/liblcdf/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,37 +30,55 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = liblcdf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru liblcdf_a_AR = $(AR) $(ARFLAGS) +liblcdf_a_DEPENDENCIES = am_liblcdf_a_OBJECTS = bezier.$(OBJEXT) clp.$(OBJEXT) error.$(OBJEXT) \ - filename.$(OBJEXT) globmatch.$(OBJEXT) landmark.$(OBJEXT) \ - md5.$(OBJEXT) permstr.$(OBJEXT) point.$(OBJEXT) \ - slurper.$(OBJEXT) straccum.$(OBJEXT) string.$(OBJEXT) \ - strtonum.$(OBJEXT) transform.$(OBJEXT) vectorv.$(OBJEXT) + filename.$(OBJEXT) fixlibc.$(OBJEXT) globmatch.$(OBJEXT) \ + landmark.$(OBJEXT) md5.$(OBJEXT) permstr.$(OBJEXT) \ + point.$(OBJEXT) slurper.$(OBJEXT) straccum.$(OBJEXT) \ + string.$(OBJEXT) strtonum.$(OBJEXT) transform.$(OBJEXT) \ + vectorv.$(OBJEXT) liblcdf_a_OBJECTS = $(am_liblcdf_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(liblcdf_a_SOURCES) DIST_SOURCES = $(liblcdf_a_SOURCES) ETAGS = etags @@ -68,6 +86,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -84,29 +103,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -115,6 +145,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -127,20 +158,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -149,6 +189,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -164,12 +205,12 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = liblcdf.a liblcdf_a_SOURCES = bezier.cc \ clp.c \ error.cc \ filename.cc \ + fixlibc.c \ globmatch.cc \ landmark.cc \ md5.c \ @@ -182,21 +223,19 @@ liblcdf_a_SOURCES = bezier.cc \ transform.cc \ vectorv.cc -liblcdf_a_DEPENDENCIES = @FIXLIBC_O@ -liblcdf_a_LIBADD = @FIXLIBC_O@ @TEMPLATE_OBJS@ +liblcdf_a_LIBADD = @TEMPLATE_OBJS@ CLEANFILES = @TEMPLATE_OBJS@ INCLUDES = -I$(top_srcdir)/include -EXTRA_DIST = fixlibc.c all: all-am .SUFFIXES: -.SUFFIXES: .c .cc .o .obj +.SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -238,6 +277,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fixlibc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/landmark.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ @@ -264,6 +304,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -278,12 +325,25 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -382,7 +442,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -425,7 +486,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -440,17 +502,17 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am srclinks: diff --git a/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc b/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc index 54402c90276..4d874695052 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/bezier.cc @@ -235,23 +235,23 @@ generate_bezier(const Point *d, int nd, const Vector<double> ¶meters, a0[i] = left_tangent * B1(parameters[i]); a1[i] = right_tangent * B2(parameters[i]); } - + double c[2][2], x[2]; c[0][0] = c[0][1] = c[1][0] = c[1][1] = x[0] = x[1] = 0.0; - + int last = nd - 1; for (int i = 0; i < nd; i++) { c[0][0] += Point::dot(a0[i], a0[i]); c[0][1] += Point::dot(a0[i], a1[i]); c[1][1] += Point::dot(a1[i], a1[i]); - + Point tmp = d[i] - (d[0] * (B0(parameters[i]) + B1(parameters[i])) + d[last] * (B2(parameters[i]) + B3(parameters[i]))); x[0] += Point::dot(a0[i], tmp); x[1] += Point::dot(a1[i], tmp); } c[1][0] = c[0][1]; - + // compute determinants double det_c0_c1 = c[0][0]*c[1][1] - c[1][0]*c[0][1]; double det_c0_x = c[0][0]*x[1] - c[0][1]*x[0]; @@ -277,7 +277,7 @@ static double newton_raphson_root_find(const Bezier &b, const Point &p, double u) { const Point *b_pts = b.points(); - + Point b_det[3]; for (int i = 0; i < 3; i++) b_det[i] = (b_pts[i+1] - b_pts[i]) * 3; @@ -334,12 +334,12 @@ fit0(const Point *d, int nd, Point left_tangent, Point right_tangent, d[1])); return; } - + // Parameterize points and attempt to fit curve Vector<double> parameters; chord_length_parameterize(d, nd, parameters); Bezier b = generate_bezier(d, nd, parameters, left_tangent, right_tangent); - + // find max error int split_point; double max_error = compute_max_error(d, nd, b, parameters, &split_point); @@ -347,7 +347,7 @@ fit0(const Point *d, int nd, Point left_tangent, Point right_tangent, result.push_back(b); return; } - + // if error not too large, try iteration and reparameterization if (max_error < error*error) for (int i = 0; i < 4; i++) { @@ -359,7 +359,7 @@ fit0(const Point *d, int nd, Point left_tangent, Point right_tangent, return; } } - + // fitting failed -- split at max error point and fit again Point center_tangent = ((d[split_point-1] - d[split_point+1])/2).normal(); fit0(d, split_point+1, left_tangent, center_tangent, error, result); diff --git a/Build/source/texk/lcdf-typetools/liblcdf/clp.c b/Build/source/texk/lcdf-typetools/liblcdf/clp.c index 83321e01c29..11ca85e16da 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/clp.c +++ b/Build/source/texk/lcdf-typetools/liblcdf/clp.c @@ -170,10 +170,10 @@ typedef struct Clp_Internal { Clp_InternOption *iopt; int nopt; unsigned opt_generation; - + Clp_ValType *valtype; int nvaltype; - + const char * const *argv; int argc; @@ -182,22 +182,22 @@ typedef struct Clp_Internal { int long1pos; int long1neg; int utf8; - + char option_chars[Clp_OptionCharsSize]; const char *xtext; - + const char *program_name; void (*error_handler)(Clp_Parser *, const char *); - + int option_processing; int current_option; - + unsigned char is_short; unsigned char whole_negated; /* true if negated by an option character */ unsigned char could_be_short; unsigned char current_short; unsigned char negated_by_no; - + int ambiguous; int ambiguous_values[MAX_AMBIGUOUS_VALUES]; } Clp_Internal; @@ -206,7 +206,7 @@ typedef struct Clp_Internal { struct Clp_ParserState { const char * const *argv; int argc; - + char option_chars[Clp_OptionCharsSize]; const char *xtext; @@ -226,10 +226,10 @@ typedef struct Clp_StringList { Clp_Option *items; Clp_InternOption *iopt; int nitems; - + int allow_int; int nitems_invalid_report; - + } Clp_StringList; @@ -379,13 +379,13 @@ compare_options(Clp_Parser *clp, const Clp_Option *o1, Clp_InternOption *io1, { Clp_Internal *cli = clp->internal; int short1, shortx1; - + /* ignore meaningless combinations */ if ((!io1->ishort && !io1->ilong) || (!io2->ishort && !io2->ilong) || !((io1->ipos && io2->ipos) || (io1->ineg && io2->ineg)) || o1->option_id == o2->option_id) return; - + /* look for duplication of short options */ short1 = (io1->ishort ? o1->short_name : -1); shortx1 = long_as_short(cli, o1, io1, -2); @@ -479,13 +479,13 @@ Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *op clp->vstr = 0; clp->user_data = 0; clp->internal = cli; - + cli->opt = opt; cli->nopt = nopt; cli->iopt = iopt; cli->opt_generation = 0; cli->error_handler = 0; - + /* Assign program name (now so we can call Clp_OptionError) */ if (argc > 0) { const char *slash = strrchr(argv[0], '/'); @@ -512,19 +512,19 @@ Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *op if (!cli->valtype) goto failed; cli->nvaltype = 0; - + Clp_AddType(clp, Clp_ValString, 0, parse_string, 0); Clp_AddType(clp, Clp_ValStringNotOption, Clp_DisallowOptions, parse_string, 0); Clp_AddType(clp, Clp_ValInt, 0, parse_int, 0); Clp_AddType(clp, Clp_ValUnsigned, 0, parse_int, (void *)cli); Clp_AddType(clp, Clp_ValBool, 0, parse_bool, 0); Clp_AddType(clp, Clp_ValDouble, 0, parse_double, 0); - + /* Set options */ Clp_SetOptions(clp, nopt, opt); - + return clp; - + failed: if (cli && cli->valtype) free(cli->valtype); @@ -547,9 +547,9 @@ Clp_DeleteParser(Clp_Parser *clp) Clp_Internal *cli; if (!clp) return; - + cli = clp->internal; - + /* get rid of any string list types */ for (i = 0; i < cli->nvaltype; i++) if (cli->valtype[i].func == parse_string_list) { @@ -558,7 +558,7 @@ Clp_DeleteParser(Clp_Parser *clp) free(clsl->iopt); free(clsl); } - + free(cli->valtype); free(cli->iopt); free(cli); @@ -720,7 +720,7 @@ Clp_SetOptionChar(Clp_Parser *clp, int c, int type) &cli->opt[j], &cli->iopt[j]); } } - + return old; } @@ -772,7 +772,7 @@ Clp_SetOptions(Clp_Parser *clp, int nopt, const Clp_Option *opt) cli->opt_generation = ++opt_generation; iopt = cli->iopt; cli->current_option = -1; - + /* Massage the options to make them usable */ for (i = 0; i < nopt; i++) { /* Ignore negative option_ids, which are internal to CLP */ @@ -792,7 +792,7 @@ Clp_SetOptions(Clp_Parser *clp, int nopt, const Clp_Option *opt) iopt[i].ioptional = (opt[i].flags & Clp_Optional) != 0; iopt[i].iprefmatch = (opt[i].flags & Clp_PreferredMatch) != 0; iopt[i].ilongoff = 0; - + /* Enforce invariants */ if (opt[i].val_type <= 0) iopt[i].imandatory = iopt[i].ioptional = 0; @@ -844,7 +844,7 @@ void Clp_SetArguments(Clp_Parser *clp, int argc, const char * const *argv) { Clp_Internal *cli = clp->internal; - + cli->argc = argc + 1; cli->argv = argv - 1; @@ -886,7 +886,7 @@ argcmp(const char *ref, const char *arg, int min_match, int fewer_dashes) Returns len if ref and arg match min_match or more characters; len is the number of characters that matched in arg. Allows arg to contain fewer dashes than ref iff fewer_dashes != 0. - + Examples: argcmp("x", "y", 1, 0) --> 0 / just plain wrong argcmp("a", "ax", 1, 0) --> 0 / ...even though min_match == 1 @@ -898,7 +898,7 @@ argcmp(const char *ref, const char *arg, int min_match, int fewer_dashes) const char *refstart = ref; const char *argstart = arg; assert(min_match > 0); - + compare: while (*ref && *arg && *arg != '=' && *ref == *arg) ref++, arg++; @@ -908,7 +908,7 @@ argcmp(const char *ref, const char *arg, int min_match, int fewer_dashes) ref++; goto compare; } - + if (*arg && *arg != '=') return 0; else if (ref - refstart < min_match) @@ -936,7 +936,7 @@ find_prefix_opt(Clp_Parser *clp, const char *arg, int len, lmm; if (!iopt[i].ilong || (negated ? !iopt[i].ineg : !iopt[i].ipos)) continue; - + lmm = (negated ? iopt[i].lmmneg : iopt[i].lmmpos); if (clp && clp->internal->could_be_short && (negated ? iopt[i].lmmneg_short : iopt[i].lmmpos_short)) @@ -956,7 +956,7 @@ find_prefix_opt(Clp_Parser *clp, const char *arg, fewer_dashes = 1; goto retry; } - + return -1; } @@ -1018,12 +1018,12 @@ Clp_AddType(Clp_Parser *clp, int val_type, int flags, { Clp_Internal *cli = clp->internal; int vtpos; - + if (val_type <= 0 || !parser) return -1; - + vtpos = val_type_binsearch(cli, val_type); - + if (vtpos == cli->nvaltype || cli->valtype[vtpos].val_type != val_type) { if (cli->nvaltype != 0 && (cli->nvaltype % Clp_InitialValType) == 0) { Clp_ValType *new_valtype = @@ -1120,11 +1120,11 @@ parse_bool(Clp_Parser *clp, const char *arg, int complain, void *user_data) (void)user_data; if (strlen(arg) > 5 || strchr(arg, '=') != 0) goto error; - + for (i = 0; arg[i] != 0; i++) lcarg[i] = tolower((unsigned char) arg[i]); lcarg[i] = 0; - + if (argcmp("yes", lcarg, 1, 0) > 0 || argcmp("true", lcarg, 1, 0) > 0 || argcmp("1", lcarg, 1, 0) > 0) { @@ -1136,7 +1136,7 @@ parse_bool(Clp_Parser *clp, const char *arg, int complain, void *user_data) clp->val.i = 0; return 1; } - + error: if (complain) Clp_OptionError(clp, "%`%O%' expects a true-or-false value, not %`%s%'", arg); @@ -1154,7 +1154,7 @@ parse_string_list(Clp_Parser *clp, const char *arg, int complain, void *user_dat Clp_StringList *sl = (Clp_StringList *)user_data; int idx, ambiguous = 0; int ambiguous_values[MAX_AMBIGUOUS_VALUES + 1]; - + /* actually look for a string value */ idx = find_prefix_opt (0, arg, sl->nitems, sl->items, sl->iopt, @@ -1163,12 +1163,12 @@ parse_string_list(Clp_Parser *clp, const char *arg, int complain, void *user_dat clp->val.i = sl->items[idx].option_id; return 1; } - + if (sl->allow_int) { if (parse_int(clp, arg, 0, 0)) return 1; } - + if (complain) { const char *complaint = (ambiguous ? "ambiguous" : "invalid"); if (!ambiguous) { @@ -1193,7 +1193,7 @@ finish_string_list(Clp_Parser *clp, int val_type, int flags, Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nitems); if (!clsl || !iopt) goto error; - + clsl->items = items; clsl->iopt = iopt; clsl->nitems = nitems; @@ -1206,7 +1206,7 @@ finish_string_list(Clp_Parser *clp, int val_type, int flags, clsl->nitems_invalid_report = MAX_AMBIGUOUS_VALUES + 1; else clsl->nitems_invalid_report = nitems; - + for (i = 0; i < nitems; i++) { iopt[i].ilong = iopt[i].ipos = 1; iopt[i].ishort = iopt[i].ineg = iopt[i].ilongoff = iopt[i].iprefmatch = 0; @@ -1216,7 +1216,7 @@ finish_string_list(Clp_Parser *clp, int val_type, int flags, for (i = 0; i < nitems; i++) for (j = 0; j < nitems; j++) compare_options(clp, &items[i], &iopt[i], &items[j], &iopt[j]); - + if (Clp_AddType(clp, val_type, 0, parse_string_list, clsl) >= 0) return 0; @@ -1259,13 +1259,13 @@ Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...) int nitems = 0; int itemscap = 5; Clp_Option *items = (Clp_Option *)malloc(sizeof(Clp_Option) * itemscap); - + va_list val; va_start(val, flags); - + if (!items) goto error; - + /* slurp up the arguments */ while (1) { int value; @@ -1273,7 +1273,7 @@ Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...) if (!name) break; value = va_arg(val, int); - + if (nitems >= itemscap) { Clp_Option *new_items; itemscap *= 2; @@ -1282,7 +1282,7 @@ Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...) goto error; items = new_items; } - + items[nitems].long_name = name; items[nitems].option_id = value; items[nitems].flags = 0; @@ -1292,7 +1292,7 @@ Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags, ...) va_end(val); if (finish_string_list(clp, val_type, flags, items, nitems, itemscap) >= 0) return 0; - + error: va_end(val); if (items) @@ -1350,14 +1350,14 @@ Clp_AddStringListTypeVec(Clp_Parser *clp, int val_type, int flags, Clp_Option *items = (Clp_Option *)malloc(sizeof(Clp_Option) * itemscap); if (!items) return -1; - + /* copy over items */ for (i = 0; i < nstrs; i++) { items[i].long_name = strs[i]; items[i].option_id = vals[i]; items[i].flags = 0; } - + if (finish_string_list(clp, val_type, flags, items, nstrs, itemscap) >= 0) return 0; else { @@ -1537,7 +1537,7 @@ next_argument(Clp_Parser *clp, int want_argument) want_argument == 1: Accept arguments that start with Clp_NotOption or Clp_LongImplicit. want_argument == 2: Accept ALL arguments. - + Where is the option stored when this returns? Well, cli->argv[0] holds the whole of the next command line argument. cli->option_chars holds a string: what characters began the option? @@ -1554,7 +1554,7 @@ next_argument(Clp_Parser *clp, int want_argument) clp->have_val = 0; clp->vstr = 0; cli->could_be_short = 0; - + /* if we're in a string of short options, move up one char in the string */ if (cli->is_short) { cli->xtext += clp_utf8_charlen(cli, cli->xtext); @@ -1571,31 +1571,31 @@ next_argument(Clp_Parser *clp, int want_argument) return 0; } } - + /* if in short options, we're all set */ if (cli->is_short) return 1; - + /** if not in short options, move to the next argument **/ cli->whole_negated = 0; cli->xtext = 0; - + if (cli->argc <= 1) return 0; - + cli->argc--; cli->argv++; text = cli->argv[0]; - + if (want_argument > 1) goto not_option; - + if (text[0] == '-' && text[1] == '-') { oclass = Clp_DoubledLong; ocharskip = 2; } else oclass = get_oclass(clp, text, &ocharskip); - + /* If this character could introduce either a short or a long option, try a long option first, but remember that short's a possibility for later. */ @@ -1605,25 +1605,25 @@ next_argument(Clp_Parser *clp, int want_argument) if (text[ocharskip]) cli->could_be_short = 1; } - + switch (oclass) { - + case Clp_Short: cli->is_short = 1; goto check_singleton; - + case Clp_ShortNegated: cli->is_short = 1; cli->whole_negated = 1; goto check_singleton; - + case Clp_Long: goto check_singleton; - + case Clp_LongNegated: cli->whole_negated = 1; goto check_singleton; - + check_singleton: /* For options introduced with one character, option-char, '[option-char]' alone is NOT an option. */ @@ -1631,7 +1631,7 @@ next_argument(Clp_Parser *clp, int want_argument) goto not_option; set_option_text(cli, text, ocharskip); break; - + case Clp_LongImplicit: /* LongImplict: option_chars == "" (since all chars are part of the option); restore head -> text of option */ @@ -1639,23 +1639,23 @@ next_argument(Clp_Parser *clp, int want_argument) goto not_option; set_option_text(cli, text, 0); break; - + case Clp_DoubledLong: set_option_text(cli, text, ocharskip); break; - - not_option: + + not_option: case Clp_NotOption: cli->is_short = 0; clp->have_val = 1; clp->vstr = text; return 0; - + default: assert(0 /* CLP misconfiguration: bad option type */); - + } - + return 1; } @@ -1685,14 +1685,14 @@ find_long(Clp_Parser *clp, const char *arg) const Clp_Option *opt = cli->opt; const Clp_InternOption *iopt; int first_negative_ambiguous; - + /* Look for a normal option. */ optno = find_prefix_opt (clp, arg, cli->nopt, opt, cli->iopt, &cli->ambiguous, cli->ambiguous_values); if (optno >= 0) goto worked; - + /* If we can't find it, look for a negated option. */ /* I know this is silly, but it makes me happy to accept --no-no-option as a double negative synonym for --option. :) */ @@ -1706,7 +1706,7 @@ find_long(Clp_Parser *clp, const char *arg) if (optno >= 0) goto worked; } - + /* No valid option was found; return 0. Mark the ambiguous values found through '--no' by making them negative. */ { @@ -1716,7 +1716,7 @@ find_long(Clp_Parser *clp, const char *arg) cli->ambiguous_values[i] = -cli->ambiguous_values[i] - 1; } return -1; - + worked: iopt = &cli->iopt[optno]; lmm = (clp->negated ? iopt->lmmneg : iopt->lmmpos); @@ -1747,12 +1747,12 @@ find_short(Clp_Parser *clp, const char *text) c = decode_utf8(text, 0); else c = (unsigned char) *text; - + for (i = 0; i < cli->nopt; i++) if (iopt[i].ishort && opt[i].short_name == c && (clp->negated ? iopt[i].ineg : iopt[i].ipos)) return i; - + return -1; } @@ -1807,23 +1807,23 @@ Clp_Next(Clp_Parser *clp) const Clp_Option *opt; Clp_ParserState clpsave; int vtpos, complain; - + /* Set up clp */ cli->current_option = -1; cli->ambiguous = 0; - + /* Get the next argument or option */ if (!next_argument(clp, cli->option_processing ? 0 : 2)) { clp->val.s = clp->vstr; return clp->have_val ? Clp_NotOption : Clp_Done; } - + clp->negated = cli->whole_negated; if (cli->is_short) optno = find_short(clp, cli->xtext); else optno = find_long(clp, cli->xtext); - + /* If there's ambiguity between long & short options, and we couldn't find a long option, look for a short option */ if (optno < 0 && cli->could_be_short) { @@ -1855,12 +1855,12 @@ Clp_Next(Clp_Parser *clp) return Clp_BadOption; } - + /* Set the current option */ cli->current_option = optno; cli->current_short = cli->is_short; cli->negated_by_no = clp->negated && !cli->whole_negated; - + /* The no-argument (or should-have-no-argument) case */ if (clp->negated || (!cli->iopt[optno].imandatory && !cli->iopt[optno].ioptional)) { @@ -1870,7 +1870,7 @@ Clp_Next(Clp_Parser *clp) } else return cli->opt[optno].option_id; } - + /* Get an argument if we need one, or if it's optional */ /* Sanity-check the argument type. */ opt = &cli->opt[optno]; @@ -1879,12 +1879,12 @@ Clp_Next(Clp_Parser *clp) vtpos = val_type_binsearch(cli, opt->val_type); if (vtpos == cli->nvaltype || cli->valtype[vtpos].val_type != opt->val_type) return Clp_Error; - + /* complain == 1 only if the argument was explicitly given, or it is mandatory. */ complain = (clp->have_val != 0) || cli->iopt[optno].imandatory; Clp_SaveParser(clp, &clpsave); - + if (cli->iopt[optno].imandatory && !clp->have_val) { /* Mandatory argument case */ /* Allow arguments to options to start with a dash, but only if the @@ -1900,13 +1900,13 @@ Clp_Next(Clp_Parser *clp) Clp_OptionError(clp, "%`%O%' requires an argument"); return Clp_BadOption; } - + } else if (cli->is_short && !clp->have_val && cli->xtext[clp_utf8_charlen(cli, cli->xtext)]) /* The -[option]argument case: Assume that the rest of the current string is the argument. */ next_argument(clp, 1); - + /* Parse the argument */ if (clp->have_val) { Clp_ValType *atr = &cli->valtype[vtpos]; @@ -1919,7 +1919,7 @@ Clp_Next(Clp_Parser *clp) Clp_RestoreParser(clp, &clpsave); } } - + return opt->option_id; } @@ -2023,7 +2023,7 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, Clp_Internal *cli = clp->internal; const char *percent; int c; - + if (!bs) bs = new_build_string(); if (!bs) @@ -2032,11 +2032,11 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, append_build_string(bs, cli->program_name, -1); append_build_string(bs, ": ", 2); } - + for (percent = strchr(fmt, '%'); percent; percent = strchr(fmt, '%')) { append_build_string(bs, fmt, percent - fmt); switch (*++percent) { - + case 's': { const char *s = va_arg(val, const char *); if (s) @@ -2077,7 +2077,7 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, } } break; - + case 'd': { int d = va_arg(val, int); if (ENSURE_BUILD_STRING(bs, 32)) { @@ -2086,7 +2086,7 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, } break; } - + case 'O': { int optno = cli->current_option; const Clp_Option *opt = &cli->opt[optno]; @@ -2110,7 +2110,7 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, } break; } - + case '%': if (ENSURE_BUILD_STRING(bs, 1)) *bs->pos++ = '%'; @@ -2119,25 +2119,25 @@ Clp_VaOptionError(Clp_Parser *clp, Clp_BuildString *bs, case '`': append_build_string(bs, (cli->utf8 ? "\342\200\230" : "'"), -1); break; - + case '\'': append_build_string(bs, (cli->utf8 ? "\342\200\231" : "'"), -1); break; - + default: if (ENSURE_BUILD_STRING(bs, 2)) { *bs->pos++ = '%'; *bs->pos++ = *percent; } break; - + } fmt = ++percent; } - + append_build_string(bs, fmt, -1); append_build_string(bs, "\n", 1); - + return bs; } diff --git a/Build/source/texk/lcdf-typetools/liblcdf/error.cc b/Build/source/texk/lcdf-typetools/liblcdf/error.cc index 2602f460bca..dea40b63fd6 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/error.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/error.cc @@ -1,10 +1,11 @@ -// -*- c-basic-offset: 2; related-file-name: "../include/lcdf/error.hh" -*- +// -*- related-file-name: "../include/lcdf/error.hh" -*- /* * error.{cc,hh} -- flexible classes for error reporting * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2006 Eddie Kohler + * Copyright (c) 2001-2008 Eddie Kohler + * Copyright (c) 2008 Meraki, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -28,738 +29,1030 @@ #include <algorithm> #ifndef __KERNEL__ # include <stdlib.h> +# if HAVE_UNISTD_H +# include <unistd.h> +# endif #endif +/** @file error.hh + * @brief Flexible error handling classes. + */ + struct ErrorHandler::Conversion { - String name; - ConversionHook hook; - Conversion *next; + String name; + ConversionFunction hook; + Conversion *next; }; static ErrorHandler::Conversion *error_items; -const int ErrorHandler::OK_RESULT = 0; -const int ErrorHandler::ERROR_RESULT = -EINVAL; +const char ErrorHandler::e_abort[] = "<-999>"; +const char ErrorHandler::e_fatal[] = "<-1>"; +const char ErrorHandler::e_emergency[] = "<0>"; +const char ErrorHandler::e_alert[] = "<1>"; +const char ErrorHandler::e_critical[] = "<2>"; +const char ErrorHandler::e_error[] = "<3>"; +const char ErrorHandler::e_warning[] = "<4>"; +const char ErrorHandler::e_warning_annotated[] = "<4>warning: "; +const char ErrorHandler::e_notice[] = "<5>"; +const char ErrorHandler::e_info[] = "<6>"; +const char ErrorHandler::e_debug[] = "<7>"; -int -ErrorHandler::min_verbosity() const -{ - return 0; -} +const int ErrorHandler::ok_result = 0; +const int ErrorHandler::error_result = -EINVAL; -void -ErrorHandler::debug(const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_DEBUG, String(), format, val); - va_end(val); -} +ErrorHandler *ErrorHandler::the_default_handler = 0; +ErrorHandler *ErrorHandler::the_silent_handler = 0; -void -ErrorHandler::message(const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_MESSAGE, String(), format, val); - va_end(val); -} -int -ErrorHandler::warning(const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_WARNING, String(), format, val); - va_end(val); - return ERROR_RESULT; -} +// ANNOTATION MANAGEMENT -int -ErrorHandler::error(const char *format, ...) +static const char * +parse_level(const char *begin, const char *end, int *result) { - va_list val; - va_start(val, format); - verror(ERR_ERROR, String(), format, val); - va_end(val); - return ERROR_RESULT; + int x = 0; + const char *s = begin; + + bool negative = false; + if (s != end && *s == '-') { + negative = true; + ++s; + } else if (s != end && *s == '+') + ++s; + + const char *digits = s; + for (; s != end && *s >= '0' && *s <= '9'; ++s) + x = x * 10 + *s - '0'; + + if (s != end && *s == '.') + for (++s; s != end && *s >= '0' && *s <= '9'; ++s) + /* nada */; + + if (s == digits || (s == digits + 1 && s[-1] == '.')) + return begin; + if (result) + *result = (negative ? -x : x); + return s; } -int -ErrorHandler::fatal(const char *format, ...) +String +ErrorHandler::make_anno(const char *name, const String &value) { - va_list val; - va_start(val, format); - verror(ERR_FATAL, String(), format, val); - va_end(val); - return ERROR_RESULT; -} + StringAccum sa; + sa.reserve(value.length() + 10); + + // level annotation requires special handling + if (name[0] == '<' && name[1] == '>' && name[2] == 0) { + if (parse_level(value.begin(), value.end(), 0) == value.end()) { + sa << '<' << value << '>'; + return sa.take_string(); + } else + return String(); + } -int -ErrorHandler::fatal(int exit_status, const char *format, ...) -{ - assert(exit_status >= 0 && exit_status < 0x1000); - va_list val; - va_start(val, format); - verror((Seriousness) (ERR_MIN_FATAL + (exit_status << ERRVERBOSITY_SHIFT)), String(), format, val); - va_end(val); - return ERROR_RESULT; + sa << '{' << name << ':'; + const char *last = value.begin(), *end = value.end(); + for (const char *s = value.begin(); s != end; ++s) + if (*s == '\\' || *s == '}') { + sa.append(last, s); + sa << '\\' << *s; + last = s + 1; + } else if (*s == '\n') { + sa.append(last, s); + sa << '\\' << 'n'; + last = s + 1; + } + sa.append(last, end); + sa << '}'; + return sa.take_string(); } -void -ErrorHandler::ldebug(const String &where, const char *format, ...) +const char * +ErrorHandler::skip_anno(const String &str, const char *begin, const char *end, + String *name_result, String *value_result, bool raw) { - va_list val; - va_start(val, format); - verror(ERR_DEBUG, where, format, val); - va_end(val); -} + String name, value; + const char *s = begin; + + if (s + 3 <= end && *s == '<') { + const char *x = parse_level(s + 1, end, 0); + if (x != s + 1 && x != end && *x == '>') { + name = String::make_stable("<>", 2); + if (str) + value = str.substring(begin + 1, x); + begin = x + 1; + } + + } else if (s + 2 <= end && *s == '{' && s[1] == '}') + begin = s + 2; + + else if (s + 3 <= end && *s == '{' && str) { + for (++s; s != end && isalnum((unsigned char) *s); ++s) + /* nada */; + if (s == end || s == begin + 1 || (*s != '}' && *s != ':')) + /* not an annotation */; + else if (*s == '}' && str) { + name = str.substring(begin + 1, s); + begin = s + 1; + } else if (*s == '}') { + name = String::make_stable("{}", 2); + begin = s + 1; + } else if (str) { + const char *x, *last = s + 1; + StringAccum sa; + for (x = s + 1; x != end && *x != '\n' && *x != '}'; ++x) + if (*x == '\\' && x + 1 != end && x[1] != '\n') { + if (!raw) { + sa.append(last, x); + sa << (x[1] == 'n' ? '\n' : x[1]); + last = x + 2; + } + ++x; + } + if (x != end && *x == '}') { + name = str.substring(begin + 1, s); + if (sa) { + sa.append(last, x); + value = sa.take_string(); + } else + value = str.substring(s + 1, x); + begin = x + 1; + } + } else { + const char *x; + for (x = s + 1; x != end && *x != '\n' && *x != '}'; ++x) + if (*x == '\\' && x + 1 != end && x[1] != '\n') + ++x; + if (x != end && *x == '}') { + name = String::make_stable("{}", 2); + begin = x + 1; + } + } + } -void -ErrorHandler::lmessage(const String &where, const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_MESSAGE, where, format, val); - va_end(val); + if (name_result) + *name_result = name; + if (value_result) + *value_result = value; + return begin; } -int -ErrorHandler::lwarning(const String &where, const char *format, ...) +const char * +ErrorHandler::parse_anno(const String &str, const char *begin, const char *end, + ...) { - va_list val; - va_start(val, format); - verror(ERR_WARNING, where, format, val); - va_end(val); - return ERROR_RESULT; -} + const char *names[8]; + void *values[8]; + int nanno = 0; + + va_list val; + va_start(val, end); + while (const char *n = va_arg(val, const char *)) { + assert(nanno < 8); + names[nanno] = n; + if (n[0] == '#') + values[nanno] = va_arg(val, int *); + else + values[nanno] = va_arg(val, String *); + ++nanno; + } -int -ErrorHandler::lerror(const String &where, const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_ERROR, where, format, val); - va_end(val); - return ERROR_RESULT; -} + String name, value; + while (1) { + begin = skip_anno(str, begin, end, &name, &value, false); + if (!name) + break; + for (int i = 0; i < nanno; ++i) + if (names[i][0] == '#') { + if (name == (names[i] + 1)) + parse_level(value.begin(), value.end(), (int *) values[i]); + } else { + if (name == names[i]) + *(String *) values[i] = value; + } + } -int -ErrorHandler::lfatal(const String &where, const char *format, ...) -{ - va_list val; - va_start(val, format); - verror(ERR_FATAL, where, format, val); - va_end(val); - return ERROR_RESULT; + return begin; } -int -ErrorHandler::lfatal(int exit_status, const String &where, const char *format, ...) +String +ErrorHandler::combine_anno(const String &text, const String &anno) { - assert(exit_status >= 0 && exit_status < 0x1000); - va_list val; - va_start(val, format); - verror((Seriousness) (ERR_MIN_FATAL + (exit_status << ERRVERBOSITY_SHIFT)), where, format, val); - va_end(val); - return ERROR_RESULT; + if (!anno) + return text; + + String names[8], values[8]; + int nanno = 0; + const char *abegin = anno.begin(); + while (abegin != anno.end()) { + assert(nanno < 8); + abegin = skip_anno(anno, abegin, anno.end(), &names[nanno], &values[nanno], true); + if (names[nanno]) + ++nanno; + else + break; + } + + const char *last = text.begin(), *s = last; + String name; + StringAccum sa; + while (s != text.end()) { + const char *line = s; + uint32_t mask = (1U << nanno) - 1; + while (1) { + s = skip_anno(text, s, text.end(), &name, 0, false); + if (!name) + break; + for (int i = 0; i < nanno; ++i) + if (name == names[i]) + mask &= ~(1U << i); + } + + if (mask) { + sa.append(last, line); + for (int i = 0; i < nanno; ++i) + if (mask & (1U << i)) { + if (names[i].equals("<>", 2)) + sa << '<' << values[i] << '>'; + else + sa << '{' << names[i] << ':' << values[i] << '}'; + } + last = line; + } + if (abegin != anno.end()) { + sa.append(last, s); + sa.append(abegin, anno.end()); + last = s; + } + + while (s != text.end() && *s != '\n') + ++s; + if (s != text.end()) + ++s; + } + + if (sa) { + sa.append(last, text.end()); + return sa.take_string(); + } else + return text; } String -ErrorHandler::make_text(Seriousness seriousness, const char *format, ...) +ErrorHandler::clean_landmark(const String &landmark, bool with_colon) { - va_list val; - va_start(val, format); - String s = make_text(seriousness, format, val); - va_end(val); - return s; + const char *end = landmark.end(); + while (end != landmark.begin() && isspace((unsigned char) end[-1])) + --end; + if (end != landmark.begin() && end[-1] == ':') + --end; + if (end == landmark.begin()) + return String(); + else if (with_colon) + return landmark.substring(landmark.begin(), end) + ": "; + else + return landmark.substring(landmark.begin(), end); } + +// FORMATTING + #define NUMBUF_SIZE 128 #define ErrH ErrorHandler static char * do_number(unsigned long num, char *after_last, int base, int flags) { - const char *digits = - ((flags & ErrH::UPPERCASE) ? "0123456789ABCDEF" : "0123456789abcdef"); - char *pos = after_last; - while (num) { - *--pos = digits[num % base]; - num /= base; - } - if (pos == after_last) - *--pos = '0'; - return pos; + const char *digits = + ((flags & ErrH::cf_uppercase) ? "0123456789ABCDEF" : "0123456789abcdef"); + char *pos = after_last; + while (num) { + *--pos = digits[num % base]; + num /= base; + } + if (pos == after_last) + *--pos = '0'; + return pos; } static char * do_number_flags(char *pos, char *after_last, int base, int flags, int precision, int field_width) { - // remove ALTERNATE_FORM for zero results in base 16 - if ((flags & ErrH::ALTERNATE_FORM) && base == 16 && *pos == '0') - flags &= ~ErrH::ALTERNATE_FORM; - - // account for zero padding - if (precision >= 0) - while (after_last - pos < precision) - *--pos = '0'; - else if (flags & ErrH::ZERO_PAD) { - if ((flags & ErrH::ALTERNATE_FORM) && base == 16) - field_width -= 2; - if ((flags & ErrH::NEGATIVE) - || (flags & (ErrH::PLUS_POSITIVE | ErrH::SPACE_POSITIVE))) - field_width--; - while (after_last - pos < field_width) - *--pos = '0'; - } - - // alternate forms - if ((flags & ErrH::ALTERNATE_FORM) && base == 8 && pos[1] != '0') - *--pos = '0'; - else if ((flags & ErrH::ALTERNATE_FORM) && base == 16) { - *--pos = ((flags & ErrH::UPPERCASE) ? 'X' : 'x'); - *--pos = '0'; - } - - // sign - if (flags & ErrH::NEGATIVE) - *--pos = '-'; - else if (flags & ErrH::PLUS_POSITIVE) - *--pos = '+'; - else if (flags & ErrH::SPACE_POSITIVE) - *--pos = ' '; - - return pos; + // remove cf_alternate_form for zero results in base 16 + if ((flags & ErrH::cf_alternate_form) && base == 16 && *pos == '0') + flags &= ~ErrH::cf_alternate_form; + + // account for zero padding + if (precision >= 0) + while (after_last - pos < precision) + *--pos = '0'; + else if (flags & ErrH::cf_zero_pad) { + if ((flags & ErrH::cf_alternate_form) && base == 16) + field_width -= 2; + if ((flags & ErrH::cf_negative) + || (flags & (ErrH::cf_plus_positive | ErrH::cf_space_positive))) + field_width--; + while (after_last - pos < field_width) + *--pos = '0'; + } + + // alternate forms + if ((flags & ErrH::cf_alternate_form) && base == 8 && pos[1] != '0') + *--pos = '0'; + else if ((flags & ErrH::cf_alternate_form) && base == 16) { + *--pos = ((flags & ErrH::cf_uppercase) ? 'X' : 'x'); + *--pos = '0'; + } + + // sign + if (flags & ErrH::cf_negative) + *--pos = '-'; + else if (flags & ErrH::cf_plus_positive) + *--pos = '+'; + else if (flags & ErrH::cf_space_positive) + *--pos = ' '; + + return pos; } String -ErrorHandler::make_text(Seriousness seriousness, const char *s, va_list val) -{ - StringAccum msg; - - char numbuf[NUMBUF_SIZE]; // for numerics - numbuf[NUMBUF_SIZE-1] = 0; - - String placeholder; // to ensure temporaries aren't destroyed - - // prepend 'warning: ' to every line if appropriate - String begin_lines; - if (seriousness >= ERR_MIN_WARNING && seriousness < ERR_MIN_ERROR) { - begin_lines = String::stable_string("warning: ", 9); - msg << begin_lines; - } - - // declare and initialize these here to make gcc shut up about possible - // use before initialization - int flags = 0; - int field_width = -1; - int precision = -1; - int width_flag = 0; - int base = 10; - while (1) { - - const char *pct = strchr(s, '%'); - - // handle begin_lines - const char *nl; - while (begin_lines && (nl = strchr(s, '\n')) && (!pct || nl < pct)) { - msg.append(s, nl + 1 - s); - if (nl[1]) - msg.append(begin_lines.data(), begin_lines.length()); - s = nl + 1; - } - - if (!pct) { - if (*s) - msg << s; - break; - } - if (pct != s) { - msg.append(s, pct - s); - s = pct; - } - - // parse flags - flags = 0; - flags: - switch (*++s) { - case '#': flags |= ALTERNATE_FORM; goto flags; - case '0': flags |= ZERO_PAD; goto flags; - case '-': flags |= LEFT_JUST; goto flags; - case ' ': flags |= SPACE_POSITIVE; goto flags; - case '+': flags |= PLUS_POSITIVE; goto flags; - } - - // parse field width - field_width = -1; - if (*s == '*') { - field_width = va_arg(val, int); - if (field_width < 0) { - field_width = -field_width; - flags |= LEFT_JUST; - } - s++; - } else if (*s >= '0' && *s <= '9') - for (field_width = 0; *s >= '0' && *s <= '9'; s++) - field_width = 10*field_width + *s - '0'; - - // parse precision - precision = -1; - if (*s == '.') { - s++; - precision = 0; - if (*s == '*') { - precision = va_arg(val, int); - s++; - } else if (*s >= '0' && *s <= '9') - for (; *s >= '0' && *s <= '9'; s++) - precision = 10*precision + *s - '0'; - } - - // parse width flags - width_flag = 0; - width_flags: - switch (*s) { - case 'h': - width_flag = 'h'; s++; goto width_flags; - case 'l': - width_flag = (width_flag == 'l' ? 'q' : 'l'); s++; goto width_flags; - case 'L': case 'q': - width_flag = 'q'; s++; goto width_flags; - } - - // conversion character - // after switch, data lies between `s1' and `s2' - const char *s1 = 0, *s2 = 0; - base = 10; - switch (*s++) { - - case 's': { - s1 = va_arg(val, const char *); - if (!s1) - s1 = "(null)"; - if (flags & ALTERNATE_FORM) { - placeholder = String(s1).printable(); - s1 = placeholder.c_str(); - } - for (s2 = s1; *s2 && precision != 0; s2++) - if (precision > 0) - precision--; - break; - } - - case 'c': { - int c = va_arg(val, int); - // check for extension of 'signed char' to 'int' - if (c < 0) - c += 256; - // assume ASCII - if (c == '\n') - strcpy(numbuf, "\\n"); - else if (c == '\t') - strcpy(numbuf, "\\t"); - else if (c == '\r') - strcpy(numbuf, "\\r"); - else if (c == '\0') - strcpy(numbuf, "\\0"); - else if (c < 0 || c >= 256) - strcpy(numbuf, "(bad char)"); - else if (c < 32 || c >= 0177) - sprintf(numbuf, "\\%03o", c); - else - sprintf(numbuf, "%c", c); - s1 = numbuf; - s2 = strchr(numbuf, 0); - break; - } - - case '%': { - numbuf[0] = '%'; - s1 = numbuf; - s2 = s1 + 1; - break; - } - - case 'd': - case 'i': - flags |= SIGNED; - case 'u': - number: { - // protect numbuf from overflow - if (field_width > NUMBUF_SIZE) - field_width = NUMBUF_SIZE; - if (precision > NUMBUF_SIZE-4) - precision = NUMBUF_SIZE-4; - - s2 = numbuf + NUMBUF_SIZE; - - unsigned long num; -#ifdef HAVE_INT64_TYPES - if (width_flag == 'q') { - uint64_t qnum = va_arg(val, uint64_t); - if ((flags & SIGNED) && (int64_t)qnum < 0) - qnum = -(int64_t)qnum, flags |= NEGATIVE; - String q = cp_unparse_unsigned64(qnum, base, flags & UPPERCASE); - s1 = s2 - q.length(); - memcpy((char *)s1, q.data(), q.length()); - goto got_number; - } +ErrorHandler::vxformat(int default_flags, const char *s, va_list val) +{ + StringAccum msg; + + char numbuf[NUMBUF_SIZE]; // for numerics + numbuf[NUMBUF_SIZE-1] = 0; + + String strstore; // to ensure temporaries aren't destroyed + + // declare and initialize these here to make gcc shut up about possible + // use before initialization + int flags = 0; + int field_width = -1; + int precision = -1; + int width_flag = 0; + int base = 10; + while (1) { + + const char *pct = strchr(s, '%'); + if (!pct) { + if (*s) + msg << s; + break; + } + if (pct != s) { + msg.append(s, pct - s); + s = pct; + } + + // parse flags + flags = default_flags; + flags: + switch (*++s) { + case '#': flags |= cf_alternate_form; goto flags; + case '0': flags |= cf_zero_pad; goto flags; + case '-': flags |= cf_left_just; goto flags; + case ' ': flags |= cf_space_positive; goto flags; + case '+': flags |= cf_plus_positive; goto flags; + case '\'': flags |= cf_singlequote; goto flags; + case '_': flags &= ~cf_utf8; goto flags; + } + + // parse field width + field_width = -1; + if (*s == '*') { + field_width = va_arg(val, int); + if (field_width < 0) { + field_width = -field_width; + flags |= cf_left_just; + } + s++; + } else if (*s >= '0' && *s <= '9') + for (field_width = 0; *s >= '0' && *s <= '9'; s++) + field_width = 10*field_width + *s - '0'; + + // parse precision + precision = -1; + if (*s == '.') { + s++; + precision = 0; + if (*s == '*') { + precision = va_arg(val, int); + s++; + } else if (*s >= '0' && *s <= '9') + for (; *s >= '0' && *s <= '9'; s++) + precision = 10*precision + *s - '0'; + } + + // parse width flags + width_flag = 0; + width_flags: + switch (*s) { + case 'h': case 'l': + if (width_flag == *s) + width_flag = *s + 'A' - 'a'; + else if (width_flag) + break; + else + width_flag = *s; + s++; + goto width_flags; + case 'z': + if (width_flag) + break; + width_flag = *s++; + break; + case '^': + if (!isdigit((unsigned char) s[1]) || width_flag) + break; + for (s++; isdigit((unsigned char) *s); s++) + width_flag = width_flag * 10 + *s - '0'; + width_flag = -width_flag; + break; + } + + // conversion character + // after switch, data lies between `s1' and `s2' + const char *s1 = 0, *s2 = 0; + base = 10; + switch (*s++) { + + case 's': { + s1 = va_arg(val, const char *); + if (!s1) + s1 = "(null)"; + + // transform string, fetch length + int len; + if (flags & cf_alternate_form) { + strstore = String(s1).printable(); + len = strstore.length(); + } else + len = strlen(s1); + + // adjust length for precision + if (precision >= 0 && precision < len) + len = precision; + + // quote characters that look like annotations, readjusting length + if (flags & (cf_singlequote | cf_alternate_form)) { + if (!(flags & cf_alternate_form)) + strstore = String(s1, len); + + // check first line, considering trailing part of 'msg' + const char *mbegin = msg.end(); + while (mbegin != msg.begin() && mbegin[-1] != '\n') + --mbegin; + if (skip_anno(strstore.begin(), strstore.end()) != strstore.begin() + && skip_anno(mbegin, msg.end()) == msg.end()) { + strstore = String::make_stable("{}", 2) + strstore; + len += 2; + } + + // check subsequent lines + const char *s = std::find(strstore.begin(), strstore.end(), '\n'); + while (s != strstore.end() && s + 1 != strstore.end()) { + size_t nextpos = (s + 1) - strstore.begin(); + if (skip_anno(s + 1, strstore.end()) != s + 1) { + strstore = strstore.substring(strstore.begin(), s + 1) + + String::make_stable("{}", 2) + + strstore.substring(s + 1, strstore.end()); + len += 2; + } + s = std::find(strstore.begin() + nextpos, strstore.end(), '\n'); + } + } + + // obtain begin and end pointers + if (flags & (cf_singlequote | cf_alternate_form)) + s1 = strstore.begin(); + s2 = s1 + len; + break; + } + + case 'c': { + int c = va_arg(val, int); + // check for extension of 'signed char' to 'int' + if (c < 0) + c += 256; + // assume ASCII + if (c == '\n') + strcpy(numbuf, "\\n"); + else if (c == '\t') + strcpy(numbuf, "\\t"); + else if (c == '\r') + strcpy(numbuf, "\\r"); + else if (c == '\0') + strcpy(numbuf, "\\0"); + else if (c < 0 || c >= 256) + strcpy(numbuf, "(bad char)"); + else if (c < 32 || c >= 0177) + sprintf(numbuf, "\\%03o", c); + else + sprintf(numbuf, "%c", c); + s1 = numbuf; + s2 = strchr(numbuf, 0); + break; + } + + case '%': { + numbuf[0] = '%'; + s1 = numbuf; + s2 = s1 + 1; + break; + } + + case '<': + s1 = (flags & cf_utf8 ? "\342\200\230" : "\'"); + s2 = s1 + strlen(s1); + break; + + case '>': + case ',': + s1 = (flags & cf_utf8 ? "\342\200\231" : "\'"); + s2 = s1 + strlen(s1); + break; + + case 'd': + case 'i': + flags |= cf_signed; + case 'u': + number: { + // protect numbuf from overflow + if (field_width > NUMBUF_SIZE) + field_width = NUMBUF_SIZE; + if (precision > NUMBUF_SIZE - 4) + precision = NUMBUF_SIZE - 4; + + s2 = numbuf + NUMBUF_SIZE; + + unsigned long num; + switch (width_flag) { + case 'H': + case -8: + num = (unsigned char) va_arg(val, int); + if ((flags & cf_signed) && (signed char) num < 0) + num = -(signed char) num, flags |= cf_negative; + break; + case 'h': + case -16: + num = (unsigned short) va_arg(val, int); + if ((flags & cf_signed) && (short) num < 0) + num = -(short) num, flags |= cf_negative; + break; + case 0: + case -32: +#if SIZEOF_LONG == 4 + case 'l': +#endif +#if SIZEOF_SIZE_T == 4 + case 'z': +#endif + num = va_arg(val, unsigned); + if ((flags & cf_signed) && (int) num < 0) + num = -(int) num, flags |= cf_negative; + break; +#if HAVE_INT64_TYPES +# if SIZEOF_LONG == 8 + case 'l': +# endif +# if SIZEOF_LONG_LONG == 8 + case 'L': +# endif +# if SIZEOF_SIZE_T == 8 + case 'z': +# endif + case -64: { + uint64_t qnum = va_arg(val, uint64_t); + if ((flags & cf_signed) && (int64_t)qnum < 0) + qnum = -(int64_t) qnum, flags |= cf_negative; + StringAccum sa; + sa.append_numeric(static_cast<String::uint_large_t>(qnum), base, (flags & cf_uppercase)); + s1 = s2 - sa.length(); + memcpy(const_cast<char*>(s1), sa.data(), s2 - s1); + goto got_number; + } #endif - if (width_flag == 'h') { - num = (unsigned short)va_arg(val, int); - if ((flags & SIGNED) && (short)num < 0) - num = -(short)num, flags |= NEGATIVE; - } else if (width_flag == 'l') { - num = va_arg(val, unsigned long); - if ((flags & SIGNED) && (long)num < 0) - num = -(long)num, flags |= NEGATIVE; - } else { - num = va_arg(val, unsigned int); - if ((flags & SIGNED) && (int)num < 0) - num = -(int)num, flags |= NEGATIVE; - } - s1 = do_number(num, (char *)s2, base, flags); - -#ifdef HAVE_INT64_TYPES - got_number: + default: + goto error; + } + s1 = do_number(num, (char *)s2, base, flags); + +#if HAVE_INT64_TYPES + got_number: #endif - s1 = do_number_flags((char *)s1, (char *)s2, base, flags, - precision, field_width); - break; - } - - case 'o': - base = 8; - goto number; - - case 'X': - flags |= UPPERCASE; - case 'x': - base = 16; - goto number; - - case 'p': { - void *v = va_arg(val, void *); - s2 = numbuf + NUMBUF_SIZE; - s1 = do_number((unsigned long)v, (char *)s2, 16, flags); - s1 = do_number_flags((char *)s1, (char *)s2, 16, flags | ALTERNATE_FORM, - precision, field_width); - break; - } + s1 = do_number_flags((char *)s1, (char *)s2, base, flags, + precision, field_width); + break; + } + + case 'o': + base = 8; + goto number; + + case 'X': + flags |= cf_uppercase; + case 'x': + base = 16; + goto number; + + case 'p': { + void *v = va_arg(val, void *); + s2 = numbuf + NUMBUF_SIZE; + s1 = do_number((unsigned long)v, (char *)s2, 16, flags); + s1 = do_number_flags((char *)s1, (char *)s2, 16, flags | cf_alternate_form, + precision, field_width); + break; + } #ifndef __KERNEL__ - case 'e': case 'f': case 'g': - case 'E': case 'F': case 'G': { - char format[80], *f = format, new_numbuf[NUMBUF_SIZE]; - *f++ = '%'; - if (flags & ALTERNATE_FORM) - *f++ = '#'; - if (precision >= 0) - f += sprintf(f, ".%d", precision); - *f++ = s[-1]; - *f++ = 0; - - int len = sprintf(new_numbuf, format, va_arg(val, double)); - - s2 = numbuf + NUMBUF_SIZE; - s1 = s2 - len; - memcpy((char *)s1, new_numbuf, len); // note: no terminating \0 - s1 = do_number_flags((char *)s1, (char *)s2, 10, flags & ~ALTERNATE_FORM, -1, field_width); - break; - } + case 'e': case 'f': case 'g': + case 'E': case 'F': case 'G': { + char format[80], *f = format, new_numbuf[NUMBUF_SIZE]; + *f++ = '%'; + if (flags & cf_alternate_form) + *f++ = '#'; + if (precision >= 0) + f += sprintf(f, ".%d", precision); + *f++ = s[-1]; + *f++ = 0; + + int len = sprintf(new_numbuf, format, va_arg(val, double)); + + s2 = numbuf + NUMBUF_SIZE; + s1 = s2 - len; + memcpy((char *)s1, new_numbuf, len); // note: no terminating \0 + s1 = do_number_flags((char *)s1, (char *)s2, 10, flags & ~cf_alternate_form, -1, field_width); + break; + } #endif - - case '{': { - const char *rbrace = strchr(s, '}'); - if (!rbrace || rbrace == s) - assert(0 /* Bad %{ in error */); - String name(s, rbrace - s); - s = rbrace + 1; - for (Conversion *item = error_items; item; item = item->next) - if (item->name == name) { - placeholder = item->hook(flags, VA_LIST_REF(val)); - s1 = placeholder.data(); - s2 = s1 + placeholder.length(); - goto got_result; - } - assert(0 /* Bad %{ in error */); - break; - } - - default: - assert(0 /* Bad % in error */); - break; - - } - // add result of conversion - got_result: - int slen = s2 - s1; - if (slen > field_width) field_width = slen; - char *dest = msg.extend(field_width); - if (flags & LEFT_JUST) { - memcpy(dest, s1, slen); - memset(dest + slen, ' ', field_width - slen); - } else { - memcpy(dest + field_width - slen, s1, slen); - memset(dest, (flags & ZERO_PAD ? '0' : ' '), field_width - slen); + case '{': { + const char *rbrace = strchr(s, '}'); + if (!rbrace || rbrace == s) + assert(0 /* Bad %{ in error */); + String name(s, rbrace - s); + s = rbrace + 1; + for (Conversion *item = error_items; item; item = item->next) + if (item->name == name) { + strstore = item->hook(flags, VA_LIST_REF(val)); + s1 = strstore.begin(); + s2 = strstore.end(); + goto got_result; + } + goto error; + } + + error: + default: + assert(0 /* Bad % in error */); + break; + + } + + // add result of conversion + got_result: + int slen = s2 - s1; + if (slen > field_width) + field_width = slen; + char *dest = msg.extend(field_width); + if (flags & cf_left_just) { + memcpy(dest, s1, slen); + memset(dest + slen, ' ', field_width - slen); + } else { + memcpy(dest + field_width - slen, s1, slen); + memset(dest, (flags & cf_zero_pad ? '0' : ' '), field_width - slen); + } } - } - return msg.take_string(); + return msg.take_string(); } String -ErrorHandler::decorate_text(Seriousness, const String &landmark, const String &text) -{ - String new_text = text; - - // handle landmark - if (landmark - && !(landmark.length() > 2 && landmark[0] == '\\' - && landmark.back() == '\\')) { - // ignore special-purpose landmarks (begin and end with a backslash `\') - // fix landmark: skip trailing spaces and trailing colon - int i, len = landmark.length(); - for (i = len - 1; i >= 0; i--) - if (!isspace((unsigned char) landmark[i])) - break; - if (i >= 0 && landmark[i] == ':') - i--; - - // prepend landmark, unless all spaces - if (i >= 0) - new_text = prepend_lines(landmark.substring(0, i+1) + ": ", new_text); - } - - return new_text; +ErrorHandler::xformat(int default_flags, const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + String s = vxformat(default_flags, fmt, val); + va_end(val); + return s; } -int -ErrorHandler::verror(Seriousness seriousness, const String &where, - const char *s, va_list val) +String +ErrorHandler::xformat(const char *fmt, ...) { - String text = make_text(seriousness, s, val); - text = decorate_text(seriousness, where, text); - handle_text(seriousness, text); - return count_error(seriousness, text); + va_list val; + va_start(val, fmt); + String s = vxformat(0, fmt, val); + va_end(val); + return s; } -int -ErrorHandler::verror_text(Seriousness seriousness, const String &where, - const String &text) +String +ErrorHandler::format(const char *fmt, ...) { - // text is already made - String dec_text = decorate_text(seriousness, where, text); - handle_text(seriousness, dec_text); - return count_error(seriousness, dec_text); + va_list val; + va_start(val, fmt); + String s = vformat(fmt, val); + va_end(val); + return s; } + +// ERROR MESSAGE SHORTHAND + void -ErrorHandler::set_error_code(int) +ErrorHandler::debug(const char *fmt, ...) { + va_list val; + va_start(val, fmt); + vxmessage(String::make_stable(e_debug, 3), fmt, val); + va_end(val); } -String -ErrorHandler::prepend_lines(const String &prepend, const String &text) -{ - if (!prepend) - return text; - - StringAccum sa; - const char *begin = text.begin(); - const char *end = text.end(); - while (begin < end) { - const char *nl = std::find(begin, end, '\n'); - if (nl < end) - nl++; - sa << prepend << text.substring(begin, nl); - begin = nl; - } - - return sa.take_string(); +void +ErrorHandler::message(const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + vxmessage(String::make_stable(e_info, 3), fmt, val); + va_end(val); } - -// -// BASE ERROR HANDLER -// - int -BaseErrorHandler::count_error(Seriousness seriousness, const String &) +ErrorHandler::warning(const char *fmt, ...) { - if (seriousness < ERR_MIN_WARNING) - /* do nothing */; - else if (seriousness < ERR_MIN_ERROR) - _nwarnings++; - else - _nerrors++; - return (seriousness < ERR_MIN_WARNING ? OK_RESULT : ERROR_RESULT); + va_list val; + va_start(val, fmt); + int r = vxmessage(String::make_stable(e_warning_annotated, 12), fmt, val); + va_end(val); + return r; } +int +ErrorHandler::error(const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + int r = vxmessage(String::make_stable(e_error, 3), fmt, val); + va_end(val); + return r; +} -#ifndef __KERNEL__ -// -// FILE ERROR HANDLER -// - -FileErrorHandler::FileErrorHandler(FILE *f, const String &context) - : _f(f), _context(context) +int +ErrorHandler::fatal(const char *fmt, ...) { + va_list val; + va_start(val, fmt); + int r = vxmessage(String::make_stable(e_fatal, 4), fmt, val); + va_end(val); + return r; } void -FileErrorHandler::handle_text(Seriousness seriousness, const String &message) -{ - String text = prepend_lines(_context, message); - if (text && text.back() != '\n') - text += '\n'; - fwrite(text.data(), 1, text.length(), _f); - - if (seriousness >= ERR_MIN_FATAL) { - int exit_status = (seriousness - ERR_MIN_FATAL) >> ERRVERBOSITY_SHIFT; - exit(exit_status); - } +ErrorHandler::ldebug(const String &landmark, const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + String l = make_landmark_anno(landmark); + vxmessage(String::make_stable(e_debug, 3) + l, fmt, val); + va_end(val); } -#endif - - -// -// SILENT ERROR HANDLER -// void -SilentErrorHandler::handle_text(Seriousness, const String &) +ErrorHandler::lmessage(const String &landmark, const char *fmt, ...) { + va_list val; + va_start(val, fmt); + String l = make_landmark_anno(landmark); + vxmessage(String::make_stable(e_info, 3) + l, fmt, val); + va_end(val); } +int +ErrorHandler::lwarning(const String &landmark, const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + String l = make_landmark_anno(landmark); + int r = vxmessage(l + String::make_stable(e_warning_annotated, 12), fmt, val); + va_end(val); + return r; +} -// -// STATIC ERROR HANDLERS -// - -static ErrorHandler *the_default_handler = 0; -static ErrorHandler *the_ignore_handler = 0; +int +ErrorHandler::lerror(const String &landmark, const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + String l = make_landmark_anno(landmark); + int r = vxmessage(String::make_stable(e_error, 3) + l, fmt, val); + va_end(val); + return r; +} -ErrorHandler::Conversion * -ErrorHandler::add_conversion(const String &name, ConversionHook hook) -{ - if (Conversion *c = new Conversion) { - c->name = name; - c->hook = hook; - c->next = error_items; - error_items = c; - return c; - } else - return 0; +int +ErrorHandler::lfatal(const String &landmark, const char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + String l = make_landmark_anno(landmark); + int r = vxmessage(String::make_stable(e_fatal, 4) + l, fmt, val); + va_end(val); + return r; } int -ErrorHandler::remove_conversion(ErrorHandler::Conversion *conv) +ErrorHandler::xmessage(const String &str) { - Conversion **pprev = &error_items; - for (Conversion *c = error_items; c; pprev = &c->next, c = *pprev) - if (c == conv) { - *pprev = c->next; - delete c; - return 0; + String xstr = decorate(str); + + int min_level = 1000, xlevel = 1000; + const char *s = xstr.begin(), *end = xstr.end(); + void *user_data = 0; + while (s != end) { + const char *l = parse_anno(xstr, s, end, "#<>", &xlevel, + (const char *) 0); + const char *nl = std::find(l, end, '\n'); + String line = xstr.substring(s, nl); + s = nl + (nl != end); + user_data = emit(line, user_data, s != end); + min_level = (xlevel < min_level ? xlevel : min_level); } - return -1; + + account(min_level); + + return (min_level <= el_warning ? error_result : ok_result); } -ErrorHandler * -ErrorHandler::static_initialize(ErrorHandler *default_handler) +String +ErrorHandler::vformat(const char *fmt, va_list val) { - the_default_handler = default_handler; - return the_default_handler; + return vxformat(0, fmt, val); } -void -ErrorHandler::static_cleanup() +String +ErrorHandler::decorate(const String &str) { - delete the_default_handler; - delete the_ignore_handler; - the_default_handler = the_ignore_handler = 0; - while (error_items) { - Conversion *next = error_items->next; - delete error_items; - error_items = next; - } + return str; } -bool -ErrorHandler::has_default_handler() +void * +ErrorHandler::emit(const String &, void *user_data, bool) { - return the_default_handler ? true : false; + return user_data; } -ErrorHandler * -ErrorHandler::default_handler() + +#ifndef __KERNEL__ +// +// FILE ERROR HANDLER +// + +FileErrorHandler::FileErrorHandler(FILE *f, const String &context) + : _f(f), _context(context), _default_flags(0) { - assert(the_default_handler != 0); - return the_default_handler; +# if HAVE_UNISTD_H + if (isatty(fileno(_f))) { +# endif + char *s = getenv("LANG"); + if (s && (strstr(s, "UTF-8") != 0 || strstr(s, "UTF8") != 0 + || strstr(s, "utf8") != 0)) + _default_flags |= cf_utf8; +# if HAVE_UNISTD_H + } +# endif } -ErrorHandler * -ErrorHandler::ignore_handler() +String +FileErrorHandler::vformat(const char *fmt, va_list val) { - if (!the_ignore_handler) - the_ignore_handler = new SilentErrorHandler; - return the_ignore_handler; + return vxformat(_default_flags, fmt, val); +} + +void * +FileErrorHandler::emit(const String &str, void *, bool) +{ + String landmark; + const char *s = parse_anno(str, str.begin(), str.end(), + "l", &landmark, (const char *) 0); + StringAccum sa; + sa << _context << clean_landmark(landmark, true) + << str.substring(s, str.end()) << '\n'; + (void) fwrite(sa.begin(), 1, sa.length(), _f); + return 0; } void -ErrorHandler::set_default_handler(ErrorHandler *errh) +FileErrorHandler::account(int level) { - the_default_handler = errh; + ErrorHandler::account(level); + if (level <= el_abort) + abort(); + else if (level <= el_fatal) + exit(-level); } +#endif + // -// ERROR VENEER +// STATIC ERROR HANDLERS // -int -ErrorVeneer::nwarnings() const +ErrorHandler::Conversion * +ErrorHandler::add_conversion(const String &name, ConversionFunction function) { - return _errh->nwarnings(); + if (Conversion *c = new Conversion) { + c->name = name; + c->hook = function; + c->next = error_items; + error_items = c; + return c; + } else + return 0; } int -ErrorVeneer::nerrors() const +ErrorHandler::remove_conversion(ErrorHandler::Conversion *conv) +{ + Conversion **pprev = &error_items; + for (Conversion *c = error_items; c; pprev = &c->next, c = *pprev) + if (c == conv) { + *pprev = c->next; + delete c; + return 0; + } + return -1; +} + +ErrorHandler * +ErrorHandler::static_initialize(ErrorHandler *default_handler) +{ + if (!the_silent_handler) { + the_default_handler = default_handler; + the_silent_handler = new SilentErrorHandler; + } + return default_handler; +} + +void +ErrorHandler::static_cleanup() { - return _errh->nerrors(); + delete the_default_handler; + delete the_silent_handler; + the_default_handler = the_silent_handler = 0; + while (error_items) { + Conversion *next = error_items->next; + delete error_items; + error_items = next; + } } void -ErrorVeneer::reset_counts() +ErrorHandler::set_default_handler(ErrorHandler *errh) { - _errh->reset_counts(); + the_default_handler = errh; } + +// +// ERROR VENEER +// + String -ErrorVeneer::make_text(Seriousness seriousness, const char *s, va_list val) +ErrorVeneer::vformat(const char *fmt, va_list val) { - return _errh->make_text(seriousness, s, val); + if (_errh) + return _errh->vformat(fmt, val); + else + return ErrorHandler::vformat(fmt, val); } String -ErrorVeneer::decorate_text(Seriousness seriousness, const String &landmark, const String &text) +ErrorVeneer::decorate(const String &str) { - return _errh->decorate_text(seriousness, landmark, text); + if (_errh) + return _errh->decorate(str); + else + return ErrorHandler::decorate(str); } -void -ErrorVeneer::handle_text(Seriousness seriousness, const String &text) +void * +ErrorVeneer::emit(const String &str, void *user_data, bool more) { - _errh->handle_text(seriousness, text); + if (_errh) + return _errh->emit(str, user_data, more); + else + return ErrorHandler::emit(str, user_data, more); } -int -ErrorVeneer::count_error(Seriousness seriousness, const String &text) +void +ErrorVeneer::account(int level) { - return _errh->count_error(seriousness, text); + ErrorHandler::account(level); + if (_errh) + _errh->account(level); } @@ -767,32 +1060,44 @@ ErrorVeneer::count_error(Seriousness seriousness, const String &text) // CONTEXT ERROR HANDLER // -ContextErrorHandler::ContextErrorHandler(ErrorHandler *errh, - const String &context, - const String &indent, - const String &context_landmark) - : ErrorVeneer(errh), _context(context), _indent(indent), - _context_landmark(context_landmark) +ContextErrorHandler::ContextErrorHandler(ErrorHandler *errh, const char *fmt, + ...) + : ErrorVeneer(errh), _indent(String::make_stable(" ", 2)), + _context_printed(false) { + va_list val; + va_start(val, fmt); + _context = ErrorVeneer::vformat(fmt, val); + va_end(val); + if (_context) + _context = combine_anno(_context, String::make_stable("{context:context}", 17)); } String -ContextErrorHandler::decorate_text(Seriousness seriousness, const String &landmark, const String &text) -{ - String context_lines; - if (_context) { - // do not print context or indent if underlying ErrorHandler doesn't want - // context - if (_errh->min_verbosity() > ERRVERBOSITY_CONTEXT) - _context = _indent = String(); - else { - context_lines = _errh->decorate_text(ERR_MESSAGE, (_context_landmark ? _context_landmark : landmark), _context); - if (context_lines && context_lines.back() != '\n') - context_lines += '\n'; - _context = String(); - } - } - return context_lines + _errh->decorate_text(seriousness, (landmark ? landmark : _context_landmark), prepend_lines(_indent, text)); +ContextErrorHandler::decorate(const String &str) +{ + String cstr = ErrorVeneer::decorate(str), context_anno; + const char *cstr_endanno = parse_anno(cstr, cstr.begin(), cstr.end(), + "context", &context_anno, + (const char *) 0); + if (context_anno.equals("no", 2)) + return cstr; + + String icstr; + if (context_anno.equals("noindent", 8)) + icstr = combine_anno(cstr, _context_landmark); + else + icstr = combine_anno(cstr, _context_landmark + _indent); + + if (!_context_printed && !context_anno.equals("nocontext", 9)) { + String astr = combine_anno(combine_anno(_context, _context_landmark), + cstr.substring(cstr.begin(), cstr_endanno)); + if (astr && astr.back() != '\n') + astr += '\n'; + _context_printed = true; + return ErrorVeneer::decorate(astr) + icstr; + } else + return icstr; } @@ -802,14 +1107,14 @@ ContextErrorHandler::decorate_text(Seriousness seriousness, const String &landma PrefixErrorHandler::PrefixErrorHandler(ErrorHandler *errh, const String &prefix) - : ErrorVeneer(errh), _prefix(prefix) + : ErrorVeneer(errh), _prefix(prefix) { } String -PrefixErrorHandler::decorate_text(Seriousness seriousness, const String &landmark, const String &text) +PrefixErrorHandler::decorate(const String &str) { - return _errh->decorate_text(seriousness, landmark, prepend_lines(_prefix, text)); + return ErrorVeneer::decorate(combine_anno(str, _prefix)); } @@ -818,41 +1123,14 @@ PrefixErrorHandler::decorate_text(Seriousness seriousness, const String &landmar // LandmarkErrorHandler::LandmarkErrorHandler(ErrorHandler *errh, const String &landmark) - : ErrorVeneer(errh), _landmark(landmark) + : ErrorVeneer(errh), _landmark(make_landmark_anno(landmark)) { } String -LandmarkErrorHandler::decorate_text(Seriousness seriousness, const String &lm, const String &text) -{ - if (lm) - return _errh->decorate_text(seriousness, lm, text); - else - return _errh->decorate_text(seriousness, _landmark, text); -} - - -// -// VERBOSE FILTER ERROR HANDLER -// - -VerboseFilterErrorHandler::VerboseFilterErrorHandler(ErrorHandler *errh, int min_verbosity) - : ErrorVeneer(errh), _min_verbosity(min_verbosity) -{ -} - -int -VerboseFilterErrorHandler::min_verbosity() const -{ - int m = _errh->min_verbosity(); - return (m >= _min_verbosity ? m : _min_verbosity); -} - -void -VerboseFilterErrorHandler::handle_text(Seriousness s, const String &text) +LandmarkErrorHandler::decorate(const String &str) { - if ((s & ERRVERBOSITY_MASK) >= _min_verbosity) - _errh->handle_text(s, text); + return ErrorVeneer::decorate(combine_anno(str, _landmark)); } @@ -862,17 +1140,17 @@ VerboseFilterErrorHandler::handle_text(Seriousness s, const String &text) #ifndef __KERNEL__ -BailErrorHandler::BailErrorHandler(ErrorHandler *errh, Seriousness s) - : ErrorVeneer(errh), _exit_seriousness(s) +BailErrorHandler::BailErrorHandler(ErrorHandler *errh, int l) + : ErrorVeneer(errh), _level(l) { } void -BailErrorHandler::handle_text(Seriousness s, const String &text) +BailErrorHandler::account(int level) { - _errh->handle_text(s, text); - if (s >= _exit_seriousness) - exit(1); + ErrorVeneer::account(level); + if (level <= _level) + exit(1); } #endif diff --git a/Build/source/texk/lcdf-typetools/liblcdf/filename.cc b/Build/source/texk/lcdf-typetools/liblcdf/filename.cc index fcd8e89029a..dd603088b05 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/filename.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/filename.cc @@ -69,7 +69,7 @@ Filename::Filename(const String &dir, const String &name) _dir += name.substring(0, slash + 1); _name = name.substring(slash + 1); } - + _path = _dir + _name; } diff --git a/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc b/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc index 023a8f2a4ca..33b59521ecf 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/globmatch.cc @@ -67,7 +67,7 @@ glob_match(const String& str, const String& pattern) p++; if (p >= plen) // not a character class at all goto ordinary; - + // parse character class bool in = false; for (int i = first; i < p && !in; i++) { @@ -95,7 +95,7 @@ glob_match(const String& str, const String& pattern) spos++; ppos++; break; - + } done: diff --git a/Build/source/texk/lcdf-typetools/liblcdf/md5.c b/Build/source/texk/lcdf-typetools/liblcdf/md5.c index ecacfadd3bc..d2373dc6120 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/md5.c +++ b/Build/source/texk/lcdf-typetools/liblcdf/md5.c @@ -118,7 +118,7 @@ transform(MD5_CONTEXT *ctx, const unsigned char *data) #define OP(a, b, c, d, s, T) \ do { \ - a += FF (b, c, d) + (*cwp++) + T; \ + a += FF (b, c, d) + (*cwp++) + T; \ a = rol(a, s); \ a += b; \ } while (0) @@ -152,7 +152,7 @@ transform(MD5_CONTEXT *ctx, const unsigned char *data) do { \ a += f (b, c, d) + correct_words[k] + T; \ a = rol(a, s); \ - a += b; \ + a += b; \ } while (0) /* Round 2. */ diff --git a/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc b/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc index 4d6744215c3..b7c1eb52d97 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/permstr.cc @@ -115,7 +115,7 @@ PermString::initialize(const char* s, int length) if (length < 0) length = (s ? strlen(s) : 0); - + if (length == 0) { _rep = zero_char_doodad.data; return; @@ -144,7 +144,7 @@ PermString::initialize(const char* s, int length) buck->length = length; memcpy(buck->data, s, length); buck->data[length] = 0; - + _rep = buck->data; } @@ -287,11 +287,11 @@ vpermprintf(const char *s, va_list val) goto pctdone; } - + pctdone: s++; } - + return PermString(psc, pspos); } diff --git a/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc b/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc index 54905b8bdbd..ec09e76a147 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/slurper.cc @@ -58,7 +58,7 @@ Slurper::grow_buffer() _len -= _pos; _pos = 0; } - + // Grow the buffer if necessary. if (_len >= _cap) { unsigned char *new_data = new unsigned char[ 2 * _cap ]; @@ -75,7 +75,7 @@ inline int Slurper::more_data() { grow_buffer(); - + // Read new data into the buffer. int amount = fread(_data + _len, 1, _cap - _len, _f); _len += amount; @@ -89,7 +89,7 @@ Slurper::get_line_at(unsigned pos) for (; pos < _len; pos++) if (_data[pos] == '\n' || _data[pos] == '\r') goto line_ends_at_pos; - + // no line end? look for more data. save and reset `pos', since _pos // may change. int offset = pos - _pos; @@ -100,12 +100,12 @@ Slurper::get_line_at(unsigned pos) goto line_ends_at_pos; } } - + line_ends_at_pos: - + // PRECONDITION: the line starts at _pos and ends at pos. unsigned next_pos; - + // Find beginning of next line. 3 cases: // 1. line ends in \r\n -> _pos = pos + 2; // 2. line ends in \r OR \n -> _pos = pos + 1; @@ -118,10 +118,10 @@ Slurper::get_line_at(unsigned pos) next_pos = pos; // if already at EOF, don't increment the line number if (pos == _pos) _lineno--; - + } else if (_data[pos] == '\n') next_pos = pos + 1; - + else { assert(_data[pos] == '\r'); // If `\r' is last char in buffer, `\n' might be next char. Must read more @@ -138,12 +138,12 @@ Slurper::get_line_at(unsigned pos) else next_pos = pos + 1; } - + _line = _data + _pos; _line_len = pos - _pos; _data[pos] = 0; _pos = next_pos; - _lineno++; + _lineno++; return (char *)_line; } @@ -180,7 +180,7 @@ Slurper::append_next_line() _pos -= delta; _len -= delta; } - + unsigned append_at = _pos; _pos = _line - _data; return get_line_at(append_at); diff --git a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc index 9c9217358b5..78f8d217493 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc @@ -4,7 +4,7 @@ * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2006 Eddie Kohler + * Copyright (c) 2001-2008 Eddie Kohler * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -26,63 +26,75 @@ #include <stdio.h> #include <ctype.h> -StringAccum::StringAccum(const char *s) - : _s(0), _len(0), _cap(0) -{ - *this << s; -} +/** @class StringAccum + * @brief Efficiently build up Strings from pieces. + * + * Like the String class, StringAccum represents a string of characters. + * However, unlike a String, a StringAccum is inherently mutable, and + * efficiently supports building up a large string from many smaller pieces. + * + * StringAccum objects support operator<<() operations for most fundamental + * data types. A StringAccum is generally built up by operator<<(), and then + * turned into a String by the take_string() method. Extracting the String + * from a StringAccum does no memory allocation or copying; the StringAccum's + * memory is donated to the String. + * + * <h3>Out-of-memory StringAccums</h3> + * + * When there is not enough memory to add requested characters to a + * StringAccum object, the object becomes a special "out-of-memory" string. + * Out-of-memory strings are contagious: the result of any concatenation + * operation involving an out-of-memory string is another out-of-memory + * string. Calling take_string() on an out-of-memory StringAccum returns an + * out-of-memory String. + * + * Out-of-memory StringAccum objects nominally have zero characters. + */ -StringAccum::StringAccum(const String &s) - : _s(0), _len(0), _cap(0) +void +StringAccum::assign_out_of_memory() { - *this << s; + assert(_cap >= 0); + delete[] _s; + _s = reinterpret_cast<unsigned char *>(const_cast<char *>(String::out_of_memory_data())); + _cap = -1; + _len = 0; } -#ifdef HAVE_PERMSTRING -StringAccum::StringAccum(PermString s) - : _s(0), _len(0), _cap(0) +bool +StringAccum::grow(int want) { - *this << s; -} -#endif + // can't append to out-of-memory strings + if (_cap < 0) + return false; -void -StringAccum::make_out_of_memory() -{ - assert(_cap >= 0); - delete[] _s; - _s = reinterpret_cast<unsigned char *>(const_cast<char *>(String::out_of_memory_data())); - _cap = -1; - _len = 0; + int ncap = (_cap ? _cap * 2 : 128); + while (ncap <= want) + ncap *= 2; + + unsigned char *n = new unsigned char[ncap]; + if (!n) { + assign_out_of_memory(); + return false; + } + + if (_s) + memcpy(n, _s, _cap); + delete[] _s; + _s = n; + _cap = ncap; + return true; } -bool -StringAccum::grow(int want) +void +StringAccum::append_fill(int c, int len) { - // can't append to out-of-memory strings - if (_cap < 0) - return false; - - int ncap = (_cap ? _cap * 2 : 128); - while (ncap <= want) - ncap *= 2; - - unsigned char *n = new unsigned char[ncap]; - if (!n) { - make_out_of_memory(); - return false; - } - - if (_s) - memcpy(n, _s, _cap); - delete[] _s; - _s = n; - _cap = ncap; - return true; + if (char *s = extend(len)) + memset(s, c, len); } void -StringAccum::append_utf8_hard(uint32_t ch) +StringAccum::append_utf8_hard(unsigned ch) { if (ch < 0x80) append((unsigned char) ch); @@ -110,65 +122,96 @@ StringAccum::c_str() return reinterpret_cast<char *>(_s); } +void +StringAccum::append_unsafe_data(const char *s, int len) +{ + char *copy = new char[len]; + memcpy(copy, s, len); + append_safe_data(copy, len); + delete[] copy; +} + String StringAccum::take_string() { int len = length(); - if (len) { - int capacity = _cap; - return String::claim_string(reinterpret_cast<char *>(take_bytes()), len, capacity); - } else if (out_of_memory()) - return String::out_of_memory_string(); - else + int cap = _cap; + char *str = reinterpret_cast<char *>(_s); + if (len > 0) { + _s = 0; + _len = _cap = 0; + return String::make_claim(str, len, cap); + } else if (!out_of_memory()) return String(); + else { + clear(); + return String::make_out_of_memory(); + } +} + +void +StringAccum::swap(StringAccum &o) +{ + unsigned char *os = o._s; + int olen = o._len, ocap = o._cap; + o._s = _s; + o._len = _len, o._cap = _cap; + _s = os; + _len = olen, _cap = ocap; } +/** @relates StringAccum + @brief Append decimal representation of @a i to @a sa. + @return @a sa */ StringAccum & operator<<(StringAccum &sa, long i) { if (char *x = sa.reserve(24)) { int len = sprintf(x, "%ld", i); - sa.forward(len); + sa.adjust_length(len); } return sa; } +/** @relates StringAccum + @brief Append decimal representation of @a u to @a sa. + @return @a sa */ StringAccum & operator<<(StringAccum &sa, unsigned long u) { - if (char *x = sa.reserve(24)) { - int len = sprintf(x, "%lu", u); - sa.forward(len); - } - return sa; + if (char *x = sa.reserve(24)) { + int len = sprintf(x, "%lu", u); + sa.adjust_length(len); + } + return sa; } StringAccum & operator<<(StringAccum &sa, double d) { - if (char *x = sa.reserve(256)) { - int len = sprintf(x, "%.12g", d); - sa.forward(len); - } - return sa; + if (char *x = sa.reserve(256)) { + int len = sprintf(x, "%.12g", d); + sa.adjust_length(len); + } + return sa; } StringAccum & StringAccum::snprintf(int n, const char *format, ...) { - va_list val; - va_start(val, format); - if (char *x = reserve(n + 1)) { -#ifdef HAVE_VSNPRINTF - int len = vsnprintf(x, n + 1, format, val); + va_list val; + va_start(val, format); + if (char *x = reserve(n + 1)) { +#if HAVE_VSNPRINTF + int len = vsnprintf(x, n + 1, format, val); #else - int len = vsprintf(x, format, val); - assert(len <= n); + int len = vsprintf(x, format, val); + assert(len <= n); #endif - forward(len); - } - va_end(val); - return *this; + adjust_length(len); + } + va_end(val); + return *this; } void diff --git a/Build/source/texk/lcdf-typetools/liblcdf/string.cc b/Build/source/texk/lcdf-typetools/liblcdf/string.cc index 9f3c27e07c6..6ba05536f25 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/string.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/string.cc @@ -4,7 +4,8 @@ * Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology - * Copyright (c) 2001-2006 Eddie Kohler + * Copyright (c) 2001-2008 Eddie Kohler + * Copyright (c) 2008 Meraki, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -27,102 +28,158 @@ #include <ctype.h> #include <lcdf/inttypes.h> -static String::Initializer initializer; -String::Memo *String::null_memo = 0; -String::Memo *String::permanent_memo = 0; -String::Memo *String::oom_memo = 0; -String *String::null_string_p = 0; -String *String::oom_string_p = 0; -const char String::oom_string_data = 0; - -inline -String::Memo::Memo() - : _refcount(0), _capacity(0), _dirty(0), _real_data("") -{ -} +/** @file string.hh + * @brief The LCDF String class. + */ -inline -String::Memo::Memo(char *data, int dirty, int capacity) - : _refcount(0), _capacity(capacity), _dirty(dirty), - _real_data(data) -{ -} +/** @class String + * @brief A string of characters. + * + * The String class represents a string of characters. Strings may be + * constructed from C strings, characters, numbers, and so forth. They may + * also be added together. The underlying character arrays are dynamically + * allocated; String operations allocate and free memory as needed. A String + * and its substrings generally share memory. Accessing a character by index + * takes O(1) time; so does creating a substring. + * + * <h3>Initialization</h3> + * + * The String implementation must be explicitly initialized before use; see + * static_initialize(). Explicit initialization is used because static + * constructors and other automatic initialization tricks don't work in the + * kernel. However, at user level, you can declare a String::Initializer + * object to initialize the library. + * + * <h3>Out-of-memory strings</h3> + * + * When there is not enough memory to create a particular string, a special + * "out-of-memory" string is returned instead. Out-of-memory strings are + * contagious: the result of any concatenation operation involving an + * out-of-memory string is another out-of-memory string. Thus, the final + * result of a series of String operations will be an out-of-memory string, + * even if the out-of-memory condition occurs in the middle. + * + * Out-of-memory strings have zero characters, but they aren't equal to other + * empty strings. If @a s is a normal String (even an empty string), and @a + * oom is an out-of-memory string, then @a s @< @a oom. + * + * All out-of-memory strings are equal and share the same data(), which is + * different from the data() of any other string. See + * String::out_of_memory_data(). The String::make_out_of_memory() function + * returns an out-of-memory string. + */ -String::Memo::Memo(int dirty, int capacity) - : _refcount(1), _capacity(capacity), _dirty(dirty), - _real_data(new char[capacity]) -{ - assert(_capacity >= _dirty); +const char String::null_string_data = 0; +const char String::oom_string_data = 0; +const char String::bool_data[] = "true\0false"; + +String::memo_t String::null_memo = { + 2, 0, 0, const_cast<char *>(&null_string_data) +}; +String::memo_t String::permanent_memo = { + 1, 0, 0, const_cast<char *>(&null_string_data) +}; +String::memo_t String::oom_memo = { + 2, 0, 0, const_cast<char *>(&oom_string_data) +}; + +const String::rep_t String::null_string_rep = { + &null_string_data, 0, &null_memo +}; +const String::rep_t String::oom_string_rep = { + &oom_string_data, 0, &oom_memo +}; + +/** @cond never */ +String::memo_t * +String::create_memo(char *data, int dirty, int capacity) +{ + assert(capacity >= dirty); + memo_t *memo = new memo_t; + if (memo) { + if (data) + memo->real_data = data; + else if (!(memo->real_data = new char[capacity])) { + delete memo; + return 0; + } + memo->capacity = capacity; + memo->dirty = dirty; + memo->refcount = (data ? 0 : 1); + } + return memo; } -String::Memo::~Memo() +void +String::delete_memo(memo_t *memo) { - if (_capacity) { - assert(_capacity >= _dirty); - delete[] _real_data; + if (memo->capacity) { + assert(memo->capacity >= memo->dirty); + delete[] memo->real_data; } + delete memo; } +/** @endcond never */ String::String(int i) { char buf[128]; sprintf(buf, "%d", i); - assign(buf, -1); + assign(buf, -1, false); } String::String(unsigned u) { char buf[128]; sprintf(buf, "%u", u); - assign(buf, -1); + assign(buf, -1, false); } -String::String(long d) +String::String(long i) { char buf[128]; - sprintf(buf, "%ld", d); - assign(buf, -1); + sprintf(buf, "%ld", i); + assign(buf, -1, false); } String::String(unsigned long u) { char buf[128]; sprintf(buf, "%lu", u); - assign(buf, -1); + assign(buf, -1, false); } String::String(double d) { char buf[128]; - sprintf(buf, "%.12g", d); - assign(buf, -1); + int len = sprintf(buf, "%.12g", d); + assign(buf, len, false); } String -String::claim_string(char *str, int len, int capacity) +String::make_claim(char *str, int len, int capacity) { assert(str && len > 0 && capacity >= len); - Memo *new_memo = new Memo(str, len, capacity); - if (new_memo) + if (memo_t *new_memo = create_memo(str, len, capacity)) return String(str, len, new_memo); else - return String(oom_memo->_real_data, 0, oom_memo); + return String(&oom_string_data, 0, &oom_memo); } String -String::stable_string(const char *str, int len) +String::make_stable(const char *s, int len) { if (len < 0) - len = (str ? strlen(str) : 0); + len = (s ? strlen(s) : 0); if (len == 0) return String(); else - return String(str, len, permanent_memo); + return String(s, len, &permanent_memo); } String -String::garbage_string(int len) +String::make_garbage(int len) { String s; s.append_garbage(len); @@ -130,7 +187,7 @@ String::garbage_string(int len) } String -String::fill_string(int c, int len) +String::make_fill(int c, int len) { String s; s.append_fill(c, len); @@ -138,111 +195,134 @@ String::fill_string(int c, int len) } void -String::make_out_of_memory() +String::assign_out_of_memory() { - if (_memo) + if (_r.memo) deref(); - _memo = oom_memo; - _memo->_refcount++; - _data = _memo->_real_data; - _length = 0; + _r.memo = &oom_memo; + _r.data = _r.memo->real_data; + _r.length = 0; + ++_r.memo->refcount; } void -String::assign(const char *str, int len) +String::assign(const char *str, int len, bool need_deref) { if (!str) { assert(len <= 0); len = 0; } else if (len < 0) len = strlen(str); - + + // need to start with dereference + if (need_deref) { + if (str >= _r.memo->real_data + && str + len <= _r.memo->real_data + _r.memo->capacity) { + // Be careful about "String s = ...; s = s.c_str();" + _r.data = str; + _r.length = len; + return; + } else + deref(); + } + if (len == 0) { - _memo = (str == oom_memo->_real_data ? oom_memo : null_memo); - _memo->_refcount++; - + _r.memo = (str == &oom_string_data ? &oom_memo : &null_memo); + ++_r.memo->refcount; + } else { - // Make 'capacity' a multiple of 16 characters at least as big as - // 'len'. + // Make 'capacity' a multiple of 16 characters and bigger than 'len'. int capacity = (len + 16) & ~15; - _memo = new Memo(len, capacity); - if (!_memo || !_memo->_real_data) { - make_out_of_memory(); + _r.memo = create_memo(0, len, capacity); + if (!_r.memo) { + assign_out_of_memory(); return; } - memcpy(_memo->_real_data, str, len); + memcpy(_r.memo->real_data, str, len); } - - _data = _memo->_real_data; - _length = len; + + _r.data = _r.memo->real_data; + _r.length = len; } char * -String::append_garbage(int suffix_len) +String::append_garbage(int len) { // Appending anything to "out of memory" leaves it as "out of memory" - if (suffix_len <= 0 || _memo == oom_memo) + if (len <= 0 || _r.memo == &oom_memo) return 0; - + // If we can, append into unused space. First, we check that there's - // enough unused space for `suffix_len' characters to fit; then, we check - // that the unused space immediately follows the data in `*this'. - if (_memo->_capacity > _memo->_dirty + suffix_len) { - char *real_dirty = _memo->_real_data + _memo->_dirty; - if (real_dirty == _data + _length) { - _length += suffix_len; - _memo->_dirty += suffix_len; - assert(_memo->_dirty < _memo->_capacity); + // enough unused space for 'len' characters to fit; then, we check + // that the unused space immediately follows the data in '*this'. + uint32_t dirty = _r.memo->dirty; + if (_r.memo->capacity > dirty + len) { + char *real_dirty = _r.memo->real_data + dirty; + if (real_dirty == _r.data + _r.length) { + _r.length += len; + _r.memo->dirty = dirty + len; + assert(_r.memo->dirty < _r.memo->capacity); return real_dirty; } } - + // Now we have to make new space. Make sure the new capacity is a - // multiple of 16 characters and that it is at least 16. - int new_capacity = (_length + 16) & ~15; - while (new_capacity < _length + suffix_len) + // multiple of 16 characters and that it is at least 16. But for large + // strings, allocate a power of 2, since power-of-2 sizes minimize waste + // in frequently-used allocators, like Linux kmalloc. + int new_capacity = (_r.length + len < 1024 ? (_r.length + 16) & ~15 : 1024); + while (new_capacity < _r.length + len) new_capacity *= 2; - Memo *new_memo = new Memo(_length + suffix_len, new_capacity); - if (!new_memo || !new_memo->_real_data) { - delete new_memo; - make_out_of_memory(); + + memo_t *new_memo = create_memo(0, _r.length + len, new_capacity); + if (!new_memo) { + assign_out_of_memory(); return 0; } - char *new_data = new_memo->_real_data; - memcpy(new_data, _data, _length); - + char *new_data = new_memo->real_data; + memcpy(new_data, _r.data, _r.length); + deref(); - _data = new_data; - new_data += _length; // now new_data points to the garbage - _length += suffix_len; - _memo = new_memo; + _r.data = new_data; + new_data += _r.length; // now new_data points to the garbage + _r.length += len; + _r.memo = new_memo; return new_data; } void -String::append(const char *suffix, int suffix_len) +String::append(const char *s, int len) { - if (!suffix) { - assert(suffix_len <= 0); - suffix_len = 0; - } else if (suffix_len < 0) - suffix_len = strlen(suffix); + if (!s) { + assert(len <= 0); + len = 0; + } else if (len < 0) + len = strlen(s); - if (char *space = append_garbage(suffix_len)) - memcpy(space, suffix, suffix_len); - else if (suffix == oom_memo->_real_data) + if (s == &oom_string_data) // Appending "out of memory" to a regular string makes it "out of // memory" - make_out_of_memory(); + assign_out_of_memory(); + else if (len == 0) + /* do nothing */; + else if (!(s >= _r.memo->real_data + && s + len <= _r.memo->real_data + _r.memo->capacity)) { + if (char *space = append_garbage(len)) + memcpy(space, s, len); + } else { + String preserve_s(*this); + if (char *space = append_garbage(len)) + memcpy(space, s, len); + } } void -String::append_fill(int c, int suffix_len) +String::append_fill(int c, int len) { - assert(suffix_len >= 0); - if (char *space = append_garbage(suffix_len)) - memset(space, c, suffix_len); + assert(len >= 0); + if (char *space = append_garbage(len)) + memset(space, c, len); } char * @@ -250,15 +330,15 @@ String::mutable_data() { // If _memo has a capacity (it's not one of the special strings) and it's // uniquely referenced, return _data right away. - if (_memo->_capacity && _memo->_refcount == 1) - return const_cast<char *>(_data); - + if (_r.memo->capacity && _r.memo->refcount == 1) + return const_cast<char *>(_r.data); + // Otherwise, make a copy of it. Rely on: deref() doesn't change _data or // _length; and if _capacity == 0, then deref() doesn't free _real_data. - assert(!_memo->_capacity || _memo->_refcount > 1); + assert(!_r.memo->capacity || _r.memo->refcount > 1); deref(); - assign(_data, _length); - return const_cast<char *>(_data); + assign(_r.data, _r.length, false); + return const_cast<char *>(_r.data); } char * @@ -266,7 +346,7 @@ String::mutable_c_str() { (void) mutable_data(); (void) c_str(); - return const_cast<char *>(_data); + return const_cast<char *>(_r.data); } const char * @@ -276,94 +356,107 @@ String::c_str() const // or PermString). We are guaranteed, in these strings, that // _data[_length] exists. We can return _data immediately if we have a // '\0' in the right place. - if (!_memo->_capacity && _data[_length] == '\0') - return _data; - + if (!_r.memo->capacity && _r.data[_r.length] == '\0') + return _r.data; + // Otherwise, this invariant must hold (there's more real data in _memo // than in our substring). - assert(!_memo->_capacity - || _memo->_real_data + _memo->_dirty >= _data + _length); - + assert(!_r.memo->capacity + || _r.memo->real_data + _r.memo->dirty >= _r.data + _r.length); + // Has the character after our substring been set? - if (_memo->_real_data + _memo->_dirty == _data + _length) { - // Character after our substring has not been set. May be able to - // change it to '\0'. This case will never occur on special strings. - if (_memo->_dirty < _memo->_capacity) - goto add_final_nul; - + uint32_t dirty = _r.memo->dirty; + if (_r.memo->real_data + dirty == _r.data + _r.length) { + if (_r.memo->capacity > dirty) { + _r.memo->dirty = dirty + 1; + // Character after our substring has not been set. Change it to + // '\0'. This case will never occur on special strings. + char *real_data = const_cast<char *>(_r.data); + real_data[_r.length] = '\0'; + return _r.data; + } + } else { // Character after our substring has been set. OK to return _data if // it is already '\0'. - if (_data[_length] == '\0') - return _data; + if (_r.data[_r.length] == '\0') + return _r.data; } - + // If we get here, we must make a copy of our portion of the string. { - String s(_data, _length); + String s(_r.data, _r.length); deref(); assign(s); } - - add_final_nul: - char *real_data = const_cast<char *>(_data); - real_data[_length] = '\0'; - _memo->_dirty++; // include '\0' in used portion of _memo - return _data; + + char *real_data = const_cast<char *>(_r.data); + real_data[_r.length] = '\0'; + ++_r.memo->dirty; // include '\0' in used portion of _memo + return _r.data; } String -String::substring(int left, int len) const +String::substring(int pos, int len) const { - if (left < 0) - left += _length; + if (pos < 0) + pos += _r.length; + + int pos2; if (len < 0) - len = _length - left + len; - if (left + len > _length) - len = _length - left; - - if (left < 0 || len <= 0) + pos2 = _r.length + len; + else if (pos >= 0 && len >= _r.length) // avoid integer overflow + pos2 = _r.length; + else + pos2 = pos + len; + + if (pos < 0) + pos = 0; + if (pos2 > _r.length) + pos2 = _r.length; + + if (pos >= pos2) return String(); else - return String(_data + left, len, _memo); + return String(_r.data + pos, pos2 - pos, _r.memo); } int -String::find_left(int c, int start) const +String::find_left(char c, int start) const { - if (start < 0) - start = 0; - for (int i = start; i < _length; i++) - if ((unsigned char)_data[i] == c) - return i; - return -1; + if (start < 0) + start = 0; + for (int i = start; i < _r.length; i++) + if (_r.data[i] == c) + return i; + return -1; } int -String::find_left(const String &s, int start) const +String::find_left(const String &str, int start) const { if (start < 0) start = 0; if (start >= length()) return -1; - if (!s.length()) + if (!str.length()) return 0; - int first_c = (unsigned char)s[0]; - int pos = start, max_pos = length() - s.length(); + int first_c = (unsigned char)str[0]; + int pos = start, max_pos = length() - str.length(); for (pos = find_left(first_c, pos); pos >= 0 && pos <= max_pos; pos = find_left(first_c, pos + 1)) - if (!memcmp(_data + pos, s._data, s.length())) + if (!memcmp(_r.data + pos, str._r.data, str.length())) return pos; return -1; } int -String::find_right(int c, int start) const +String::find_right(char c, int start) const { - if (start >= _length) - start = _length - 1; + if (start >= _r.length) + start = _r.length - 1; for (int i = start; i >= 0; i--) - if ((unsigned char)_data[i] == c) + if (_r.data[i] == c) return i; return -1; } @@ -383,8 +476,8 @@ String String::lower() const { // avoid copies - for (int i = 0; i < _length; i++) - if (_data[i] >= 'A' && _data[i] <= 'Z') + for (int i = 0; i < _r.length; i++) + if (_r.data[i] >= 'A' && _r.data[i] <= 'Z') return hard_lower(*this, i); return *this; } @@ -404,8 +497,8 @@ String String::upper() const { // avoid copies - for (int i = 0; i < _length; i++) - if (_data[i] >= 'a' && _data[i] <= 'z') + for (int i = 0; i < _r.length; i++) + if (_r.data[i] >= 'a' && _r.data[i] <= 'z') return hard_upper(*this, i); return *this; } @@ -432,43 +525,143 @@ String String::printable() const { // avoid copies - for (int i = 0; i < _length; i++) - if (_data[i] < 32 || _data[i] > 126) + for (int i = 0; i < _r.length; i++) + if (_r.data[i] < 32 || _r.data[i] > 126) return hard_printable(*this, i); return *this; } -unsigned -hashcode(const String &s) +uint32_t +String::hashcode(const char *begin, const char *end) +{ + if (end <= begin) + return 0; + + uint32_t hash = end - begin; + int rem = hash & 3; + end -= rem; + uint32_t last16; + +#if !HAVE_INDIFFERENT_ALIGNMENT + if (!(reinterpret_cast<uintptr_t>(begin) & 1)) { +#endif +#define get16(p) (*reinterpret_cast<const uint16_t *>((p))) + for (; begin != end; begin += 4) { + hash += get16(begin); + uint32_t tmp = (get16(begin + 2) << 11) ^ hash; + hash = (hash << 16) ^ tmp; + hash += hash >> 11; + } + if (rem >= 2) { + last16 = get16(begin); + goto rem2; + } +#undef get16 +#if !HAVE_INDIFFERENT_ALIGNMENT + } else { +# if !__i386__ +# define get16(p) (((unsigned char) (p)[0] << 8) + (unsigned char) (p)[1]) +# else +# define get16(p) ((unsigned char) (p)[0] + ((unsigned char) (p)[1] << 8)) +# endif + // should be exactly the same as the code above + for (; begin != end; begin += 4) { + hash += get16(begin); + uint32_t tmp = (get16(begin + 2) << 11) ^ hash; + hash = (hash << 16) ^ tmp; + hash += hash >> 11; + } + if (rem >= 2) { + last16 = get16(begin); + goto rem2; + } +# undef get16 + } +#endif + + /* Handle end cases */ + if (0) { // weird organization avoids uninitialized + rem2: // variable warnings + if (rem == 3) { + hash += last16; + hash ^= hash << 16; + hash ^= ((unsigned char) begin[2]) << 18; + hash += hash >> 11; + } else { + hash += last16; + hash ^= hash << 11; + hash += hash >> 17; + } + } else if (rem == 1) { + hash += (unsigned char) *begin; + hash ^= hash << 10; + hash += hash >> 1; + } + + /* Force "avalanching" of final 127 bits */ + hash ^= hash << 3; + hash += hash >> 5; + hash ^= hash << 4; + hash += hash >> 17; + hash ^= hash << 25; + hash += hash >> 6; + + return hash; +} + +#if 0 +// 11.Apr.2008 -- This old hash function was swapped out in favor of +// SuperFastHash, above. +size_t +String::hashcode() const { - int length = s.length(); - const char *data = s.data(); - if (!length) + int l = length(); + const char *d = data(); + if (!l) return 0; - else if (length == 1) - return data[0] | (data[0] << 8); - else if (length < 4) - return data[0] + (data[1] << 3) + (length << 12); + else if (l == 1) + return d[0] | (d[0] << 8); + else if (l < 4) + return d[0] + (d[1] << 3) + (l << 12); else - return data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24) - + (length << 12) + (data[length-1] << 10); + return d[0] + (d[1] << 8) + (d[2] << 16) + (d[3] << 24) + + (l << 12) + (d[l-1] << 10); } +#endif bool String::equals(const char *s, int len) const { - // I would like to make "out-of-memory" strings compare unequal to - // anything, even themseleves, but this would be a bad idea for Strings + // It'd be nice to make "out-of-memory" strings compare unequal to + // anything, even themselves, but this would be a bad idea for Strings // used as (for example) keys in hashtables. Instead, "out-of-memory" // strings compare unequal to other null strings, but equal to each other. if (len < 0) len = strlen(s); - if (_length != len) + if (_r.length != len) return false; + else if (_r.data == s) + return true; else if (len == 0) - return (_data == s || (s != oom_memo->_real_data && _memo != oom_memo)); + return (s != &oom_string_data && _r.memo != &oom_memo); else - return (_data == s || memcmp(_data, s, len) == 0); + return memcmp(_r.data, s, len) == 0; +} + +bool +String::starts_with(const char *s, int len) const +{ + // See note on equals() re: "out-of-memory" strings. + if (len < 0) + len = strlen(s); + if (_r.length < len) + return false; + else if (_r.data == s) + return true; + else if (len == 0) + return (s != &oom_string_data && _r.memo != &oom_memo); + else + return memcmp(_r.data, s, len) == 0; } int @@ -476,15 +669,19 @@ String::compare(const char *s, int len) const { if (len < 0) len = strlen(s); - if (_data == s && _length == len) - return 0; - if (_length == len) - return memcmp(_data, s, len); - else if (_length < len) { - int v = memcmp(_data, s, _length); + if (_r.data == s) + return _r.length - len; + else if (_r.memo == &oom_memo) + return 1; + else if (s == &oom_string_data) + return -1; + else if (_r.length == len) + return memcmp(_r.data, s, len); + else if (_r.length < len) { + int v = memcmp(_r.data, s, _r.length); return (v ? v : -1); } else { - int v = memcmp(_data, s, len); + int v = memcmp(_r.data, s, len); return (v ? v : 1); } } @@ -492,57 +689,14 @@ String::compare(const char *s, int len) const void String::align(int n) { - int offset = reinterpret_cast<uintptr_t>(_data) % n; + int offset = reinterpret_cast<uintptr_t>(_r.data) % n; if (offset) { String s; - s.append_garbage(_length + n + 1); - offset = reinterpret_cast<uintptr_t>(s._data) % n; - memcpy((char *)s._data + n - offset, _data, _length); - s._data += n - offset; - s._length = _length; + s.append_garbage(_r.length + n + 1); + offset = reinterpret_cast<uintptr_t>(s._r.data) % n; + memcpy((char *)s._r.data + n - offset, _r.data, _r.length); + s._r.data += n - offset; + s._r.length = _r.length; *this = s; } } - - -String::Initializer::Initializer() -{ - String::static_initialize(); -} - -void -String::static_initialize() -{ - // function called to initialize static globals - if (!null_memo) { - null_memo = new Memo; - null_memo->_refcount++; - permanent_memo = new Memo; - permanent_memo->_refcount++; - // use a separate string for oom_memo's data, so we can distinguish - // the pointer - oom_memo = new Memo; - oom_memo->_refcount++; - oom_memo->_real_data = const_cast<char*>(&oom_string_data); - null_string_p = new String; - oom_string_p = new String(oom_memo->_real_data, 0, oom_memo); - } -} - -void -String::static_cleanup() -{ - if (null_string_p) { - delete null_string_p; - null_string_p = 0; - delete oom_string_p; - oom_string_p = 0; - if (--null_memo->_refcount == 0) - delete null_memo; - if (--permanent_memo->_refcount == 0) - delete permanent_memo; - if (--oom_memo->_refcount == 0) - delete oom_memo; - null_memo = permanent_memo = oom_memo = 0; - } -} diff --git a/Build/source/texk/lcdf-typetools/liblcdf/transform.cc b/Build/source/texk/lcdf-typetools/liblcdf/transform.cc index b59da9de99a..d8b58a02d08 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/transform.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/transform.cc @@ -76,11 +76,11 @@ Transform::rotate(double r) { double c = cos(r); double s = sin(r); - + double a = _m[0], b = _m[2]; _m[0] = a*c + b*s; _m[2] = b*c - a*s; - + a = _m[1], b = _m[3]; _m[1] = a*c + b*s; _m[3] = b*c - a*s; diff --git a/Build/source/texk/lcdf-typetools/liblcdf/vectorv.cc b/Build/source/texk/lcdf-typetools/liblcdf/vectorv.cc index 26dc1a05a66..f5f12b52c90 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/vectorv.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/vectorv.cc @@ -60,14 +60,14 @@ Vector<void*>::reserve(int want) want = (_capacity > 0 ? _capacity * 2 : 4); if (want <= _capacity) return true; - + void **new_l = new void*[want]; if (!new_l) return false; - + memcpy(new_l, _l, sizeof(void*) * _n); delete[] _l; - + _l = new_l; _capacity = want; return true; diff --git a/Build/source/texk/lcdf-typetools/m4/ac_cxx_template_objs.m4 b/Build/source/texk/lcdf-typetools/m4/ac_cxx_template_objs.m4 new file mode 100644 index 00000000000..823ae58cce6 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/ac_cxx_template_objs.m4 @@ -0,0 +1,69 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_template_objs.html +dnl +dnl Adapted for Autoconf 2.63 Peter Breitenlohner <peb@mppmu.mpg.de> +dnl +AC_DEFUN([AC_CXX_TEMPLATE_OBJS], +[AC_CACHE_CHECK(where template objects are stored, ac_cv_cxx_templobjs, + [ ac_cv_cxx_templobjs='unknown' + if test "$GXX" = yes; then + ac_cv_cxx_templobjs='nowhere' + else + case $CXX in + CC|*/CC) + cat > conftest.cc <<EOF +template<class T> class A { public : A () {} }; +template<class T> void f (const A<T>&) {} +main() +{ A<double> d; + A<int> i; + f (d); + f (i); + return 0; +} +EOF + if test "$ac_cv_cxx_templobjs" = 'unknown' ; then + if test -d Templates.DB ; then + rm -fr Templates.DB + fi + if $CXX $CXXFLAGS -ptr. -c conftest.cc 1> /dev/null 2>&1; then + if test -d Templates.DB ; then +# this should be Sun CC <= 4.2 + CXXFLAGS="$CXXFLAGS -ptr." + if test x"$LIBTOOL" = x ; then + ac_cv_cxx_templobjs='Templates.DB/*.o' + else + ac_cv_cxx_templobjs='Templates.DB/*.lo' + fi + rm -fr Templates.DB + fi + fi + fi + if test "$ac_cv_cxx_templobjs" = 'unknown' ; then + if test -d SunWS_cache ; then + rm -fr SunWS_cache + fi + if $CXX $CXXFLAGS -c conftest.cc 1> /dev/null 2>&1; then + if test -d SunWS_cache ; then +# this should be Sun WorkShop C++ compiler 5.x +# or Sun Forte C++ compiler >= 6.x + if test x"$LIBTOOL" = x ; then + ac_cv_cxx_templobjs='SunWS_cache/*/*.o' + else + ac_cv_cxx_templobjs='SunWS_cache/*/*.lo' + fi + rm -fr SunWS_cache + fi + fi + fi + rm -f conftest* ;; + esac + fi]) +case $ac_cv_cxx_templobjs in + unknown|nowhere) + TEMPLATE_OBJS="" ;; + *) + TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; +esac +AC_SUBST(TEMPLATE_OBJS)]) + diff --git a/Build/source/texk/lcdf-typetools/m4/kpse-common.m4 b/Build/source/texk/lcdf-typetools/m4/kpse-common.m4 new file mode 100644 index 00000000000..ec45662634d --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/kpse-common.m4 @@ -0,0 +1,235 @@ +# Public macros for the teTeX / TeX Live (TL) tree. +# Copyright (C) 1995 - 2009 Karl Berry <tex-live@tug.org> +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 0 + +# KPSE_LIBS_PREPARE +# ----------------- +# Enforce inclusion of this file. +AC_DEFUN([KPSE_LIBS_PREPARE], []) + +# _KPSE_INIT() +# ------------ +# Initialize infrastructure for libraries and programs in the TL tree. +# If in the TL tree, define kpse_TL as relative path to the TL root. +AC_DEFUN([_KPSE_INIT], +[## $0: Initialize TL infrastructure +m4_syscmd([test -f ../../texk/kpathsea/doc/kpathsea.texi])[]dnl +m4_if(m4_sysval, [0], [m4_define([kpse_TL], [../../])])[]dnl +m4_ifdef([kpse_TL], +[kpse_BLD=`(cd "./kpse_TL()." && pwd)` +kpse_SRC=`(cd "$srcdir/kpse_TL()." && pwd)` +])[]dnl +]) # _KPSE_INIT + +# KPSE_INIT() +# ----------- +# Initialize, if not automatically done so via KPSE_*_FLAGS +AC_DEFUN([KPSE_INIT], +[AC_REQUIRE([_KPSE_INIT])]) + +# _KPSE_USE_LIBTOOL() +# ------------------ +AC_DEFUN([_KPSE_USE_LIBTOOL], +[## $0: Generate a libtool script for use in configure tests +AC_PROVIDE_IFELSE([LT_INIT], , + [m4_fatal([$0: requires libtool])])[]dnl +LT_OUTPUT +m4_append([AC_LANG(C)], +[ac_link="./libtool --mode=link --tag=CC $ac_link" +])[]dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], +[m4_append([AC_LANG(C++)], +[ac_link="./libtool --mode=link --tag=CXX $ac_link" +])])[]dnl +AC_LANG(_AC_LANG)[]dnl +]) # _KPSE_USE_LIBTOOL + +# _KPSE_LIB_FLAGS(LIBDIR, LIBNAME, +# [SHELL-CODE=DEFAULT-SHELL-CODE], +# INCLUDES, LIBS, OPTIONS, +# [REBUILD-SRC-DEPENDENCIES], +# [REBUILD-BLD-DEPENDENCIES]) +# ------------------------------------------------ +# Provide the configure options '--with-system-LIBDIR' (if in the TL tree), +# '--with-LIBDIR-includes', and '--with-LIBDIR-libdir'. +# +# Set the make variables LIBDIR_INCLUDES and LIBDIR_LIBS to the CPPFLAGS and +# LIBS required for the library in the directory libs/LIBDIR/ of the TL tree. +# +# If an installed (system) version of the library has been selected or is +# implied, then execute SHELL-CODE to set the two variables. +# In most cases DEFAULT-SHELL-CODE will do the right thing, based on the +# values of with_LIBDIR_includes and with_LIBDIR_libdir. +# +# Otherwise, set LIBDIR_INCLUDES based on the value of INCLUDES and +# LIBDIR_LIBS based on the value of LIBS. If OPTIONS specifies a libtool +# library, then arrange that future configure test use libtool. +# Furthermore, set LIBDIR_DEPEND and LIBDIR_RULE to values suitable as +# dependency and rule to rebuild the library (assuming that +# '${top_srcdir}/../../' and '${top_builddir}/../../' point to the root of +# the TL tree). +AC_DEFUN([_KPSE_LIB_FLAGS], +[AC_REQUIRE([_KPSE_INIT])[]dnl +## $0: Setup $1 (-l$2) flags +m4_ifdef([kpse_TL], + [_KPSE_LIB_FLAGS_TL($@)], + [_KPSE_LIB_FLAGS_STANDALONE($@)])[]dnl +AC_SUBST(AS_TR_CPP($1)[_INCLUDES])[]dnl +AC_SUBST(AS_TR_CPP($1)[_LIBS])[]dnl +AC_SUBST(AS_TR_CPP($1)[_DEPEND])[]dnl +AC_SUBST(AS_TR_CPP($1)[_RULE])[]dnl +m4_provide_if([AM_INIT_AUTOMAKE], [_AM_SUBST_NOTMAKE(AS_TR_CPP($1)[_RULE])])[]dnl +]) # _KPSE_LIB_FLAGS + +# _KPSE_LIB_FLAGS_TL(LIBDIR, LIBNAME, +# [SHELL-CODE=DEFAULT-SHELL-CODE], +# INCLUDES, LIBS, OPTIONS, +# [REBUILD-SRC-DEPENDENCIES], +# [REBUILD-BLD-DEPENDENCIES]) +# --------------------------------------------------- +# Internal subroutine for use of _KPSE_LIB_FLAGS inside the TL tree. +m4_define([_KPSE_LIB_FLAGS_TL], +[m4_if(m4_index([ $6 ], [ lt ]), [-1], , + [AC_REQUIRE([_KPSE_USE_LIBTOOL])])[]dnl m4_if +m4_if(m4_index([ $6 ], [ tree ]), [-1], + [AC_ARG_WITH([system-$1], + [AS_HELP_STRING([--with-system-$1], + [use installed $1 headers and library])])[]dnl +_KPSE_LIB_FLAGS_WITH([$1])[]dnl +if test "x$with_system_[]AS_TR_SH($1)" = xyes; then + m4_ifval([$3], [$3], AS_TR_CPP([kpse-$1-system-flags]))[]dnl +else +])[]dnl m4_if + AS_TR_CPP($1)[_INCLUDES=`echo '$4' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"`] + AS_TR_CPP($1)[_LIBS=`echo '$5' | sed \ + -e "s,BLD/,$kpse_BLD/,g"`] + m4_if([$1], [kpathsea], + [AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \ + -e 's,BLD/texk/,${top_builddir}/../,g'`] + AS_TR_CPP($1)[_RULE='# Rebuild lib$2 +$(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7], + [[ $7]])m4_ifval([$8], [[ $8 + cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) +$8:]])[ + cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS)']], + [AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'`] + AS_TR_CPP($1)[_RULE='# Rebuild lib$2 +$(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7], + [[ $7]])m4_ifval([$8], [[ $8 + cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) +$8:]])[ + cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS)']]) +m4_if(m4_index([ $6 ], [ tree ]), [-1], + [fi +])[]dnl m4_if +]) # _KPSE_LIB_FLAGS_TL + +# _KPSE_LIB_FLAGS_STANDALONE(LIBDIR, LIBNAME, +# [SHELL-CODE=DEFAULT-SHELL-CODE], +# INCLUDES, LIBS, OPTIONS) +# ------------------------------------------------ +# Internal subroutine for standalone use of_KPSE_LIB_FLAGS. +m4_define([_KPSE_LIB_FLAGS_STANDALONE], +[m4_if(m4_index([ $6 ], [ tree ]), [-1], , +[m4_fatal([$0: not in TL tree])])[]dnl m4_if +_KPSE_LIB_FLAGS_WITH([$1])[]dnl +m4_ifval([$3], [$3], [_KPSE_LIB_FLAGS_SYSTEM([$1], [$2])])[]dnl +]) # _KPSE_LIB_FLAGS_STANDALONE + +# _KPSE_LIB_FLAGS_WITH(LIBDIR) +# ---------------------------- +# Internal subroutine for of_KPSE_LIB_FLAGS: configure options. +m4_define([_KPSE_LIB_FLAGS_WITH], +[AC_ARG_WITH([$1-includes], + [AS_HELP_STRING([--with-$1-includes=DIR], + [$1 headers installed in DIR])])[]dnl +AC_ARG_WITH([$1-libdir], + [AS_HELP_STRING([--with-$1-libdir=DIR], + [$1 library installed in DIR])])[]dnl +]) # _KPSE_LIB_FLAGS_WITH + +# _KPSE_LIB_FLAGS_SYSTEM(LIBDIR, LIBNAME) +# --------------------------------------- +# Internal subroutine for of_KPSE_LIB_FLAGS: default flags for system library. +m4_define([_KPSE_LIB_FLAGS_SYSTEM], +[if test "x$with_[]AS_TR_SH($1)_includes" != x && test "x$with_[]AS_TR_SH($1)_includes" != xyes; then + AS_TR_CPP($1)_INCLUDES="-I$with_[]AS_TR_SH($1)_includes" +fi +AS_TR_CPP($1)_LIBS="-l$2" +if test "x$with_[]AS_TR_SH($1)_libdir" != x && test "x$with_[]AS_TR_SH($1)_libdir" != xyes; then + AS_TR_CPP($1)_LIBS="-L$with_[]AS_TR_SH($1)_libdir $AS_TR_CPP($1)_LIBS" +fi +]) # _KPSE_LIB_FLAGS_SYSTEM + +# KPSE_COMMON(PACKAGE-NAME, [MORE-AUTOMAKE-OPTIONS]) +# -------------------------------------------------- +# Common Autoconf code for all programs using libkpathsea. +# Originally written by Karl Berry as texk/kpathsea/common.ac. +# +# Initializtion of Automake and Libtool, some common tests. +AC_DEFUN([KPSE_COMMON], +[dnl Remember PACKAGE-NAME as Kpse_Package (for future messages) +m4_define([Kpse_Package], [$1]) +dnl +AM_INIT_AUTOMAKE([foreign dist-bzip2]m4_ifval([$2], [ $2])) +AM_MAINTAINER_MODE +dnl +LT_PREREQ([2.2.6]) +LT_INIT +dnl +AC_SYS_LARGEFILE +AC_FUNC_FSEEKO +dnl +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_FUNC_CLOSEDIR_VOID +AC_CHECK_HEADERS([assert.h float.h limits.h memory.h pwd.h stdlib.h \ + string.h strings.h sys/param.h unistd.h]) +dnl +dnl Replacement functions that may be required on ancient broken system. +AC_CHECK_FUNCS([putenv strcasecmp strtol strstr]) +dnl +dnl More common functions +AC_CHECK_FUNCS([bcmp bcopy bzero getcwd getwd index memcmp memcpy rindex strchr strrchr]) +dnl +AC_C_CONST +AC_C_INLINE +dnl +dnl Check whether struct stat provides high-res time. +AC_CHECK_MEMBERS([struct stat.st_mtim]) +dnl +dnl Check whether prototypes work. +AC_CACHE_CHECK([whether the compiler accepts prototypes], + [kb_cv_c_prototypes], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>]], + [[extern void foo(int i,...);]])], + [kb_cv_c_prototypes=yes], + [kb_cv_c_prototypes=no])]) +if test "$kb_cv_c_prototypes" = yes; then + AC_DEFINE([HAVE_PROTOTYPES], 1, + [Define to 1 if your compiler understands prototypes.]) +fi +dnl +dnl This is a GNU libc invention. +AC_CACHE_CHECK([whether program_invocation_name is predefined], + [kb_cv_var_program_inv_name], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[extern char *program_invocation_name; + program_invocation_name = "love";]])], + [kb_cv_var_program_inv_name=yes], + [kb_cv_var_program_inv_name=no])]) +if test "$kb_cv_var_program_inv_name" = yes; then + AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], 1, + [Define to 1 if you are using GNU libc or otherwise have global variables + `program_invocation_name' and `program_invocation_short_name'.]) +fi +]) # KPSE_COMMON diff --git a/Build/source/texk/lcdf-typetools/m4/kpse-kpathsea-flags.m4 b/Build/source/texk/lcdf-typetools/m4/kpse-kpathsea-flags.m4 new file mode 100644 index 00000000000..afc3cd3c306 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/kpse-kpathsea-flags.m4 @@ -0,0 +1,30 @@ +# Public macros for the teTeX / TeX Live (TL) tree. +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 0 + +# KPSE_KPATHSEA_FLAGS([SHELL-CODE=DEFAULT-SHELL-CODE]) +# ---------------------------------------------------- +# Provide the configure options '--with-system-kpathsea' (if in the TL tree), +# '--with-kpathsea-includes', and '--with-kpathsea-libdir'. +# +# Set the make variables KPATHSEA_INCLUDES and KPATHSEA_LIBS to the CPPFLAGS and +# LIBS required for the `-lkpathsea' library in texk/kpathsea/ of the TL tree. +AC_DEFUN([KPSE_KPATHSEA_FLAGS], +[_KPSE_LIB_FLAGS([kpathsea], [kpathsea], + [$1], + [-IBLD/texk -ISRC/texk], + [BLD/texk/kpathsea/libkpathsea.la], [lt], + [${top_srcdir}/../kpathsea/*.[ch]], + [${top_builddir}/../kpathsea/paths.h])[]dnl +]) # KPSE_KPATHSEA_FLAGS + +# KPSE_KPATHSEA_SYSTEM_FLAGS +# -------------------------- +AC_DEFUN([KPSE_KPATHSEA_SYSTEM_FLAGS], +[_KPSE_LIB_FLAGS_SYSTEM([kpathsea], [kpathsea])[]dnl +]) # KPSE__SYSTEM_FLAGS diff --git a/Build/source/texk/lcdf-typetools/m4/libtool.m4 b/Build/source/texk/lcdf-typetools/m4/libtool.m4 new file mode 100644 index 00000000000..39ba996cb96 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/libtool.m4 @@ -0,0 +1,7357 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -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 + +Report bugs to <bug-libtool@gnu.org>." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$lt_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +_LT_PATH_LD_GNU +AC_SUBST([LD]) + +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD + +# Old names: +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_LD], []) +dnl AC_DEFUN([AC_PROG_LD], []) + + +# _LT_PATH_LD_GNU +#- -------------- +m4_defun([_LT_PATH_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac]) +with_gnu_ld=$lt_cv_prog_gnu_ld +])# _LT_PATH_LD_GNU + + +# _LT_CMD_RELOAD +# -------------- +# find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +m4_defun([_LT_CMD_RELOAD], +[AC_CACHE_CHECK([for $LD option to reload object files], + lt_cv_ld_reload_flag, + [lt_cv_ld_reload_flag='-r']) +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac +_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_DECL([], [reload_cmds], [2])dnl +])# _LT_CMD_RELOAD + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/Build/source/texk/lcdf-typetools/m4/ltoptions.m4 b/Build/source/texk/lcdf-typetools/m4/ltoptions.m4 new file mode 100644 index 00000000000..34151a3ba62 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/Build/source/texk/lcdf-typetools/m4/ltsugar.m4 b/Build/source/texk/lcdf-typetools/m4/ltsugar.m4 new file mode 100644 index 00000000000..9000a057d31 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/Build/source/texk/lcdf-typetools/m4/ltversion.m4 b/Build/source/texk/lcdf-typetools/m4/ltversion.m4 new file mode 100644 index 00000000000..b8e154fe6e1 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/Build/source/texk/lcdf-typetools/m4/lt~obsolete.m4 b/Build/source/texk/lcdf-typetools/m4/lt~obsolete.m4 new file mode 100644 index 00000000000..637bb2066c4 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/Build/source/texk/lcdf-typetools/mmafm/Makefile.am b/Build/source/texk/lcdf-typetools/mmafm/Makefile.am index 4d535e5cfbd..7a5fc397a20 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/Makefile.am +++ b/Build/source/texk/lcdf-typetools/mmafm/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = mmafm man_MANS = mmafm.1 diff --git a/Build/source/texk/lcdf-typetools/mmafm/Makefile.in b/Build/source/texk/lcdf-typetools/mmafm/Makefile.in index 416f61f7886..8dbd4192585 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/Makefile.in +++ b/Build/source/texk/lcdf-typetools/mmafm/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = mmafm$(EXEEXT) subdir = mmafm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,13 +55,17 @@ am_mmafm_OBJECTS = main.$(OBJEXT) mmafm_OBJECTS = $(am_mmafm_OBJECTS) mmafm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(mmafm_SOURCES) DIST_SOURCES = $(mmafm_SOURCES) man1dir = $(mandir)/man1 @@ -64,6 +76,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,29 +93,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -111,6 +135,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -123,20 +148,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -145,6 +179,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -160,7 +195,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = mmafm.1 mmafm_SOURCES = main.cc mmafm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @@ -170,13 +204,13 @@ EXTRA_DIST = mmafm.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -206,10 +240,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -222,7 +257,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done mmafm$(EXEEXT): $(mmafm_OBJECTS) $(mmafm_DEPENDENCIES) @rm -f mmafm$(EXEEXT) $(CXXLINK) $(mmafm_OBJECTS) $(mmafm_LDADD) $(LIBS) @@ -248,6 +287,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -299,7 +351,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -401,7 +453,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -444,7 +496,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -461,18 +514,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/mmafm/main.cc b/Build/source/texk/lcdf-typetools/mmafm/main.cc index b58480e72c7..655e60e30c8 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/main.cc +++ b/Build/source/texk/lcdf-typetools/mmafm/main.cc @@ -1,6 +1,6 @@ /* main.cc -- driver for mmafm program * - * Copyright (c) 1997-2006 Eddie Kohler + * Copyright (c) 1997-2009 Eddie Kohler * * 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 @@ -114,7 +114,7 @@ apply_precision(Metrics *m, int precision) { if (precision < 0) return; - + double multiplier = 1, divider = 1; for (int i = 0; i < precision; i++) multiplier *= 10, divider /= 10; @@ -151,7 +151,7 @@ read_file(const char *fn, MetricsFinder *finder) { Filename filename; FILE *file; - + if (strcmp(fn, "-") == 0) { filename = Filename("<stdin>"); file = stdin; @@ -160,7 +160,7 @@ read_file(const char *fn, MetricsFinder *finder) file = filename.open_read(); } int save_errno = errno; - + if (!file) { // look for a font by name AmfmMetrics *new_amfm = finder->find_amfm(fn, errh); @@ -170,7 +170,7 @@ read_file(const char *fn, MetricsFinder *finder) } if (finder->find_metrics(fn, errh)) return; - + // check for instance name. don't use InstanceMetricsFinder. const char *underscore = strchr(fn, '_'); if (underscore) @@ -178,7 +178,7 @@ read_file(const char *fn, MetricsFinder *finder) if (!new_amfm) errh->fatal("%s: %s", fn, strerror(save_errno)); set_amfm(new_amfm); - + int i = 0; while (underscore[0] == '_' && underscore[1]) { double x = strtod(underscore + 1, const_cast<char **>(&underscore)); @@ -187,7 +187,7 @@ read_file(const char *fn, MetricsFinder *finder) } return; } - + Slurper slurper(filename, file); bool is_afm = false; if (file != stdin) { @@ -195,7 +195,7 @@ read_file(const char *fn, MetricsFinder *finder) if (first_line) is_afm = strncmp(first_line, "StartFontMetrics", 16) == 0; } - + if (is_afm) { Metrics *afm = AfmReader::read(slurper, errh); if (afm) @@ -213,7 +213,7 @@ usage_error(const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION | FONT]...", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -221,8 +221,9 @@ usage_error(const char *error_message, ...) static void usage() { - printf("\ -'Mmafm' creates an AFM font metrics file for a multiple master font by\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Mmafm%> creates an AFM font metrics file for a multiple master font by\n\ interpolating at a point you specify and writes it to the standard output.\n\ \n\ Usage: %s [OPTION | FONT]...\n\ @@ -245,7 +246,7 @@ Interpolation settings:\n\ -p, --precision=N Allow N digits of fraction (default 3).\n\ -k, --min-kern=N Remove kerns smaller than N (default 2).\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -253,41 +254,41 @@ int main(int argc, char *argv[]) { MetricsFinder *finder = new CacheMetricsFinder; - + PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); PsresMetricsFinder *psres_finder = new PsresMetricsFinder(psres); finder->add_finder(psres_finder); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); - + FILE *output_file = 0; int precision = 3; double kern_precision = 2.0; while (1) { int opt = Clp_Next(clp); switch (opt) { - + case WEIGHT_OPT: set_design("Weight", clp->val.d); break; - + case WIDTH_OPT: set_design("Width", clp->val.d); break; - + case OPSIZE_OPT: set_design("OpticalSize", clp->val.d); break; - + case STYLE_OPT: set_design("Style", clp->val.d); break; - + case N1_OPT: case N2_OPT: case N3_OPT: @@ -298,11 +299,11 @@ main(int argc, char *argv[]) case PRECISION_OPT: precision = clp->val.i; break; - + case KERN_PREC_OPT: kern_precision = clp->val.d; break; - + case OUTPUT_OPT: if (output_file) errh->fatal("output file already specified"); if (strcmp(clp->vstr, "-") == 0) @@ -313,44 +314,44 @@ main(int argc, char *argv[]) errh->fatal("%s: %s", clp->vstr, strerror(errno)); } break; - + case HELP_OPT: usage(); exit(0); break; - + case VERSION_OPT: printf("mmafm (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1997-2006 Eddie Kohler\n\ + printf("Copyright (C) 1997-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case Clp_NotOption: read_file(clp->vstr, finder); break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(0); break; - + } } - + done: if (!amfm) usage_error("missing font argument"); - + MultipleMasterSpace *mmspace = amfm->mmspace(); #if MMAFM_RUN_MMPFB if (!mmspace->check_intermediate()) { char *buf = new char[amfm->font_name().length() + 30]; sprintf(buf, "mmpfb -q --amcp-info '%s'", amfm->font_name().c_str()); - + FILE *f = popen(buf, "r"); if (f) { Filename fake("<mmpfb output>"); @@ -358,47 +359,47 @@ particular purpose.\n"); AmfmReader::add_amcp_file(slurpy, amfm, errh); pclose(f); } - + delete[] buf; } #endif - + Vector<double> design = mmspace->default_design_vector(); for (int i = 0; i < values.size(); i++) if (ax_names[i]) mmspace->set_design(design, ax_names[i], values[i], errh); else mmspace->set_design(design, ax_nums[i], values[i], errh); - + Vector<double> weight; if (!mmspace->design_to_weight(design, weight, errh)) { if (!mmspace->check_intermediate()) { - errh->message("(I can't interpolate font programs with intermediate masters on my own."); + errh->message("(I can%,t interpolate font programs with intermediate masters on my own."); #if MMAFM_RUN_MMPFB - errh->message("I tried to run `mmpfb --amcp-info %s', but it didn't work.", amfm->font_name().c_str()); + errh->message("I tried to run %<mmpfb --amcp-info %s%>, but it didn't work.", amfm->font_name().c_str()); errh->message("Maybe your PSRESOURCEPATH environment variable is not set?"); #endif errh->fatal("See the manual page for more information.)"); } else - errh->fatal("can't create weight vector"); + errh->fatal("can%,t create weight vector"); } - + // Need to check for case when all design coordinates are unspecified. The // AMFM file contains a default WeightVector, but often NOT a default // DesignVector; we don't want to generate a file with a FontName like // `MyriadMM_-9.79797979e97_-9.79797979e97_' because the DesignVector // components are unknown. if (!KNOWN(design[0])) - errh->fatal("must specify %s's %s coordinate", amfm->font_name().c_str(), + errh->fatal("must specify %s%,s %s coordinate", amfm->font_name().c_str(), mmspace->axis_type(0).c_str()); - + Metrics *m = amfm->interpolate(design, weight, errh); if (m) { - + // Add a comment identifying this as interpolated by mmafm if (MetricsXt *xt = m->find_xt("AFM")) { AfmMetricsXt *afm_xt = (AfmMetricsXt *)xt; - + #if HAVE_CTIME time_t cur_time = time(0); char *time_str = ctime(&cur_time); @@ -410,7 +411,7 @@ particular purpose.\n"); char *buf = new char[strlen(VERSION) + 100]; sprintf(buf, "Interpolated by mmafm-%s.", VERSION); #endif - + afm_xt->opening_comments.push_back(buf); afm_xt->opening_comments.push_back("Mmafm is free software. See <http://www.lcdf.org/type/>."); delete[] buf; @@ -421,12 +422,12 @@ particular purpose.\n"); apply_precision(m, precision); if (kern_precision > 0) apply_kern_precision(m, kern_precision); - + // write the output file if (!output_file) output_file = stdout; AfmWriter::write(m, output_file); - + return 0; } else return 1; diff --git a/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 b/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 index 5cc80bd2669..2b0bb91d828 100644 --- a/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 +++ b/Build/source/texk/lcdf-typetools/mmafm/mmafm.1 @@ -1,5 +1,5 @@ .\" -*-nroff-*- -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -168,7 +168,7 @@ You haven't yet created an AMCP file for \fIFont\fR. ' .SH AUTHOR .na -Eddie Kohler, kohler@cs.ucla.edu +Eddie Kohler, ekohler@gmail.com .PP The latest version is available from: .br diff --git a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am index 5d579edca5c..18b00d4dae6 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am +++ b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = mmpfb man_MANS = mmpfb.1 diff --git a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in index b5c4bc7b67f..1e415506d98 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in +++ b/Build/source/texk/lcdf-typetools/mmpfb/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = mmpfb$(EXEEXT) subdir = mmpfb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,17 +56,26 @@ am_mmpfb_OBJECTS = myfont.$(OBJEXT) main.$(OBJEXT) \ mmpfb_OBJECTS = $(am_mmpfb_OBJECTS) mmpfb_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(mmpfb_SOURCES) DIST_SOURCES = $(mmpfb_SOURCES) man1dir = $(mandir)/man1 @@ -69,6 +86,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -85,29 +103,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -116,6 +145,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -128,20 +158,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -150,6 +189,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -165,7 +205,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = mmpfb.1 mmpfb_SOURCES = myfont.cc myfont.hh \ main.cc \ @@ -179,13 +218,13 @@ EXTRA_DIST = mmpfb.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -215,10 +254,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -231,7 +271,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done mmpfb$(EXEEXT): $(mmpfb_OBJECTS) $(mmpfb_DEPENDENCIES) @rm -f mmpfb$(EXEEXT) $(CXXLINK) $(mmpfb_OBJECTS) $(mmpfb_LDADD) $(LIBS) @@ -260,6 +304,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -311,7 +368,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -413,7 +470,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -456,7 +513,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -473,18 +531,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/mmpfb/main.cc b/Build/source/texk/lcdf-typetools/mmpfb/main.cc index fe7f9f721a7..d12798727fa 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/main.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/main.cc @@ -1,6 +1,6 @@ /* main.cc -- driver for mmpfb program * - * Copyright (c) 1997-2006 Eddie Kohler + * Copyright (c) 1997-2009 Eddie Kohler * * 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 @@ -98,7 +98,7 @@ usage_error(const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -106,8 +106,9 @@ usage_error(const char *error_message, ...) void usage() { - printf("\ -'Mmpfb' creates a single-master PostScript Type 1 font by interpolating a\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Mmpfb%> creates a single-master PostScript Type 1 font by interpolating a\n\ multiple master font at a point you specify. The resulting font does not\n\ contain multiple master extensions. It is written to the standard output.\n\ \n\ @@ -124,7 +125,7 @@ General options:\n\ -o, --output=FILE Write output to FILE.\n\ -p, --precision=N Set precision to N (larger means more precise).\n\ --subrs=N Limit output font to at most N subroutines.\n\ - --no-minimize Do not replace original font's PostScript code.\n\ + --no-minimize Do not replace original font%,s PostScript code.\n\ -h, --help Print this message and exit.\n\ -q, --quiet Do not generate any error messages.\n\ -v, --version Print version number and exit.\n\ @@ -136,7 +137,7 @@ Interpolation settings:\n\ --style=N Set style axis to N.\n\ --1=N, --2=N, --3=N, --4=N Set first (second, third, fourth) axis to N.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -168,7 +169,7 @@ do_file(const char *filename, PsresDatabase *psres) #endif } else f = fopen(filename, "rb"); - + if (!f) { // check for PostScript or instance name Filename fn = psres->filename_value("FontOutline", filename); @@ -185,10 +186,10 @@ do_file(const char *filename, PsresDatabase *psres) } f = fn.open_read(); } - + if (!f) errh->fatal("%s: %s", filename, strerror(errno)); - + Type1Reader *reader; int c = getc(f); ungetc(c, f); @@ -198,14 +199,14 @@ do_file(const char *filename, PsresDatabase *psres) reader = new Type1PFBReader(f); else reader = new Type1PFAReader(f); - + font = new MyFont(*reader); delete reader; if (!font->ok()) errh->fatal("%s: invalid font", filename); else if (font->nglyphs() == 0) errh->fatal("%s: font contains no characters", filename); - + mmspace = font->create_mmspace(errh); if (!mmspace) errh->fatal("%s: not a multiple master font", filename); @@ -257,11 +258,11 @@ main(int argc, char *argv[]) { PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + bool write_pfb = true; bool amcp_info = false; bool minimize = true; @@ -270,42 +271,42 @@ main(int argc, char *argv[]) FILE *outfile = 0; ::errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); - + while (1) { int opt = Clp_Next(clp); switch (opt) { - + case WEIGHT_OPT: set_design("Weight", clp->val.d); break; - + case WIDTH_OPT: set_design("Width", clp->val.d); break; - + case OPSIZE_OPT: set_design("OpticalSize", clp->val.d); break; - + case STYLE_OPT: set_design("Style", clp->val.d); break; - + case N1_OPT: case N2_OPT: case N3_OPT: case N4_OPT: set_design(opt - N1_OPT, clp->val.d); break; - + case AMCP_INFO_OPT: amcp_info = true; break; - + case PFA_OPT: write_pfb = false; break; - + case PFB_OPT: write_pfb = true; break; @@ -329,11 +330,11 @@ main(int argc, char *argv[]) else subr_count = clp->val.i; break; - + case MINIMIZE_OPT: minimize = !clp->negated; break; - + case QUIET_OPT: if (clp->negated) errh = ErrorHandler::default_handler(); @@ -351,64 +352,64 @@ main(int argc, char *argv[]) errh->fatal("%s: %s", clp->vstr, strerror(errno)); } break; - + case VERSION_OPT: printf("mmpfb (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1997-2006 Eddie Kohler\n\ + printf("Copyright (C) 1997-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); break; - + case Clp_NotOption: do_file(clp->vstr, psres); break; - + case Clp_Done: if (!font) usage_error("missing font argument"); goto done; - + case Clp_BadOption: usage_error(0); break; - + default: break; - + } } - + done: if (outfile == 0) outfile = stdout; - + if (amcp_info) { print_amcp_info(mmspace, outfile); exit(0); } - + Vector<double> design = mmspace->empty_design_vector(); for (int i = 0; i < values.size(); i++) if (ax_names[i]) mmspace->set_design(design, ax_names[i], values[i], errh); else mmspace->set_design(design, ax_nums[i], values[i], errh); - + Vector<double> default_design = mmspace->default_design_vector(); for (int i = 0; i < mmspace->naxes(); i++) if (!KNOWN(design[i]) && KNOWN(default_design[i])) { - errh->warning("using default value %g for %s's %s", default_design[i], + errh->warning("using default value %g for %s%,s %s", default_design[i], font->font_name().c_str(), mmspace->axis_type(i).c_str()); design[i] = default_design[i]; } - + if (!font->set_design_vector(mmspace, design, errh)) exit(1); @@ -428,7 +429,7 @@ particular purpose.\n"); delete font; } else t1font = font; - + { // Add an identifying comment. #if HAVE_CTIME time_t cur_time = time(0); @@ -446,7 +447,7 @@ particular purpose.\n"); t1font->add_header_comment("%% Mmpfb is free software. See <http://www.lcdf.org/type/>."); delete[] buf; } - + if (write_pfb) { #if defined(_MSDOS) || defined(_WIN32) _setmode(_fileno(outfile), _O_BINARY); @@ -457,6 +458,6 @@ particular purpose.\n"); Type1PFAWriter w(outfile); t1font->write(w); } - + return 0; } diff --git a/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 b/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 index 9d3ce0f5a1e..e75e96160ca 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 +++ b/Build/source/texk/lcdf-typetools/mmpfb/mmpfb.1 @@ -1,5 +1,5 @@ .\" -*-nroff-*- -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -199,7 +199,7 @@ will have \fIN\fR subroutines. ' .SH AUTHOR .na -Eddie Kohler, kohler@cs.ucla.edu +Eddie Kohler, ekohler@gmail.com .PP The latest version is available from: .br diff --git a/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc b/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc index 9816daefe47..3d0119e230e 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/myfont.cc @@ -40,14 +40,14 @@ MyFont::kill_def(Type1Definition *t1d, int whichd) { if (!t1d) return; - + if (whichd < 0) for (whichd = dFont; whichd < dLast; whichd = (Dict)(whichd + 1)) if (dict(whichd, t1d->name()) == t1d) break; if (whichd < 0 || whichd >= dLast || dict(whichd, t1d->name()) != t1d) return; - + int icount = nitems(); for (int i = first_dict_item(whichd); i < icount; i++) if (item(i) == t1d) { @@ -60,7 +60,7 @@ MyFont::kill_def(Type1Definition *t1d, int whichd) set_dict(whichd, name, 0); return; } - + assert(0); } @@ -80,30 +80,30 @@ MyFont::set_design_vector(MultipleMasterSpace *mmspace, const Vector<double> &de t1d->set_numvec(norm_design); kill_def(t1d, dFont); } - + if (!mmspace->design_to_weight(design, _weight_vector, errh)) return false; - + // Need to check for case when all design coordinates are unspecified. The // font file contains a default WeightVector, but possibly NOT a default // DesignVector; we don't want to generate a FontName like // `MyriadMM_-9.79797979e97_-9.79797979e97_' because the DesignVector // components are unknown. if (!KNOWN(design[0])) { - errh->error("must specify %s's %s coordinate", font_name().c_str(), + errh->error("must specify %s%,s %s coordinate", font_name().c_str(), mmspace->axis_type(0).c_str()); return false; } - + t1d = dict("WeightVector"); if (t1d) { t1d->set_numvec(_weight_vector); kill_def(t1d, dFont); } - + int naxes = design.size(); _nmasters = _weight_vector.size(); - + PermString name; t1d = dict("FontName"); if (t1d && t1d->value_name(name)) { @@ -129,13 +129,13 @@ MyFont::set_design_vector(MultipleMasterSpace *mmspace, const Vector<double> &de } t1d->set_string(sa.c_str()); } - + // save UniqueID, then kill its definition int uniqueid; t1d = dict("UniqueID"); bool have_uniqueid = (t1d && t1d->value_int(uniqueid)); - kill_def(t1d, dFont); - + kill_def(t1d, dFont); + // prepare XUID t1d = dict("XUID"); NumVector xuid; @@ -156,7 +156,7 @@ MyFont::set_design_vector(MultipleMasterSpace *mmspace, const Vector<double> &de xuid.push_back((int)(design[a] * 100)); t1d->set_numvec(xuid); } - + return true; } @@ -166,7 +166,7 @@ MyFont::interpolate_dict_int(PermString name, Dict the_dict, ErrorHandler *errh) Type1Definition *def = dict(the_dict, name); Type1Definition *blend_def = dict(the_dict + dBlend, name); NumVector blend; - + if (def && blend_def && blend_def->value_numvec(blend)) { int n = _nmasters; double val = 0; @@ -186,7 +186,7 @@ MyFont::interpolate_dict_num(PermString name, Dict the_dict, bool force_integer) Type1Definition *def = dict(the_dict, name); Type1Definition *blend_def = dict(the_dict + dBlend, name); NumVector blend; - + if (def && blend_def && blend_def->value_numvec(blend)) { int n = _nmasters; double val = 0; @@ -209,7 +209,7 @@ MyFont::interpolate_dict_numvec(PermString name, Dict the_dict, int round_mode, Type1Definition *def = dict(the_dict, name); Type1Definition *blend_def = dict(the_dict + dBlend, name); Vector<NumVector> blend; - + if (def && blend_def && blend_def->value_numvec_vec(blend)) { int n = blend.size(); NumVector val; @@ -235,7 +235,7 @@ MyFont::interpolate_dicts(bool force_integer, ErrorHandler *errh) // of integers. Round its elements away from zero (this is what the // Acrobat distiller seems to do). interpolate_dict_numvec("FontBBox", dFont, 2, true); - + interpolate_dict_numvec("BlueValues", dPrivate, force_integer); interpolate_dict_numvec("OtherBlues", dPrivate, force_integer); interpolate_dict_numvec("FamilyBlues", dPrivate, force_integer); @@ -244,11 +244,11 @@ MyFont::interpolate_dicts(bool force_integer, ErrorHandler *errh) interpolate_dict_numvec("StdVW", dPrivate); interpolate_dict_numvec("StemSnapH", dPrivate); interpolate_dict_numvec("StemSnapV", dPrivate); - + interpolate_dict_num("BlueScale", dPrivate); interpolate_dict_num("BlueShift", dPrivate, force_integer); interpolate_dict_int("BlueFuzz", dPrivate, errh); - + { Type1Definition *def = p_dict("ForceBold"); Type1Definition *blend_def = bp_dict("ForceBold"); @@ -272,18 +272,18 @@ MyFont::interpolate_dicts(bool force_integer, ErrorHandler *errh) if (Type1Definition *def = bp_dict("BuildCharArray")) kill_def(def, dBlendPrivate); - + for (DictHashMap::const_iterator i = dict_begin(dBlend); i; i++) { PermString name = i.key(); if (i.value() && name != "Private" && name != "FontInfo" && name != "ConvertDesignVector" && name != "NormalizeDesignVector") - errh->warning("didn't interpolate %s in Blend", name.c_str()); + errh->warning("didn%,t interpolate %s in Blend", name.c_str()); } for (DictHashMap::const_iterator i = dict_begin(dBlendPrivate); i; i++) if (i.value() && i.key() != "Erode") - errh->warning("didn't interpolate %s in BlendPrivate", i.key().c_str()); - + errh->warning("didn%,t interpolate %s in BlendPrivate", i.key().c_str()); + kill_def(p_dict("NDV"), dPrivate); kill_def(p_dict("CDV"), dPrivate); kill_def(p_dict("UniqueID"), dPrivate); diff --git a/Build/source/texk/lcdf-typetools/mmpfb/myfont.hh b/Build/source/texk/lcdf-typetools/mmpfb/myfont.hh index 9b29a9f4111..ffe35668f94 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/myfont.hh +++ b/Build/source/texk/lcdf-typetools/mmpfb/myfont.hh @@ -5,27 +5,27 @@ namespace Efont { class MultipleMasterSpace; } class ErrorHandler; class MyFont : public Efont::Type1Font { public: - + MyFont(Efont::Type1Reader &); ~MyFont(); - + bool set_design_vector(Efont::MultipleMasterSpace *, const Vector<double> &, ErrorHandler * = 0); - + void interpolate_dicts(bool force_integers, ErrorHandler *); void interpolate_charstrings(int precision, ErrorHandler * = 0); private: - + typedef Vector<double> NumVector; - + int _nmasters; Vector<double> _weight_vector; - + void interpolate_dict_int(PermString, Dict, ErrorHandler *); void interpolate_dict_num(PermString, Dict, bool round_integer = false); void interpolate_dict_numvec(PermString, Dict, int round_mode = 0, bool executable = false); - void kill_def(Efont::Type1Definition *, int which_dict = -1); - + void kill_def(Efont::Type1Definition *, int which_dict = -1); + }; #endif diff --git a/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc b/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc index 4d970a15c7d..02d3d16aac5 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/t1minimize.cc @@ -31,7 +31,7 @@ minimize(Type1Font *font) for (int i = 0; i < font->nsubrs(); i++) if (Type1Subr *s = font->subr_x(i)) output->set_subr(s->subrno(), s->t1cs(), s->definer()); - + // CharStrings for (int i = 0; i < font->nglyphs(); i++) if (Type1Subr *g = font->glyph_x(i)) diff --git a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc index 2c402964626..a6e96242428 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc +++ b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.cc @@ -30,7 +30,7 @@ static ErrorHandler *itc_errh; void itc_complain() { - //itc_errh->warning("strange `callothersubr'; is this an ITC font?"); + //itc_errh->warning("strange %<callothersubr%>; is this an ITC font?"); itc_complained = true; } @@ -78,7 +78,7 @@ bool HintReplacementDetector::type1_command(int cmd) { switch (cmd) { - + case Cs::cCallothersubr: { if (size() < 2) goto unknown; @@ -107,7 +107,7 @@ HintReplacementDetector::type1_command(int cmd) int which = (int)pop(); if (!_count_calls_below || _subr_level < _count_calls_below) _call_counts[which]++; - + Charstring *subr_cs = get_subr(which); if (!subr_cs) return error(errSubr, which); @@ -115,7 +115,7 @@ HintReplacementDetector::type1_command(int cmd) _subr_level++; subr_cs->process(*this); _subr_level--; - + if (error() != errOK) return false; return !done(); @@ -124,7 +124,7 @@ HintReplacementDetector::type1_command(int cmd) case Cs::cEndchar: case Cs::cReturn: return CharstringInterp::type1_command(cmd); - + case Cs::cBlend: case Cs::cAbs: case Cs::cAdd: @@ -155,7 +155,7 @@ HintReplacementDetector::type1_command(int cmd) unknown: clear(); break; - + } return true; } @@ -178,30 +178,30 @@ class Type1OneMMRemover: public CharstringInterp { public: Type1OneMMRemover(Type1MMRemover *); bool type1_command(int); - + inline bool run_fresh_subr(const Type1Charstring &, bool); inline bool run_fresh_glyph(const Type1Charstring &); inline bool rerun_subr(const Type1Charstring &); - + Type1Charstring *output_prefix(); void output_main(Type1Charstring &); - + private: - + Type1MMRemover *_remover; Type1CharstringGen _prefix_gen; Type1CharstringGen _main_gen; - + int _subr_level; bool _in_subr; bool _in_prefix; bool _must_expand; - + inline void run_subr(Type1Charstring *); bool itc_command(int command, int on_stack); bool run(const Type1Charstring &, bool, bool, bool); - + }; /* For version 1.1 @@ -291,7 +291,7 @@ Type1OneMMRemover::itc_command(int command, int on_stack) } break; } - + case Cs::othcITC_get: { if (on_stack != 1) return false; @@ -304,35 +304,35 @@ Type1OneMMRemover::itc_command(int command, int on_stack) ps_push(d); break; } - + case Cs::othcITC_add: { if (on_stack != 2) return false; ps_push(at(base) + at(base+1)); break; } - + case Cs::othcITC_sub: { if (on_stack != 2) return false; ps_push(at(base) - at(base+1)); break; } - + case Cs::othcITC_mul: { if (on_stack != 2) return false; ps_push(at(base) * at(base+1)); break; } - + case Cs::othcITC_div: { if (on_stack != 2) return false; ps_push(at(base) / at(base+1)); break; } - + case Cs::othcITC_ifelse: { if (on_stack != 4) return false; @@ -342,12 +342,12 @@ Type1OneMMRemover::itc_command(int command, int on_stack) ps_push(at(base+1)); break; } - + default: return false; } - + pop(on_stack + 2); return true; } @@ -356,7 +356,7 @@ bool Type1OneMMRemover::type1_command(int cmd) { switch (cmd) { - + case Cs::cCallothersubr: { // Expand known othersubr calls. If we cannot expand the othersubr // call completely, then write it to the expander. @@ -378,7 +378,7 @@ Type1OneMMRemover::type1_command(int cmd) goto normal; break; } - + partial_othersubr: { if (!_in_prefix) { _must_expand = true; @@ -388,7 +388,7 @@ Type1OneMMRemover::type1_command(int cmd) _prefix_gen.gen_command(Cs::cCallothersubr); break; } - + case Cs::cCallsubr: { // expand subroutines in line if necessary if (size() < 1) @@ -406,7 +406,7 @@ Type1OneMMRemover::type1_command(int cmd) } break; } - + case Cs::cPop: if (ps_size() >= 1) push(ps_pop()); @@ -416,24 +416,24 @@ Type1OneMMRemover::type1_command(int cmd) } else goto normal; break; - + case Cs::cDiv: if (size() < 2) goto normal; top(1) /= top(0); pop(); break; - + case Cs::cReturn: return false; - + normal: default: _main_gen.gen_stack(*this, cmd); _main_gen.gen_command(cmd); _in_prefix = 0; return (cmd != Cs::cEndchar); - + } return true; } @@ -451,7 +451,7 @@ Type1OneMMRemover::run(const Type1Charstring &cs, _must_expand = false; Vector<double> *scratch = scratch_vector(); scratch->assign(scratch->size(), UNKDOUBLE); - + CharstringInterp::interpret(_remover->program(), &cs); if (in_subr) { @@ -508,7 +508,7 @@ Type1OneMMRemover::output_main(Type1Charstring &cs) **/ class Type1BadCallRemover: public CharstringInterp { public: - + Type1BadCallRemover(Type1MMRemover *); bool type1_command(int); @@ -519,7 +519,7 @@ class Type1BadCallRemover: public CharstringInterp { public: Type1CharstringGen _gen; Type1MMRemover *_remover; - + }; Type1BadCallRemover::Type1BadCallRemover(Type1MMRemover *remover) @@ -532,7 +532,7 @@ bool Type1BadCallRemover::type1_command(int cmd) { switch (cmd) { - + case Cs::cCallsubr: { if (size() < 1) goto normal; @@ -549,7 +549,7 @@ Type1BadCallRemover::type1_command(int cmd) _gen.gen_stack(*this, 0); _gen.gen_command(cmd); return (cmd != Cs::cEndchar && cmd != Cs::cReturn); - + } } @@ -578,7 +578,7 @@ Type1MMRemover::Type1MMRemover(Type1Font *font, const Vector<double> &wv, _expand_all_subrs(false), _errh(errh) { itc_errh = _errh; - + // find subroutines needed for hint replacement HintReplacementDetector hr(font, wv, 0); for (int i = 0; i < _font->nglyphs(); i++) @@ -606,10 +606,10 @@ Type1MMRemover::subr_prefix(int subrno) { if (subrno < 0 || subrno >= _nsubrs) return 0; - + if (!_subr_done[subrno]) { _subr_done[subrno] = 1; - + Type1Charstring *subr = _font->subr(subrno); if (!subr) return 0; @@ -632,7 +632,7 @@ Type1MMRemover::subr_expander(int subrno) if (!_subr_done[subrno]) (void)subr_prefix(subrno); if (!_expand_all_subrs && !_must_expand_subr[subrno]) - return 0; + return 0; return _font->subr(subrno); } @@ -650,7 +650,7 @@ void Type1MMRemover::run() { Type1OneMMRemover one(this); - + // check subroutines for (int subrno = 0; subrno < _nsubrs; subrno++) (void)subr_prefix(subrno); @@ -676,7 +676,7 @@ Type1MMRemover::run() one.output_main(g->t1cs()); } } - + // remove uncalled subroutines, expand hint replacement subroutines HintReplacementDetector hr(_font, _weight_vector, 0); for (int i = 0; i < _font->nglyphs(); i++) @@ -695,7 +695,7 @@ Type1MMRemover::run() one.output_main(*cs); } else _font->remove_subr(subrno); - + // remove calls to removed subroutines Type1BadCallRemover bcr(this); for (int i = 0; i < _font->nglyphs(); i++) @@ -704,7 +704,7 @@ Type1MMRemover::run() for (int subrno = 4; subrno < _nsubrs; subrno++) if (Type1Charstring *cs = _font->subr(subrno)) bcr.run(*cs); - + // report warnings if (bad_glyphs.size()) { qsort(&bad_glyphs[0], bad_glyphs.size(), sizeof(PermString), sort_permstring_compare); @@ -731,19 +731,19 @@ Type1MMRemover::run() class SubrExpander : public CharstringInterp { public: SubrExpander(); - + void set_renumbering(const Vector<int> *v) { _renumbering = v; } bool type1_command(int); - + bool run(Type1Font *, Type1Charstring &); private: - + Type1CharstringGen _gen; const Vector<int> *_renumbering; int _subr_level; - + }; SubrExpander::SubrExpander() @@ -755,7 +755,7 @@ bool SubrExpander::type1_command(int cmd) { switch (cmd) { - + case Cs::cCallsubr: { if (size() < 1) goto unknown; @@ -773,27 +773,27 @@ SubrExpander::type1_command(int cmd) } return !done(); } - + case Cs::cEndchar: set_done(); goto end_cs; - + case Cs::cReturn: if (_subr_level) return false; goto end_cs; - + end_cs: _gen.gen_stack(*this, cmd); _gen.gen_command(cmd); return false; - + default: unknown: _gen.gen_stack(*this, cmd); _gen.gen_command(cmd); break; - + } return true; } @@ -874,7 +874,7 @@ Type1SubrRemover::run(int lower_to) int to_remove = _nsubrs - _nonexist_count - lower_to; if (to_remove < 0) to_remove = 0; - + // multiply by lost bytes per call Vector<int> permute; for (int i = 0; i < _nsubrs; i++) @@ -883,8 +883,8 @@ Type1SubrRemover::run(int lower_to) // sort them by least frequent use -> most frequent use sort_keys = &_cost; qsort(&permute[0], _nsubrs, sizeof(int), sort_permute_compare); - - // mark first portion of `permute' to be removed + + // mark first portion of `permute' to be removed int removed = 0; for (int i = 0; i < _nsubrs; i++) { int p = permute[i]; @@ -917,6 +917,6 @@ Type1SubrRemover::run(int lower_to) // actually remove subroutines _font->renumber_subrs(_renumbering); - + return true; } diff --git a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.hh b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.hh index 238f93dc630..eac9d75beeb 100644 --- a/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.hh +++ b/Build/source/texk/lcdf-typetools/mmpfb/t1rewrit.hh @@ -5,61 +5,61 @@ #include <lcdf/straccum.hh> class Type1MMRemover { public: - + Type1MMRemover(Efont::Type1Font *, const Vector<double> &weight_vec, int, ErrorHandler *); ~Type1MMRemover(); - + Efont::CharstringProgram *program() const { return _font; } const Vector<double> &weight_vector() const { return _weight_vector; } int nmasters() const { return _weight_vector.size(); } int precision() const { return _precision; } - + Efont::Type1Charstring *subr_prefix(int); Efont::Type1Charstring *subr_expander(int); - + void run(); - + private: - + Efont::Type1Font *_font; Vector<double> _weight_vector; int _precision; - + int _nsubrs; Vector<int> _subr_done; Vector<Efont::Type1Charstring *> _subr_prefix; Vector<int> _must_expand_subr; Vector<int> _hint_replacement_subr; bool _expand_all_subrs; - + ErrorHandler *_errh; - + }; class Type1SubrRemover { public: - + Type1SubrRemover(Efont::Type1Font *, ErrorHandler *); ~Type1SubrRemover(); - + Efont::CharstringProgram *program() const { return _font; } ErrorHandler *errh() const { return _errh; } - + int save_count() const { return _save_count; } - + bool run(int); - + private: - + Efont::Type1Font *_font; - + int _nsubrs; enum { REMOVABLE = -1, DEAD = -2 }; Vector<int> _renumbering; Vector<int> _cost; int _save_count; int _nonexist_count; - + ErrorHandler *_errh; }; diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am index c1541be0c33..3e95e338f3a 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am +++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = otfinfo man_MANS = otfinfo.1 diff --git a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in index d01cca26a01..5d3204f77d6 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in +++ b/Build/source/texk/lcdf-typetools/otfinfo/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = otfinfo$(EXEEXT) subdir = otfinfo DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -46,13 +54,17 @@ PROGRAMS = $(bin_PROGRAMS) am_otfinfo_OBJECTS = otfinfo.$(OBJEXT) otfinfo_OBJECTS = $(am_otfinfo_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(otfinfo_SOURCES) DIST_SOURCES = $(otfinfo_SOURCES) man1dir = $(mandir)/man1 @@ -63,6 +75,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -79,29 +92,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -110,6 +134,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -122,20 +147,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -144,6 +178,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -159,7 +194,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = otfinfo.1 otfinfo_SOURCES = \ otfinfo.cc @@ -172,13 +206,13 @@ EXTRA_DIST = otfinfo.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -208,10 +242,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -224,7 +259,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done otfinfo$(EXEEXT): $(otfinfo_OBJECTS) $(otfinfo_DEPENDENCIES) @rm -f otfinfo$(EXEEXT) $(CXXLINK) $(otfinfo_OBJECTS) $(otfinfo_LDADD) $(LIBS) @@ -250,6 +289,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -301,7 +353,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -403,7 +455,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -446,7 +498,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -463,18 +516,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 index 6ed20e60a2f..5a30b2bb428 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 +++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.1 @@ -1,5 +1,5 @@ '\"t -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -187,4 +187,4 @@ Print the version number and some short non-warranty information and exit. Version 1.4 ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc index 82545acec04..69340a2d9ac 100644 --- a/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc +++ b/Build/source/texk/lcdf-typetools/otfinfo/otfinfo.cc @@ -1,6 +1,6 @@ /* otfinfo.cc -- driver for reporting information about OpenType fonts * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2009 Eddie Kohler * * 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 @@ -56,7 +56,7 @@ using namespace Efont; #define INFO_OPT 328 const Clp_Option options[] = { - + { "script", 0, SCRIPT_OPT, Clp_ValString, 0 }, { "quiet", 'q', QUIET_OPT, 0, Clp_Negate }, { "verbose", 'V', VERBOSE_OPT, 0, Clp_Negate }, @@ -71,12 +71,11 @@ const Clp_Option options[] = { { "tables", 't', TABLES_OPT, 0, 0 }, { "help", 'h', HELP_OPT, 0, 0 }, { "version", 0, VERSION_OPT, 0, 0 }, - + }; static const char *program_name; -static String::Initializer initializer; static Efont::OpenType::Tag script, langsys; @@ -92,7 +91,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -100,23 +99,24 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'Otfinfo' reports information about an OpenType font to standard output.\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Otfinfo%> reports information about an OpenType font to standard output.\n\ Options specify what information to print.\n\ \n\ Usage: %s [-sfzpg] [OTFFILES...]\n\n", program_name); - printf("\ + uerrh.message("\ Query options:\n\ - -s, --scripts Report font's supported scripts.\n\ - -f, --features Report font's GSUB/GPOS features.\n\ - -z, --optical-size Report font's optical size information.\n\ - -p, --postscript-name Report font's PostScript name.\n\ - -a, --family Report font's family name.\n\ - -v, --font-version Report font's version information.\n\ - -i, --info Report font's names and designer/vendor info.\n\ - -g, --glyphs Report font's glyph names.\n\ - -t, --tables Report font's OpenType tables.\n\ + -s, --scripts Report font%,s supported scripts.\n\ + -f, --features Report font%,s GSUB/GPOS features.\n\ + -z, --optical-size Report font%,s optical size information.\n\ + -p, --postscript-name Report font%,s PostScript name.\n\ + -a, --family Report font%,s family name.\n\ + -v, --font-version Report font%,s version information.\n\ + -i, --info Report font%,s names and designer/vendor info.\n\ + -g, --glyphs Report font%,s glyph names.\n\ + -t, --tables Report font%,s OpenType tables.\n\ \n\ Other options:\n\ --script=SCRIPT[.LANG] Set script used for --features [latn].\n\ @@ -125,7 +125,7 @@ Other options:\n\ -q, --quiet Do not generate any error messages.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n"); +Report bugs to <ekohler@gmail.com>.\n"); } String @@ -140,17 +140,17 @@ read_file(String filename, ErrorHandler *errh, bool warning = false) _setmode(_fileno(f), _O_BINARY); #endif } else if (!(f = fopen(filename.c_str(), "rb"))) { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, strerror(errno)); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), strerror(errno)); return String(); } - + StringAccum sa; while (!feof(f)) { if (char *x = sa.reserve(8192)) { int amt = fread(x, 1, 8192, f); sa.forward(amt); } else { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, "Out of memory!"); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), "Out of memory!"); break; } } @@ -163,7 +163,7 @@ String printable_filename(const String &s) { if (!s || s == "-") - return String::stable_string("<stdin>"); + return String::make_stable("<stdin>"); else return s; } @@ -284,9 +284,9 @@ do_query_optical_size(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandle if (String n = name.english_name(size_data.u16(4))) sa << ", subfamily name " << n; } - + result_errh->message("%s", sa.c_str()); - + } catch (OpenType::Error) { if (errh->nerrors() == before_nerrors) result_errh->message("no optical size information"); @@ -393,7 +393,7 @@ do_info(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_errh } } - if (errh->nerrors() == before_nerrors) + if (errh->nerrors() == before_nerrors) result_errh->message("%s", (sa ? sa.c_str() : "no name information")); } @@ -448,15 +448,14 @@ do_tables(const OpenType::Font &otf, ErrorHandler *errh, ErrorHandler *result_er int main(int argc, char *argv[]) { - String::static_initialize(); Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); Vector<const char *> input_files; int query = 0; - + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -480,7 +479,7 @@ main(int argc, char *argv[]) usage_error(errh, "bad script tag"); break; } - + case QUERY_SCRIPTS_OPT: case QUERY_FEATURES_OPT: case QUERY_OPTICAL_SIZE_OPT: @@ -508,13 +507,13 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("otfinfo (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2003-2006 Eddie Kohler\n\ + printf("Copyright (C) 2003-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); @@ -526,17 +525,17 @@ particular purpose.\n"); case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; default: break; - + } } - + done: if (!query) usage_error(errh, "supply exactly one query option"); @@ -579,6 +578,6 @@ particular purpose.\n"); else if (query == INFO_OPT) do_info(otf, &cerrh, result_errh); } - + return (errh->nerrors() == 0 ? 0 : 1); } diff --git a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am index 18f4e88c302..0a8a66a4ef8 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am +++ b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = otftotfm man_MANS = otftotfm.1 @@ -13,15 +11,21 @@ otftotfm_SOURCES = \ secondary.cc secondary.hh \ uniprop.cc uniprop.hh \ util.cc util.hh -EXTRA_otftotfm_SOURCES = kpseinterface.c kpseinterface.h -otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA@ -otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA_DEP@ +otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a +otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a INCLUDES = -I$(top_srcdir)/include CLEANFILES = @TEMPLATE_OBJS@ +if have_kpathsea +otftotfm_SOURCES += kpseinterface.c kpseinterface.h +INCLUDES += $(KPATHSEA_INCLUDES) +otftotfm_LDADD += $(KPATHSEA_LIBS) +otftotfm_DEPENDENCIES += $(KPATHSEA_DEPEND) +endif have_kpathsea + EXTRA_DIST = otftotfm.1 -$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a: - cd $(top_builddir)/../../texk/kpathsea && $(MAKE) +## Rebuild libkpathsea +@KPATHSEA_RULE@ diff --git a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in index 33e50516f5a..0abaaea037a 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in +++ b/Build/source/texk/lcdf-typetools/otftotfm/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,23 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = otftotfm$(EXEEXT) +@have_kpathsea_TRUE@am__append_1 = kpseinterface.c kpseinterface.h +@have_kpathsea_TRUE@am__append_2 = $(KPATHSEA_INCLUDES) +@have_kpathsea_TRUE@am__append_3 = $(KPATHSEA_LIBS) +@have_kpathsea_TRUE@am__append_4 = $(KPATHSEA_DEPEND) subdir = otftotfm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -43,24 +55,42 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) +am__otftotfm_SOURCES_DIST = automatic.cc automatic.hh dvipsencoding.cc \ + dvipsencoding.hh glyphfilter.cc glyphfilter.hh metrics.cc \ + metrics.hh otftotfm.cc otftotfm.hh secondary.cc secondary.hh \ + uniprop.cc uniprop.hh util.cc util.hh kpseinterface.c \ + kpseinterface.h +@have_kpathsea_TRUE@am__objects_1 = kpseinterface.$(OBJEXT) am_otftotfm_OBJECTS = automatic.$(OBJEXT) dvipsencoding.$(OBJEXT) \ glyphfilter.$(OBJEXT) metrics.$(OBJEXT) otftotfm.$(OBJEXT) \ - secondary.$(OBJEXT) uniprop.$(OBJEXT) util.$(OBJEXT) + secondary.$(OBJEXT) uniprop.$(OBJEXT) util.$(OBJEXT) \ + $(am__objects_1) otftotfm_OBJECTS = $(am_otftotfm_OBJECTS) +am__DEPENDENCIES_1 = +@have_kpathsea_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -SOURCES = $(otftotfm_SOURCES) $(EXTRA_otftotfm_SOURCES) -DIST_SOURCES = $(otftotfm_SOURCES) $(EXTRA_otftotfm_SOURCES) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(otftotfm_SOURCES) +DIST_SOURCES = $(am__otftotfm_SOURCES_DIST) man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) @@ -69,6 +99,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -85,29 +116,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -116,6 +158,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -128,20 +171,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -150,6 +202,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -165,34 +218,28 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = otftotfm.1 -otftotfm_SOURCES = \ - automatic.cc automatic.hh \ - dvipsencoding.cc dvipsencoding.hh \ - glyphfilter.cc glyphfilter.hh \ - metrics.cc metrics.hh \ - otftotfm.cc otftotfm.hh \ - secondary.cc secondary.hh \ - uniprop.cc uniprop.hh \ - util.cc util.hh - -EXTRA_otftotfm_SOURCES = kpseinterface.c kpseinterface.h -otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA@ -otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a @KPSEINTERFACE_O@ @LIBKPATHSEA_DEP@ -INCLUDES = -I$(top_srcdir)/include +otftotfm_SOURCES = automatic.cc automatic.hh dvipsencoding.cc \ + dvipsencoding.hh glyphfilter.cc glyphfilter.hh metrics.cc \ + metrics.hh otftotfm.cc otftotfm.hh secondary.cc secondary.hh \ + uniprop.cc uniprop.hh util.cc util.hh $(am__append_1) +otftotfm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a \ + $(am__append_3) +otftotfm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a \ + $(am__append_4) +INCLUDES = -I$(top_srcdir)/include $(am__append_2) CLEANFILES = @TEMPLATE_OBJS@ EXTRA_DIST = otftotfm.1 all: all-am .SUFFIXES: -.SUFFIXES: .c .cc .o .obj +.SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -222,10 +269,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -238,7 +286,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done otftotfm$(EXEEXT): $(otftotfm_OBJECTS) $(otftotfm_DEPENDENCIES) @rm -f otftotfm$(EXEEXT) $(CXXLINK) $(otftotfm_OBJECTS) $(otftotfm_LDADD) $(LIBS) @@ -273,6 +325,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -286,6 +345,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -337,7 +409,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -439,7 +511,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -482,7 +554,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -499,22 +572,22 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 - - -$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a: - cd $(top_builddir)/../../texk/kpathsea && $(MAKE) + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 + + +@KPATHSEA_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc b/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc index 5796ee281af..9e46907eb46 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/automatic.cc @@ -1,6 +1,6 @@ /* automatic.{cc,hh} -- code for automatic mode and interfacing with kpathsea * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2009 Eddie Kohler * * 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 @@ -20,20 +20,20 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include <unistd.h> #endif #include <sys/stat.h> #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H +#if HAVE_SYS_TIME_H # include <sys/time.h> #endif -#ifdef HAVE_SYS_WAIT_H +#if HAVE_SYS_WAIT_H # include <sys/wait.h> #endif #include <lcdf/error.hh> #include <lcdf/straccum.hh> -#ifdef HAVE_FCNTL_H +#if HAVE_FCNTL_H # include <fcntl.h> #endif #include <algorithm> @@ -46,7 +46,6 @@ enum { T1DOTLESSJ_EXIT_J_NODOT = 2 }; #endif -static String::Initializer initializer; static String odir[NUMODIR]; static String typeface; static String vendor; @@ -103,7 +102,7 @@ look_for_writable_texdir(const char *path_variable, bool create) else if (create && errno != EACCES && mkdir(texdir.c_str(), 0777) >= 0) // create file if it doesn't exist already writable_texdir = texdir; - } + } if (writable_texdir && writable_texdir.back() != '/') writable_texdir += "/"; } @@ -120,7 +119,7 @@ find_writable_texdir(ErrorHandler *errh, const char *) errh->warning("no writable directory found in $TEXMFVAR or $TEXMF"); errh->message("(You probably need to set your TEXMF environment variable; see\n\ the manual for more information. The current TEXMF path is\n\ -'%s'.)", kpsei_string(kpsei_path_expand("$TEXMF")).c_str()); +%<%s%>.)", kpsei_string(kpsei_path_expand("$TEXMF")).c_str()); } writable_texdir_tried = true; } @@ -159,18 +158,18 @@ String getodir(int o, ErrorHandler *errh) { assert(o >= 0 && o < NUMODIR); - + if (!odir[o] && automatic && odir_info[o].envvar) odir[o] = getenv(odir_info[o].envvar); - -#ifdef HAVE_KPATHSEA + +#if HAVE_KPATHSEA if (!odir[o] && automatic && !writable_texdir_tried) find_writable_texdir(errh, odir_info[o].name); if (!odir[o] && automatic && writable_texdir) { String suffix = odir_info[o].texdir; - - // May need to behave differently on TDS 1.1 rather than TDS 1.0. + + // May need to behave differently on TDS 1.1 rather than TDS 1.0. if (suffix[0] == '#') { // check type of TDS if (tds_1_1 < 0) { @@ -185,14 +184,14 @@ getodir(int o, ErrorHandler *errh) else suffix = suffix.substring(suffix.begin() + 1, std::find(suffix.begin() + 1, suffix.end(), '#')); } - + String dir = writable_texdir + suffix; if (dir.back() == '%') dir = dir.substring(0, -1) + get_vendor() + "/" + get_typeface(); else if (dir.back() == '@') dir = dir.substring(0, -1) + get_vendor(); - + // create parent directories as appropriate int slash = writable_texdir.length() - 1; while (access(dir.c_str(), F_OK) < 0 && slash < dir.length()) { @@ -211,18 +210,24 @@ getodir(int o, ErrorHandler *errh) } kpathsea_done: #endif - + if (!odir[o]) { - if (automatic) - errh->warning("%s not specified, placing %s files in '.'", odir_info[o].envvar, odir_info[o].name); + if (automatic) { + errh->warning("%s not specified, placing %s files in %<.%>", odir_info[o].envvar, odir_info[o].name); +#if !HAVE_KPATHSEA + static int kpathsea_warning = 0; + if (++kpathsea_warning == 1) + errh->message("(This version of otftotfm lacks $TEXMF directory support.)"); +#endif + } odir[o] = "."; } - + while (odir[o].length() && odir[o].back() == '/') odir[o] = odir[o].substring(0, -1); - + if (verbose) - errh->message("placing %s files in '%s'", odir_info[o].name, odir[o].c_str()); + errh->message("placing %s files in %<%s%>", odir_info[o].name, odir[o].c_str()); return odir[o]; } @@ -286,7 +291,7 @@ update_odir(int o, String file, ErrorHandler *errh) return; } else if (verbose) errh->message("updating %sls-R for %s/%s", writable_texdir.c_str(), directory.c_str(), file.c_str()); - + // try to update ls-R ourselves, rather than running mktexupd -- // mktexupd's runtime is painful: a half second to update a file String ls_r = writable_texdir + "ls-R"; @@ -311,11 +316,11 @@ update_odir(int o, String file, ErrorHandler *errh) String command = mktexupd + " " + shell_quote(writable_texdir + directory) + " " + shell_quote(file); int retval = system(command.c_str()); if (retval == 127) - errh->error("could not run '%s'", command.c_str()); + errh->error("could not run %<%s%>", command.c_str()); else if (retval < 0) - errh->error("could not run '%s': %s", command.c_str(), strerror(errno)); + errh->error("could not run %<%s%>: %s", command.c_str(), strerror(errno)); else if (retval != 0) - errh->error("'%s' failed", command.c_str()); + errh->error("%<%s%> failed", command.c_str()); } } #else @@ -345,9 +350,14 @@ installed_type1(const String &otf_filename, const String &ps_fontname, bool allo String file, path; if ((file = ps_fontname + ".pfb", path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TYPE1))) || (file = ps_fontname + ".pfa", path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TYPE1)))) { - if (verbose) - errh->message("Type 1 file %s found with kpathsea at %s", file.c_str(), path.c_str()); - return path; + if (path == "./" + file || path == file) { + if (verbose) + errh->message("ignoring Type 1 file %s found with kpathsea in %<.%>", path.c_str()); + } else { + if (verbose) + errh->message("Type 1 file %s found with kpathsea at %s", file.c_str(), path.c_str()); + return path; + } } # if HAVE_AUTO_CFFTOT1 } @@ -363,18 +373,18 @@ installed_type1(const String &otf_filename, const String &ps_fontname, bool allo String command = "cfftot1 " + shell_quote(otf_filename) + " -n " + shell_quote(ps_fontname) + " " + shell_quote(pfb_filename); int retval = mysystem(command.c_str(), errh); if (retval == 127) - errh->error("could not run '%s'", command.c_str()); + errh->error("could not run %<%s%>", command.c_str()); else if (retval < 0) - errh->error("could not run '%s': %s", command.c_str(), strerror(errno)); + errh->error("could not run %<%s%>: %s", command.c_str(), strerror(errno)); else if (retval != 0) - errh->error("'%s' failed", command.c_str()); + errh->error("%<%s%> failed", command.c_str()); if (retval == 0) { update_odir(O_TYPE1, pfb_filename, errh); return pfb_filename; } } #endif - + return String(); } @@ -385,9 +395,9 @@ installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, return String(); if (verbose) errh->message("searching for dotless-j font for %s", ps_fontname.c_str()); - + String j_ps_fontname = ps_fontname + "LCDFJ"; - + #if HAVE_KPATHSEA # if HAVE_AUTO_T1DOTLESSJ if (!(force && allow_generate && getodir(O_TYPE1, errh))) { @@ -396,9 +406,15 @@ installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, String file, path; if ((file = j_ps_fontname + ".pfb", path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TYPE1))) || (file = j_ps_fontname + ".pfa", path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TYPE1)))) { - if (verbose) - errh->message("Type 1 file %s found with kpathsea at %s", file.c_str(), path.c_str()); - return path; + // ignore versions in the current directory + if (path == "./" + file || path == file) { + if (verbose) + errh->message("ignoring Type 1 file %s found with kpathsea in %<.%>", path.c_str()); + } else { + if (verbose) + errh->message("Type 1 file %s found with kpathsea at %s", file.c_str(), path.c_str()); + return path; + } } # if HAVE_AUTO_T1DOTLESSJ } @@ -415,13 +431,13 @@ installed_type1_dotlessj(const String &otf_filename, const String &ps_fontname, String command = "t1dotlessj " + shell_quote(base_filename) + " -n " + shell_quote(j_ps_fontname) + " " + shell_quote(pfb_filename); int retval = mysystem(command.c_str(), errh); if (retval == 127) - errh->warning("could not run '%s'", command.c_str()); + errh->warning("could not run %<%s%>", command.c_str()); else if (retval < 0) - errh->warning("could not run '%s': %s", command.c_str(), strerror(errno)); + errh->warning("could not run %<%s%>: %s", command.c_str(), strerror(errno)); else if (WEXITSTATUS(retval) == T1DOTLESSJ_EXIT_J_NODOT) return String("\0", 1); else if (retval != 0) - errh->warning("'%s' failed (%d)", command.c_str(), retval); + errh->warning("%<%s%> failed (%d)", command.c_str(), retval); if (retval == 0) { update_odir(O_TYPE1, pfb_filename, errh); return pfb_filename; @@ -438,36 +454,50 @@ String installed_truetype(const String &otf_filename, bool allow_generate, ErrorHandler *errh) { String file = pathname_filename(otf_filename); - + #if HAVE_KPATHSEA - if (String path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TRUETYPE))) { - if (verbose) - errh->message("TrueType file %s found with kpathsea at %s", file.c_str(), path.c_str()); - return path; + if (!(force && allow_generate && otf_filename && otf_filename != "-" && getodir(O_TRUETYPE, errh))) { + if (String path = kpsei_string(kpsei_find_file(file.c_str(), KPSEI_FMT_TRUETYPE))) { + if (path == "./" + file || path == file) { + if (verbose) + errh->message("ignoring TrueType file %s found with kpathsea in %<.%>", path.c_str()); + } else { + if (verbose) + errh->message("TrueType file %s found with kpathsea at %s", file.c_str(), path.c_str()); + return path; + } + } } #endif -#if HAVE_AUTO_CFFTOT1 - // if not found, and can generate on the fly, run cfftot1 + // perhaps generate type 42 in the future, for now just copy if (allow_generate && otf_filename && otf_filename != "-" && getodir(O_TRUETYPE, errh)) { String ttf_filename = odir[O_TRUETYPE] + "/" + file; - if (ttf_filename.find_left('\'') >= 0 || ttf_filename.find_left('\'') >= 0) + if (ttf_filename.find_left('\'') >= 0 || ttf_filename.find_left('\"') >= 0) return String(); - String command = "cp " + shell_quote(otf_filename) + " " + shell_quote(ttf_filename); - int retval = mysystem(command.c_str(), errh); - if (retval == 127) - errh->error("could not run '%s'", command.c_str()); - else if (retval < 0) - errh->error("could not run '%s': %s", command.c_str(), strerror(errno)); - else if (retval != 0) - errh->error("'%s' failed", command.c_str()); + + int retval; + if (!same_filename(otf_filename, ttf_filename)) { + String command = "cp " + shell_quote(otf_filename) + " " + shell_quote(ttf_filename); + retval = mysystem(command.c_str(), errh); + if (retval == 127) + errh->error("could not run %<%s%>", command.c_str()); + else if (retval < 0) + errh->error("could not run %<%s%>: %s", command.c_str(), strerror(errno)); + else if (retval != 0) + errh->error("%<%s%> failed", command.c_str()); + } else { + if (verbose) + errh->message("TrueType file %s already located in output directory", otf_filename.c_str()); + retval = 0; + } + if (retval == 0) { update_odir(O_TRUETYPE, ttf_filename, errh); return ttf_filename; } } -#endif - + return String(); } @@ -488,7 +518,7 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) return 0; } else if (verbose) errh->message("updating %s for %s", map_file.c_str(), String(fontname).c_str()); - + int fd = open(map_file.c_str(), O_RDWR | O_CREAT, 0666); if (fd < 0) return errh->error("%s: %s", map_file.c_str(), strerror(errno)); @@ -564,12 +594,12 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) errh->message("%s unchanged", map_file.c_str()); return 0; } - + // add our text text += mapline; // rewind file -#ifdef HAVE_FTRUNCATE +#if HAVE_FTRUNCATE rewind(f); ftruncate(fd, 0); #else @@ -579,7 +609,7 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) // write data fwrite(text.data(), 1, text.length(), f); - + fclose(f); // inform about the new file if necessary @@ -596,7 +626,7 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) // want to run 'updmap' from its directory, can't use system() if (verbose) errh->message("running %s", updmap_file.c_str()); - + pid_t child = fork(); if (child < 0) errh->fatal("%s during fork", strerror(errno)); @@ -608,7 +638,7 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) errh->fatal("%s: %s during exec", updmap_file.c_str(), strerror(errno)); exit(1); // should never get here } - + # if HAVE_WAITPID // wait for updmap to finish int status; @@ -643,15 +673,15 @@ update_autofont_map(const String &fontname, String mapline, ErrorHandler *errh) command += " >/dev/null 2>&1"; int retval = mysystem(command.c_str(), errh); if (retval == 127) - errh->warning("could not run '%s'", command.c_str()); + errh->warning("could not run %<%s%>", command.c_str()); else if (retval < 0) - errh->warning("could not run '%s': %s", command.c_str(), strerror(errno)); + errh->warning("could not run %<%s%>: %s", command.c_str(), strerror(errno)); else if (retval != 0) - errh->warning("'%s' exited with status %d;\nrun it manually to check for errors", command.c_str(), WEXITSTATUS(retval)); + errh->warning("%<%s%> exited with status %d;\nrun it manually to check for errors", command.c_str(), WEXITSTATUS(retval)); goto ran_updmap; } # endif - + if (verbose) errh->message("not running updmap"); @@ -667,7 +697,7 @@ locate_encoding(String encfile, ErrorHandler *errh, bool literal) { if (!encfile || encfile == "-") return encfile; - + if (!literal) { int slash = encfile.find_right('/'); int dot = encfile.find_left('.', slash >= 0 ? slash : 0); @@ -675,7 +705,7 @@ locate_encoding(String encfile, ErrorHandler *errh, bool literal) if (String file = locate_encoding(encfile + ".enc", errh, true)) return file; } - + #if HAVE_KPATHSEA if (String file = kpsei_string(kpsei_find_file(encfile.c_str(), KPSEI_FMT_ENCODING))) { if (verbose) diff --git a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc index a8b68fc2961..7dc8f561d31 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc @@ -26,7 +26,6 @@ #include <algorithm> #include "util.hh" -static String::Initializer initializer; enum { GLYPHLIST_MORE = 0x40000000, U_EMPTYSLOT = 0xD801, U_ALTSELECTOR = 0xD802 }; static HashMap<String, int> glyphlist(-1); @@ -86,10 +85,10 @@ DvipsEncoding::add_glyphlist(String text) void DvipsEncoding::glyphname_unicode(String gn, Vector<int> &unis, bool *more) -{ +{ if (more) *more = false; - + // first, drop all characters to the right of the first dot String::iterator dot = std::find(gn.begin(), gn.end(), '.'); if (dot < gn.end()) @@ -110,7 +109,10 @@ DvipsEncoding::glyphname_unicode(String gn, Vector<int> &unis, bool *more) *more = true; } else if (component.length() >= 7 && (component.length() % 4) == 3 - && memcmp(component.data(), "uni", 3) == 0) { + && (memcmp(component.data(), "uni", 3) == 0 + // 16.Aug.2008: Some texnansx.enc have incorrect "Uni" + // prefix, but we might as well understand it. + || memcmp(component.data(), "Uni", 3) == 0)) { int old_size = unis.size(); for (const char* s = component.begin() + 3; s < component.end(); s += 4) if (parse_unicode_number(s, s + 4, -1, uval)) @@ -189,7 +191,7 @@ tokenize(const String &s, int &pos_in, int &line) line++; pos++; } - + if (pos >= len) { pos_in = len; return String(); @@ -244,7 +246,7 @@ comment_tokenize(const String &s, int &pos_in, int &line) line++; pos++; } - + if (pos >= len) { pos_in = len; return String(); @@ -372,9 +374,9 @@ DvipsEncoding::parse_ligkern_words(Vector<String> &v, int override, ErrorHandler encode(l, v[2]); return 0; } else - return errh->error("encoding value '%d' out of range", l); + return errh->error("encoding value %<%d%> out of range", l); } - + // kern operation if (v[1].length() >= 3 && v[1][0] == '{' && v[1].back() == '}') { String middle = v[1].substring(1, v[1].length() - 2); @@ -390,12 +392,12 @@ DvipsEncoding::parse_ligkern_words(Vector<String> &v, int override, ErrorHandler found_kernop: int av = (v[0] == "*" ? J_ALL : encoding_of(v[0])); if (av < 0) - return errh->warning("'%s' has no encoding, ignoring '%s'", v[0].c_str(), v[1].c_str()); + return errh->warning("%<%s%> has no encoding, ignoring %<%s%>", v[0].c_str(), v[1].c_str()); int bv = (v[2] == "*" ? J_ALL : encoding_of(v[2])); if (bv < 0) - return errh->warning("'%s' has no encoding, ignoring '%s'", v[2].c_str(), v[1].c_str()); + return errh->warning("%<%s%> has no encoding, ignoring %<%s%>", v[2].c_str(), v[1].c_str()); if ((op & JT_KERN) && l && (av == J_ALL || bv == J_ALL)) - return errh->warning("'%s %s %s' illegal, only {0} works with *", v[0].c_str(), v[1].c_str(), v[2].c_str()); + return errh->warning("%<%s %s %s%> illegal, only {0} works with *", v[0].c_str(), v[1].c_str(), v[2].c_str()); Ligature lig = { av, bv, op, l, 0 }; add_ligkern(lig, override); return 0; @@ -403,17 +405,17 @@ DvipsEncoding::parse_ligkern_words(Vector<String> &v, int override, ErrorHandler } else if (v.size() == 4 && ((op = find_ligkern_op(v[2])) & JT_ADDLIG)) { int av = encoding_of(v[0], override > 0); if (av < 0) - return (override > 0 ? errh->warning("'%s' has no encoding, ignoring ligature", v[0].c_str()) : -1); + return (override > 0 ? errh->warning("%<%s%> has no encoding, ignoring ligature", v[0].c_str()) : -1); int bv = encoding_of(v[1], override > 0); if (bv < 0) - return (override > 0 ? errh->warning("'%s' has no encoding, ignoring ligature", v[1].c_str()) : -1); + return (override > 0 ? errh->warning("%<%s%> has no encoding, ignoring ligature", v[1].c_str()) : -1); int cv = encoding_of(v[3], override > 0); if (cv < 0) - return (override > 0 ? errh->warning("'%s' has no encoding, ignoring ligature", v[3].c_str()) : -1); + return (override > 0 ? errh->warning("%<%s%> has no encoding, ignoring ligature", v[3].c_str()) : -1); Ligature lig = { av, bv, op, 0, cv }; add_ligkern(lig, override); return 0; - + } else return -EPARSE; } @@ -426,8 +428,8 @@ DvipsEncoding::parse_position_words(Vector<String> &v, int override, ErrorHandle int c = encoding_of(v[0]); if (c < 0) - return (override > 0 ? errh->warning("'%s' has no encoding, ignoring positioning", v[0].c_str()) : -1); - + return (override > 0 ? errh->warning("%<%s%> has no encoding, ignoring positioning", v[0].c_str()) : -1); + char *endptr; int pdx, pdy, adx; if (!v[1] || !v[2] || !v[3] @@ -452,10 +454,10 @@ DvipsEncoding::parse_unicoding_words(Vector<String> &v, int override, ErrorHandl if (v.size() < 2 || (v[1] != "=" && v[1] != "=:" && v[1] != ":=")) return -EPARSE; else if (v[0] == "||" || (av = encoding_of(v[0])) < 0) - return errh->warning("'%s' has no encoding, ignoring UNICODING", v[0].c_str()); + return errh->warning("%<%s%> has no encoding, ignoring UNICODING", v[0].c_str()); int original_size = _unicoding.size(); - + if (v.size() == 2 || (v.size() == 3 && v[2] == dot_notdef)) /* no warnings to delete a glyph */; else { @@ -463,9 +465,9 @@ DvipsEncoding::parse_unicoding_words(Vector<String> &v, int override, ErrorHandl bool more; // some care to get all possibilities int uni = glyphname_unicode(v[i], &more); if (uni < 0) { - errh->warning("can't map '%s' to Unicode", v[i].c_str()); + errh->warning("can't map %<%s%> to Unicode", v[i].c_str()); if (i == 2) - errh->warning("target '%s' will be deleted from encoding", v[0].c_str()); + errh->warning("target %<%s%> will be deleted from encoding", v[0].c_str()); } else { _unicoding.push_back(uni); while (more) { @@ -476,7 +478,7 @@ DvipsEncoding::parse_unicoding_words(Vector<String> &v, int override, ErrorHandl } } } - + _unicoding.push_back(-1); if (override > 0 || _unicoding_map[v[0]] < 0) _unicoding_map.insert(v[0], original_size); @@ -515,7 +517,7 @@ DvipsEncoding::parse_word_group(Vector<String> &words, int override, int wt, Err } if ((this->*method)(rewords, override, errh) == -EPARSE) errh->error("parse error in %s", word_types[wt].name); - + } words.clear(); } @@ -543,10 +545,12 @@ DvipsEncoding::parse_words(const String &s, int override, int wt, ErrorHandler * return 0; } -static String -landmark(const String &filename, int line) +String +DvipsEncoding::landmark(int line) const { - return filename + String::stable_string(":", 1) + String(line); + StringAccum sa; + sa << _printable_filename << ':' << line; + return sa.take_string(); } static String @@ -573,19 +577,19 @@ DvipsEncoding::parse(String filename, bool ignore_ligkern, bool ignore_other, Er if (errh->nerrors() != before) return -1; _filename = filename; + _printable_filename = printable_filename(filename); _file_had_ligkern = false; - filename = printable_filename(filename); int pos = 0, line = 1; // parse text String token = tokenize(s, pos, line); if (!token || token[0] != '/') - return errh->lerror(landmark(filename, line), "parse error, expected name"); + return errh->lerror(landmark(line), "parse error, expected name"); _name = token.substring(1); _initial_comment = s.substring(0, pos - token.length()); if (tokenize(s, pos, line) != "[") - return errh->lerror(landmark(filename, line), "parse error, expected ["); + return errh->lerror(landmark(line), "parse error, expected ["); while ((token = tokenize(s, pos, line)) && token[0] == '/') _e.push_back(token.substring(1)); @@ -601,40 +605,40 @@ DvipsEncoding::parse(String filename, bool ignore_ligkern, bool ignore_other, Er && memcmp(token.data(), "LIGKERN", 7) == 0 && isspace((unsigned char) token[7]) && !ignore_ligkern) { - lerrh.set_landmark(landmark(filename, line)); + lerrh.set_landmark(landmark(line)); parse_words(token.substring(8), 1, WT_LIGKERN, &lerrh); - + } else if (token.length() >= 9 && memcmp(token.data(), "LIGKERNX", 8) == 0 && isspace((unsigned char) token[8]) && !ignore_ligkern) { - lerrh.set_landmark(landmark(filename, line)); + lerrh.set_landmark(landmark(line)); parse_words(token.substring(9), 1, WT_LIGKERN, &lerrh); - + } else if (token.length() >= 10 && memcmp(token.data(), "UNICODING", 9) == 0 && isspace((unsigned char) token[9]) && !ignore_other) { - lerrh.set_landmark(landmark(filename, line)); + lerrh.set_landmark(landmark(line)); parse_words(token.substring(10), 1, WT_UNICODING, &lerrh); - + } else if (token.length() >= 9 && memcmp(token.data(), "POSITION", 8) == 0 && isspace((unsigned char) token[8]) && !ignore_other) { - lerrh.set_landmark(landmark(filename, line)); + lerrh.set_landmark(landmark(line)); parse_words(token.substring(9), 1, WT_POSITION, &lerrh); - + } else if (token.length() >= 13 && memcmp(token.data(), "CODINGSCHEME", 12) == 0 && isspace((unsigned char) token[12]) && !ignore_other) { _coding_scheme = trim_space(token, 13); if (_coding_scheme.length() > 39) - lerrh.lwarning(landmark(filename, line), "only first 39 chars of CODINGSCHEME are significant"); + lerrh.lwarning(landmark(line), "only first 39 chars of CODINGSCHEME are significant"); if (std::find(_coding_scheme.begin(), _coding_scheme.end(), '(') < _coding_scheme.end() || std::find(_coding_scheme.begin(), _coding_scheme.end(), ')') < _coding_scheme.end()) { - lerrh.lerror(landmark(filename, line), "CODINGSCHEME cannot contain parentheses"); + lerrh.lerror(landmark(line), "CODINGSCHEME cannot contain parentheses"); _coding_scheme = String(); } @@ -648,7 +652,7 @@ DvipsEncoding::parse(String filename, bool ignore_ligkern, bool ignore_other, Er else if (value == "0" || value == "no" || value == "false") _warn_missing = false; else - lerrh.lerror(landmark(filename, line), "WARNMISSING command not understood"); + lerrh.lerror(landmark(line), "WARNMISSING command not understood"); } return 0; @@ -774,7 +778,7 @@ DvipsEncoding::make_metrics(Metrics &metrics, const FontInfo &finfo, Secondary * // do not use a Unicode-mapped glyph if literal if (literal) glyph = named_glyph; - + // If we found a glyph, maybe use its named_glyph variant. if (glyph > 0 && named_glyph > 0 && std::find(chname.begin(), chname.end(), '.') < chname.end()) @@ -790,7 +794,7 @@ DvipsEncoding::make_metrics(Metrics &metrics, const FontInfo &finfo, Secondary * // skip already-encoded characters and .notdef if (literal || metrics.glyph(code) > 0 || _e[code] == dot_notdef) continue; - + PermString chname = _e[code]; // find all Unicodes @@ -837,7 +841,7 @@ DvipsEncoding::make_metrics(Metrics &metrics, const FontInfo &finfo, Secondary * bad_codepoint(code, metrics, unencoded); if (unencoded.size() == 1) { - errh->warning("'%s' glyph not found in font", unencoded[0].c_str()); + errh->warning("%<%s%> glyph not found in font", unencoded[0].c_str()); errh->message("(This glyph will appear as a blot and cause warnings if used.)"); } else if (unencoded.size() > 1) { std::sort(unencoded.begin(), unencoded.end()); @@ -895,7 +899,7 @@ DvipsEncoding::apply_ligkern_lig(Metrics &metrics, ErrorHandler *errh) const else { static int complex_join_warning = 0; if (!complex_join_warning) { - errh->warning("complex LIGKERN ligature removed (I only support '=:', '=:|', and '|=:')"); + errh->warning("complex LIGKERN ligature removed (I only support %<=:%>, %<=:|%>, and %<|=:%>)"); complex_join_warning = 1; } } diff --git a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.hh b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.hh index 62512b2ef12..5c472670863 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.hh @@ -36,15 +36,15 @@ class DvipsEncoding { public: int parse_unicoding(const String &unicoding_text, int override, ErrorHandler *); bool file_had_ligkern() const { return _file_had_ligkern; } - + // also modifies 'this': void make_metrics(Metrics &, const FontInfo &, Secondary *, bool literal, ErrorHandler *); void make_base_mappings(Vector<int> &mappings, const FontInfo &); - + void apply_ligkern_lig(Metrics &, ErrorHandler *) const; void apply_ligkern_kern(Metrics &, ErrorHandler *) const; void apply_position(Metrics &, ErrorHandler *) const; - + enum { JT_KERN = 32, JT_LIG = 64, JT_ADDLIG = 128, JT_LIGALL = 199, JL_LIG = JT_LIG | JT_ADDLIG, JL_CLIG = JL_LIG | 1, JL_CLIG_S = JL_LIG | 2, JL_LIGC = JL_LIG | 3, @@ -52,7 +52,7 @@ class DvipsEncoding { public: JL_CLIGC_S = JL_LIG | 6, JL_CLIGC_SS = JL_LIG | 7, JT_NOLIGKERN = JT_KERN | JT_LIG, J_ALL = 0x7FFFFFFF }; // also see nokern_names in dvipsencoding.cc - + private: struct Ligature { @@ -73,6 +73,7 @@ class DvipsEncoding { public: String _name; String _filename; + String _printable_filename; String _coding_scheme; String _initial_comment; String _final_text; @@ -95,9 +96,10 @@ class DvipsEncoding { public: int parse_words(const String &, int override, int wt, ErrorHandler *); void bad_codepoint(int, Metrics &, Vector<String> &); bool x_unicodes(PermString chname, Vector<uint32_t> &unicodes) const; - + String landmark(int line) const; + static PermString dot_notdef; - + friend inline bool operator==(const Ligature&, const Ligature&); }; diff --git a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc index beb666e84d2..f7d2ec5d0ea 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.cc @@ -97,7 +97,7 @@ void GlyphFilter::add_pattern(const String& pattern, int ptype, ErrorHandler* errh) { _sorted = false; - + const char* begin = pattern.begin(); const char* end = pattern.end(); while (begin < end && isspace((unsigned char) *begin)) @@ -122,7 +122,7 @@ GlyphFilter::add_pattern(const String& pattern, int ptype, ErrorHandler* errh) if (UnicodeProperty::parse_property(pattern.substring(begin + 1, word - 1), p.u.uniprop.value, p.u.uniprop.mask)) _patterns.push_back(p); else if (errh) - errh->error("unknown Unicode property '%s'", pattern.c_str()); + errh->error("unknown Unicode property %<%s%>", pattern.c_str()); goto next_clause; } @@ -149,7 +149,7 @@ GlyphFilter::add_pattern(const String& pattern, int ptype, ErrorHandler* errh) p.data = D_NAME; p.pattern = pattern.substring(begin, word); _patterns.push_back(p); - + // move to next clause next_clause: for (begin = word; begin < end && isspace((unsigned char) *begin); begin++) diff --git a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.hh b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.hh index a2ceb40e439..753e5714d5c 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/glyphfilter.hh @@ -12,13 +12,13 @@ class GlyphFilter { public: inline bool allow_substitution(Efont::OpenType::Glyph glyph, const Vector<PermString>& glyph_names, uint32_t unicode) const; inline bool allow_alternate(Efont::OpenType::Glyph glyph, const Vector<PermString>& glyph_names, uint32_t unicode) const; - + void add_substitution_filter(const String&, bool is_exclude, ErrorHandler*); void add_alternate_filter(const String&, bool is_exclude, ErrorHandler*); friend bool operator==(const GlyphFilter&, const GlyphFilter&); inline bool check_eq(GlyphFilter&); // may alter both GlyphFilters - + GlyphFilter& operator+=(const GlyphFilter&); void unparse(StringAccum&) const; @@ -53,7 +53,7 @@ class GlyphFilter { public: bool allow(Efont::OpenType::Glyph glyph, const Vector<PermString>& glyph_names, uint32_t unicode, int ptype) const; void add_pattern(const String&, int ptype, ErrorHandler*); void sort(); - + }; inline bool diff --git a/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc b/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc index 4a6d40a0be7..5d76691d3d3 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/metrics.cc @@ -608,12 +608,12 @@ Metrics::apply_ligature(const Vector<Code> &in, const Substitution *s, int looku if (_encoding[l->out].flags & Char::BUILT) old_out = l->out; } - + // make the final ligature add_ligature(cin1, cin2, cout); //fprintf(stderr, "%s : %d/%s %d/%s => %d/%s [was %d/%s]\n", s->unparse().c_str(), cin1, code_str(cin1), cin2, code_str(cin2), cout, code_str(cout), old_out, code_str(old_out)); - + // if appropriate, swap old ligatures to point to the new result if (old_out >= 0) for (Char *ch = _encoding.begin(); ch != _encoding.end(); ch++) @@ -629,7 +629,7 @@ Metrics::apply(const Vector<Substitution>& sv, bool allow_single, int lookup, co ChangedContext ctx(_encoding.size()); // XXX does not handle multiply-encoded glyphs - + // loop over substitutions int failures = 0; for (const Substitution *s = sv.begin(); s != sv.end(); s++) { @@ -645,7 +645,7 @@ Metrics::apply(const Vector<Substitution>& sv, bool allow_single, int lookup, co // check if substitution of this code allowed if (!glyph_filter.allow_substitution(s->in_glyph(), glyph_names, unicode(cin))) continue; - + // look for an allowed alternate Glyph out = -1; for (int i = 0; out < 0 && i < s->out_nglyphs(); i++) @@ -706,7 +706,7 @@ Metrics::apply(const Vector<Substitution>& sv, bool allow_single, int lookup, co // actually apply ligature apply_ligature(in, s, lookup); - + } else failures++; } @@ -788,7 +788,7 @@ Metrics::apply(const Vector<Positioning>& pv) Vector<int *> pair_changed(_encoding.size(), 0); // XXX does not handle multiply-encoded glyphs - + // loop over substitutions int success = 0; for (const Positioning *p = pv.begin(); p != pv.end(); p++) @@ -826,7 +826,7 @@ operator<(const Metrics::Ligature3 &l1, const Metrics::Ligature3 &l2) if (l1.out == l2.in1 || l1.out == l2.in2) return true; else - return l1.in1 < l2.in1 + return l1.in1 < l2.in1 || (l1.in1 == l2.in1 && (l1.in2 < l2.in2 || (l1.in2 == l2.in2 && l1.out < l2.out))); } @@ -854,7 +854,7 @@ Metrics::mark_liveness(int size, const Vector<Ligature3> *all_ligs) all_ligatures(my_ligs); all_ligs = &my_ligs; } - + /* Characters below 'size' are in both virtual and base encodings. */ for (Char *ch = _encoding.begin(); ch < _encoding.begin() + size; ch++) if (ch->visible()) @@ -885,7 +885,7 @@ Metrics::mark_liveness(int size, const Vector<Ligature3> *all_ligs) } if (changed) goto redo_live_reachable; - + /* Characters reachable from live settings are base-live. */ for (Char *ch = _encoding.begin(); ch != _encoding.end(); ch++) if (ch->flag(Char::LIVE)) @@ -957,7 +957,7 @@ Metrics::cut_encoding(int size) // 21.Feb.2007: Character isn't live any more. ch->flags &= ~(Char::BASE_LIVE | Char::LIVE); } - + /* Maybe we don't need to do anything else. */ if (_encoding.size() <= size) { _encoding.resize(size, Char()); @@ -967,7 +967,7 @@ Metrics::cut_encoding(int size) /* Need liveness markings. */ if (!_liveness_marked) mark_liveness(size); - + /* Characters below 'size' are 'good'. Characters above 'size' are not 'good'. */ Vector<int> good(_encoding.size(), 1); @@ -1002,7 +1002,7 @@ Metrics::cut_encoding(int size) _encoding[c].ligatures.clear(); _encoding[c].kerns.clear(); } - + /* Remove ligatures and kerns that point beyond 'size', except for valid context ligatures. Also remove ligatures that have non-live components. */ @@ -1100,7 +1100,7 @@ Metrics::shrink_encoding(int size, const DvipsEncoding &dvipsenc, ErrorHandler * /* Need liveness markings. */ if (!_liveness_marked) mark_liveness(size, &all_ligs); - + /* Score characters by importance. Importance relates first to Unicode values, and then recursively to the importances of characters that form a ligature. */ @@ -1189,7 +1189,7 @@ Metrics::shrink_encoding(int size, const DvipsEncoding &dvipsenc, ErrorHandler * encoding, then those encoded by the input encoding (but that character wasn't available). */ Vector<Code> empty_codes; - for (int want_encoded = 0; want_encoded < 2; want_encoded++) + for (int want_encoded = 0; want_encoded < 2; want_encoded++) for (Code c = 0; c < size; c++) if (_encoding[c].base_code < 0 && dvipsenc.encoded(c) == (bool) want_encoded) @@ -1205,7 +1205,7 @@ Metrics::shrink_encoding(int size, const DvipsEncoding &dvipsenc, ErrorHandler * int needs = (_encoding[slot->old_code].visible_base() ? 1 : 0) + (_encoding[slot->old_code].flag(Char::LIVE) ? 2 : 0); assert(needs > 0); - + Code dest = -1; for (Code *h = empty_codes.begin(); h < empty_codes.end() && dest < 0; h++) { int haves = (_encoding[*h].base_code < 0 ? 1 : 0) @@ -1247,7 +1247,7 @@ Metrics::shrink_encoding(int size, const DvipsEncoding &dvipsenc, ErrorHandler * sa.pop_back(); errh->lwarning(" ", (unencoded.size() == 1 ? "not enough room in encoding, ignoring %d glyph" : "not enough room in encoding, ignoring %d glyphs"), unencoded.size()); errh->lmessage(" ", "(\ -This encoding doesn't have room for all the glyphs used by the\n\ +This encoding doesn%,t have room for all the glyphs used by the\n\ font, so these have been left out:\n%s.\n\ To select specific glyphs, add them to the input encoding.)", sa.c_str()); } @@ -1319,10 +1319,10 @@ bool Metrics::setting(Code code, Vector<Setting> &v, SettingMode sm) const { extern int letterspace; - + if (!(sm & SET_KEEP)) v.clear(); - + if (!valid_code(code) || _encoding[code].glyph == 0) return false; @@ -1331,10 +1331,10 @@ Metrics::setting(Code code, Vector<Setting> &v, SettingMode sm) const if (const VirtualChar *vc = ch.virtual_char) { bool good = true; int font_number = 0; - + if (ch.pdx != 0 || ch.pdy != 0) v.push_back(Setting(Setting::MOVE, ch.pdx, ch.pdy)); - + for (const Setting *s = vc->setting.begin(); s != vc->setting.end(); s++) switch (s->op) { case Setting::MOVE: @@ -1374,17 +1374,17 @@ Metrics::setting(Code code, Vector<Setting> &v, SettingMode sm) const if (ch.pdy != 0 || ch.adx - ch.pdx != 0) v.push_back(Setting(Setting::MOVE, ch.adx - ch.pdx, -ch.pdy)); return good; - + } else if (ch.base_code >= 0) { if (ch.pdx != 0 || ch.pdy != 0) v.push_back(Setting(Setting::MOVE, ch.pdx, ch.pdy)); - + v.push_back(Setting(Setting::SHOW, ch.base_code, ch.glyph)); - + if (ch.pdy != 0 || ch.adx - ch.pdx != 0) v.push_back(Setting(Setting::MOVE, ch.adx - ch.pdx, -ch.pdy)); return true; - + } else return false; } @@ -1424,7 +1424,7 @@ Metrics::kerns(Code in1, Vector<Code> &in2, Vector<int> &kern) const { in2.clear(); kern.clear(); - + const Char &in1ch = _encoding[in1]; for (const Kern *k = in1ch.kerns.begin(); k != in1ch.kerns.end(); k++) if (k->kern != 0) { diff --git a/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh b/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh index d502ae94181..06f6a25f291 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/metrics.hh @@ -32,7 +32,7 @@ class Metrics { public: ~Metrics(); void check() const; - + Glyph boundary_glyph() const { return _boundary_glyph; } Glyph emptyslot_glyph() const { return _emptyslot_glyph; } @@ -64,7 +64,7 @@ class Metrics { public: void add_altselector_code(Code, int altselector_type); bool altselectors() const { return _altselectors.size() > 0; } - + inline bool was_base_glyph(Code) const; inline Code base_code(Code) const; inline Glyph base_glyph(Code) const; @@ -75,11 +75,11 @@ class Metrics { public: void add_kern(Code in1, Code in2, int kern); void set_kern(Code in1, Code in2, int kern); void add_single_positioning(Code, int pdx, int pdy, int adx); - + enum { CODE_ALL = 0x7FFFFFFF }; void remove_ligatures(Code in1, Code in2); int reencode_right_ligkern(Code old_in2, Code new_in2); - + int apply(const Vector<Substitution>&, bool allow_single, int lookup, const GlyphFilter&, const Vector<PermString>& glyph_names); void apply_alternates(const Vector<Substitution>&, int lookup, const GlyphFilter&, const Vector<PermString>& glyph_names); int apply(const Vector<Positioning>&); @@ -116,14 +116,14 @@ class Metrics { public: PermString name; Vector<Setting> setting; }; - + struct Ligature3 { Code in1; Code in2; Code out; Ligature3(Code in1_, Code in2_, Code out_) : in1(in1_), in2(in2_), out(out_) { } }; - + private: struct Char { @@ -142,7 +142,7 @@ class Metrics { public: enum { BUILT = 1, INTERMEDIATE = 2, CONTEXT_ONLY = 4, LIVE = 8, BASE_LIVE = 16, BASE_REP = 32 }; int flags; - + Char() : virtual_char(0) { clear(); } void clear(); void swap(Char &); @@ -169,7 +169,7 @@ class Metrics { public: Vector<const Efont::CharstringProgram *> _mapped_fonts; Vector<String> _mapped_font_names; - + Metrics(const Metrics &); // does not exist Metrics &operator=(const Metrics &); // does not exist diff --git a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 index e1d87b48cf6..04016c90393 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 +++ b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.1 @@ -1,5 +1,5 @@ '\"t -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -109,7 +109,9 @@ installations, you may first need to copy the system's file to .I $HOME/texmf/web2c and run -.M mktexlsr 1 .) +.M mktexlsr 1 . +On newer TeXLive installations, you may need to set the TEXMFVAR environment +variable.) You can then run "\fBotftotfm\fR .B \-a .IR fontfile @@ -498,25 +500,23 @@ and 255. The default is taken from the encoding. .Sp .TP 5 .BI \-\-altselector\-char= char -Set the font's alternate-selector character to +Set the font's alternate selector character to .IR char , -which should either be a single non-digit character, or a number between \-1 -and 255. Use an alternate selector if you want to choose between different -versions of a character from within a TeX file. For instance, say that your -font provides three versions of "A". If you want to access them all, pick a -character to be your alternate selector -- say "*". Then give -.B otftotfm -the \&'\-\-altselector\-char="*"' -option. In TeX, "A" will produce the normal version, "A*" will produce the -first alternate, and "A**" will produce the second alternate. Furthermore, -"s*t" will activate any discretionary "s_t" ligature in the font. +which should either be a single non-digit character, or a number between +\&\-1 and 255. Alternate selectors let TeX authors explicitly choose +between versions of a character. For instance, the +\&'\-\-altselector\-char="*"' option turns the "*" character into a special +switch that cycles between alternates. For instance, the TeX input "A" +would produce the normal version of the "A" Unicode character, "A*" would +produce the first alternate, "A**" would produce the second alternate, and +so forth. Furthermore, "s*t" will activate any discretionary "s_t" +ligature in the font. .Sp The .B \-\-altselector\-char mechanism uses the features specified by .BR \-\-altselector\-feature -options. You don't need to turn on those features if you use -.BR \-\-altselector . +options. .Sp The alternate-selector character may also be specified in the encoding; see ENCODINGS, below. See Sivan Toledo's article cited in the SEE ALSO section @@ -819,6 +819,8 @@ Do not generate a font map line for the font. .BI \-\-encoding\-directory= dir .TP 5 .BI \-\-type1\-directory= dir +.TP 5 +.BI \-\-truetype\-directory= dir Set the directory used for various output types. Each directory may be set by an environment variable, and defaults to a TDS directory in automatic mode, or to "." otherwise. Environment variable names and default TDS @@ -917,28 +919,32 @@ semicolons. For example, .nf % UNICODING pi1 =: uni03D6 ; .fi -tells otftotfm that the character "/pi1" encodes as U+03D6 GREEK PI SYMBOL, +encodes the character "/pi1" as U+03D6 GREEK PI SYMBOL, and .nf % UNICODING Delta =: uni0394 uni2206 ; .fi -tells it that U+0394 GREEK CAPITAL LETTER DELTA should be preferred to -U+2206 INCREMENT as an encoding for "/Delta". You can also supply regular +makes U+0394 GREEK CAPITAL LETTER DELTA preferred to +U+2206 INCREMENT as an encoding for "/Delta". You can also supply glyph names: .nf % UNICODING Delta =: Deltagreek Delta ; .fi -Supply zero choices to remove a glyph from the input encoding. For -instance: +A mapping with no Unicode values removes that glyph from the input +encoding. For instance, this erases any f-ligature characters from the +encoding: .nf % UNICODING ff =: ; fi =: ; fl =: ; ffi =: ; ffl =: ; .fi -The f-ligatures will be added back to the encoding, preferably at their -original locations, if some font feature requires them. Finally, map a -glyph to \&'emptyslot' if you don't want +The slots are available for +.BR otftfm 's +own use, for example for other characters required by the font. (If the +f-ligatures themselves are required by the font, for instance by a \&'liga' +feature, then they will be stored into their old slots when possible.) Map +a glyph to \&'emptyslot' if you don't want .B otftotfm -to use the slot for a ligature character. For example, this will leave the -\&'ff' slot unused if the font has no \&'ff' glyph: +to use the slot. For example, this will leave the \&'ff' slot unused if +the font has no \&'ff' glyph: .nf % UNICODING ff =: ff emptyslot ; .fi @@ -1484,6 +1490,17 @@ features, or by using an encoding with more empty slots, such as the 7t.enc encoding distributed with .BR otftotfm . ' +.TP 5 +The \&'\fB\-a\fR' option did not install my font correctly. +' +Try again with the \&'\fB\-\-verbose\fR' option, which causes +.BR otftotfm +to explain its behavior. Note that by default, +.BR otftotfm +will not re-install files already present in your system's TeX search paths +(in the current directory, for instance). Use \&'\fB\-\-force\fR' to +override this behavior. +' .SH "FREQUENTLY ASKED QUESTIONS" .TP 5 How can I get a small-caps "SS" in place of the German sharp-S? @@ -1530,7 +1547,6 @@ How can I get lining figures (that is, normal line-height digits) with small cap Many fonts use old-style figures by default with small caps. Since the default is not specified, it's wise to explicitly supply \&'\fB\-f\fRlnum' or \&'\fB-f\fRonum'. - ' .SH "BUGS" .\" .LP @@ -1590,7 +1606,7 @@ used to translate glyph names to Unicode code points. http://partners.adobe.com/public/developer/opentype/index_glyph.html ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) .PP Thanks to Karl Berry, Marco Kuhlmann, Adam Lindsay, Bruce D'Arcus, Thomas Esser, Claire Connelly, Nelson H.F. Beebe, and Ryuji Suzuki for diff --git a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc index 90f03edd240..a5ae8282313 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/otftotfm.cc @@ -1,6 +1,6 @@ /* otftotfm.cc -- driver for translating OpenType fonts to TeX metrics * - * Copyright (c) 2003-2008 Eddie Kohler + * Copyright (c) 2003-2009 Eddie Kohler * * 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 @@ -134,7 +134,7 @@ using namespace Efont; #define CHAR_OPTTYPE (Clp_ValFirstUser) static Clp_Option options[] = { - + { "script", 's', SCRIPT_OPT, Clp_ValString, 0 }, { "feature", 'f', FEATURE_OPT, Clp_ValString, 0 }, { "letter-feature", 0, LETTER_FEATURE_OPT, Clp_ValString, 0 }, @@ -182,12 +182,12 @@ static Clp_Option options[] = { { "no-updmap", 0, NO_UPDMAP_OPT, 0, 0 }, { "map-file", 0, MAP_FILE_OPT, Clp_ValString, Clp_Negate }, { "output-encoding", 0, OUTPUT_ENCODING_OPT, Clp_ValString, Clp_Optional }, - + { "automatic", 'a', AUTOMATIC_OPT, 0, Clp_Negate }, { "name", 'n', FONT_NAME_OPT, Clp_ValString, 0 }, { "vendor", 'v', VENDOR_OPT, Clp_ValString, 0 }, { "typeface", 0, TYPEFACE_OPT, Clp_ValString, 0 }, - + { "encoding-directory", 0, ENCODING_DIR_OPT, Clp_ValString, 0 }, { "pl-directory", 0, PL_DIR_OPT, Clp_ValString, 0 }, { "tfm-directory", 0, TFM_DIR_OPT, Clp_ValString, 0 }, @@ -211,7 +211,7 @@ static Clp_Option options[] = { { "qf", 0, QUERY_FEATURES_OPT, 0, 0 }, { "query-scripts", 0, QUERY_SCRIPTS_OPT, 0, 0 }, { "qs", 0, QUERY_SCRIPTS_OPT, 0, 0 }, - + }; static const char * const default_ligkerns = "\ @@ -229,7 +229,6 @@ struct BaseEncoding { }; static const char *program_name; -static String::Initializer initializer; static String current_time; static StringAccum invocation; @@ -277,7 +276,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -285,24 +284,25 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'Otftotfm' generates TeX font metrics files from an OpenType font (PostScript\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Otftotfm%> generates TeX font metrics files from an OpenType font (PostScript\n\ flavor only), including ligatures, kerns, and some positionings. Supply\n\ -'-s SCRIPT[.LANG]' options to specify a language system, '-f FEAT' options to\n\ -turn on optional OpenType features, and a '-e ENC' option to specify a base\n\ +%<-s SCRIPT[.LANG]%> options to specify a language system, %<-f FEAT%> options to\n\ +turn on optional OpenType features, and a %<-e ENC%> option to specify a base\n\ encoding. Output files are written to the current directory (but see\n\ -'--automatic' and the 'directory' options).\n\ +%<--automatic%> and the %<directory%> options).\n\ \n\ Usage: %s [-a] [OPTIONS] OTFFILE FONTNAME\n\n", program_name); - printf("\ + uerrh.message("\ Font feature and transformation options:\n\ -s, --script=SCRIPT[.LANG] Use features for script SCRIPT[.LANG] [latn].\n\ -f, --feature=FEAT Activate feature FEAT.\n\ --lf, --letter-feature=FEAT Activate feature FEAT for letters.\n\ --subs-filter=PAT Substitute only characters matching PAT.\n\ --include-subs=PAT Same, but cumulative.\n\ - --exclude-subs=PAT Don't substitute characters matching PAT.\n\ + --exclude-subs=PAT Don%,t substitute characters matching PAT.\n\ --clear-subs Clear included/excluded substitutions.\n\ -E, --extend=F Widen characters by a factor of F.\n\ -S, --slant=AMT Oblique characters by AMT, generally <<1.\n\ @@ -312,7 +312,7 @@ Font feature and transformation options:\n\ --space-factor=F Scale wordspace by a factor of F.\n\ --design-size=SIZE Set font design size to SIZE.\n\ \n"); - printf("\ + uerrh.message("\ Encoding options:\n\ -e, --encoding=FILE Use DVIPS encoding FILE as a base encoding.\n\ --boundary-char=CHAR Set the boundary character to CHAR.\n\ @@ -325,14 +325,14 @@ Encoding options:\n\ --ligkern=COMMAND Add a ligature or kern.\n\ --position=COMMAND Add a POSITION command.\n\ --unicoding=COMMAND Add a UNICODING command.\n\ - --no-encoding-commands Ignore encoding file's LIGKERN/UNICODINGs.\n\ - --no-default-ligkern Don't include default LIGKERNs.\n\ + --no-encoding-commands Ignore encoding file%,s LIGKERN/UNICODINGs.\n\ + --no-default-ligkern Don%,t include default LIGKERNs.\n\ --coding-scheme=SCHEME Set the output coding scheme to SCHEME.\n\ --warn-missing Warn about characters not supported by font.\n\ --literal-encoding=FILE Use DVIPS encoding FILE verbatim.\n\ --base-encodings=FILE Output can refer to base fonts named in FILE.\n\ \n"); - printf("\ + uerrh.message("\ Automatic mode options:\n\ -a, --automatic Install in a TeX Directory Structure.\n\ -v, --vendor=NAME Set font vendor for TDS [lcdftools].\n\ @@ -350,7 +350,7 @@ Output options:\n\ --no-map Do not generate a psfonts.map line.\n\ --output-encoding[=FILE] Only generate an encoding file.\n\ \n"); - printf("\ + uerrh.message("\ File location options:\n\ --tfm-directory=DIR Put TFM files in DIR [.|automatic].\n\ --pl-directory=DIR Put PL files in DIR [.|automatic].\n\ @@ -373,7 +373,7 @@ Other options:\n\ -q, --quiet Do not generate any error messages.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n"); +Report bugs to <ekohler@gmail.com>.\n"); } #ifndef WIN32 @@ -442,7 +442,7 @@ get_design_size(const FontInfo &finfo) if (!gpos_table) throw OpenType::Error(); - ErrorHandler *errh = ErrorHandler::ignore_handler(); + ErrorHandler *errh = ErrorHandler::silent_handler(); OpenType::Gpos gpos(gpos_table, errh); // extract 'size' feature(s) @@ -469,7 +469,7 @@ get_design_size(const FontInfo &finfo) // return a number in 'pt', not 'bp' return result * 72.27 / 72.; - + } catch (OpenType::Error) { return 10.0; } @@ -554,7 +554,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, if (design_size <= 0) design_size = get_design_size(finfo); max_printed_real = 0; - + fprintf(f, "(DESIGNSIZE R %.1f)\n" "(DESIGNUNITS R %d.0)\n" "(COMMENT DESIGNSIZE (1 em) IS IN POINTS)\n" @@ -569,7 +569,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, font_xform.shear(slant); int bounds[4], width; double du = (design_units == metrics.units_per_em() ? 1. : design_units / (double) metrics.units_per_em()); - + double actual_slant = font_slant(finfo); if (actual_slant) fprintf(f, " (SLANT R %g)\n", actual_slant); @@ -593,7 +593,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, int xheight = font_x_height(finfo, font_xform); if (xheight < 1000) fprint_real(f, " (XHEIGHT", xheight, du); - + fprint_real(f, " (QUAD", 1000, du); fprintf(f, " )\n"); @@ -637,7 +637,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, } else for (int i = 0; i < metrics.n_mapped_fonts(); i++) font_mapping.push_back(i); - + // figure out the proper names and numbers for glyphs Vector<String> glyph_ids; Vector<String> glyph_comments(257, String()); @@ -668,7 +668,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, glyph_ids.push_back("D " + String(i)); glyph_comments[i] = glyph_base_comments[i] = glyph_comment; - + } else if (i < 256) glyph_ids.push_back("D " + String(i)); } @@ -713,12 +713,12 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, } } fprintf(f, " )\n"); - + // CHARACTERs Vector<Setting> settings; StringAccum sa; Vector<Point> push_stack; - + for (int i = 0; i < 256; i++) if (metrics.setting(i, settings)) { fprintf(f, "(CHARACTER %s%s\n", glyph_ids[i].c_str(), glyph_comments[i].c_str()); @@ -731,7 +731,7 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, const CharstringProgram *program = finfo.program(); for (const Setting *s = settings.begin(); s < settings.end(); s++) switch (s->op) { - + case Setting::SHOW: if (vpl || program == finfo.program()) boundser.char_bounds(program->glyph_context(s->y)); @@ -805,9 +805,9 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, sa << " (SPECIAL " << s->s << ")\n"; break; } - + } - + assert(push_stack.size() == 0); // output information @@ -826,14 +826,14 @@ output_pl(Metrics &metrics, const String &ps_name, int boundary_char, // at last, close the file fclose(f); - + // Did we print a number too big for TeX to handle? If so, try again. if (max_printed_real >= 2047) { if (metrics.design_units() <= 1) errh->fatal("This font appears to be broken. It has characters so big that the PL format\ncannot represent them."); metrics.set_design_units(metrics.design_units() > 200 ? metrics.design_units() - 250 : 1); if (verbose) - errh->message("the font's metrics overflow the limits of PL files\n(reducing DESIGNUNITS to %d and trying again)", metrics.design_units()); + errh->message("the font%,s metrics overflow the limits of PL files\n(reducing DESIGNUNITS to %d and trying again)", metrics.design_units()); output_pl(metrics, ps_name, boundary_char, finfo, vpl, filename, errh); } } @@ -856,7 +856,7 @@ find_lookups(const OpenType::ScriptList& scripts, const OpenType::FeatureList& f for (int i = 0; i < interesting_scripts.size(); i += 2) { OpenType::Tag script = interesting_scripts[i]; OpenType::Tag langsys = interesting_scripts[i+1]; - + // collect features applying to this script scripts.features(script, langsys, required, fids, errh); @@ -872,7 +872,7 @@ find_lookups(const OpenType::ScriptList& scripts, const OpenType::FeatureList& f for (int k = 0; k < lookupids.size(); k++) { int l = lookupids[k]; if (l < 0 || l >= lookups.size()) - errh->error("lookup for '%s' feature out of range", OpenType::Tag::langsys_text(script, langsys).c_str()); + errh->error("lookup for %<%s%> feature out of range", OpenType::Tag::langsys_text(script, langsys).c_str()); else { lookups[l].used = true; lookups[l].features.push_back(ftag); @@ -889,7 +889,7 @@ find_lookups(const OpenType::ScriptList& scripts, const OpenType::FeatureList& f l->filter = feature_filters[l->features[0]]; for (OpenType::Tag* ft = l->features.begin() + 1; ft < l->features.end(); ft++) if (!l->filter->check_eq(*feature_filters[*ft])) { - errh->error("'%s' and '%s' features share a lookup, but have different filters", l->features[0].text().c_str(), ft->text().c_str()); + errh->error("%<%s%> and %<%s%> features share a lookup, but have different filters", l->features[0].text().c_str(), ft->text().c_str()); break; } } @@ -907,7 +907,7 @@ write_encoding_file(String &filename, const String &encoding_name, return ok_retval; } else if (verbose) errh->message((ok_retval ? "creating encoding file %s" : "updating encoding file %s"), filename.c_str()); - + int fd = open(filename.c_str(), O_RDWR | O_CREAT, 0666); if (fd < 0) return errh->error("%s: %s", filename.c_str(), strerror(errno)); @@ -961,7 +961,7 @@ write_encoding_file(String &filename, const String &encoding_name, contents << old_encodings.substring(pos1, pos2 - pos1); pos1 = pos2; } - + // rewind file #ifdef HAVE_FTRUNCATE rewind(f); @@ -992,7 +992,7 @@ output_encoding(const Metrics &metrics, Vector<Metrics::Glyph> glyphs; if (!metrics.base_glyphs(glyphs, 256)) return false; - + StringAccum sa; for (int i = 0; i < 256; i++) { if ((i & 0xF) == 0) @@ -1035,10 +1035,10 @@ output_encoding(const Metrics &metrics, %%" << out_encoding_name << "\n"; contents << "% Encoding created by otftotfm" << current_time << "\n\ % Command line follows encoding\n"; - + // the encoding itself contents << '/' << out_encoding_name << " [\n" << sa << "] def\n"; - + // write banner -- unfortunately this takes some doing String banner = String("Command line: '") + String(invocation.data(), invocation.length()) + String("'"); char *buf = banner.mutable_data(); @@ -1063,7 +1063,7 @@ output_encoding(const Metrics &metrics, contents << "% " << banner.substring(0, last_pos) << '\n'; banner = banner.substring(last_pos + 1); } - + // open encoding file if (out_encoding_file == "-") fwrite(contents.data(), 1, contents.length(), stdout); @@ -1096,12 +1096,12 @@ output_tfm(Metrics &metrics, const String &ps_name, int boundary_char, command << "vptovf " << shell_quote(pl_filename) << ' ' << shell_quote(vf_filename) << ' ' << shell_quote(tfm_filename) << " >&2"; else command << "pltotf " << shell_quote(pl_filename) << ' ' << shell_quote(tfm_filename) << " >&2"; - + int status = mysystem(command.c_str(), errh); if (!no_create) unlink(pl_filename.c_str()); - + if (status != 0) errh->fatal("%s execution failed", (vpl ? "vptovf" : "pltotf")); else { @@ -1127,7 +1127,7 @@ output_metrics(Metrics &metrics, const String &ps_name, int boundary_char, else if (output_flags & G_METRICS) errh->warning("features require virtual fonts"); } - + // output virtual metrics if (!(output_flags & G_VMETRICS)) /* do nothing */; @@ -1136,10 +1136,10 @@ output_metrics(Metrics &metrics, const String &ps_name, int boundary_char, // erase old virtual font String vf = getodir(O_VF, errh) + "/" + font_name + ".vf"; if (no_create) - errh->message("would remove potential VF file '%s'", vf.c_str()); + errh->message("would remove potential VF file %<%s%>", vf.c_str()); else { if (verbose) - errh->message("removing potential VF file '%s'", vf.c_str()); + errh->message("removing potential VF file %<%s%>", vf.c_str()); if (unlink(vf.c_str()) < 0 && errno != ENOENT) errh->error("removing %s: %s", vf.c_str(), strerror(errno)); } @@ -1160,7 +1160,7 @@ output_metrics(Metrics &metrics, const String &ps_name, int boundary_char, metrics.make_base(257); if (!metrics.need_base()) return; - + // output metrics double save_minimum_kern = minimum_kern; if (need_virtual) @@ -1293,7 +1293,7 @@ do_gsub(Metrics& metrics, const OpenType::Font& otf, DvipsEncoding& dvipsenc, bo OpenType::Tag feature = (lookups[i].features.size() == 1 ? lookups[i].features[0] : OpenType::Tag()); if (feature == OpenType::Tag("fina") || feature == OpenType::Tag("fin2") || feature == OpenType::Tag("fin3")) { if (dvipsenc.boundary_char() < 0) - errh->warning("'-ffina' requires a boundary character\n(The input encoding didn't specify a boundary character, but\nI need one to implement '-ffina' features correctly. Try\nthe '--boundary-char' option.)"); + errh->warning("%<-ffina%> requires a boundary character\n(The input encoding didn%,t specify a boundary character, but\nI need one to implement %<-ffina%> features correctly. Try\nthe %<--boundary-char%> option.)"); else { int bg = metrics.boundary_glyph(); for (int j = 0; j < subs.size(); j++) @@ -1322,7 +1322,7 @@ do_gsub(Metrics& metrics, const OpenType::Font& otf, DvipsEncoding& dvipsenc, bo altselector_features.swap(interesting_features); altselector_feature_filters.swap(feature_filters); Vector<Lookup> alt_lookups(gsub.nlookups(), Lookup()); - find_lookups(gsub.script_list(), gsub.feature_list(), alt_lookups, ErrorHandler::ignore_handler()); + find_lookups(gsub.script_list(), gsub.feature_list(), alt_lookups, ErrorHandler::silent_handler()); Vector<OpenType::Substitution> alt_subs; for (int i = 0; i < alt_lookups.size(); i++) if (alt_lookups[i].used) { @@ -1371,15 +1371,15 @@ do_math_spacing(Metrics &metrics, const FontInfo &finfo, int x_height = font_x_height(finfo, font_xform); double slant = font_slant(finfo); int boundary_char = dvipsenc.boundary_char(); - + int bounds[4], width; - + for (int code = 0; code < metrics.encoding_size(); code++) if (metrics.was_base_glyph(code) && code != boundary_char && char_bounds(bounds, width, finfo, font_xform, code)) { int left_sb = (bounds[0] < 0 ? -bounds[0] : 0); metrics.add_single_positioning(code, left_sb, 0, left_sb); - + if (skew_char >= 0 && code < 256) { double virtual_height = (bounds[3] > x_height ? bounds[3] :x_height) - 0.5 * x_height; int right_sb = (bounds[2] > width ? bounds[2] - width : 0); @@ -1399,7 +1399,7 @@ do_file(const String &otf_filename, const OpenType::Font &otf, return; if (!finfo.cff) errh->warning("TrueType-flavored font support is experimental"); - + // save glyph names Vector<PermString> glyph_names; finfo.glyph_names(glyph_names); @@ -1439,26 +1439,26 @@ do_file(const String &otf_filename, const OpenType::Font &otf, } catch (OpenType::BlankTable) { // nada } catch (OpenType::Error e) { - errh->warning("GSUB '%s' error, continuing", e.description.c_str()); + errh->warning("GSUB %<%s%> error, continuing", e.description.c_str()); } - + // apply LIGKERN ligature commands to the result dvipsenc.apply_ligkern_lig(metrics, errh); // test fake ligature mechanism //metrics.add_threeligature('T', 'h', 'e', '0'); - + // reencode characters to fit within 8 bytes (+ 1 for the boundary) if (!dvipsenc_literal) metrics.shrink_encoding(257, dvipsenc_in, errh); - + // apply activated GPOS features try { do_gpos(metrics, otf, feature_usage, errh); } catch (OpenType::BlankTable) { // nada } catch (OpenType::Error e) { - errh->warning("GPOS '%s' error, continuing", e.description.c_str()); + errh->warning("GPOS %<%s%> error, continuing", e.description.c_str()); } // apply LIGKERN kerning and POS positioning commands to the result @@ -1524,7 +1524,7 @@ do_file(const String &otf_filename, const OpenType::Font &otf, if (feature_usage[interesting_features[i].value()]) font_name += String("--F") + interesting_features[i].text(); } - + // output encoding if (dvipsenc_literal) { out_encoding_name = dvipsenc_in.name(); @@ -1543,7 +1543,7 @@ do_file(const String &otf_filename, const OpenType::Font &otf, errh->warning("assuming --no-type1 since this font is TrueType-flavored"); output_flags &= ~G_TYPE1; } - + // output ::otf_filename = otf_filename; output_metrics(metrics, finfo.postscript_name(), dvipsenc.boundary_char(), @@ -1623,7 +1623,7 @@ parse_base_encodings(const String &filename, ErrorHandler *errh) else if (String path = locate_encoding(efile, errh)) be->encoding.parse(path, true, true, &lerrh); else - lerrh.error("encoding '%s' not found", efile.c_str()); + lerrh.error("encoding %<%s%> not found", efile.c_str()); if (lerrh.nerrors() == before) base_encodings.push_back(be); else @@ -1645,7 +1645,6 @@ main(int argc, char *argv[]) #ifndef WIN32 handle_sigchld(); #endif - String::static_initialize(); Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); Clp_AddType(clp, CHAR_OPTTYPE, 0, clp_parse_char, 0); @@ -1662,7 +1661,7 @@ main(int argc, char *argv[]) #endif for (int i = 0; i < argc; i++) invocation << (i ? " " : "") << argv[i]; - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); const char *input_file = 0; Vector<String> glyphlist_files; @@ -1678,7 +1677,7 @@ main(int argc, char *argv[]) GlyphFilter current_substitution_filter; GlyphFilter current_alternate_filter; GlyphFilter* current_filter_ptr = &null_filter; - + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -1707,7 +1706,7 @@ main(int argc, char *argv[]) if (!t.valid()) usage_error(errh, "bad feature tag"); else if (feature_filters[t]) - usage_error(errh, "feature '%s' included twice", t.text().c_str()); + usage_error(errh, "feature %<%s%> included twice", t.text().c_str()); else { if (!current_filter_ptr) current_filter_ptr = new GlyphFilter(current_substitution_filter + current_alternate_filter); @@ -1716,19 +1715,19 @@ main(int argc, char *argv[]) } break; } - + case LETTER_FEATURE_OPT: { OpenType::Tag t(clp->vstr); if (!t.valid()) usage_error(errh, "bad feature tag"); else if (feature_filters[t]) - usage_error(errh, "feature '%s' included twice", t.text().c_str()); + usage_error(errh, "feature %<%s%> included twice", t.text().c_str()); else { interesting_features.push_back(t); GlyphFilter* gf = new GlyphFilter; gf->add_substitution_filter("<Letter>", false, errh); *gf += current_alternate_filter; - feature_filters.insert(t, gf); + feature_filters.insert(t, gf); } break; } @@ -1746,7 +1745,7 @@ main(int argc, char *argv[]) current_substitution_filter = null_filter; current_filter_ptr = 0; break; - + case ENCODING_OPT: if (encoding_file) usage_error(errh, "encoding specified twice"); @@ -1763,7 +1762,7 @@ main(int argc, char *argv[]) case BASE_ENCODINGS_OPT: base_encoding_files.push_back(clp->vstr); break; - + case EXTEND_OPT: if (extend) usage_error(errh, "extend value specified twice"); @@ -1796,7 +1795,7 @@ main(int argc, char *argv[]) skew_char = clp->val.i; } break; - + case DESIGN_SIZE_OPT: if (design_size > 0) usage_error(errh, "design size value specified twice"); @@ -1838,7 +1837,7 @@ main(int argc, char *argv[]) if (!t.valid()) usage_error(errh, "bad feature tag"); else if (altselector_feature_filters[t]) - usage_error(errh, "altselector feature '%s' included twice", t.text().c_str()); + usage_error(errh, "altselector feature %<%s%> included twice", t.text().c_str()); else { if (!current_filter_ptr) current_filter_ptr = new GlyphFilter(current_substitution_filter + current_alternate_filter); @@ -1861,11 +1860,11 @@ main(int argc, char *argv[]) current_alternate_filter = null_filter; current_filter_ptr = 0; break; - + case UNICODING_OPT: unicoding.push_back(clp->vstr); break; - + case CODINGSCHEME_OPT: if (codingscheme) usage_error(errh, "coding scheme specified twice"); @@ -1915,7 +1914,7 @@ main(int argc, char *argv[]) case MINIMUM_KERN_OPT: minimum_kern = clp->val.d; break; - + case MAP_FILE_OPT: if (clp->negated) output_flags &= ~G_PSFONTSMAP; @@ -1925,7 +1924,7 @@ main(int argc, char *argv[]) usage_error(errh, "map file specified twice"); } break; - + case PL_OPT: output_flags = (output_flags & ~G_BINARY) | G_ASCII; break; @@ -1933,7 +1932,7 @@ main(int argc, char *argv[]) case TFM_OPT: output_flags = (output_flags & ~G_ASCII) | G_BINARY; break; - + case ENCODING_DIR_OPT: case TFM_DIR_OPT: case PL_DIR_OPT: @@ -1944,7 +1943,7 @@ main(int argc, char *argv[]) if (!setodir(opt - DIR_OPTS, clp->vstr)) usage_error(errh, "%s directory specified twice", odirname(opt - DIR_OPTS)); break; - + case FONT_NAME_OPT: font_name: if (font_name) @@ -1955,15 +1954,15 @@ main(int argc, char *argv[]) case GLYPHLIST_OPT: glyphlist_files.push_back(clp->vstr); break; - + case QUERY_FEATURES_OPT: - usage_error(errh, "run 'otfinfo --query-features' instead"); + usage_error(errh, "run %<otfinfo --query-features%> instead"); break; case QUERY_SCRIPTS_OPT: - usage_error(errh, "run 'otfinfo --query-scripts' instead"); + usage_error(errh, "run %<otfinfo --query-scripts%> instead"); break; - + case QUIET_OPT: if (clp->negated) errh = ErrorHandler::default_handler(); @@ -1995,13 +1994,13 @@ main(int argc, char *argv[]) case VERSION_OPT: printf("otftotfm (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2002-2008 Eddie Kohler\n\ + printf("Copyright (C) 2002-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); @@ -2018,27 +2017,31 @@ particular purpose.\n"); case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; default: break; - + } } - + done: + // check for odd option combinations + if (warn_missing && !(output_flags & G_VMETRICS)) + errh->warning("%<--warn-missing%> has no effect with %<--no-virtual%>"); + // set up file names if (!input_file) usage_error(errh, "no font filename provided"); if (!encoding_file) { errh->warning("no encoding provided"); - errh->message("(Use '-e ENCODING' to choose an encoding. '-e texnansx' often works,\nor say '-e -' to turn off this warning.)"); + errh->message("(Use %<-e ENCODING%> to choose an encoding. %<-e texnansx%> often works,\nor say %<-e -%> to turn off this warning.)"); } else if (encoding_file == "-") encoding_file = ""; - + // set up feature filters if (!altselector_features.size()) { if (!current_filter_ptr) @@ -2091,7 +2094,7 @@ particular purpose.\n"); #endif glyphlist_files.push_back(SHAREDIR "/texglyphlist.txt"); } - + // read glyphlist for (String *g = glyphlist_files.begin(); g < glyphlist_files.end(); g++) if (String s = read_file(*g, errh, true)) @@ -2107,7 +2110,7 @@ particular purpose.\n"); if (String path = locate_encoding(encoding_file, errh)) dvipsenc.parse(path, no_ecommand, no_ecommand, errh); else - errh->fatal("encoding '%s' not found", encoding_file.c_str()); + errh->fatal("encoding %<%s%> not found", encoding_file.c_str()); } else { // use encoding from font Cff cff(otf.table("CFF"), &bail_errh); @@ -2123,8 +2126,8 @@ particular purpose.\n"); // apply default ligkern commands if (default_ligkern) - dvipsenc.parse_ligkern(default_ligkerns, 0, ErrorHandler::ignore_handler()); - + dvipsenc.parse_ligkern(default_ligkerns, 0, ErrorHandler::silent_handler()); + // apply command-line ligkern commands and coding scheme cerrh.set_landmark("--ligkern command"); for (int i = 0; i < ligkern.size(); i++) @@ -2141,10 +2144,10 @@ particular purpose.\n"); dvipsenc.set_warn_missing(warn_missing); do_file(input_file, otf, dvipsenc, literal_encoding, errh); - + } catch (OpenType::Error e) { - errh->error("unhandled exception '%s'", e.description.c_str()); + errh->error("unhandled exception %<%s%>", e.description.c_str()); } - + return (errh->nerrors() == 0 ? 0 : 1); } diff --git a/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc b/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc index 5da704fbf2e..1d1c8094901 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/secondary.cc @@ -110,7 +110,7 @@ FontInfo::FontInfo(const Efont::OpenType::Font *otf_, ErrorHandler *errh) if (_nglyphs < 0 && post->ok()) _nglyphs = post->nglyphs(); } - + name = new Efont::OpenType::Name(otf->table("name"), errh); } @@ -261,7 +261,7 @@ T1Secondary::char_setting(Vector<Setting> &v, Metrics &metrics, int uni, ...) kerntype = Setting::KERNX; uni = va_arg(val, int); } - + for (; uni; uni = va_arg(val, int)) { int code = metrics.unicode_encoding(uni); if (code < 0) { @@ -325,14 +325,14 @@ T1Secondary::dotlessj_font(Metrics &metrics, ErrorHandler *errh, Glyph &dj_glyph for (int i = 0; i < metrics.n_mapped_fonts(); i++) if (metrics.mapped_font_name(i) == dj_name) return i; - + if (String filename = installed_type1_dotlessj(_otf_file_name, _finfo.cff->font_name(), (output_flags & G_DOTLESSJ), errh)) { // check for special case: "\0" means the font's "j" is already // dotless if (filename == String("\0", 1)) return J_NODOT; - + // open dotless-j font file FILE *f = fopen(filename.c_str(), "rb"); if (!f) { @@ -348,9 +348,9 @@ T1Secondary::dotlessj_font(Metrics &metrics, ErrorHandler *errh, Glyph &dj_glyph reader = new Efont::Type1PFBReader(f); else reader = new Efont::Type1PFAReader(f); - Efont::Type1Font *font = new Efont::Type1Font(*reader); + Efont::Type1Font *font = new Efont::Type1Font(*reader); delete reader; - + if (!font->ok()) { errh->error("%s: no glyphs in dotless-J font", filename.c_str()); delete font; @@ -362,12 +362,12 @@ T1Secondary::dotlessj_font(Metrics &metrics, ErrorHandler *errh, Glyph &dj_glyph font->glyph_names(glyph_names); Vector<PermString>::iterator g = std::find(glyph_names.begin(), glyph_names.end(), "uni0237"); if (g == glyph_names.end()) { - errh->error("%s: dotless-J font has no 'uni0237' glyph", filename.c_str()); + errh->error("%s: dotless-J font has no %<uni0237%> glyph", filename.c_str()); delete font; return -1; } dj_glyph = g - glyph_names.begin(); - + // create metrics for dotless-J if (install_metrics) { Metrics dj_metrics(font, 256); @@ -375,11 +375,11 @@ T1Secondary::dotlessj_font(Metrics &metrics, ErrorHandler *errh, Glyph &dj_glyph ::dotlessj_file_name = filename; output_metrics(dj_metrics, font->font_name(), -1, _finfo, String(), String(), dj_name, dotlessj_dvips_include, errh); } else if (verbose) - errh->message("using '%s' for dotless-J font metrics", dj_name.c_str()); - + errh->message("using %<%s%> for dotless-J font metrics", dj_name.c_str()); + // add font to metrics return metrics.add_mapped_font(font, dj_name); - + } else return -1; } @@ -390,9 +390,9 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa Transform xform; int vsize = v.size(); extern int letterspace; - + switch (uni) { - + case U_CWM: case U_ALTSELECTOR: v.push_back(Setting(Setting::RULE, 0, _xheight)); @@ -506,7 +506,7 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa return 1; } break; - + case U_BARDBL: if (char_setting(v, metrics, '|', 0)) { if (!_finfo.is_fixed_pitch()) { @@ -543,7 +543,7 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa return 1; } break; - + case U_THREEQUARTERSEMDASH: if (char_setting(v, metrics, U_ENDASH, 0)) { if (!_finfo.is_fixed_pitch()) { @@ -554,13 +554,13 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa return 1; } break; - + case U_CENTIGRADE: // TODO: set italic correction to that of a 'C' if (char_setting(v, metrics, U_USE_KERNX, U_DEGREE, 'C', 0)) return 1; break; - + case U_INTERROBANG: { double exclam_offset = (char_one_bound(_finfo, xform, 4, true, 0, '?', 0) @@ -612,7 +612,7 @@ T1Secondary::setting(uint32_t uni, Vector<Setting> &v, Metrics &metrics, ErrorHa } break; } - + } // didn't find a good setting, restore v to pristine state diff --git a/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh b/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh index 810aaacea6d..bfe31bf04d7 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/secondary.hh @@ -8,29 +8,29 @@ struct Setting; namespace Efont { class TrueTypeBoundsCharstringProgram; } struct FontInfo { - + const Efont::OpenType::Font *otf; const Efont::OpenType::Cmap *cmap; - + Efont::Cff *cff_file; const Efont::Cff::Font *cff; - + const Efont::OpenType::Post *post; const Efont::OpenType::Name *name; - + FontInfo(const Efont::OpenType::Font *otf, ErrorHandler *); ~FontInfo(); bool ok() const; - + int nglyphs() const { return _nglyphs; } bool glyph_names(Vector<PermString> &) const; int glyphid(PermString) const; const Efont::CharstringProgram *program() const; - + bool is_fixed_pitch() const; double italic_angle() const; - + String family_name() const; String postscript_name() const; diff --git a/Build/source/texk/lcdf-typetools/otftotfm/uniprop.hh b/Build/source/texk/lcdf-typetools/otftotfm/uniprop.hh index 8a08f427203..4dd6b135eb7 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/uniprop.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/uniprop.hh @@ -15,7 +15,7 @@ class UnicodeProperty { public: P_TMASK = 0370, P_MAX = 0377 }; - + static int property(uint32_t uni); static const char* property_name(int p); static bool parse_property(const String&, int& prop, int& prop_mask); @@ -26,9 +26,9 @@ class UnicodeProperty { public: static const unsigned char property_pages[]; static const unsigned int property_offsets[]; static const int nproperty_offsets; - + static inline const unsigned int* find_offset(uint32_t uni); - + }; #endif diff --git a/Build/source/texk/lcdf-typetools/otftotfm/util.cc b/Build/source/texk/lcdf-typetools/otftotfm/util.cc index 7628e9063ca..f2edcb2fdbe 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/util.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/util.cc @@ -44,17 +44,17 @@ read_file(String filename, ErrorHandler *errh, bool warning) _setmode(_fileno(f), _O_BINARY); #endif } else if (!(f = fopen(filename.c_str(), "rb"))) { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, strerror(errno)); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), strerror(errno)); return String(); } - + StringAccum sa; while (!feof(f)) { if (char *x = sa.reserve(8192)) { int amt = fread(x, 1, 8192, f); sa.forward(amt); } else { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, "Out of memory!"); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), "Out of memory!"); break; } } @@ -67,7 +67,7 @@ String printable_filename(const String &s) { if (!s || s == "-") - return String::stable_string("<stdin>"); + return String::make_stable("<stdin>"); else return s; } @@ -82,6 +82,23 @@ pathname_filename(const String &path) return path; } +static String +simplify_filename(String x) +{ + while (x.substring(0, 2) == "./") + x = x.substring(2); + int pos; + while ((pos = x.find_left("/./")) >= 0) + x = x.substring(0, pos) + x.substring(pos + 2); + return x; +} + +bool +same_filename(const String &a, const String &b) +{ + return simplify_filename(a) == simplify_filename(b); +} + String shell_quote(const String &str) { @@ -89,7 +106,7 @@ shell_quote(const String &str) return str; // XXX #else if (!str) - return String::stable_string("''"); + return String::make_stable("''"); const char *begin = str.begin(); const char *end = str.end(); @@ -130,7 +147,7 @@ temporary_file(String &filename, ErrorHandler *errh) { if (no_create) return 0; // random number suffices - + #ifdef HAVE_MKSTEMP const char *tmpdir = getenv("TMPDIR"); if (tmpdir) @@ -144,7 +161,7 @@ temporary_file(String &filename, ErrorHandler *errh) } int fd = mkstemp(filename.mutable_c_str()); if (fd < 0) - errh->error("temporary file '%s': %s", filename.c_str(), strerror(errno)); + errh->error("temporary file %<%s%>: %s", filename.c_str(), strerror(errno)); return fd; #else // !HAVE_MKSTEMP for (int tries = 0; tries < 5; tries++) { @@ -158,7 +175,7 @@ temporary_file(String &filename, ErrorHandler *errh) if (fd >= 0) return fd; } - return errh->error("temporary file '%s': %s", filename.c_str(), strerror(errno)); + return errh->error("temporary file %<%s%>: %s", filename.c_str(), strerror(errno)); #endif } @@ -206,11 +223,11 @@ shell_command_output(String cmdline, const String &input, ErrorHandler *errh, bo fwrite(input.data(), 1, input.length(), f); fflush(f); rewind(f); - + String new_cmdline = cmdline + " 0<&" + String(fileno(f)); FILE *p = popen(new_cmdline.c_str(), "r"); if (!p) - errh->fatal("'%s': %s", cmdline.c_str(), strerror(errno)); + errh->fatal("%<%s%>: %s", cmdline.c_str(), strerror(errno)); StringAccum sa; while (!feof(p) && !ferror(p) && sa.length() < 200000) { @@ -218,10 +235,10 @@ shell_command_output(String cmdline, const String &input, ErrorHandler *errh, bo if (x > 0) sa.forward(x); else if (x < 0 && errno != EAGAIN) - errh->error("'%s': %s", cmdline.c_str(), strerror(errno)); + errh->error("%<%s%>: %s", cmdline.c_str(), strerror(errno)); } if (!feof(p) && !ferror(p)) - errh->warning("'%s' output too long, truncated", cmdline.c_str()); + errh->warning("%<%s%> output too long, truncated", cmdline.c_str()); fclose(f); pclose(p); diff --git a/Build/source/texk/lcdf-typetools/otftotfm/util.hh b/Build/source/texk/lcdf-typetools/otftotfm/util.hh index a0f37c14105..dd7aa29e3e6 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/util.hh +++ b/Build/source/texk/lcdf-typetools/otftotfm/util.hh @@ -17,6 +17,7 @@ extern int output_flags; String read_file(String filename, ErrorHandler *, bool warn = false); String printable_filename(const String &); String pathname_filename(const String &); +bool same_filename(const String &a, const String &b); String shell_quote(const String &); int temporary_file(String &, ErrorHandler *); int mysystem(const char *command, ErrorHandler *); diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am index 802f841f664..88ab31767f4 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = t1dotlessj man_MANS = t1dotlessj.1 diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in index 51b093946cc..42810e0a531 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = t1dotlessj$(EXEEXT) subdir = t1dotlessj DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,13 +55,17 @@ am_t1dotlessj_OBJECTS = t1dotlessj.$(OBJEXT) t1dotlessj_OBJECTS = $(am_t1dotlessj_OBJECTS) t1dotlessj_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(t1dotlessj_SOURCES) DIST_SOURCES = $(t1dotlessj_SOURCES) man1dir = $(mandir)/man1 @@ -64,6 +76,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,29 +93,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -111,6 +135,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -123,20 +148,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -145,6 +179,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -160,7 +195,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = t1dotlessj.1 t1dotlessj_SOURCES = t1dotlessj.cc t1dotlessj_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @@ -170,13 +204,13 @@ EXTRA_DIST = t1dotlessj.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -206,10 +240,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -222,7 +257,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done t1dotlessj$(EXEEXT): $(t1dotlessj_OBJECTS) $(t1dotlessj_DEPENDENCIES) @rm -f t1dotlessj$(EXEEXT) $(CXXLINK) $(t1dotlessj_OBJECTS) $(t1dotlessj_LDADD) $(LIBS) @@ -248,6 +287,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -299,7 +351,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -401,7 +453,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -444,7 +496,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -461,18 +514,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 index 254883bc8df..1136624ab11 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -93,4 +93,4 @@ An error occurred. .I "Adobe Type 1 Font Format" ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc index 55859bcbf09..e4d8c3feb75 100644 --- a/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc +++ b/Build/source/texk/lcdf-typetools/t1dotlessj/t1dotlessj.cc @@ -1,6 +1,6 @@ /* t1dotlessj.cc -- driver for creating dotlessj characters from Type 1 fonts * - * Copyright (c) 2003-2006 Eddie Kohler + * Copyright (c) 2003-2009 Eddie Kohler * * 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 @@ -73,16 +73,17 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTIONS] [FONTFILE [OUTPUTFILE]]", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); - exit(1); + exit(EXIT_ERROR); } void usage() { - printf("\ -'T1dotlessj' reads a PostScript Type 1 font, derives a new PostScript Type 1\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<T1dotlessj%> reads a PostScript Type 1 font, derives a new PostScript Type 1\n\ font containing just a dotlessj character (by chopping the dot from the j),\n\ and writes it to the standard output.\n\ \n\ @@ -92,12 +93,12 @@ Options:\n\ -a, --pfa Output PFA font.\n\ -b, --pfb Output PFB font. This is the default.\n\ -o, --output=FILE Write output to FILE instead of standard output.\n\ - -n, --name=NAME Set output font's PostScript name.\n\ + -n, --name=NAME Set output font%,s PostScript name.\n\ -h, --help Print this message and exit.\n\ -q, --quiet Do not report errors to standard error.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -106,12 +107,12 @@ Report bugs to <kohler@cs.ucla.edu>.\n", program_name); class Sectioner : public Type1CharstringGenInterp { public: Sectioner(int precision); - + void act_line(int, const Point &, const Point &); void act_curve(int, const Point &, const Point &, const Point &, const Point &); void act_closepath(int); void act_flex(int, const Point &, const Point &, const Point &, const Point &, const Point &, const Point &, const Point &, double); - + void run(const CharstringContext &g); void undot(PermString, ErrorHandler *); Type1Charstring gen(Type1Font *); @@ -122,7 +123,7 @@ class Sectioner : public Type1CharstringGenInterp { public: Vector<String> _sections; Vector<int> _bounds; - + }; Sectioner::Sectioner(int precision) @@ -184,8 +185,8 @@ Sectioner::undot(PermString font_name, ErrorHandler *errh) // fprintf(stderr, "%d %s\n", s - _sections.begin(), CharstringUnparser::unparse(Type1Charstring(*s)).c_str()); if (_sections.size() < 3) - errh->fatal(EXIT_J_NODOT, "%s: 'j' is already dotless", font_name.c_str()); - + errh->fatal("<%d>%s: %<j%> is already dotless", -EXIT_J_NODOT, font_name.c_str()); + int topmost = -1; for (int i = 0; i < _sections.size() - 1; i++) if (topmost < 0 || _bounds[i*4 + 1] > _bounds[topmost*4 + 1]) @@ -195,7 +196,7 @@ Sectioner::undot(PermString font_name, ErrorHandler *errh) for (int i = 0; i < _sections.size() - 1; i++) if (_bounds[i*4 + 1] < _bounds[topmost*4 + 1]) goto found_below; - errh->fatal(EXIT_J_NODOT, "%s: 'j' is already dotless", font_name.c_str()); + errh->fatal("<%d>%s: %<j%> is already dotless", -EXIT_J_NODOT, font_name.c_str()); found_below: _sections[topmost] = String(); @@ -229,29 +230,29 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) #endif } else f = fopen(filename, "rb"); - + if (!f) { // check for PostScript name Filename fn = psres->filename_value("FontOutline", filename); f = fn.open_read(); } - + if (!f) - errh->fatal(EXIT_ERROR, "%s: %s", filename, strerror(errno)); - + errh->fatal("<%d>%s: %s", -EXIT_ERROR, filename, strerror(errno)); + Type1Reader *reader; int c = getc(f); ungetc(c, f); if (c == EOF) - errh->fatal(EXIT_ERROR, "%s: empty file", filename); + errh->fatal("<%d>%s: empty file", -EXIT_ERROR, filename); if (c == 128) reader = new Type1PFBReader(f); else reader = new Type1PFAReader(f); - + Type1Font *font = new Type1Font(*reader); if (!font->ok()) - errh->fatal(EXIT_ERROR, "%s: no glyphs in font", filename); + errh->fatal("<%d>%s: no glyphs in font", -EXIT_ERROR, filename); delete reader; return font; @@ -262,22 +263,22 @@ main(int argc, char *argv[]) { PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr)); const char *input_file = 0; FILE *outputf = 0; const char *private_use_dotlessj = "uniF6BE"; bool binary = true; const char *font_name = 0; - + while (1) { int opt = Clp_Next(clp); switch (opt) { - + case QUIET_OPT: if (clp->negated) errh = ErrorHandler::default_handler(); @@ -288,7 +289,7 @@ main(int argc, char *argv[]) case NAME_OPT: font_name = clp->vstr; break; - + case PFA_OPT: binary = false; break; @@ -304,23 +305,23 @@ main(int argc, char *argv[]) if (strcmp(clp->vstr, "-") == 0) outputf = stdout; else if (!(outputf = fopen(clp->vstr, "wb"))) - errh->fatal(EXIT_ERROR, "%s: %s", clp->vstr, strerror(errno)); + errh->fatal("<%d>%s: %s", -EXIT_ERROR, clp->vstr, strerror(errno)); break; - + case VERSION_OPT: printf("t1dotlessj (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2003-2006 Eddie Kohler\n\ + printf("Copyright (C) 2003-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); break; - + case Clp_NotOption: if (input_file && outputf) usage_error(errh, "too many arguments"); @@ -329,20 +330,20 @@ particular purpose.\n"); else input_file = clp->vstr; break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: Type1Font *font = do_file(input_file, psres, errh); if (!input_file || strcmp(input_file, "-") == 0) @@ -350,33 +351,35 @@ particular purpose.\n"); // check for existing dotlessj if (font->glyph("dotlessj")) - errh->fatal(EXIT_DOTLESSJ_EXISTS, "%s: already has a 'dotlessj' glyph", font->font_name().c_str()); + errh->fatal("<%d>%s: already has a %<dotlessj%> glyph", -EXIT_DOTLESSJ_EXISTS, font->font_name().c_str()); else if (font->glyph("uni0237")) - errh->fatal(EXIT_DOTLESSJ_EXISTS, "%s: already has a dotlessj glyph at 'uni0237'", font->font_name().c_str()); + errh->fatal("<%d>%s: already has a dotlessj glyph at %<uni0237%>", -EXIT_DOTLESSJ_EXISTS, font->font_name().c_str()); else if (font->glyph("u0237")) - errh->fatal(EXIT_DOTLESSJ_EXISTS, "%s: already has a dotlessj glyph at 'u0237'", font->font_name().c_str()); + errh->fatal("<%d>%s: already has a dotlessj glyph at %<u0237%>", -EXIT_DOTLESSJ_EXISTS, font->font_name().c_str()); else if (private_use_dotlessj && font->glyph(private_use_dotlessj)) - errh->fatal(EXIT_DOTLESSJ_EXISTS, "%s: already has a dotlessj glyph at '%s'", font->font_name().c_str(), private_use_dotlessj); + errh->fatal("<%d>%s: already has a dotlessj glyph at %<%s%>", -EXIT_DOTLESSJ_EXISTS, font->font_name().c_str(), private_use_dotlessj); // check for j Type1Charstring *j_cs = font->glyph("j"); if (!j_cs) j_cs = font->glyph("uni006A"); if (!j_cs) - errh->fatal(EXIT_NO_J, "%s: has no 'j' glyph to make dotless", font->font_name().c_str()); + j_cs = font->glyph("u006A"); + if (!j_cs) + errh->fatal("<%d>%s: has no %<j%> glyph to make dotless", -EXIT_NO_J, font->font_name().c_str()); // make new font String actual_font_name = (font_name ? String(font_name) : font->font_name() + String("LCDFJ")); if (actual_font_name.length() > 29 && !font_name) { - errh->warning("derived font name '%s' longer than 29 characters", actual_font_name.c_str()); - errh->message("(Use the '--name' option to supply your own name.)"); + errh->warning("derived font name %<%s%> longer than 29 characters", actual_font_name.c_str()); + errh->message("(Use the %<--name%> option to supply your own name.)"); } Vector<double> xuid_extension; xuid_extension.push_back(0x00237237); Type1Font *dotless_font = Type1Font::skeleton_make_copy(font, actual_font_name, &xuid_extension); dotless_font->skeleton_common_subrs(); - + // copy space and .notdef if (Type1Charstring *notdef = font->glyph(".notdef")) dotless_font->add_glyph(Type1Subr::make_glyph(".notdef", *notdef, " |-")); @@ -410,6 +413,6 @@ particular purpose.\n"); Type1PFAWriter w(outputf); dotless_font->write(w); } - + return (errh->nerrors() == 0 ? EXIT_NORMAL : EXIT_ERROR); } diff --git a/Build/source/texk/lcdf-typetools/t1lint/Makefile.am b/Build/source/texk/lcdf-typetools/t1lint/Makefile.am index 641702c1ed2..257d2aa1557 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1lint/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = t1lint man_MANS = t1lint.1 diff --git a/Build/source/texk/lcdf-typetools/t1lint/Makefile.in b/Build/source/texk/lcdf-typetools/t1lint/Makefile.in index 991641b42da..7a27bd57bdc 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1lint/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = t1lint$(EXEEXT) subdir = t1lint DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,17 +55,26 @@ am_t1lint_OBJECTS = cscheck.$(OBJEXT) t1lint.$(OBJEXT) t1lint_OBJECTS = $(am_t1lint_OBJECTS) t1lint_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(t1lint_SOURCES) DIST_SOURCES = $(t1lint_SOURCES) man1dir = $(mandir)/man1 @@ -68,6 +85,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -84,29 +102,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -115,6 +144,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -127,20 +157,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -149,6 +188,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -164,7 +204,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = t1lint.1 t1lint_SOURCES = cscheck.hh cscheck.cc \ t1lint.cc @@ -176,13 +215,13 @@ EXTRA_DIST = t1lint.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -212,10 +251,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -228,7 +268,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done t1lint$(EXEEXT): $(t1lint_OBJECTS) $(t1lint_DEPENDENCIES) @rm -f t1lint$(EXEEXT) $(CXXLINK) $(t1lint_OBJECTS) $(t1lint_LDADD) $(LIBS) @@ -255,6 +299,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -306,7 +363,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -408,7 +465,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -451,7 +508,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -468,18 +526,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc b/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc index febf2f48f14..78183a927a6 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc +++ b/Build/source/texk/lcdf-typetools/t1lint/cscheck.cc @@ -49,11 +49,11 @@ CharstringChecker::stem(double y, double dy, const char *cmd_name) dy = -dy; } if (dy < 0.5) - _errh->warning("small delta-%s in `%s' (%g)", dimen_name, cmd_name, dy); + _errh->warning("small delta-%s in %<%s%> (%g)", dimen_name, cmd_name, dy); for (int i = 0; i < hints.size(); i += 2) if ((hints[i] >= y && hints[i+1] <= y) || (hints[i] >= y+dy && hints[i+1] <= y+dy)) - _errh->warning("overlapping `%s' hints", cmd_name); + _errh->warning("overlapping %<%s%> hints", cmd_name); hints.push_back(y); hints.push_back(y+dy); } @@ -65,7 +65,7 @@ CharstringChecker::check_stem3(const char *cmd_name) Vector<double> &hints = (is_v ? _h_vstem : _h_hstem); Vector<double> &old_hints = (is_v ? _h_vstem3 : _h_hstem3); assert(hints.size() == 6); - + // sort hints int i0, i1, i2; if (hints[0] > hints[2]) @@ -78,24 +78,24 @@ CharstringChecker::check_stem3(const char *cmd_name) i2 = i1, i1 = 4; else i2 = 4; - + // check constraints. count "almost equal" as equal double stemw1 = hints[i0+1] - hints[i0]; double stemw2 = hints[i2+1] - hints[i2]; if ((int)(1024*(stemw1 - stemw2) + .5) != 0) - _errh->error("bad `%s': extreme stem widths unequal (%g, %g)", cmd_name, stemw1, stemw2); - + _errh->error("bad %<%s%>: extreme stem widths unequal (%g, %g)", cmd_name, stemw1, stemw2); + double c0 = (hints[i0] + hints[i0+1])/2; double c1 = (hints[i1] + hints[i1+1])/2; double c2 = (hints[i2] + hints[i2+1])/2; if ((int)(1024*((c1 - c0) - (c2 - c1)) + .5) != 0) - _errh->error("bad `%s': stem gaps unequal (%g, %g)", cmd_name, c1-c0, c2-c1); - + _errh->error("bad %<%s%>: stem gaps unequal (%g, %g)", cmd_name, c1-c0, c2-c1); + // compare to old hints if (old_hints.size()) { for (int i = 0; i < old_hints.size(); i++) if (hints[i] != old_hints[i]) { - _errh->warning("`%s' conflicts with old `%s'", cmd_name, cmd_name); + _errh->warning("%<%s%> conflicts with old %<%s%>", cmd_name, cmd_name); break; } } @@ -140,15 +140,15 @@ CharstringChecker::callothersubr() int othersubrnum = (int)top(0); int n = (int)top(1); int i; - + pop(2); if (othersubrnum < 0 || size() < n) return false; - + if (!_started && (othersubrnum < 14 || othersubrnum > 18)) - _errh->warning("first command not `hsbw' or `sbw'"); - + _errh->warning("first command not %<hsbw%> or %<sbw%>"); + switch (othersubrnum) { - + case 0: // Flex if (n != 3) { _errh->error("wrong number of arguments to Flex"); @@ -174,7 +174,7 @@ CharstringChecker::callothersubr() ps_push(top(1)); _flex = false; break; - + case 1: // Flex if (n != 0) { _errh->error("wrong number of arguments to Flex"); @@ -187,7 +187,7 @@ CharstringChecker::callothersubr() _just_flexed = true; //_flex_connect = _connect; break; - + case 2: // Flex if (n != 0) { _errh->error("wrong number of arguments to Flex"); @@ -201,7 +201,7 @@ CharstringChecker::callothersubr() ps_push(_cp.y); _just_flexed = true; break; - + case 3: // hint replacement if (n != 1) { _errh->error("wrong number of arguments to hint replacement"); @@ -212,24 +212,24 @@ CharstringChecker::callothersubr() _h_hstem.clear(); _h_vstem.clear(); break; - + case 14: case 15: case 16: case 17: case 18: return mm_command(othersubrnum, n); - + default: // unknown unknown: - _errh->warning("unknown callothersubr `%d'", othersubrnum); + _errh->warning("unknown callothersubr %<%d%>", othersubrnum); ps_clear(); for (i = 0; i < n; i++) ps_push(top(i)); break; - + } - + pop(n); return true; } @@ -253,115 +253,115 @@ CharstringChecker::type1_command(int cmd) if (cmd != Cs::cHsbw && cmd != Cs::cSbw) { if (!_started) - _errh->warning("first command not `hsbw' or `sbw'"); + _errh->warning("first command not %<hsbw%> or %<sbw%>"); } else { if (_started) - _errh->error("duplicate `hsbw' or `sbw'"); + _errh->error("duplicate %<hsbw%> or %<sbw%>"); } _started = true; - + switch (cmd) { - + case Cs::cHsbw: CHECK_STACK(2); moveto(at(0), 0, false); clear(); break; - + case Cs::cSbw: CHECK_STACK(4); moveto(at(0), at(1), false); clear(); break; - + case Cs::cClosepath: _cp_exists = false; clear(); break; - + case Cs::cHlineto: CHECK_STACK_CP(1); rlineto(at(0), 0); clear(); break; - + case Cs::cHmoveto: CHECK_STACK(1); rmoveto(at(0), 0); clear(); break; - + case Cs::cHvcurveto: CHECK_STACK_CP(4); rrcurveto(at(0), 0, at(1), at(2), 0, at(3)); clear(); break; - + case Cs::cRlineto: CHECK_STACK_CP(2); rlineto(at(0), at(1)); clear(); break; - + case Cs::cRmoveto: CHECK_STACK(2); rmoveto(at(0), at(1)); clear(); break; - + case Cs::cRrcurveto: CHECK_STACK_CP(6); rrcurveto(at(0), at(1), at(2), at(3), at(4), at(5)); clear(); break; - + case Cs::cVhcurveto: CHECK_STACK_CP(4); rrcurveto(0, at(0), at(1), at(2), at(3), 0); clear(); break; - + case Cs::cVlineto: CHECK_STACK_CP(1); rlineto(0, at(0)); clear(); break; - + case Cs::cVmoveto: CHECK_STACK(1); rmoveto(0, at(0)); clear(); break; - + case Cs::cHstem: CHECK_STACK(2); if (_hstem3 && !_hstem) - _errh->error("charstring has both `hstem' and `hstem3'"); + _errh->error("charstring has both %<hstem%> and %<hstem3%>"); _hstem = true; stem(at(0), at(1), "hstem"); clear(); break; - + case Cs::cVstem: CHECK_STACK(2); if (_vstem3 && !_vstem) - _errh->error("charstring has both `vstem' and `vstem3'"); + _errh->error("charstring has both %<vstem%> and %<vstem3%>"); _vstem = true; stem(at(0), at(1), "vstem"); clear(); break; - + case Cs::cEndchar: set_done(); return false; - + case Cs::cDotsection: break; - + case Cs::cVstem3: CHECK_STACK(6); if (_vstem && !_vstem3) - _errh->error("charstring has both `vstem' and `vstem3'"); + _errh->error("charstring has both %<vstem%> and %<vstem3%>"); _vstem3 = true; _h_vstem.clear(); stem(at(0), at(1), "vstem3"); @@ -370,11 +370,11 @@ CharstringChecker::type1_command(int cmd) check_stem3("vstem3"); clear(); break; - + case Cs::cHstem3: CHECK_STACK(6); if (_hstem && !_hstem3) - _errh->error("charstring has both `hstem' and `hstem3'"); + _errh->error("charstring has both %<hstem%> and %<hstem3%>"); _hstem3 = true; _h_hstem.clear(); stem(at(0), at(1), "hstem3"); @@ -383,7 +383,7 @@ CharstringChecker::type1_command(int cmd) check_stem3("hstem3"); clear(); break; - + case Cs::cSeac: { CHECK_STACK(5); #if 0 @@ -392,16 +392,16 @@ CharstringChecker::type1_command(int cmd) double ady = at(2); int bchar = (int)at(3); int achar = (int)at(4); - + double ax = adx - asb + _sidebearing.x; double ay = ady + _sidebearing.y; - + Point real_sidebearing = _sidebearing; Point real_char_width = _char_width; Point original_origin = _origin; - + Type1Encoding *adobe = Type1Encoding::standard_encoding(); - if (!adobe) + if (!adobe) return error(errInternal, cmd); Type1Charstring *t1cs = get_glyph((*adobe)[achar]); if (!t1cs) ERROR(errGlyph); @@ -410,7 +410,7 @@ CharstringChecker::type1_command(int cmd) t1cs->run(*this); _origin = original_origin; if (error()) return false; - + t1cs = get_glyph((*adobe)[bchar]); if (!t1cs) ERROR(errGlyph); init(); @@ -420,25 +420,25 @@ CharstringChecker::type1_command(int cmd) #endif return false; } - + case Cs::cSetcurrentpoint: CHECK_STACK(2); _cp = Point(at(0), at(1)); _cp_exists = true; clear(); break; - + case Cs::cPut: case Cs::cGet: case Cs::cStore: case Cs::cLoad: return vector_command(cmd); - + default: return arith_command(cmd); - + } - + return true; } @@ -457,6 +457,6 @@ CharstringChecker::check(const CharstringContext &g, ErrorHandler *errh) _h_vstem3.clear(); CharstringInterp::interpret(g); - + return errh->nerrors() == old_errors; } diff --git a/Build/source/texk/lcdf-typetools/t1lint/cscheck.hh b/Build/source/texk/lcdf-typetools/t1lint/cscheck.hh index 2004f165ee9..9563e27fa62 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/cscheck.hh +++ b/Build/source/texk/lcdf-typetools/t1lint/cscheck.hh @@ -6,26 +6,26 @@ class ErrorHandler; class CharstringChecker : public Efont::CharstringInterp { public: - + CharstringChecker(); CharstringChecker(const Vector<double> &weight_vec); - + bool error(int, int); bool callothersubr(); bool type1_command(int); - + bool check(const Efont::CharstringContext &, ErrorHandler *); - + private: - + ErrorHandler *_errh; Point _cp; - + bool _started; bool _flex; bool _cp_exists; - + bool _hstem; bool _hstem3; bool _vstem; @@ -41,12 +41,12 @@ class CharstringChecker : public Efont::CharstringInterp { public: void stem(double, double, const char *); void check_stem3(const char *); - + void moveto(double, double, bool cp_exists = true); void rmoveto(double, double); void rlineto(double, double); void rrcurveto(double, double, double, double, double, double); - + }; #endif diff --git a/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 b/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 index e3821c24a12..36bedc100f7 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 +++ b/Build/source/texk/lcdf-typetools/t1lint/t1lint.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -45,4 +45,4 @@ Print the version number and some short non-warranty information and exit. .I "Adobe Type 1 Font Format" ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc b/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc index cebca24615a..336eda27457 100644 --- a/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc +++ b/Build/source/texk/lcdf-typetools/t1lint/t1lint.cc @@ -1,6 +1,6 @@ /* t1lint.cc -- driver for checking Type 1 fonts for validity * - * Copyright (c) 1999-2006 Eddie Kohler + * Copyright (c) 1999-2009 Eddie Kohler * * 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 @@ -60,7 +60,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -68,8 +68,9 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'T1lint' checks a PostScript Type 1 font for correctness. Any errors or\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<T1lint%> checks a PostScript Type 1 font for correctness. Any errors or\n\ divergences from the specification are reported to standard error. Nothing is\n\ printed for correct fonts. The command exits with status 0 if there are no\n\ errors, and status 1 otherwise.\n\ @@ -83,7 +84,7 @@ Options:\n\ -q, --quiet Do not report errors to standard error.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -134,13 +135,13 @@ check_blue_array(Vector<double> &blues, const char *name, double BlueScale, errh->error("%s has an odd number of entries", name); blues.push_back(blues.back()); } - + for (int i = 0; i < blues.size(); i++) if (blues[i] != (double)((int)blues[i])) { errh->warning("some %s entries are not integers", name); break; } - + double max_diff = 1 / BlueScale; for (int i = 0; i < blues.size(); i += 2) { if (blues[i] > blues[i+1]) @@ -175,7 +176,7 @@ static void check_blues(Type1Font *font, ErrorHandler *errh) { Type1Definition *d; - + // BlueScale double BlueScale; bool ok = false; @@ -191,7 +192,7 @@ check_blues(Type1Font *font, ErrorHandler *errh) } } if (!ok) BlueScale = 0.039625; - + // BlueShift int BlueShift = -1; if (get_integer(font, Type1Font::dP, "BlueShift", BlueShift, errh) @@ -199,7 +200,7 @@ check_blues(Type1Font *font, ErrorHandler *errh) errh->error("BlueShift less than 0"); if (BlueShift < 0) BlueShift = 7; - + // BlueFuzz int BlueFuzz = -1; if (get_integer(font, Type1Font::dP, "BlueFuzz", BlueFuzz, errh) @@ -209,35 +210,35 @@ check_blues(Type1Font *font, ErrorHandler *errh) BlueFuzz = 1; else if (BlueFuzz > 10) errh->warning("suspiciously large BlueFuzz (%d)", BlueFuzz); - + // BlueValues Vector<double> BlueValues, OtherBlues; get_num_array(font, Type1Font::dP, "BlueValues", BlueValues, errh, true); get_num_array(font, Type1Font::dP, "OtherBlues", OtherBlues, errh); - + check_blue_array(BlueValues, "BlueValues", BlueScale, errh); if (BlueValues.size() > 14) errh->error("too many zones in BlueValues (max 7)"); check_blue_array(OtherBlues, "OtherBlues", BlueScale, errh); if (OtherBlues.size() > 10) errh->error("too many zones in OtherBlues (max 5)"); - + check_blue_overlap(BlueValues, "BlueValues", BlueValues, "BlueValues", BlueFuzz, errh); check_blue_overlap(OtherBlues, "OtherBlues", OtherBlues, "OtherBlues", BlueFuzz, errh); check_blue_overlap(BlueValues, "BlueValues", OtherBlues, "OtherBlues", BlueFuzz, errh); - + // FamilyBlues Vector<double> FamilyBlues, FamilyOtherBlues; get_num_array(font, Type1Font::dP, "FamilyBlues", FamilyBlues, errh); get_num_array(font, Type1Font::dP, "FamilyOtherBlues", FamilyOtherBlues, errh); - + check_blue_array(FamilyBlues, "FamilyBlues", BlueScale, errh); if (FamilyBlues.size() > 14) errh->error("too many zones in FamilyBlues (max 7)"); check_blue_array(FamilyOtherBlues, "FamilyOtherBlues", BlueScale, errh); if (FamilyOtherBlues.size() > 10) errh->error("too many zones in FamilyOtherBlues (max 5)"); - + check_blue_overlap(FamilyBlues, "FamilyBlues", FamilyBlues, "FamilyBlues", BlueFuzz, errh); check_blue_overlap(FamilyOtherBlues, "FamilyOtherBlues", FamilyOtherBlues, "FamilyOtherBlues", BlueFuzz, errh); check_blue_overlap(FamilyBlues, "FamilyBlues", FamilyOtherBlues, "FamilyOtherBlues", BlueFuzz, errh); @@ -281,7 +282,7 @@ check_stems(Type1Font *font, ErrorHandler *errh) if (StdVW.size() > 0 && StdVW[0] <= 0) errh->error("StdVW entry less than or equal to 0"); } - + if (get_num_array(font, Type1Font::dP, "StemSnapH", StemSnapH, errh)) check_stem_snap(StemSnapH, StdHW.size() ? StdHW[0] : -1000, false, errh); if (get_num_array(font, Type1Font::dP, "StemSnapV", StemSnapV, errh)) @@ -303,16 +304,16 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) #endif } else f = fopen(filename, "rb"); - + if (!f) { // check for PostScript name Filename fn = psres->filename_value("FontOutline", filename); f = fn.open_read(); } - + if (!f) errh->fatal("%s: %s", filename, strerror(errno)); - + Type1Reader *reader; int c = getc(f); ungetc(c, f); @@ -322,9 +323,9 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) reader = new Type1PFBReader(f); else reader = new Type1PFAReader(f); - + Type1Font *font = new Type1Font(*reader); - + if (font) { LandmarkErrorHandler cerrh(errh, filename); @@ -351,24 +352,24 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) } } } - + check_blues(font, &cerrh); check_stems(font, &cerrh); - + MultipleMasterSpace *mmspace = font->create_mmspace(&cerrh); Vector<double> weight_vector; if (mmspace) weight_vector = mmspace->default_weight_vector(); int gc = font->nglyphs(); CharstringChecker cc(weight_vector); - + for (int i = 0; i < gc; i++) { ContextErrorHandler derrh - (&cerrh, String("While interpreting `") + font->glyph_name(i) + "':"); + (&cerrh, "While interpreting %<%s%>:", font->glyph_name(i).c_str()); cc.check(font->glyph_context(i), &derrh); } } - + delete font; delete reader; } @@ -378,60 +379,60 @@ main(int argc, char *argv[]) { PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr)); int nfiles = 0; - + while (1) { int opt = Clp_Next(clp); switch (opt) { - + case QUIET_OPT: if (clp->negated) errh = ErrorHandler::default_handler(); else errh = new SilentErrorHandler; break; - + case VERSION_OPT: printf("t1lint (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2006 Eddie Kohler\n\ + printf("Copyright (C) 1999-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); break; - + case Clp_NotOption: do_file(clp->vstr, psres, errh); nfiles++; break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: if (nfiles == 0) do_file("-", psres, errh); - + return (errh->nerrors() == 0 ? 0 : 1); } diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am new file mode 100644 index 00000000000..dd658213c1b --- /dev/null +++ b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in +bin_PROGRAMS = t1rawafm +man_MANS = t1rawafm.1 + +t1rawafm_SOURCES = t1rawafm.cc + +t1rawafm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a + +INCLUDES = -I$(top_srcdir)/include +CLEANFILES = @TEMPLATE_OBJS@ + +EXTRA_DIST = t1rawafm.1 diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in new file mode 100644 index 00000000000..ed71e530df2 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/t1rawafm/Makefile.in @@ -0,0 +1,533 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = t1rawafm$(EXEEXT) +subdir = t1rawafm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_t1rawafm_OBJECTS = t1rawafm.$(OBJEXT) +t1rawafm_OBJECTS = $(am_t1rawafm_OBJECTS) +t1rawafm_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(t1rawafm_SOURCES) +DIST_SOURCES = $(t1rawafm_SOURCES) +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEMPLATE_OBJS = @TEMPLATE_OBJS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +man_MANS = t1rawafm.1 +t1rawafm_SOURCES = t1rawafm.cc +t1rawafm_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a +INCLUDES = -I$(top_srcdir)/include +CLEANFILES = @TEMPLATE_OBJS@ +EXTRA_DIST = t1rawafm.1 +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign t1rawafm/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign t1rawafm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +t1rawafm$(EXEEXT): $(t1rawafm_OBJECTS) $(t1rawafm_DEPENDENCIES) + @rm -f t1rawafm$(EXEEXT) + $(CXXLINK) $(t1rawafm_OBJECTS) $(t1rawafm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1rawafm.Po@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list=''; \ + l2='$(man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; \ + l2='$(man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.1 b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.1 new file mode 100644 index 00000000000..a2833471a09 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.1 @@ -0,0 +1,59 @@ +.ds V 2.70 +.de M +.BR "\\$1" "(\\$2)\\$3" +.. +.de Sp +.if n .sp +.if t .sp 0.4 +.. +.TH T1RAWAFM 1 "LCDF Typetools" "Version \*V" +.SH NAME +t1rawafm \- produce raw AFM metrics from a PostScript Type 1 font +.SH SYNOPSIS +.B t1rawafm +\%\-e ENCODING +\%[OPTIONS...] +.I font +.RI [ outputfile ] +.SH DESCRIPTION +.BR T1rawafm +generates an AFM file with the information available in a PostScript +Type\~1 font. The AFM file will lack kerns, ligature information, and +composite characters, but is otherwise usable. The AFM file is written to +the standard output (but see the +.B \-\-output +option). If no input font file is supplied, +.B t1rawafm +reads a PFA or PFB font from the standard input. +' +.SH OPTIONS +.PD 0 +.TP 5 +.BR \-\-output "=\fIfile\fR, " \-o " \fIfile" +Send output to +.I file +instead of standard output. +' +.Sp +.TP 5 +.BR \-h ", " \-\-help +Print usage information and exit. +' +.Sp +.TP 5 +.BR \-\-version +Print the version number and some short non-warranty information and exit. +.PD +' +.SH "RETURN VALUES" +.B T1rawafm +exits with value 0 if an AFM metrics file was successfully generated, and 1 +otherwise. +' +.SH "SEE ALSO" +.LP +.IR "Adobe Type 1 Font Format" , +.IR "Adobe Font Metrics File Format Specification v4.1" +' +.SH AUTHOR +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc new file mode 100644 index 00000000000..0edc5f18448 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/t1rawafm/t1rawafm.cc @@ -0,0 +1,361 @@ +/* t1rawafm.cc -- driver for generating a raw AFM file from a font + * + * Copyright (c) 2008-2009 Eddie Kohler + * + * 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. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +#include <efont/psres.hh> +#include <efont/t1rw.hh> +#include <efont/t1font.hh> +#include <efont/t1item.hh> +#include <efont/t1mm.hh> +#include <efont/t1interp.hh> +#include <efont/t1bounds.hh> +#include <lcdf/clp.h> +#include <lcdf/error.hh> +#include <lcdf/globmatch.hh> +#include <lcdf/transform.hh> +#include <algorithm> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <stdarg.h> +#include <ctype.h> +#include <errno.h> +#ifdef HAVE_CTIME +# include <time.h> +#endif +#if defined(_MSDOS) || defined(_WIN32) +# include <fcntl.h> +# include <io.h> +#endif +#ifdef WIN32 +/* According to Fabrice Popineau MSVCC doesn't handle std::min correctly. */ +# define std /* */ +#endif + +using namespace Efont; + +#define VERSION_OPT 301 +#define HELP_OPT 302 +#define OUTPUT_OPT 303 +#define SMOKE_OPT 305 + +const Clp_Option options[] = { + { "help", 'h', HELP_OPT, 0, 0 }, + { "output", 'o', OUTPUT_OPT, Clp_ValString, 0 }, + { "version", 0, VERSION_OPT, 0, 0 }, +}; + + +static const char *program_name; +static PermString::Initializer initializer; + + +void +usage_error(ErrorHandler *errh, const char *error_message, ...) +{ + va_list val; + va_start(val, error_message); + if (!error_message) + errh->message("Usage: %s [OPTION]... FONT", program_name); + else + errh->vxmessage(ErrorHandler::e_error, error_message, val); + errh->message("Type %s --help for more information.", program_name); + exit(1); +} + +void +usage() +{ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<T1rawafm%> generates a raw (kernless and ligatureless) AFM file corresponding\n\ +to the specified Type 1 font file and writes it to the standard output.\n\ +\n\ +Usage: %s [OPTION]... [FONT]\n\ +\n\ +FONT is the name of a PFA or PFB font file. If omitted, t1testpage will read\n\ +a font file from the standard input.\n\ +\n\ +Options:\n\ + -o, --output=FILE Write output to FILE instead of standard out.\n\ + -h, --help Print this message and exit.\n\ + --version Print version number and exit.\n\ +\n\ +Report bugs to <ekohler@gmail.com>.\n", program_name); +} + + +// MAIN + +static Type1Font *font; + +static void +do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) +{ + FILE *f; + if (!filename || strcmp(filename, "-") == 0) { + f = stdin; + filename = "<stdin>"; +#if defined(_MSDOS) || defined(_WIN32) + _setmode(_fileno(f), _O_BINARY); +#endif + } else + f = fopen(filename, "rb"); + + if (!f) { + // check for PostScript name + Filename fn = psres->filename_value("FontOutline", filename); + f = fn.open_read(); + } + + if (!f) + errh->fatal("%s: %s", filename, strerror(errno)); + + Type1Reader *reader; + int c = getc(f); + ungetc(c, f); + if (c == EOF) + errh->fatal("%s: empty file", filename); + if (c == 128) + reader = new Type1PFBReader(f); + else + reader = new Type1PFAReader(f); + + font = new Type1Font(*reader); + + delete reader; +} + + +/***** + * MAIN PROGRAM + **/ + +struct fontinfo_t { + const char *afm_name; + int dict; + const char *dict_name; + bool as_string; +}; + +static const fontinfo_t fontinfo_strings[] = { + { "Version", Type1Font::dFI, "version", true }, + { "Notice", Type1Font::dFI, "Notice", true }, + { "FullName", Type1Font::dFI, "FullName", true }, + { "FamilyName", Type1Font::dFI, "FamilyName", true }, + { "Weight", Type1Font::dFI, "Weight", true }, + { "ItalicAngle", Type1Font::dFI, "ItalicAngle", false }, + { "IsFixedPitch", Type1Font::dFI, "isFixedPitch", false }, + { "UnderlinePosition", Type1Font::dFI, "UnderlinePosition", false }, + { "UnderlineThickness", Type1Font::dFI, "UnderlineThickness", false } +}; + +static String +strip_newlines(const String &str) +{ + StringAccum sa; + const char *end = str.end(), *last = str.begin(); + for (const char *s = str.begin(); s != end; ++s) + if (*s == '\n' || *s == '\r' || *s == '\f' || *s == '\v') { + sa.append(last, s); + last = s + 1; + } + if (last == str.begin()) + return str; + else { + sa.append(last, end); + return sa.take_string(); + } +} + +static void +write_char(FILE *outf, int c, PermString n, Type1Charstring *g, const Transform &font_transform, Type1Font *font) +{ + int bb[4], wx; + CharstringBounds::bounds(font_transform, CharstringContext(font, g), bb, wx); + fprintf(outf, "C %d ; WX %d ; N %s ; B %d %d %d %d ;\n", + c, wx, n.c_str(), bb[0], bb[1], bb[2], bb[3]); +} + +static void +write_afm(FILE *outf, Type1Font *font) +{ + fprintf(outf, "StartFontMetrics 2.0\n\ +Comment Generated by t1rawafm\n"); + + for (size_t i = 0; i < sizeof(fontinfo_strings) / sizeof(fontinfo_t); ++i) + if (Type1Definition *t1d = font->dict(fontinfo_strings[i].dict, + fontinfo_strings[i].dict_name)) { + if (!fontinfo_strings[i].as_string) + fprintf(outf, "%s %s\n", fontinfo_strings[i].afm_name, t1d->value().c_str()); + else { + String s; + if (t1d->value_string(s)) + fprintf(outf, "%s %s\n", fontinfo_strings[i].afm_name, strip_newlines(s).c_str()); + } + } + + Transform font_transform; + { + double font_matrix[6]; + font->font_matrix(font_matrix); + font_transform = Transform(font_matrix); + font_transform.scale(1000); + } + + int bb[4], wx; + if (Type1Charstring *t1cs = font->glyph("H")) { + CharstringBounds::bounds(font_transform, CharstringContext(font, t1cs), bb, wx); + if (bb[3]) + fprintf(outf, "Ascender %d\n", bb[3]); + } + if (Type1Charstring *t1cs = font->glyph("x")) { + CharstringBounds::bounds(font_transform, CharstringContext(font, t1cs), bb, wx); + if (bb[3]) + fprintf(outf, "XHeight %d\n", bb[3]); + } + if (Type1Charstring *t1cs = font->glyph("d")) { + CharstringBounds::bounds(font_transform, CharstringContext(font, t1cs), bb, wx); + if (bb[3]) + fprintf(outf, "Ascender %d\n", bb[3]); + } + if (Type1Charstring *t1cs = font->glyph("p")) { + CharstringBounds::bounds(font_transform, CharstringContext(font, t1cs), bb, wx); + if (bb[3]) + fprintf(outf, "Descender %d\n", bb[1]); + } + + Vector<double> vd; + if (Type1Definition *t1d = font->p_dict("StdHW")) + if (t1d->value_numvec(vd) && vd.size() > 0) + fprintf(outf, "StdHW %d\n", (int) ceil(vd[0])); + if (Type1Definition *t1d = font->p_dict("StdVW")) + if (t1d->value_numvec(vd) && vd.size() > 0) + fprintf(outf, "StdVW %d\n", (int) ceil(vd[0])); + + int fontbb[4] = { 1000000, 1000000, -1000000, -1000000 }; + for (int i = 0; i < font->nglyphs(); ++i) { + CharstringBounds::bounds(font_transform, CharstringContext(font, font->glyph(i)), bb, wx); + fontbb[0] = std::min(fontbb[0], bb[0]); + fontbb[1] = std::min(fontbb[1], bb[1]); + fontbb[2] = std::max(fontbb[2], bb[2]); + fontbb[3] = std::max(fontbb[3], bb[3]); + } + fprintf(outf, "FontBBox %d %d %d %d\n", fontbb[0], fontbb[1], fontbb[2], fontbb[3]); + + fprintf(outf, "FontName %s\n", font->font_name().c_str()); + + int nglyphs = font->nglyphs(); + PermString dot_notdef(".notdef"); + if (font->glyph(dot_notdef)) + --nglyphs; + fprintf(outf, "Characters %d\n", nglyphs); + + fprintf(outf, "StartCharMetrics %d\n", nglyphs); + Type1Encoding *enc = font->type1_encoding(); + HashMap<PermString, int> done_yet(0); + done_yet.insert(dot_notdef, 1); + for (int i = 0; i < 256; ++i) { + PermString n = enc->elt(i); + if (!done_yet[n]) + if (Type1Charstring *g = font->glyph(n)) { + write_char(outf, i, n, g, font_transform, font); + done_yet.insert(n, true); + } + } + for (int i = 0; i < font->nglyphs(); ++i) { + PermString n = font->glyph_name(i); + if (!done_yet[n]) + write_char(outf, -1, n, font->glyph(i), font_transform, font); + } + fprintf(outf, "EndCharMetrics\n"); + + fprintf(outf, "EndFontMetrics\n"); +} + +int +main(int argc, char *argv[]) +{ + PsresDatabase *psres = new PsresDatabase; + psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); + + Clp_Parser *clp = + Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); + program_name = Clp_ProgramName(clp); + + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr)); + const char *output_file = 0; + Vector<String> glyph_patterns; + + while (1) { + int opt = Clp_Next(clp); + switch (opt) { + + case OUTPUT_OPT: + if (output_file) + errh->fatal("output file already specified"); + output_file = clp->vstr; + break; + + case VERSION_OPT: + printf("t1rawafm (LCDF typetools) %s\n", VERSION); + printf("Copyright (C) 2008-2009 Eddie Kohler\n\ +This is free software; see the source for copying conditions.\n\ +There is NO warranty, not even for merchantability or fitness for a\n\ +particular purpose.\n"); + exit(0); + break; + + case HELP_OPT: + usage(); + exit(0); + break; + + case Clp_NotOption: + if (font) + errh->fatal("font already specified"); + do_file(clp->vstr, psres, errh); + break; + + case Clp_Done: + goto done; + + case Clp_BadOption: + usage_error(errh, 0); + break; + + default: + break; + + } + } + + done: + if (!font) + do_file(0, psres, errh); + + FILE *outf; + if (!output_file || strcmp(output_file, "-") == 0) + outf = stdout; + else { + outf = fopen(output_file, "w"); + if (!outf) + errh->fatal("%s: %s", output_file, strerror(errno)); + } + + write_afm(outf, font); + + exit(0); +} diff --git a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am index 8dcf9da887d..754e44b6d5a 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = t1reencode man_MANS = t1reencode.1 diff --git a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in index 7ed1ab495b7..159c21412d9 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1reencode/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = t1reencode$(EXEEXT) subdir = t1reencode DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -48,17 +56,26 @@ am_t1reencode_OBJECTS = md5.$(OBJEXT) t1reencode.$(OBJEXT) \ t1reencode_OBJECTS = $(am_t1reencode_OBJECTS) t1reencode_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(t1reencode_SOURCES) DIST_SOURCES = $(t1reencode_SOURCES) man1dir = $(mandir)/man1 @@ -69,6 +86,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -85,29 +103,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -116,6 +145,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -128,20 +158,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -150,6 +189,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -165,7 +205,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = t1reencode.1 t1reencode_SOURCES = md5.c md5.h \ t1reencode.cc \ @@ -178,13 +217,13 @@ EXTRA_DIST = t1reencode.1 all: all-am .SUFFIXES: -.SUFFIXES: .c .cc .o .obj +.SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -214,10 +253,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -230,7 +270,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done t1reencode$(EXEEXT): $(t1reencode_OBJECTS) $(t1reencode_DEPENDENCIES) @rm -f t1reencode$(EXEEXT) $(CXXLINK) $(t1reencode_OBJECTS) $(t1reencode_LDADD) $(LIBS) @@ -259,6 +303,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -272,6 +323,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -323,7 +387,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -425,7 +489,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -468,7 +532,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -485,18 +550,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/t1reencode/md5.c b/Build/source/texk/lcdf-typetools/t1reencode/md5.c index d9fbd7510e2..107de8061c2 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/md5.c +++ b/Build/source/texk/lcdf-typetools/t1reencode/md5.c @@ -119,7 +119,7 @@ transform(MD5_CONTEXT *ctx, const unsigned char *data) #define OP(a, b, c, d, s, T) \ do { \ - a += FF (b, c, d) + (*cwp++) + T; \ + a += FF (b, c, d) + (*cwp++) + T; \ a = rol(a, s); \ a += b; \ } while (0) @@ -153,7 +153,7 @@ transform(MD5_CONTEXT *ctx, const unsigned char *data) do { \ a += f (b, c, d) + correct_words[k] + T; \ a = rol(a, s); \ - a += b; \ + a += b; \ } while (0) /* Round 2. */ diff --git a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 index 7914363f2d1..b2736233593 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 +++ b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -202,4 +202,4 @@ option). The new font will be called WarnockPro-RegularOsF. .M otftotfm 1 ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc index 6a4eedf622a..d81d26221c4 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc +++ b/Build/source/texk/lcdf-typetools/t1reencode/t1reencode.cc @@ -1,6 +1,6 @@ /* t1reencode.cc -- driver for reencoding Type 1 fonts * - * Copyright (c) 2005-2006 Eddie Kohler + * Copyright (c) 2005-2009 Eddie Kohler * * 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 @@ -64,7 +64,6 @@ const Clp_Option options[] = { static const char *program_name; static PermString::Initializer initializer; -static String::Initializer initializer2; static HashMap<PermString, int> glyph_order(-1); static String encoding_name; @@ -636,7 +635,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -644,8 +643,9 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'T1reencode' changes a Type 1 font's embedded encoding and writes the\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<T1reencode%> changes a Type 1 font%,s embedded encoding and writes the\n\ reencoded font to the standard output.\n\ \n\ Usage: %s [OPTION]... [FONTFILE [OUTPUTFILE]]\n\ @@ -653,15 +653,15 @@ Usage: %s [OPTION]... [FONTFILE [OUTPUTFILE]]\n\ Options:\n\ -e, --encoding=FILE Read the encoding from FILE (in DVIPS format).\n\ -E, --encoding-text=ENC The ENC argument is the encoding text.\n\ - -n, --name=NAME Set output font's PostScript name.\n\ - -N, --full-name=NAME Set output font's full name.\n\ + -n, --name=NAME Set output font%,s PostScript name.\n\ + -N, --full-name=NAME Set output font%,s full name.\n\ -a, --pfa Output PFA font.\n\ -b, --pfb Output PFB font. This is the default.\n\ -o, --output=FILE Write output to FILE instead of standard out.\n\ -h, --help Print this message and exit.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -672,7 +672,7 @@ kill_def(Type1Font* font, Type1Definition *t1d, int whichd) { if (!t1d || font->dict(whichd, t1d->name()) != t1d) return; - + int icount = font->nitems(); for (int i = font->first_dict_item(whichd); i < icount; i++) if (font->item(i) == t1d) { @@ -685,7 +685,7 @@ kill_def(Type1Font* font, Type1Definition *t1d, int whichd) font->set_dict(whichd, name, 0); return; } - + assert(0); } @@ -699,14 +699,14 @@ adjust_font_definitions(Type1Font* font, Type1Encoding* encoding, String new_nam MD5_CONTEXT md5; md5_init(&md5); md5_update(&md5, (const unsigned char*) etext.data(), etext.length() - 1); - + // save UniqueID, then kill its definition int uniqueid; Type1Definition *t1d = font->dict("UniqueID"); bool have_uniqueid = (t1d && t1d->value_int(uniqueid)); kill_def(font, t1d, Type1Font::dFont); kill_def(font, font->p_dict("UniqueID"), Type1Font::dPrivate); - + // prepare XUID t1d = font->dict("XUID"); Vector<double> xuid; @@ -725,7 +725,7 @@ adjust_font_definitions(Type1Font* font, Type1Encoding* encoding, String new_nam uint8_t digest[MD5_DIGEST_SIZE + 2]; // leave 2 bytes of space md5_final((unsigned char *) digest, &md5); digest[MD5_DIGEST_SIZE] = digest[MD5_DIGEST_SIZE + 1] = 0; - + // append digest to XUID; each element must be less than 2^24 for (int i = 0; i < MD5_DIGEST_SIZE; i += 3) xuid.push_back((digest[i] << 16) | (digest[i+1] << 8) | digest[i+2]); @@ -738,7 +738,7 @@ adjust_font_definitions(Type1Font* font, Type1Encoding* encoding, String new_nam md5_final_text(text_digest, &md5); encoding_name = "AutoEnc_" + String(text_digest); } - + t1d = font->dict("FontName"); PermString name; if (t1d && t1d->value_name(name)) { @@ -766,7 +766,7 @@ adjust_font_definitions(Type1Font* font, Type1Encoding* encoding, String new_nam sa << "%% Created by t1reencode-" VERSION " on " << time_str; sa.pop_back(); #else - sa << "%% Created by t1reencode-" VERSION "."; + sa << "%% Created by t1reencode-" VERSION "."; #endif font->add_header_comment(sa.take_string().c_str()); @@ -792,7 +792,7 @@ tokenize(const String &s, int &pos_in, int &line) line++; pos++; } - + if (pos >= len) { pos_in = len; return String(); @@ -835,7 +835,7 @@ tokenize(const String &s, int &pos_in, int &line) static String landmark(const String &filename, int line) { - return filename + String::stable_string(":", 1) + String(line); + return filename + String::make_stable(":", 1) + String(line); } Type1Encoding * @@ -890,16 +890,16 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) #endif } else f = fopen(filename, "rb"); - + if (!f) { // check for PostScript name Filename fn = psres->filename_value("FontOutline", filename); f = fn.open_read(); } - + if (!f) errh->fatal("%s: %s", filename, strerror(errno)); - + Type1Reader *reader; int c = getc(f); ungetc(c, f); @@ -909,7 +909,7 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) reader = new Type1PFBReader(f); else reader = new Type1PFAReader(f); - + Type1Font *font = new Type1Font(*reader); if (!font->ok()) errh->fatal("%s: no glyphs in font", filename); @@ -923,11 +923,11 @@ main(int argc, char *argv[]) { PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr)); const char *input_file = 0; const char *output_file = 0; @@ -937,7 +937,7 @@ main(int argc, char *argv[]) const char *new_full_name = 0; bool binary = true; Vector<String> glyph_patterns; - + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -965,7 +965,7 @@ main(int argc, char *argv[]) errh->fatal("full name already specified"); new_full_name = clp->vstr; break; - + case OUTPUT_OPT: if (output_file) errh->fatal("output file already specified"); @@ -979,21 +979,21 @@ main(int argc, char *argv[]) case PFB_OPT: binary = true; break; - + case VERSION_OPT: printf("t1reencode (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2006 Eddie Kohler\n\ + printf("Copyright (C) 1999-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); break; - + case Clp_NotOption: if (input_file && output_file) errh->fatal("too many arguments"); @@ -1002,20 +1002,20 @@ particular purpose.\n"); else input_file = clp->vstr; break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: // read the font Type1Font *font = do_file(input_file, psres, errh); @@ -1024,59 +1024,59 @@ particular purpose.\n"); // read the encoding if (!encoding_file && !encoding_text) - errh->fatal("missing '-e ENCODING' argument"); + errh->fatal("missing %<-e ENCODING%> argument"); Type1Encoding *t1e = 0; - if (encoding_file == "StandardEncoding") { + if (strcmp(encoding_file, "StandardEncoding") == 0) { t1e = Type1Encoding::standard_encoding(); encoding_name = encoding_file; } else { String text; if (strcmp(encoding_file, "ISOLatin1Encoding") == 0 || strcmp(encoding_file, "ISO_8859_1_Encoding") == 0) - text = String::stable_string(ISOLatin1Encoding); + text = String::make_stable(ISOLatin1Encoding); else if (strcmp(encoding_file, "ISOLatin2Encoding") == 0 || strcmp(encoding_file, "ISO_8859_2_Encoding") == 0) - text = String::stable_string(ISOLatin2Encoding); + text = String::make_stable(ISOLatin2Encoding); else if (strcmp(encoding_file, "ISOLatin3Encoding") == 0 || strcmp(encoding_file, "ISO_8859_3_Encoding") == 0) - text = String::stable_string(ISOLatin3Encoding); + text = String::make_stable(ISOLatin3Encoding); else if (strcmp(encoding_file, "ISOLatin4Encoding") == 0 || strcmp(encoding_file, "ISO_8859_4_Encoding") == 0) - text = String::stable_string(ISOLatin4Encoding); + text = String::make_stable(ISOLatin4Encoding); else if (strcmp(encoding_file, "ISOCyrillicEncoding") == 0 || strcmp(encoding_file, "ISO_8859_5_Encoding") == 0) - text = String::stable_string(ISOCyrillicEncoding); + text = String::make_stable(ISOCyrillicEncoding); else if (strcmp(encoding_file, "ISOGreekEncoding") == 0 || strcmp(encoding_file, "ISO_8859_7_Encoding") == 0) - text = String::stable_string(ISOGreekEncoding); + text = String::make_stable(ISOGreekEncoding); else if (strcmp(encoding_file, "ISO_8859_9_Encoding") == 0 || strcmp(encoding_file, "ISOLatin5Encoding") == 0) - text = String::stable_string(ISOLatin5Encoding); + text = String::make_stable(ISOLatin5Encoding); else if (strcmp(encoding_file, "ISOLatin6Encoding") == 0 || strcmp(encoding_file, "ISO_8859_10_Encoding") == 0) - text = String::stable_string(ISOLatin6Encoding); + text = String::make_stable(ISOLatin6Encoding); else if (strcmp(encoding_file, "ISOThaiEncoding") == 0 || strcmp(encoding_file, "ISO_8859_11_Encoding") == 0) - text = String::stable_string(ISOThaiEncoding); + text = String::make_stable(ISOThaiEncoding); else if (strcmp(encoding_file, "ISOLatin7Encoding") == 0 || strcmp(encoding_file, "ISO_8859_13_Encoding") == 0) - text = String::stable_string(ISOLatin7Encoding); + text = String::make_stable(ISOLatin7Encoding); else if (strcmp(encoding_file, "ISOLatin8Encoding") == 0 || strcmp(encoding_file, "ISO_8859_14_Encoding") == 0) - text = String::stable_string(ISOLatin8Encoding); + text = String::make_stable(ISOLatin8Encoding); else if (strcmp(encoding_file, "ISOLatin9Encoding") == 0 || strcmp(encoding_file, "ISO_8859_15_Encoding") == 0) - text = String::stable_string(ISOLatin9Encoding); + text = String::make_stable(ISOLatin9Encoding); else if (strcmp(encoding_file, "KOI8REncoding") == 0) - text = String::stable_string(KOI8REncoding); + text = String::make_stable(KOI8REncoding); else if (strcmp(encoding_file, "ExpertEncoding") == 0) - text = String::stable_string(ExpertEncoding); + text = String::make_stable(ExpertEncoding); else if (strcmp(encoding_file, "ExpertSubsetEncoding") == 0) - text = String::stable_string(ExpertSubsetEncoding); + text = String::make_stable(ExpertSubsetEncoding); else if (strcmp(encoding_file, "SymbolEncoding") == 0) - text = String::stable_string(SymbolEncoding); + text = String::make_stable(SymbolEncoding); else if (encoding_text) - text = String::stable_string(encoding_text), encoding_file = "<argument>"; + text = String::make_stable(encoding_text), encoding_file = "<argument>"; else if ((text = read_file(encoding_file, errh)), errh->nerrors() > 0) exit(1); if (!(t1e = parse_encoding(text, encoding_file, errh))) @@ -1108,6 +1108,6 @@ particular purpose.\n"); Type1PFAWriter w(outf); font->write(w); } - + return (errh->nerrors() == 0 ? 0 : 1); } diff --git a/Build/source/texk/lcdf-typetools/t1reencode/util.cc b/Build/source/texk/lcdf-typetools/t1reencode/util.cc index 7792eef4466..a8dc4c48ea7 100644 --- a/Build/source/texk/lcdf-typetools/t1reencode/util.cc +++ b/Build/source/texk/lcdf-typetools/t1reencode/util.cc @@ -38,17 +38,17 @@ read_file(String filename, ErrorHandler *errh, bool warning) _setmode(_fileno(f), _O_BINARY); #endif } else if (!(f = fopen(filename.c_str(), "rb"))) { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, strerror(errno)); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), strerror(errno)); return String(); } - + StringAccum sa; while (!feof(f)) { if (char *x = sa.reserve(8192)) { int amt = fread(x, 1, 8192, f); sa.forward(amt); } else { - errh->verror_text((warning ? errh->ERR_WARNING : errh->ERR_ERROR), filename, "Out of memory!"); + errh->xmessage((warning ? errh->e_warning : errh->e_error) + ErrorHandler::make_landmark_anno(filename), "Out of memory!"); break; } } @@ -61,7 +61,7 @@ String printable_filename(const String &s) { if (!s || s == "-") - return String::stable_string("<stdin>"); + return String::make_stable("<stdin>"); else return s; } diff --git a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am index 251c3ff697e..567173ddba7 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am +++ b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = t1testpage man_MANS = t1testpage.1 diff --git a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in index 8e5dcc62678..fbd94c82ec4 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in +++ b/Build/source/texk/lcdf-typetools/t1testpage/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = t1testpage$(EXEEXT) subdir = t1testpage DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,13 +55,17 @@ am_t1testpage_OBJECTS = t1testpage.$(OBJEXT) t1testpage_OBJECTS = $(am_t1testpage_OBJECTS) t1testpage_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(t1testpage_SOURCES) DIST_SOURCES = $(t1testpage_SOURCES) man1dir = $(mandir)/man1 @@ -64,6 +76,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,29 +93,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -111,6 +135,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -123,20 +148,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -145,6 +179,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -160,7 +195,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = t1testpage.1 t1testpage_SOURCES = t1testpage.cc t1testpage_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @@ -170,13 +204,13 @@ EXTRA_DIST = t1testpage.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -206,10 +240,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -222,7 +257,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done t1testpage$(EXEEXT): $(t1testpage_OBJECTS) $(t1testpage_DEPENDENCIES) @rm -f t1testpage$(EXEEXT) $(CXXLINK) $(t1testpage_OBJECTS) $(t1testpage_LDADD) $(LIBS) @@ -248,6 +287,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -299,7 +351,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -401,7 +453,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -444,7 +496,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -461,18 +514,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 index eb0e1fb6e84..856d7c3f18b 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 +++ b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -11,14 +11,18 @@ t1testpage \- create a PostScript proof for a Type 1 font .SH SYNOPSIS .B t1testpage -\%[\fIfont\fR] +\%[\fIfont...\fR] .SH DESCRIPTION .BR T1testpage creates a PostScript proof document for the specified Type 1 font file and writes it to the standard output. The proof shows every glyph in the font, including its glyph name and encoding. The .I font -argument should be the name of a PFA or PFB font file. If it is omitted, +argument should be the name of a PFA or PFB font file. If more than one +.I font +is given, the output proof contains all the fonts in order. If +.I font +is omitted, t1testpage will read a font file from the standard input. .PP T1testpage is preliminary software. @@ -59,4 +63,4 @@ Print the version number and some short non-warranty information and exit. .PD ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) diff --git a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc index 139dc569dc8..ba61e5f4f92 100644 --- a/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc +++ b/Build/source/texk/lcdf-typetools/t1testpage/t1testpage.cc @@ -1,6 +1,6 @@ /* t1testpage.cc -- driver for generating Type 1 fonts' test pages * - * Copyright (c) 1999-2007 Eddie Kohler + * Copyright (c) 1999-2009 Eddie Kohler * * 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 @@ -74,7 +74,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTION]... FONT", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -82,15 +82,16 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'T1testpage' creates a PostScript proof document for the specified Type 1\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<T1testpage%> creates a PostScript proof document for the specified Type 1\n\ font file and writes it to the standard output. The proof shows every\n\ glyph in the font, including its glyph name and encoding.\n\ \n\ -Usage: %s [OPTION]... [FONT]\n\ +Usage: %s [OPTION]... [FONT...]\n\ \n\ -FONT is the name of a PFA or PFB font file. If omitted, t1testpage will read\n\ -a font file from the standard input.\n\ +Each FONT is the name of a PFA or PFB font file. If omitted, t1testpage will\n\ +read a font file from the standard input.\n\ \n\ Options:\n\ -g, --glyph=GLYPH Limit output to one or more GLYPHs.\n\ @@ -99,15 +100,58 @@ Options:\n\ -h, --help Print this message and exit.\n\ --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } -// MAIN +// OUTPUTTER -static Type1Font *font; +namespace { -static void +class Testpager { public: + Testpager(FILE *f) + : _f(f), _pageno(1) { + } + virtual ~Testpager() { + fclose(_f); + } + virtual void prolog(const Vector<Type1Font *> &fonts) = 0; + void newpage() { + fprintf(_f, "%%%%Page: %d %d\n", _pageno, _pageno); + ++_pageno; + } + virtual void font(Type1Font *font, const Vector<PermString>& glyph_names) = 0; + virtual void epilog() { + fprintf(_f, "%%%%EOF\n"); + fclose(_f); + } + protected: + FILE *_f; + int _pageno; +}; + +class GridTestpager : public Testpager { public: + GridTestpager(FILE *f) + : Testpager(f) { + } + void prolog(const Vector<Type1Font *> &fonts); + void font(Type1Font *font, const Vector<PermString>& glyph_names); +}; + +class SmokeTestpager : public Testpager { public: + SmokeTestpager(FILE *f) + : Testpager(f) { + } + void prolog(const Vector<Type1Font *> &fonts); + void font(Type1Font *font, const Vector<PermString>& glyph_names); +}; + +} + + +// MAIN + +static Type1Font * do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) { FILE *f; @@ -119,16 +163,16 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) #endif } else f = fopen(filename, "rb"); - + if (!f) { // check for PostScript name Filename fn = psres->filename_value("FontOutline", filename); f = fn.open_read(); } - + if (!f) errh->fatal("%s: %s", filename, strerror(errno)); - + Type1Reader *reader; int c = getc(f); ungetc(c, f); @@ -138,20 +182,23 @@ do_file(const char *filename, PsresDatabase *psres, ErrorHandler *errh) reader = new Type1PFBReader(f); else reader = new Type1PFAReader(f); - - font = new Type1Font(*reader); + + Type1Font *font = new Type1Font(*reader); delete reader; + return font; } - -static void -output_testpage(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_names) +void +GridTestpager::prolog(const Vector<Type1Font *> &fonts) { - fprintf(outf, "%%!PS-Adobe-3.0\n%%%%LanguageLevel: 2\n%%%%BeginProlog\n"); - fprintf(outf, "/magicstr 1 string def\n\ + fprintf(_f, "%%!PS-Adobe-3.0\n\ +%%%%LanguageLevel: 2\n\ +%%%%DocumentMedia: Plain 612 792 white ( )\n\ +%%%%BeginProlog\n"); + fprintf(_f, "/magicstr 1 string def\n\ /magicbox { %% row col char name encoding magicbox -\n\ - 5 3 roll 54 mul 36 add exch 54 mul neg 702 add moveto currentpoint\n\ + 5 3 roll 54 mul 36 add exch 54 mul neg 682 add moveto currentpoint\n\ .8 setgray 54 0 rlineto 0 54 rlineto -54 0 rlineto closepath stroke\n\ 0 setgray moveto\n\ gsave /Helvetica 7 selectfont 3 1.5 rmoveto show grestore\n\ @@ -159,66 +206,83 @@ output_testpage(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_nam magicstr 0 3 -1 roll put\n\ magicstr stringwidth pop 54 sub -2 div 16 rmoveto magicstr show\n\ } bind def\n"); - Type1PFAWriter w(outf); - font->write(w); - fprintf(outf, "%%%%EndProlog\n"); + Type1PFAWriter w(_f); + for (Vector<Type1Font *>::const_iterator it = fonts.begin(); + it != fonts.end(); ++it) + (*it)->write(w); + fprintf(_f, "%%%%EndProlog\n"); +} +void +GridTestpager::font(Type1Font* font, const Vector<PermString>& glyph_names) +{ HashMap<PermString, int> encodings(-1); if (Type1Encoding *encoding = font->type1_encoding()) for (int i = 255; i >= 0; i--) if (encoding->elt(i)) encodings.insert(encoding->elt(i), i); - + int per_row = 10; int nrows = 13; int per_page = nrows * per_row; - - int page = 0; - for (int gi = 0; gi < glyph_names.size(); gi++) { - + + int page = 0, gi = -1; + for (Vector<PermString>::const_iterator it = glyph_names.begin(); + it != glyph_names.end(); ++it) { + // allow font that doesn't have all glyphs + if (!font->glyph(*it)) + continue; + + ++gi; if (gi % per_page == 0) { if (page) - fprintf(outf, "showpage restore\n"); - page++; - fprintf(outf, "%%%%Page: %d %d\nsave\n", page, page); + fprintf(_f, "showpage restore\n"); + ++page; + newpage(); + fprintf(_f, "save\n"); // make new font - fprintf(outf, "/%s findfont dup length dict begin\n\ + fprintf(_f, "/%s findfont dup length dict begin\n\ { 1 index /FID ne {def} {pop pop} ifelse } forall\n /Encoding [", font->font_name().c_str()); - for (int i = gi; i < gi + per_page && i < glyph_names.size(); i++) { - fprintf(outf, " /%s", glyph_names[i].c_str()); - if (i % 10 == 9) fprintf(outf, "\n"); - } - fprintf(outf, " ] def\n currentdict end /X exch definefont pop\n\ -/X 24 selectfont\n"); + int gx = 0; + for (Vector<PermString>::const_iterator xit = it; + xit != glyph_names.end() && gx < per_page; ++xit) + if (font->glyph(*xit)) { + ++gx; + fprintf(_f, " /%s", xit->c_str()); + if (gx % 10 == 9) + fprintf(_f, "\n"); + } + fprintf(_f, " ] def\n currentdict end /X exch definefont pop\n\ +/Helvetica-Bold 16 selectfont 36 742 moveto (%s) show\n\ +/X 24 selectfont\n", font->font_name().c_str()); } - + int row = (gi % per_page) / per_row; int col = gi % per_row; - fprintf(outf, "%d %d %d (%s)", row, col, gi % per_page, glyph_names[gi].c_str()); - if (encodings[glyph_names[gi]] >= 0) { - int e = encodings[glyph_names[gi]]; + fprintf(_f, "%d %d %d (%s)", row, col, gi % per_page, it->c_str()); + if (encodings[*it] >= 0) { + int e = encodings[*it]; if (e == '\\') - fprintf(outf, " ('\\\\\\\\')"); + fprintf(_f, " ('\\\\\\\\')"); else if (e == '\'') - fprintf(outf, " ('\\\\'')"); + fprintf(_f, " ('\\\\'')"); else if (e == '(' || e == ')') - fprintf(outf, " ('\\%c')", e); + fprintf(_f, " ('\\%c')", e); else if (e >= 32 && e < 127) - fprintf(outf, " ('%c')", e); + fprintf(_f, " ('%c')", e); else - fprintf(outf, " ('\\\\%03o')", e); + fprintf(_f, " ('\\\\%03o')", e); } else - fprintf(outf, " ()"); - fprintf(outf, " magicbox\n"); + fprintf(_f, " ()"); + fprintf(_f, " magicbox\n"); } if (page) - fprintf(outf, "showpage restore\n"); - fprintf(outf, "%%%%EOF\n"); - fclose(outf); -} + fprintf(_f, "showpage restore\n"); +} + /***** @@ -234,14 +298,14 @@ operator<<(StringAccum& sa, const Point& p) class Smoker : public CharstringInterp { public: Smoker(const Transform&); - + void act_line(int, const Point &, const Point &); void act_curve(int, const Point &, const Point &, const Point &, const Point &); void act_closepath(int); String char_postscript() { return _char_sa.take_string(); } String points_postscript() { return _points_sa.take_string(); } - + bool run(const CharstringContext&); private: @@ -252,7 +316,7 @@ class Smoker : public CharstringInterp { public: Point _char_cp; inline void maybe_move(const Point&); - + }; Smoker::Smoker(const Transform& xform) @@ -325,7 +389,7 @@ bounds2xform(CharstringBounds& bounds, bool expand = false) } bounds.act_line(0, Point(0, 0), bounds.width()); bounds.act_line(0, Point(0, 0), Point(1, 1)); - + double true_width = std::max(bounds.bb_right(), 0.) - std::min(bounds.bb_left(), 0.); double true_height = std::max(bounds.bb_top(), 0.) - std::min(bounds.bb_bottom(), 0.); double x_scale = (RIGHT_BOUND - LEFT_BOUND) / true_width; @@ -344,11 +408,11 @@ static const char* const bounds_glyphs[] = { "A", "Eacute", "Ecircumflex", "l", "g", "p", "q", "j", "J", "emdash", 0 }; -static void -output_smoke(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_names) +void +SmokeTestpager::prolog(const Vector<Type1Font *> &) { - fprintf(outf, "%%!PS-Adobe-3.0\n%%%%LanguageLevel: 2\n%%%%BeginProlog\n"); - fprintf(outf, "/pA { %% x y pA -\n\ + fprintf(_f, "%%!PS-Adobe-3.0\n%%%%LanguageLevel: 2\n%%%%BeginProlog\n"); + fprintf(_f, "/pA { %% x y pA -\n\ moveto\n\ -2 -2 rmoveto 4 0 rlineto 0 4 rlineto -4 0 rlineto closepath\n\ gsave 1 setgray stroke grestore 0 setgray fill\n\ @@ -358,10 +422,12 @@ output_smoke(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_names) gsave 1 setgray stroke grestore 0.1 setgray fill\n\ } bind def\n\ "); - //Type1PFAWriter w(outf); - //font->write(w); - fprintf(outf, "%%%%EndProlog\n"); + fprintf(_f, "%%%%EndProlog\n"); +} +void +SmokeTestpager::font(Type1Font* font, const Vector<PermString>& glyph_names) +{ HashMap<PermString, int> encodings(-1); if (Type1Encoding *encoding = font->type1_encoding()) for (int i = 255; i >= 0; i--) @@ -376,9 +442,14 @@ output_smoke(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_names) for (int gi = 0; gi < glyph_names.size(); gi++) bounds.char_bounds(font->glyph_context(glyph_names[gi]), false); Transform font_xform = bounds2xform(bounds, true); - + for (int gi = 0; gi < glyph_names.size(); gi++) { - fprintf(outf, "%%%%Page: %d %d\nsave\n", gi + 1, gi + 1); + // allow font that doesn't have all glyphs + if (!font->glyph(glyph_names[gi])) + continue; + + newpage(); + fprintf(_f, "save\n"); CharstringContext cc = font->glyph_context(glyph_names[gi]); bounds.clear(); @@ -398,17 +469,14 @@ output_smoke(FILE* outf, Type1Font* font, const Vector<PermString>& glyph_names) Smoker smoker(xform); smoker.run(font->glyph_context(glyph_names[gi])); - fprintf(outf, "%g %g moveto 0 %g rlineto %g %g moveto 0 %g rlineto %g %g moveto %g 0 rlineto 0 setgray stroke\n", + fprintf(_f, "%g %g moveto 0 %g rlineto %g %g moveto 0 %g rlineto %g %g moveto %g 0 rlineto 0 setgray stroke\n", (Point(0, 0) * xform).x, BOTTOM_BOUND - 36, TOP_BOUND - BOTTOM_BOUND + 72, (bounds.width() * xform).x, BOTTOM_BOUND - 36, TOP_BOUND - BOTTOM_BOUND + 72, LEFT_BOUND - 36, (Point(0, 0) * xform).y, RIGHT_BOUND - LEFT_BOUND + 72); - - fprintf(outf, "%s\n0.5 setgray fill\n\n1 setlinewidth\n%s\nshowpage\nrestore\n", smoker.char_postscript().c_str(), smoker.points_postscript().c_str()); - } - fprintf(outf, "%%%%EOF\n"); - fclose(outf); -} + fprintf(_f, "%s\n0.5 setgray fill\n\n1 setlinewidth\n%s\nshowpage\nrestore\n", smoker.char_postscript().c_str(), smoker.points_postscript().c_str()); + } +} /***** @@ -420,7 +488,7 @@ click_strcmp(PermString a, PermString b) { const char *ad = a.c_str(), *ae = a.c_str() + a.length(); const char *bd = b.c_str(), *be = b.c_str() + b.length(); - + while (ad < ae && bd < be) { if (isdigit((unsigned char) *ad) && isdigit((unsigned char) *bd)) { // compare the two numbers, but don't treat them as numbers in @@ -520,16 +588,17 @@ main(int argc, char *argv[]) { PsresDatabase *psres = new PsresDatabase; psres->add_psres_path(getenv("PSRESOURCEPATH"), 0, false); - + Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr)); const char *output_file = 0; Vector<String> glyph_patterns; bool smoke = false; - + Vector<Type1Font *> fonts; + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -551,50 +620,48 @@ main(int argc, char *argv[]) case SMOKE_OPT: smoke = !clp->negated; break; - + case OUTPUT_OPT: if (output_file) errh->fatal("output file already specified"); output_file = clp->vstr; break; - + case VERSION_OPT: printf("t1testpage (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 1999-2006 Eddie Kohler\n\ + printf("Copyright (C) 1999-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); break; - + case Clp_NotOption: - if (font) - errh->fatal("font already specified"); - do_file(clp->vstr, psres, errh); + fonts.push_back(do_file(clp->vstr, psres, errh)); break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: - if (!font) - do_file(0, psres, errh); - + if (!fonts.size()) + fonts.push_back(do_file(0, psres, errh)); + FILE *outf; if (!output_file || strcmp(output_file, "-") == 0) outf = stdout; @@ -648,18 +715,36 @@ particular purpose.\n"); glyph_order.insert("space", gindex++); // Get glyph names. + HashMap<PermString, int> glyph_hash(0); + for (Vector<Type1Font *>::iterator it = fonts.begin(); it != fonts.end(); + ++it) + for (int i = 0; i < (*it)->nglyphs(); i++) { + if (glyph_matches((*it)->glyph_name(i), + glyph_patterns.begin(), glyph_patterns.end())) + glyph_hash.insert((*it)->glyph_name(i), 1); + } + Vector<PermString> glyph_names; - for (int i = 0; i < font->nglyphs(); i++) - if (glyph_matches(font->glyph_name(i), glyph_patterns.begin(), glyph_patterns.end())) - glyph_names.push_back(font->glyph_name(i)); + for (HashMap<PermString, int>::iterator it = glyph_hash.begin(); + it != glyph_hash.end(); ++it) + glyph_names.push_back(it.key()); if (glyph_names.size() == 0) errh->fatal("no glyphs to print"); qsort(glyph_names.begin(), glyph_names.size(), sizeof(PermString), glyphcompare); + // outputs + Testpager *tp; if (smoke) - output_smoke(outf, font, glyph_names); + tp = new SmokeTestpager(outf); else - output_testpage(outf, font, glyph_names); - + tp = new GridTestpager(outf); + + tp->prolog(fonts); + for (Vector<Type1Font *>::iterator it = fonts.begin(); it != fonts.end(); + ++it) + tp->font(*it, glyph_names); + tp->epilog(); + + delete tp; exit(0); } diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am index 24206d0d0a3..34b3520f7a0 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am +++ b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.am @@ -1,6 +1,4 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - bin_PROGRAMS = ttftotype42 man_MANS = ttftotype42.1 diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in index f4d55a5603a..7e86077aaf2 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in +++ b/Build/source/texk/lcdf-typetools/ttftotype42/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -30,11 +30,19 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = ttftotype42$(EXEEXT) subdir = ttftotype42 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_template_objs.m4 \ + $(top_srcdir)/m4/kpse-common.m4 \ + $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/lcdf-typetools.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -47,13 +55,17 @@ am_ttftotype42_OBJECTS = ttftotype42.$(OBJEXT) ttftotype42_OBJECTS = $(am_ttftotype42_OBJECTS) ttftotype42_DEPENDENCIES = ../libefont/libefont.a ../liblcdf/liblcdf.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(ttftotype42_SOURCES) DIST_SOURCES = $(ttftotype42_SOURCES) man1dir = $(mandir)/man1 @@ -64,6 +76,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -80,29 +93,40 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FIXLIBC_O = @FIXLIBC_O@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KPSEINTERFACE_O = @KPSEINTERFACE_O@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBKPATHSEA = @LIBKPATHSEA@ -LIBKPATHSEA_DEP = @LIBKPATHSEA_DEP@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -111,6 +135,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +SED = @SED@ SELECTED_SUBDIRS = @SELECTED_SUBDIRS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -123,20 +148,29 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -145,6 +179,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -160,7 +195,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign man_MANS = ttftotype42.1 ttftotype42_SOURCES = ttftotype42.cc ttftotype42_LDADD = ../libefont/libefont.a ../liblcdf/liblcdf.a @@ -170,13 +204,13 @@ EXTRA_DIST = ttftotype42.1 all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -206,10 +240,11 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -222,7 +257,11 @@ uninstall-binPROGRAMS: done clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done ttftotype42$(EXEEXT): $(ttftotype42_OBJECTS) $(ttftotype42_DEPENDENCIES) @rm -f ttftotype42$(EXEEXT) $(CXXLINK) $(ttftotype42_OBJECTS) $(ttftotype42_LDADD) $(LIBS) @@ -248,6 +287,19 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -299,7 +351,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -401,7 +453,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -444,7 +496,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -461,18 +514,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-man uninstall-man1 + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 index 9beb45eb03b..6df6efc63eb 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 +++ b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.1 @@ -1,4 +1,4 @@ -.ds V 2.69 +.ds V 2.75 .de M .BR "\\$1" "(\\$2)\\$3" .. @@ -71,7 +71,7 @@ Adobe Technical Note #5012, Version 1.4 ' .SH AUTHOR -Eddie Kohler (kohler@cs.ucla.edu) +Eddie Kohler (ekohler@gmail.com) .PP The latest version is available from: .br diff --git a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc index c47ff374ae3..edb635cf67c 100644 --- a/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc +++ b/Build/source/texk/lcdf-typetools/ttftotype42/ttftotype42.cc @@ -1,6 +1,6 @@ /* ttftotype42.cc -- driver for translating TrueType fonts to Type 42 fonts * - * Copyright (c) 2006 Eddie Kohler + * Copyright (c) 2006-2009 Eddie Kohler * * 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 @@ -67,7 +67,7 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) if (!error_message) errh->message("Usage: %s [OPTIONS] [FONTFILE [OUTPUTFILE]]", program_name); else - errh->verror(ErrorHandler::ERR_ERROR, String(), error_message, val); + errh->vxmessage(ErrorHandler::e_error, error_message, val); errh->message("Type %s --help for more information.", program_name); exit(1); } @@ -75,8 +75,9 @@ usage_error(ErrorHandler *errh, const char *error_message, ...) void usage() { - printf("\ -'Ttftotype42' translates a TrueType or TrueType-flavored OpenType font into\n\ + FileErrorHandler uerrh(stdout); + uerrh.message("\ +%<Ttftotype42%> translates a TrueType or TrueType-flavored OpenType font into\n\ PostScript Type 42 format, which is suitable for inclusion in PostScript\n\ files. The result, is usually written to the standard output.\n\ \n\ @@ -88,7 +89,7 @@ Options:\n\ -h, --help Print this message and exit.\n\ -v, --version Print version number and exit.\n\ \n\ -Report bugs to <kohler@cs.ucla.edu>.\n", program_name); +Report bugs to <ekohler@gmail.com>.\n", program_name); } @@ -162,7 +163,7 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) #endif } else if (!(f = fopen(infn, "rb"))) errh->fatal("%s: %s", infn, strerror(errno)); - + int c = getc(f); ungetc(c, f); @@ -198,7 +199,7 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) tables.push_back(s); } OpenType::Font reduced_font = OpenType::Font::make(true, tags, tables); - + // output file if (!outfn || strcmp(outfn, "-") == 0) { f = stdout; @@ -212,7 +213,7 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) #endif // fprintf(f, "%%!\n"); - + // get glyph names TrueTypeBoundsCharstringProgram ttbprog(&otf); Vector<PermString> gn; @@ -271,7 +272,7 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) fprintf(f, "/UnderlineThickness %g def\n", post.underline_thickness() / emunits); } fprintf(f, "end readonly def\n"); - + // encoding fprintf(f, "/Encoding 256 array\n0 1 255{1 index exch/.notdef put}for\n"); for (int i = 0; i < 256; i++) @@ -301,7 +302,7 @@ do_file(const char *infn, const char *outfn, ErrorHandler *errh) fprintf(f, "FontName currentdict end definefont pop\n"); // fprintf(f, "/%s 100 selectfont 30 30 moveto (Hello! 9) show showpage\n", name.english_name(OpenType::Name::N_POSTSCRIPT).c_str()); - + if (f != stdout) fclose(f); } @@ -312,11 +313,11 @@ main(int argc, char *argv[]) Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); - + ErrorHandler *errh = ErrorHandler::static_initialize(new FileErrorHandler(stderr, String(program_name) + ": ")); const char *input_file = 0; const char *output_file = 0; - + while (1) { int opt = Clp_Next(clp); switch (opt) { @@ -327,16 +328,16 @@ main(int argc, char *argv[]) else errh = new SilentErrorHandler; break; - + case VERSION_OPT: printf("ttftotype42 (LCDF typetools) %s\n", VERSION); - printf("Copyright (C) 2006 Eddie Kohler\n\ + printf("Copyright (C) 2006-2009 Eddie Kohler\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty, not even for merchantability or fitness for a\n\ particular purpose.\n"); exit(0); break; - + case HELP_OPT: usage(); exit(0); @@ -357,22 +358,22 @@ particular purpose.\n"); else input_file = clp->vstr; break; - + case Clp_Done: goto done; - + case Clp_BadOption: usage_error(errh, 0); break; - + default: break; - + } } - + done: do_file(input_file, output_file, errh); - + return (errh->nerrors() == 0 ? 0 : 1); } |