diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 13:45:56 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 13:45:56 +0000 |
commit | 2fb179f86b0f9ecb7876759b87f9c64634a3f114 (patch) | |
tree | 351df3c4d5648356980bc078544e25820e4d26fc /libXfont | |
parent | a7be905cf4423239285228d4e23caf2172adfa8b (diff) | |
download | vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.gz vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.bz2 vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.zip |
Added libXfont-1.4.0.tar.gz.
Diffstat (limited to 'libXfont')
152 files changed, 19217 insertions, 52127 deletions
diff --git a/libXfont/ChangeLog b/libXfont/ChangeLog index 578ba5e6a..5072a95ab 100644 --- a/libXfont/ChangeLog +++ b/libXfont/ChangeLog @@ -1,3 +1,160 @@ +commit 04ced93e997b185b5d9124cacc96fa39a77b2ab7 +Author: Peter Astrand <astrand@maggie.lkpg.cendio.se> +Date: Wed Feb 4 22:09:25 2009 +0100 + + Avoid sending uninitialized padding data over the network. + + Besides cluttering Valgrind output, this might also be an information leak. + + Signed-off-by: Peter Astrand <astrand@cendio.se> + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit e15dca77fa76252dd8499f8585d8ce922ac3b869 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Jan 29 18:02:34 2009 -0200 + + Janitor: make distcheck and .gitignore + + Distribute ChangeLog but not autogen.sh. + Use a single toplevel .gitignore file, instead of one per subdirectory. + +commit 38bac54519a67ab1a276b66dbaa84a3327ccf827 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 27 02:06:27 2008 -0400 + + Remove some strcasecmp silliness + +commit f431b4eb4dc743ccdf94b1b2ed858cc21f63c091 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:23:40 2009 -0500 + + Allow case insensitive filename matching in fontfile. + + Simplify the freetype renderer list to match. + +commit 903d39aeea73a973fb8b05ca1ac147c2cca146cb +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:21:29 2009 -0500 + + Delete some dead ifdefs + +commit daa7af2bb2326de363aa5ea51c29616e3634343a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:20:20 2009 -0500 + + Move the copy of CopyISOLatin1Lowered near its user, and un-weak it. + +commit 6c29007756301f513c0151e2b63af073f310af66 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:17:55 2009 -0500 + + Drop OS/2 support + +commit 0cdc9b8f850342d50b72a57507db3413eacc6fb8 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:16:35 2009 -0500 + + xalloc -> malloc, etc. + +commit 632a2e90a4b209facc84d7a18873f19a720ea7df +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 27 01:30:13 2008 -0400 + + Remove PMF support. + + .pmf files are printer font metrics; they have no glyphs, just boxes for + layout. They can't possibly be useful in a post-Xprint world. + +commit e1927f80deabe0268dc18b4a9f3ceda1325171f5 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 22:57:35 2009 -0500 + + Remove printer font support. + + Xprint is just insidious, isn't it. + +commit 732191d5d6ad58caab25e24df16fb89efaea2e9a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 22:42:22 2009 -0500 + + Remove loadable renderer support. + +commit 423d0a2c1dfad969f4a238618811937bc5f49776 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 27 01:55:47 2008 -0400 + + Remove useless #define + +commit 50bca6dd881c2d787b3afa4d98a2c2667f767614 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 22:33:06 2009 -0500 + + Get rid of a useless array + +commit 6ba0565362ba9c8d1037c0e4725cb31faa141656 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 22:29:10 2009 -0500 + + const cleanup + +commit 1247f01ee36f80222e30c1678f940329aadb8335 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 01:13:08 2009 -0500 + + Delete Type1 + + Yes, these are still real fonts, but freetype can handle them just fine. + +commit 85b66b8a7f3095f10437c8ecb3dcbfe68c9cfced +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 01:03:16 2009 -0500 + + Delete speedo + + OUT OUT OUT + +commit 1559d8086e8063c692aae008006578b88e1368fe +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 28 12:35:37 2008 -0800 + + Added missing AM_CFLAGS for -Wl,-flat_namespace + + Fixes commit f859a76b0f325b07952ad1c5c818318307c589b0 + +commit 99bad52b592f4f11887bf9033590b61880c3c976 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sat Mar 1 16:45:55 2008 -0300 + + Disable some fun stdio wrapping. + + The code is still there but no magic with macros is attempted anymore + to handle files. + This should really be changed to just use stdio, and properly adapt + functions like T1Decript, T1eexec, etc. + +commit 95760fbe45a700ea4cc118daa536604393721a59 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 19 16:24:39 2008 -0800 + + Restore comment deleted by b6f793d7d5 + +commit b6f793d7d5c7f7c55911e6524dede41b92dcbc22 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Mar 14 01:30:24 2008 -0300 + + libXfont ansification and removal of xf86_ansic.h dependency + + Basically the code is now compiled as if FONTMODULE was never defined, + but also removed some "magic" defining _XOPEN_SOURCE before including + math.h. + Also removed some #if 0'ed code instead of fixing prototypes inside + the "dead code". + Changes to spdo_prv.h were due to defines like: + <hash>define foo() sp_foo() + that would not compile with the ansification in the format: + type foo(void) + due to the macro receiving "void" as an argument. + commit 282ac4226195d58e3818e7ac97093e396aa78086 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 19 15:07:21 2008 -0800 diff --git a/libXfont/Makefile.am b/libXfont/Makefile.am index bb908c204..1da055b7e 100644 --- a/libXfont/Makefile.am +++ b/libXfont/Makefile.am @@ -31,7 +31,6 @@ libXfontinclude_HEADERS = \ include/X11/fonts/fntfilst.h \ include/X11/fonts/fontencc.h \ include/X11/fonts/fontmisc.h \ - include/X11/fonts/fontmod.h \ include/X11/fonts/fontshow.h \ include/X11/fonts/fontutil.h \ include/X11/fonts/fontxlfd.h \ @@ -44,7 +43,7 @@ nodist_libXfontinclude_HEADERS = \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xfont.pc -EXTRA_DIST = xfont.pc.in autogen.sh include/X11/fonts/fontconf.h.in +EXTRA_DIST = xfont.pc.in ChangeLog include/X11/fonts/fontconf.h.in .PHONY: ChangeLog diff --git a/libXfont/Makefile.in b/libXfont/Makefile.in index 73aab90e9..71d648fd8 100644 --- a/libXfont/Makefile.in +++ b/libXfont/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -123,22 +123,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -148,17 +144,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -168,6 +171,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -181,8 +185,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -215,6 +218,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -227,6 +231,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src @@ -240,7 +245,6 @@ libXfontinclude_HEADERS = \ include/X11/fonts/fntfilst.h \ include/X11/fonts/fontencc.h \ include/X11/fonts/fontmisc.h \ - include/X11/fonts/fontmod.h \ include/X11/fonts/fontshow.h \ include/X11/fonts/fontutil.h \ include/X11/fonts/fontxlfd.h \ @@ -253,7 +257,7 @@ nodist_libXfontinclude_HEADERS = \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xfont.pc -EXTRA_DIST = xfont.pc.in autogen.sh include/X11/fonts/fontconf.h.in +EXTRA_DIST = xfont.pc.in ChangeLog include/X11/fonts/fontconf.h.in all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -328,7 +332,7 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool + -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @@ -456,8 +460,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -482,8 +486,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -493,13 +497,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 @@ -572,6 +575,10 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -599,6 +606,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -756,14 +765,15 @@ uninstall-am: uninstall-libXfontincludeHEADERS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook 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-libXfontincludeHEADERS \ - install-man install-nodist_libXfontincludeHEADERS install-pdf \ + dist-gzip dist-hook 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-libXfontincludeHEADERS install-man \ + install-nodist_libXfontincludeHEADERS install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ diff --git a/libXfont/aclocal.m4 b/libXfont/aclocal.m4 index cbcc5325b..a95cd4557 100644 --- a/libXfont/aclocal.m4 +++ b/libXfont/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 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, # with or without modifications, as long as this notice is preserved. @@ -11,1766 +11,858 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +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 Free Software Foundation, Inc. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -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], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -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. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# 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 # -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. +# This file is part of GNU Libtool. # -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir +# 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. # -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. +# 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. # -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. +# 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. # -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# 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. ]) -# AM_CONDITIONAL -*- Autoconf -*- +# serial 56 LT_INIT -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 8 +# 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])]) -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# _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 +]) -# serial 9 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... +# 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" -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +_LT_SETUP -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[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 +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT - am_cv_$1_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 +# 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], []) - 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_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +# _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-%%"` ]) -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' +# _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 -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi -# Generate code to set up dependency tracking. -*- Autoconf -*- +_LT_CHECK_OBJDIR -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; 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. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue +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 - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. + ;; +esac -# serial 12 +# 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' -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# 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 -AC_SUBST([CYGPATH_W]) +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +# Global variables: +ofile=libtool +can_build_shared=yes -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) +# 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" -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. +old_CC="$CC" +old_CFLAGS="$CFLAGS" -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# 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 -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +_LT_CC_BASENAME([$compiler]) -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +# 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 -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# 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 -# serial 2 -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) +# _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 -# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 3 +# 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. -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[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. -AC_MSG_CHECKING([for style of include used by $am_make]) -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 -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +# _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 +])])]) -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) -# serial 5 -# AM_MISSING_PROG(NAME, PROGRAM) +# _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi +# 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]) ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac +# _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], [[!?.]$], [], [.]) +)]) + + + + + +# _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])])]) ]) -# Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) -# serial 3 -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +# _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 +]) -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) +# 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)])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# 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. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# 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 +]) -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) -# Check how to create a tarball. -*- Autoconf -*- +# _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"`']) -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar +# _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: # -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac +# <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)])])]) - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. -dnl -dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the -dnl "Software"), to deal in the Software without restriction, including -dnl without limitation the rights to use, copy, modify, merge, publish, -dnl distribute, and/or sell copies of the Software, and to permit persons -dnl to whom the Software is furnished to do so, provided that the above -dnl copyright notice(s) and this permission notice appear in all copies of -dnl the Software and that both the above copyright notice(s) and this -dnl permission notice appear in supporting documentation. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -dnl -dnl Except as contained in this notice, the name of a copyright holder -dnl shall not be used in advertising or otherwise to promote the sale, use -dnl or other dealings in this Software without prior written authorization -dnl of the copyright holder. +# _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 +]) -# XORG_MACROS_VERSION(required-version) -# ------------------------------------- -# Minimum version: 1.1.0 -# -# If you're using a macro added in Version 1.1 or newer, include this in -# your configure.ac with the minimum required version, such as: -# XORG_MACROS_VERSION(1.1) -# -# To force at least a version with this macro defined, also add: -# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) -# -# -# See the "minimum version" comment for each macro you use to see what -# version you require. -AC_DEFUN([XORG_MACROS_VERSION],[ - [XORG_MACROS_needed_version=$1 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) - [XORG_MACROS_version=1.2.1 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) - fi - AC_MSG_RESULT([yes, $XORG_MACROS_version]) -]) # XORG_MACROS_VERSION -# XORG_PROG_RAWCPP() -# ------------------ -# Minimum version: 1.0.0 +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: # -# Find cpp program and necessary flags for use in pre-processing text files -# such as man pages and config files -AC_DEFUN([XORG_PROG_RAWCPP],[ -AC_REQUIRE([AC_PROG_CPP]) -AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], - [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) - -# Check for flag to avoid builtin definitions - assumes unix is predefined, -# which is not the best choice for supporting other OS'es, but covers most -# of the ones we need for now. -AC_MSG_CHECKING([if $RAWCPP requires -undef]) -AC_LANG_CONFTEST([Does cpp redefine unix ?]) -if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - AC_MSG_RESULT([no]) -else - if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - RAWCPPFLAGS=-undef - AC_MSG_RESULT([yes]) - # under Cygwin unix is still defined even with -undef - elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then - RAWCPPFLAGS="-undef -ansi" - AC_MSG_RESULT([yes, with -ansi]) - else - AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) - fi -fi -rm -f conftest.$ac_ext +# # 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 +]) -AC_MSG_CHECKING([if $RAWCPP requires -traditional]) -AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) -if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then - AC_MSG_RESULT([no]) -else - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then - RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) - fi -fi -rm -f conftest.$ac_ext -AC_SUBST(RAWCPPFLAGS) -]) # XORG_PROG_RAWCPP -# XORG_MANPAGE_SECTIONS() +# _LT_LIBTOOL_CONFIG_VARS # ----------------------- -# Minimum version: 1.0.0 -# -# Determine which sections man pages go in for the different man page types -# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. -# Not sure if there's any better way than just hardcoding by OS name. -# Override default settings by setting environment variables - -AC_DEFUN([XORG_MANPAGE_SECTIONS],[ -AC_REQUIRE([AC_CANONICAL_HOST]) - -if test x$APP_MAN_SUFFIX = x ; then - APP_MAN_SUFFIX=1 -fi -if test x$APP_MAN_DIR = x ; then - APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' -fi +# 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)])])]) -if test x$LIB_MAN_SUFFIX = x ; then - LIB_MAN_SUFFIX=3 -fi -if test x$LIB_MAN_DIR = x ; then - LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' -fi -if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; - esac -fi -if test x$FILE_MAN_DIR = x ; then - FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' -fi - -if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; - esac -fi -if test x$MISC_MAN_DIR = x ; then - MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' -fi - -if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; - esac -fi -if test x$DRIVER_MAN_DIR = x ; then - DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' -fi +# _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])])])]) -if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; - esac -fi -if test x$ADMIN_MAN_DIR = x ; then - ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' -fi +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) -AC_SUBST([APP_MAN_SUFFIX]) -AC_SUBST([LIB_MAN_SUFFIX]) -AC_SUBST([FILE_MAN_SUFFIX]) -AC_SUBST([MISC_MAN_SUFFIX]) -AC_SUBST([DRIVER_MAN_SUFFIX]) -AC_SUBST([ADMIN_MAN_SUFFIX]) -AC_SUBST([APP_MAN_DIR]) -AC_SUBST([LIB_MAN_DIR]) -AC_SUBST([FILE_MAN_DIR]) -AC_SUBST([MISC_MAN_DIR]) -AC_SUBST([DRIVER_MAN_DIR]) -AC_SUBST([ADMIN_MAN_DIR]) -]) # XORG_MANPAGE_SECTIONS -# XORG_CHECK_LINUXDOC +# _LT_CONFIG_COMMANDS # ------------------- -# Minimum version: 1.0.0 -# -# Defines the variable MAKE_TEXT if the necessary tools and -# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. -# Whether or not the necessary tools and files are found can be checked -# with the AM_CONDITIONAL "BUILD_LINUXDOC" -AC_DEFUN([XORG_CHECK_LINUXDOC],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= - -if test x"$cross_compiling" = x"yes" ; then - HAVE_DEFS_ENT=no -else - AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) -fi - -AC_PATH_PROG(LINUXDOC, linuxdoc) -AC_PATH_PROG(PS2PDF, ps2pdf) - -AC_MSG_CHECKING([Whether to build documentation]) - -if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then - BUILDDOC=yes -else - BUILDDOC=no -fi - -AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) - -AC_MSG_RESULT([$BUILDDOC]) - -AC_MSG_CHECKING([Whether to build pdf documentation]) - -if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then - BUILDPDFDOC=yes -else - BUILDPDFDOC=no -fi - -AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) - -AC_MSG_RESULT([$BUILDPDFDOC]) - -MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" -MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" -MAKE_PDF="$PS2PDF" -MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" - -AC_SUBST(MAKE_TEXT) -AC_SUBST(MAKE_PS) -AC_SUBST(MAKE_PDF) -AC_SUBST(MAKE_HTML) -]) # XORG_CHECK_LINUXDOC +# 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], +[ -# XORG_CHECK_DOCBOOK -# ------------------- -# Minimum version: 1.0.0 -# -# Checks for the ability to build output formats from SGML DocBook source. -# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" -# indicates whether the necessary tools and files are found and, if set, -# $(MAKE_XXX) blah.sgml will produce blah.xxx. -AC_DEFUN([XORG_CHECK_DOCBOOK],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= -BUILDTXTDOC=no -BUILDPDFDOC=no -BUILDPSDOC=no -BUILDHTMLDOC=no +# 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 -AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) +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 -AC_PATH_PROG(DOCBOOKPS, docbook2ps) -AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) -AC_PATH_PROG(DOCBOOKHTML, docbook2html) -AC_PATH_PROG(DOCBOOKTXT, docbook2txt) +# 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 -AC_MSG_CHECKING([Whether to build text documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && - test x$BUILD_TXTDOC != xno; then - BUILDTXTDOC=yes -fi -AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) -AC_MSG_RESULT([$BUILDTXTDOC]) +# 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 -AC_MSG_CHECKING([Whether to build PDF documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && - test x$BUILD_PDFDOC != xno; then - BUILDPDFDOC=yes -fi -AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) -AC_MSG_RESULT([$BUILDPDFDOC]) +_LT_OUTPUT_LIBTOOL_INIT +]) -AC_MSG_CHECKING([Whether to build PostScript documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && - test x$BUILD_PSDOC != xno; then - BUILDPSDOC=yes -fi -AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) -AC_MSG_RESULT([$BUILDPSDOC]) -AC_MSG_CHECKING([Whether to build HTML documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && - test x$BUILD_HTMLDOC != xno; then - BUILDHTMLDOC=yes -fi -AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) -AC_MSG_RESULT([$BUILDHTMLDOC]) +# 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 -MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" -MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" -MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" -MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" +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. -AC_SUBST(MAKE_TEXT) -AC_SUBST(MAKE_PS) -AC_SUBST(MAKE_PDF) -AC_SUBST(MAKE_HTML) -]) # XORG_CHECK_DOCBOOK +Usage: $[0] [[OPTIONS]] -# XORG_CHECK_MALLOC_ZERO -# ---------------------- -# Minimum version: 1.0.0 -# -# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if -# malloc(0) returns NULL. Packages should add one of these cflags to -# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. -AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ -AC_ARG_ENABLE(malloc0returnsnull, - AC_HELP_STRING([--enable-malloc0returnsnull], - [malloc(0) returns NULL (default: auto)]), - [MALLOC_ZERO_RETURNS_NULL=$enableval], - [MALLOC_ZERO_RETURNS_NULL=auto]) + -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 -AC_MSG_CHECKING([whether malloc(0) returns NULL]) -if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then - AC_RUN_IFELSE([ -char *malloc(); -char *realloc(); -char *calloc(); -main() { - char *m0, *r0, *c0, *p; - m0 = malloc(0); - p = malloc(10); - r0 = realloc(p,0); - c0 = calloc(0); - exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); -}], - [MALLOC_ZERO_RETURNS_NULL=yes], - [MALLOC_ZERO_RETURNS_NULL=no]) -fi -AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) +Report bugs to <bug-libtool@gnu.org>." -if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then - MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" - XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS - XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" -else - MALLOC_ZERO_CFLAGS="" - XMALLOC_ZERO_CFLAGS="" - XTMALLOC_ZERO_CFLAGS="" -fi +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. -AC_SUBST([MALLOC_ZERO_CFLAGS]) -AC_SUBST([XMALLOC_ZERO_CFLAGS]) -AC_SUBST([XTMALLOC_ZERO_CFLAGS]) -]) # XORG_CHECK_MALLOC_ZERO +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." -# XORG_WITH_LINT() -# ---------------- -# Minimum version: 1.1.0 -# -# Sets up flags for source checkers such as lint and sparse if --with-lint -# is specified. (Use --with-lint=sparse for sparse.) -# Sets $LINT to name of source checker passed with --with-lint (default: lint) -# Sets $LINT_FLAGS to flags to pass to source checker -# Sets LINT automake conditional if enabled (default: disabled) -# -AC_DEFUN([XORG_WITH_LINT],[ +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 -# Allow checking code with lint, sparse, etc. -AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], - [Use a lint-style source code checker (default: disabled)])], - [use_lint=$withval], [use_lint=no]) -if test "x$use_lint" = "xyes" ; then - LINT="lint" -else - LINT="$use_lint" +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null fi -if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then - case $LINT in - lint|*/lint) - case $host_os in - solaris*) - LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" - ;; - esac - ;; - esac +_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 -AC_SUBST(LINT) -AC_SUBST(LINT_FLAGS) -AM_CONDITIONAL(LINT, [test x$LINT != xno]) - -]) # XORG_WITH_LINT - -# XORG_LINT_LIBRARY(LIBNAME) -# -------------------------- -# Minimum version: 1.1.0 -# -# Sets up flags for building lint libraries for checking programs that call -# functions in the library. -# Disabled by default, enable with --enable-lint-library -# Sets: -# @LINTLIB@ - name of lint library file to make -# MAKE_LINT_LIB - automake conditional -# -AC_DEFUN([XORG_LINT_LIBRARY],[ -AC_REQUIRE([XORG_WITH_LINT]) -# Build lint "library" for more indepth checks of programs calling this library -AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], - [Create lint library (default: disabled)])], - [make_lint_lib=$enableval], [make_lint_lib=no]) -if test "x$make_lint_lib" != "xno" ; then - if test "x$LINT" = "xno" ; then - AC_MSG_ERROR([Cannot make lint library without --with-lint]) - fi - if test "x$make_lint_lib" = "xyes" ; then - LINTLIB=llib-l$1.ln - else - LINTLIB=$make_lint_lib - fi -fi -AC_SUBST(LINTLIB) -AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) - -]) # XORG_LINT_LIBRARY - -# XORG_CWARNFLAGS +# _LT_CONFIG(TAG) # --------------- -# Minimum version: 1.2.0 -# -# Defines CWARNFLAGS to enable C compiler warnings. -# -AC_DEFUN([XORG_CWARNFLAGS], [ -AC_REQUIRE([AC_PROG_CC]) -if test "x$GCC" = xyes ; then - CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ --Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast" - case `gcc -dumpversion` in - 3.4.* | 4.*) - CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" - ;; - esac -else - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) - if test "x$SUNCC" = "xyes"; then - CWARNFLAGS="-v" +# 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 -fi -AC_SUBST(CWARNFLAGS) -]) # XORG_CWARNFLAGS -dnl Copyright 2005 Red Hat, Inc -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation. -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -dnl OTHER DEALINGS IN THE SOFTWARE. -dnl -dnl Except as contained in this notice, the name of the copyright holders shall -dnl not be used in advertising or otherwise to promote the sale, use or -dnl other dealings in this Software without prior written authorization -dnl from the copyright holders. -dnl -# XORG_RELEASE_VERSION -# -------------------- -# Adds --with/without-release-string and changes the PACKAGE and -# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If -# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also -# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. - -AC_DEFUN([XORG_RELEASE_VERSION],[ - AC_ARG_WITH(release-version, - AC_HELP_STRING([--with-release-version=STRING], - [Use release version string in package name]), - [RELEASE_VERSION="$withval"], - [RELEASE_VERSION=""]) - if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - AC_MSG_NOTICE([Building with package name set to $PACKAGE]) - fi - AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], - [`echo $PACKAGE_VERSION | cut -d . -f 1`], - [Major version of this package]) - PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` - if test "x$PVM" = "x"; then - PVM="0" - fi - AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], - [$PVM], - [Minor version of this package]) - PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` - if test "x$PVP" = "x"; then - PVP="0" - fi - AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], - [$PVP], - [Patch version of this package]) -]) + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" -# XORG_CHANGELOG() -# ---------------- -# Minimum version: 1.2.0 -# -# Defines the variable CHANGELOG_CMD as the command to generate -# ChangeLog from git. -# -# Arrange that distcleancheck ignores ChangeLog left over by distclean. -# -AC_DEFUN([XORG_CHANGELOG], [ -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ -mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" -AC_SUBST([CHANGELOG_CMD]) -AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) -]) # XORG_CHANGELOG + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL -dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ -dnl -dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation. -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -dnl OTHER DEALINGS IN THE SOFTWARE. -dnl -dnl Except as contained in this notice, the name of the copyright holders shall -dnl not be used in advertising or otherwise to promote the sale, use or -dnl other dealings in this Software without prior written authorization -dnl from the copyright holders. -dnl - -# XTRANS_TCP_FLAGS() -# ------------------ -# Find needed libraries for TCP sockets, and check for IPv6 support -AC_DEFUN([XTRANS_TCP_FLAGS],[ - # SVR4 hides these in libraries other than libc - AC_SEARCH_LIBS(socket, [socket]) - AC_SEARCH_LIBS(gethostbyname, [nsl]) - AC_HAVE_LIBRARY([ws2_32]) - - # Needs to come after above checks for libsocket & libnsl for SVR4 systems - AC_ARG_ENABLE(ipv6, - AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), - [IPV6CONN=$enableval], - [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) - AC_MSG_CHECKING([if IPv6 support should be built]) - if test "$IPV6CONN" = "yes"; then - AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) - fi - AC_MSG_RESULT($IPV6CONN) +# `$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 - # 4.3BSD-Reno added a new member to struct sockaddr_in - AC_CHECK_MEMBER([struct sockaddr_in.sin_len], - AC_DEFINE([BSD44SOCKETS],1, - [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> - ]) +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG - # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. - AC_CHECK_TYPES([socklen_t], [], [], [ -AC_INCLUDES_DEFAULT -#include <sys/socket.h>]) - -]) # XTRANS_TCP_FLAGS - -# XTRANS_CONNECTION_FLAGS() -# ------------------------- -# Standard checks for which Xtrans transports to use by the Xorg packages -# that use Xtrans functions -AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_TYPE_SIGNAL]) - [case $host_os in - mingw*) unixdef="no" ;; - *) unixdef="yes" ;; - esac] - AC_ARG_ENABLE(unix-transport, - AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), - [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) - AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) - if test "$UNIXCONN" = "yes"; then - AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) - fi - AC_MSG_RESULT($UNIXCONN) - AC_ARG_ENABLE(tcp-transport, - AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), - [TCPCONN=$enableval], [TCPCONN=yes]) - AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) - AC_MSG_RESULT($TCPCONN) - if test "$TCPCONN" = "yes"; then - AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) - XTRANS_TCP_FLAGS - fi - [case $host_os in - solaris*|sco*|sysv4*) localdef="yes" ;; - *) localdef="no" ;; - esac] - AC_ARG_ENABLE(local-transport, - AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), - [LOCALCONN=$enableval], [LOCALCONN=$localdef]) - AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) - AC_MSG_RESULT($LOCALCONN) - if test "$LOCALCONN" = "yes"; then - AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) - fi - -]) # XTRANS_CONNECTION_FLAGS +_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 -# XTRANS_SECURE_RPC_FLAGS() -# ------------------------- -# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS -# so that any necessary networking libraries are already found -AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], -[AC_REQUIRE([XTRANS_TCP_FLAGS]) - AC_ARG_ENABLE(secure-rpc, - AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), - [SECURE_RPC=$enableval], [SECURE_RPC="try"]) + _LT_PROG_LTMAIN - if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then - FOUND_SECURE_RPC="no" - AC_CHECK_FUNCS([authdes_seccreate authdes_create], - [FOUND_SECURE_RPC="yes"]) - if test "x$FOUND_SECURE_RPC" = "xno" ; then - if test "x$SECURE_RPC" = "xyes" ; then - AC_MSG_ERROR([Secure RPC requested, but required functions not found]) - fi - SECURE_RPC="no" - else - dnl FreeBSD keeps getsecretkey in librpcsvc - AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) - SECURE_RPC="yes" - fi - fi - AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) - if test "x$SECURE_RPC" = "xyes" ; then - AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) - fi - AC_MSG_RESULT($SECURE_RPC) -]) # XTRANS_SECURE_RPC_FLAGS + # 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 -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) -# serial 48 AC_PROG_LIBTOOL + 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 -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +# 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], []) -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL +# 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 -# AC_LIBTOOL_SETUP +# _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 # ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_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. -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'] - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -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_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_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=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_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"} @@ -1779,35 +871,20 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_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_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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* +$RM conftest* ])# _LT_COMPILER_BOILERPLATE @@ -1815,70 +892,203 @@ $rm conftest* # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$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_AC_SYS_LIBPATH_AIX -# ---------------------- + +# _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. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +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_AC_SYS_LIBPATH_AIX +])# _LT_SYS_MODULE_PATH_AIX -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], +# _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_AC_SHELL_INIT +])# _LT_SHELL_INIT -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- +# _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. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ +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$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac -echo=${ECHO-echo} +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! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -1888,9 +1098,9 @@ fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift - cat <<EOF + cat <<_LT_EOF [$]* -EOF +_LT_EOF exit 0 fi @@ -1898,124 +1108,127 @@ fi # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -if test -z "$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 && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi +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. + 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 + 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 -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" + 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 - # maybe with a smaller string... - prev=: + # 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 + 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 + 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 -fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +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(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH +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_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) + [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 @@ -2026,12 +1239,12 @@ ia64-*-hpux*) 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" - ;; + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; esac fi rm -rf conftest* @@ -2040,72 +1253,79 @@ ia64-*-hpux*) # 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 + 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +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-*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-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; + *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* @@ -2117,7 +1337,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + 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 @@ -2132,38 +1352,75 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + 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* ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) 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]) -])# _LT_AC_LOCK +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 -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -2182,40 +1439,47 @@ AC_CACHE_CHECK([$1], [$2], 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 + $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* + $RM conftest* ]) if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) else - ifelse([$6], , :, [$6]) + m4_if([$6], , :, [$6]) fi -])# AC_LIBTOOL_COMPILER_OPTION +])# _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], []) -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], + +# _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" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 + $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 @@ -2224,22 +1488,28 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], $2=yes fi fi - $rm conftest* + $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) + m4_if([$4], , :, [$4]) else - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) fi -])# AC_LIBTOOL_LINKER_OPTION +])# _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], []) -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments + +# 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 @@ -2261,7 +1531,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + 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, @@ -2316,30 +1586,41 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 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/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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` + 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 ]) @@ -2348,27 +1629,35 @@ if test -n $lt_cv_sys_max_cmd_len ; then else AC_MSG_RESULT(none) fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN +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_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +# _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 <<EOF + cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" @@ -2410,10 +1699,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -2429,9 +1714,9 @@ int main () else puts (dlerror ()); - exit (status); + return status; }] -EOF +_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=$? @@ -2446,13 +1731,13 @@ EOF fi fi rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF +])# _LT_TRY_DLOPEN_SELF -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +# 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 @@ -2468,15 +1753,15 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + 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 @@ -2486,13 +1771,13 @@ else 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="-dld"], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], @@ -2500,7 +1785,7 @@ else [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="-dld"]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -2528,7 +1813,7 @@ else AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( + _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) @@ -2536,8 +1821,8 @@ else 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_AC_TRY_DLOPEN_SELF( + 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) ]) @@ -2559,22 +1844,36 @@ else *) enable_dlopen_self_static=unknown ;; esac fi -])# AC_LIBTOOL_DLOPEN_SELF +_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], []) -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +# _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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null + [_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 - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -2594,37 +1893,41 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$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 + $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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* + $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 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out cd .. - rmdir conftest - $rm conftest* + $RM -r conftest + $RM conftest* ]) -])# AC_LIBTOOL_PROG_CC_C_O +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- # Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl +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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +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* + $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 @@ -2637,12 +1940,13 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" else need_locks=no fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], +# _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 @@ -2654,40 +1958,46 @@ else fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir -])# AC_LIBTOOL_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 -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- # Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then +_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-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # 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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + ## 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_AC_TAGVAR(hardcode_action, $1)=relink + _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate + _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported + _LT_TAGVAR(hardcode_action, $1)=unsupported fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then +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 || @@ -2695,43 +2005,107 @@ elif test "$shlibpath_overrides_runpath" = yes || # Fast installation is not necessary enable_fast_install=needless fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= +# _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 +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" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) + 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 -])# AC_LIBTOOL_SYS_LIB_STRIP +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB -# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker 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= @@ -2745,20 +2119,6 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi need_lib_prefix=unknown hardcode_into_libs=no @@ -2776,7 +2136,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -2795,7 +2155,7 @@ aix4* | aix5*) 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -2821,9 +2181,18 @@ aix4* | aix5*) ;; amigaos*) - 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' + 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*) @@ -2846,25 +2215,28 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +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,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'\''`~ + 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' + 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' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -2873,20 +2245,20 @@ cygwin* | mingw* | pw32*) 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*) + 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 + 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'` + 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"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -2910,17 +2282,13 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + 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`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi +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' ;; @@ -2937,18 +2305,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2986,7 +2342,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -3025,18 +2381,18 @@ hpux9* | hpux10* | hpux11*) 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 - ;; - *) + 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 @@ -3049,7 +2405,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -3104,7 +2460,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -3113,6 +2469,17 @@ linux*) 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. @@ -3120,7 +2487,7 @@ linux*) # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -3133,23 +2500,11 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + 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' @@ -3170,14 +2525,16 @@ newsos6) shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*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=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -3186,13 +2543,13 @@ openbsd*) 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 ;; + 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 + 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 @@ -3226,6 +2583,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -3260,7 +2621,6 @@ sysv4 | sysv4.3*) sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -3291,13 +2651,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -3307,6 +2666,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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}' @@ -3325,276 +2695,54 @@ 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 -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - 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_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - -# AC_LIBTOOL_PICMODE([MODE]) +_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) # -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl +# 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 @@ -3607,7 +2755,7 @@ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 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="ifelse([$2], , $PATH, [$2])" + ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. @@ -3622,7 +2770,7 @@ dnl not every word. This closes a longstanding sh security hole. $EGREP "$file_magic_regex" > /dev/null; then : else - cat <<EOF 1>&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -3633,7 +2781,7 @@ dnl not every word. This closes a longstanding sh security hole. *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -3650,37 +2798,47 @@ if test -n "$MAGIC_CMD"; then else AC_MSG_RESULT(no) fi -])# AC_PATH_TOOL_PREFIX +_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], []) -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) + +# _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 - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi -])# AC_PATH_MAGIC +])# _LT_PATH_MAGIC -# AC_PROG_LD +# LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_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]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl +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. @@ -3697,9 +2855,9 @@ if test "$GCC" = yes; then [[\\/]]* | ?:[[\\/]]*) 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%/%"` + 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" ;; @@ -3749,15 +2907,24 @@ else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -])# AC_PROG_LD +_LT_PATH_LD_GNU +AC_SUBST([LD]) +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD -# AC_PROG_LD_GNU -# -------------- -AC_DEFUN([AC_PROG_LD_GNU], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_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'*) @@ -3768,14 +2935,14 @@ case `$LD -v 2>&1 </dev/null` in ;; esac]) with_gnu_ld=$lt_cv_prog_gnu_ld -])# AC_PROG_LD_GNU +])# _LT_PATH_LD_GNU -# AC_PROG_LD_RELOAD_FLAG -# ---------------------- +# _LT_CMD_RELOAD +# -------------- # find reload flag for linker # -- PORTME Some linkers may need a different reload flag. -AC_DEFUN([AC_PROG_LD_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']) @@ -3794,15 +2961,19 @@ case $host_os in fi ;; esac -])# AC_PROG_LD_RELOAD_FLAG +_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_DECL([], [reload_cmds], [2])dnl +])# _LT_CMD_RELOAD -# AC_DEPLIBS_CHECK_METHOD -# ----------------------- +# _LT_CHECK_MAGIC_METHOD +# ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics -AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +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= @@ -3819,7 +2990,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; @@ -3841,8 +3012,20 @@ cygwin*) 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'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # 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' ;; @@ -3850,8 +3033,8 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then +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. @@ -3888,7 +3071,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +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)$' ;; @@ -3904,12 +3087,12 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + 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)$' @@ -3922,12 +3105,12 @@ newos6*) lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown +*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 + 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)$' @@ -3938,10 +3121,18 @@ 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) @@ -3969,7 +3160,7 @@ sysv4 | sysv4.3*) esac ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +tpf*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -3977,20 +3168,26 @@ 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 -])# AC_DEPLIBS_CHECK_METHOD + +_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 -# AC_PROG_NM +# LT_PATH_NM # ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_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 + 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 @@ -4026,16 +3223,51 @@ else done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${lt_cv_path_NM=no} fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM +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], []) -# AC_CHECK_LIBM -# ------------- + +# LT_LIB_M +# -------- # check for math library -AC_DEFUN([AC_CHECK_LIBM], +AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in @@ -4050,2104 +3282,46 @@ case $host in AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([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 -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[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_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# 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 - ;; - -aix4* | aix5*) - 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]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp +AC_SUBST([LIBM]) +])# LT_LIB_M -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - 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]].*|aix5*) - 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_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_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 - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_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' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux*) - 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_AC_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_AC_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 $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) - # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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. - # 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. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([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. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -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... -ifelse([$1],[],[cat > conftest.$ac_ext <<EOF -int a; -void foo (void) { a = 0; } -EOF -],[$1],[CXX],[cat > conftest.$ac_ext <<EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -EOF -],[$1],[F77],[cat > conftest.$ac_ext <<EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -EOF -],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -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 - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - 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_AC_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_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_AC_TAGVAR(postdeps, $1)"; then - _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_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_AC_TAGVAR(predep_objects, $1)"; then - _LT_AC_TAGVAR(predep_objects, $1)="$p" - else - _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then - _LT_AC_TAGVAR(postdep_objects, $1)="$p" - else - _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_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 -ifelse([$1],[CXX], -[case $host_os in -interix3*) - # 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_AC_TAGVAR(predep_objects,$1)= - _LT_AC_TAGVAR(postdep_objects,$1)= - _LT_AC_TAGVAR(postdeps,$1)= - ;; - -solaris*) - case $cc_basename in - CC*) - # 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. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' - ;; - esac - ;; -esac -]) - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_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_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -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 - ;; -aix4* | aix5*) - 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_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' - -# 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_AC_SYS_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" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then 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 -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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. - -# 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//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\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 -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -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 -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) +# _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], @@ -6161,33 +3335,18 @@ symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; -hpux*) # Its linker distinguishes data from code symbols +hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' @@ -6212,44 +3371,72 @@ sysv4) ;; 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 + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; 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 - -# Try without a prefix undercore, then with it. +# 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. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + 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 <<EOF + cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; -void nm_test_func(){} +void nm_test_func(void); +void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} -EOF +_LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. @@ -6263,48 +3450,50 @@ EOF 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 <<EOF > conftest.$ac_ext + 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 -EOF +_LT_EOF # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - cat <<EOF >> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif + cat <<_LT_EOF >> conftest.$ac_ext -/* The mapping between symbol names and symbols. */ +/* The mapping between symbol names and symbols. */ const struct { const char *name; - lt_ptr_t address; + void *address; } -lt_preloaded_symbols[[]] = +lt__PROGRAM__LTX_preloaded_symbols[[]] = { -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} + { "@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 -EOF +_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_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + 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 @@ -6323,7 +3512,7 @@ EOF echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -6341,141 +3530,162 @@ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; the else AC_MSG_RESULT(ok) fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +_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 -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +# _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]) - ifelse([$1],[CXX],[ +m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; + amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + 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). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # 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*|ia64*) + hppa*64*) ;; *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in - aix4* | aix5*) + aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler - # _LT_AC_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" + # _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 ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; dgux*) case $cc_basename in ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; @@ -6490,41 +3700,62 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) irix5* | irix6* | nonstopux*) case $cc_basename in CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + _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*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + 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*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + 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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + _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 ;; @@ -6535,7 +3766,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) mvs*) case $cc_basename in cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; @@ -6543,22 +3774,27 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; 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_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; @@ -6570,13 +3806,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; @@ -6586,82 +3822,107 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) case $cc_basename in CC*) # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; vxworks*) ;; *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + 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. ;; @@ -6669,64 +3930,48 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; - hpux*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) + 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _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 @@ -6734,210 +3979,274 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # +Z the default ;; *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + # 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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + _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_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), +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_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) + [_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 -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- # See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +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 - aix4* | aix5*) + 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_AC_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' + 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_AC_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' + _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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; - cygwin* | mingw*) - _LT_AC_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' + 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_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''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_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _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_AC_TAGVAR(include_expsyms, $1)= + _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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + _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= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) + case $host_os in - cygwin* | mingw* | pw32*) + 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++. @@ -6954,7 +4263,7 @@ ifelse([$1],[CXX],[ ;; esac - _LT_AC_TAGVAR(ld_shlibs, $1)=yes + _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}' @@ -6963,16 +4272,16 @@ ifelse([$1],[CXX],[ # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + 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>/dev/null` in + 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 ... @@ -6982,11 +4291,11 @@ ifelse([$1],[CXX],[ # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<EOF 1>&2 + _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. @@ -6994,49 +4303,50 @@ ifelse([$1],[CXX],[ *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. -EOF +_LT_EOF fi ;; amigaos*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no + 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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + 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_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else - _LT_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _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_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + _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; @@ -7044,70 +4354,109 @@ EOF 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_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + 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_AC_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_AC_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' + _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' ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + 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_AC_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' + 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_AC_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' + _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 + 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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + 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 $supports_anon_versioning = yes; then - _LT_AC_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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi + 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_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _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_AC_TAGVAR(ld_shlibs, $1)=no - cat <<EOF 1>&2 + 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 @@ -7116,19 +4465,19 @@ EOF *** your PATH or compiler configuration so that the native linker is *** used, and then restart. -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' +_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_AC_TAGVAR(ld_shlibs, $1)=no + _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_AC_TAGVAR(ld_shlibs, $1)=no + *\ [[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 @@ -7141,58 +4490,62 @@ EOF _LT_EOF ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + # 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_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + 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_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_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' + _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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _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_AC_TAGVAR(hardcode_direct, $1)=unsupported + _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; - aix4* | aix5*) + 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. @@ -7202,22 +4555,22 @@ _LT_EOF 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_AC_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' + 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_AC_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' + _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]].*|aix5*) + 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 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi done ;; esac @@ -7232,30 +4585,32 @@ _LT_EOF # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _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 + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null then - # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + # We have reworked collect2 + : else - # We have old collect2 - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + # 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 @@ -7266,8 +4621,8 @@ _LT_EOF 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: + # 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 @@ -7278,130 +4633,94 @@ _LT_EOF 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_AC_TAGVAR(always_export_symbols, $1)=yes + _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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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" + _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_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # 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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + _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_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + _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_AC_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' + _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*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no + 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_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; - cygwin* | mingw* | pw32*) + 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + _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_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _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*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi + _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(ld_shlibs, $1)=no + _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor @@ -7409,60 +4728,60 @@ _LT_EOF # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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* | kfreebsd*-gnu | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + 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_AC_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' + _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_AC_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' + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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' else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - + _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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; @@ -7470,45 +4789,45 @@ _LT_EOF if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${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}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_AC_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}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _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_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi @@ -7516,191 +4835,221 @@ _LT_EOF irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _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_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + 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_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + 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 - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + _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_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _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_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _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_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _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_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + _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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + _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 - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_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' + 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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 linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + # 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_AC_TAGVAR(link_all_deplibs, $1)=yes + _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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + _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_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no + _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_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + _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_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + _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_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${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' else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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 -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 ;; @@ -7711,50 +5060,65 @@ _LT_EOF # 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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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' else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _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_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _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_AC_TAGVAR(ld_shlibs, $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_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +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_AC_TAGVAR(archive_cmds_need_lc, $1)" in +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in + case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; @@ -7763,119 +5127,1924 @@ x|xyes) # 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* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + $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_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + 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_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + 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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(archive_cmds_need_lc, $1)=no else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac -])# AC_LIBTOOL_PROG_LD_SHLIBS +_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) -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include <windows.h> -# #undef WIN32_LEAN_AND_MEAN -# #include <stdio.h> -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include <cygwin/cygwin_dll.h> -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_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 + +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_AC_TAGVAR(VARNAME, [TAGNAME]) + _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]) # --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) +# 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 -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + 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 + ;; -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) + *.$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 -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) + 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 ]) -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) +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 + +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. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], + +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. @@ -7893,6 +7062,7 @@ do 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 @@ -7925,9 +7095,876 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 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 ]) +# 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 + + + +# _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], []) + + +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])]) + +# 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 +]) + +# 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) +]) + +# 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])]) + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. @@ -7961,7 +7998,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) + _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) @@ -7996,15 +8033,29 @@ fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # @@ -8026,31 +8077,41 @@ AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + if test $pkg_failed = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met. +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details.])], - [$4]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +_PKG_TEXT -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -8060,3 +8121,1549 @@ else fi[]dnl ])# PKG_CHECK_MODULES +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. +dnl +dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the +dnl "Software"), to deal in the Software without restriction, including +dnl without limitation the rights to use, copy, modify, merge, publish, +dnl distribute, and/or sell copies of the Software, and to permit persons +dnl to whom the Software is furnished to do so, provided that the above +dnl copyright notice(s) and this permission notice appear in all copies of +dnl the Software and that both the above copyright notice(s) and this +dnl permission notice appear in supporting documentation. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Except as contained in this notice, the name of a copyright holder +dnl shall not be used in advertising or otherwise to promote the sale, use +dnl or other dealings in this Software without prior written authorization +dnl of the copyright holder. + +# XORG_MACROS_VERSION(required-version) +# ------------------------------------- +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_MACROS_VERSION(1.1) +# +# To force at least a version with this macro defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +AC_DEFUN([XORG_MACROS_VERSION],[ + [XORG_MACROS_needed_version=$1 + XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` + XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) + [XORG_MACROS_version=1.2.1 + XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` + XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then + AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) + fi + if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then + AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) + fi + AC_MSG_RESULT([yes, $XORG_MACROS_version]) +]) # XORG_MACROS_VERSION + +# XORG_PROG_RAWCPP() +# ------------------ +# Minimum version: 1.0.0 +# +# Find cpp program and necessary flags for use in pre-processing text files +# such as man pages and config files +AC_DEFUN([XORG_PROG_RAWCPP],[ +AC_REQUIRE([AC_PROG_CPP]) +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], + [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +AC_MSG_CHECKING([if $RAWCPP requires -undef]) +AC_LANG_CONFTEST([Does cpp redefine unix ?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) + else + AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext + +AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext +AC_SUBST(RAWCPPFLAGS) +]) # XORG_PROG_RAWCPP + +# XORG_MANPAGE_SECTIONS() +# ----------------------- +# Minimum version: 1.0.0 +# +# Determine which sections man pages go in for the different man page types +# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +# Not sure if there's any better way than just hardcoding by OS name. +# Override default settings by setting environment variables + +AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +AC_REQUIRE([AC_CANONICAL_HOST]) + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + +AC_SUBST([APP_MAN_SUFFIX]) +AC_SUBST([LIB_MAN_SUFFIX]) +AC_SUBST([FILE_MAN_SUFFIX]) +AC_SUBST([MISC_MAN_SUFFIX]) +AC_SUBST([DRIVER_MAN_SUFFIX]) +AC_SUBST([ADMIN_MAN_SUFFIX]) +AC_SUBST([APP_MAN_DIR]) +AC_SUBST([LIB_MAN_DIR]) +AC_SUBST([FILE_MAN_DIR]) +AC_SUBST([MISC_MAN_DIR]) +AC_SUBST([DRIVER_MAN_DIR]) +AC_SUBST([ADMIN_MAN_DIR]) +]) # XORG_MANPAGE_SECTIONS + +# XORG_CHECK_LINUXDOC +# ------------------- +# Minimum version: 1.0.0 +# +# Defines the variable MAKE_TEXT if the necessary tools and +# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +# Whether or not the necessary tools and files are found can be checked +# with the AM_CONDITIONAL "BUILD_LINUXDOC" +AC_DEFUN([XORG_CHECK_LINUXDOC],[ +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi +HAVE_DEFS_ENT= + +if test x"$cross_compiling" = x"yes" ; then + HAVE_DEFS_ENT=no +else + AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) +fi + +AC_PATH_PROG(LINUXDOC, linuxdoc) +AC_PATH_PROG(PS2PDF, ps2pdf) + +AC_MSG_CHECKING([Whether to build documentation]) + +if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + +AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) + +AC_MSG_RESULT([$BUILDDOC]) + +AC_MSG_CHECKING([Whether to build pdf documentation]) + +if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +AC_MSG_RESULT([$BUILDPDFDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_LINUXDOC + +# XORG_CHECK_DOCBOOK +# ------------------- +# Minimum version: 1.0.0 +# +# Checks for the ability to build output formats from SGML DocBook source. +# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +# indicates whether the necessary tools and files are found and, if set, +# $(MAKE_XXX) blah.sgml will produce blah.xxx. +AC_DEFUN([XORG_CHECK_DOCBOOK],[ +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi +HAVE_DEFS_ENT= +BUILDTXTDOC=no +BUILDPDFDOC=no +BUILDPSDOC=no +BUILDHTMLDOC=no + +AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + +AC_PATH_PROG(DOCBOOKPS, docbook2ps) +AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +AC_PATH_PROG(DOCBOOKHTML, docbook2html) +AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +AC_MSG_CHECKING([Whether to build text documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && + test x$BUILD_TXTDOC != xno; then + BUILDTXTDOC=yes +fi +AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +AC_MSG_RESULT([$BUILDTXTDOC]) + +AC_MSG_CHECKING([Whether to build PDF documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && + test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +fi +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +AC_MSG_RESULT([$BUILDPDFDOC]) + +AC_MSG_CHECKING([Whether to build PostScript documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && + test x$BUILD_PSDOC != xno; then + BUILDPSDOC=yes +fi +AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +AC_MSG_RESULT([$BUILDPSDOC]) + +AC_MSG_CHECKING([Whether to build HTML documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && + test x$BUILD_HTMLDOC != xno; then + BUILDHTMLDOC=yes +fi +AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +AC_MSG_RESULT([$BUILDHTMLDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_DOCBOOK + +# XORG_CHECK_MALLOC_ZERO +# ---------------------- +# Minimum version: 1.0.0 +# +# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +# malloc(0) returns NULL. Packages should add one of these cflags to +# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +AC_ARG_ENABLE(malloc0returnsnull, + AC_HELP_STRING([--enable-malloc0returnsnull], + [malloc(0) returns NULL (default: auto)]), + [MALLOC_ZERO_RETURNS_NULL=$enableval], + [MALLOC_ZERO_RETURNS_NULL=auto]) + +AC_MSG_CHECKING([whether malloc(0) returns NULL]) +if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then + AC_RUN_IFELSE([ +char *malloc(); +char *realloc(); +char *calloc(); +main() { + char *m0, *r0, *c0, *p; + m0 = malloc(0); + p = malloc(10); + r0 = realloc(p,0); + c0 = calloc(0); + exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); +}], + [MALLOC_ZERO_RETURNS_NULL=yes], + [MALLOC_ZERO_RETURNS_NULL=no]) +fi +AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then + MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" + XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS + XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +else + MALLOC_ZERO_CFLAGS="" + XMALLOC_ZERO_CFLAGS="" + XTMALLOC_ZERO_CFLAGS="" +fi + +AC_SUBST([MALLOC_ZERO_CFLAGS]) +AC_SUBST([XMALLOC_ZERO_CFLAGS]) +AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +]) # XORG_CHECK_MALLOC_ZERO + +# XORG_WITH_LINT() +# ---------------- +# Minimum version: 1.1.0 +# +# Sets up flags for source checkers such as lint and sparse if --with-lint +# is specified. (Use --with-lint=sparse for sparse.) +# Sets $LINT to name of source checker passed with --with-lint (default: lint) +# Sets $LINT_FLAGS to flags to pass to source checker +# Sets LINT automake conditional if enabled (default: disabled) +# +AC_DEFUN([XORG_WITH_LINT],[ + +# Allow checking code with lint, sparse, etc. +AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], + [Use a lint-style source code checker (default: disabled)])], + [use_lint=$withval], [use_lint=no]) +if test "x$use_lint" = "xyes" ; then + LINT="lint" +else + LINT="$use_lint" +fi +if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then + case $LINT in + lint|*/lint) + case $host_os in + solaris*) + LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; + esac + ;; + esac +fi + +AC_SUBST(LINT) +AC_SUBST(LINT_FLAGS) +AM_CONDITIONAL(LINT, [test x$LINT != xno]) + +]) # XORG_WITH_LINT + +# XORG_LINT_LIBRARY(LIBNAME) +# -------------------------- +# Minimum version: 1.1.0 +# +# Sets up flags for building lint libraries for checking programs that call +# functions in the library. +# Disabled by default, enable with --enable-lint-library +# Sets: +# @LINTLIB@ - name of lint library file to make +# MAKE_LINT_LIB - automake conditional +# + +AC_DEFUN([XORG_LINT_LIBRARY],[ +AC_REQUIRE([XORG_WITH_LINT]) +# Build lint "library" for more indepth checks of programs calling this library +AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], + [Create lint library (default: disabled)])], + [make_lint_lib=$enableval], [make_lint_lib=no]) +if test "x$make_lint_lib" != "xno" ; then + if test "x$LINT" = "xno" ; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi + if test "x$make_lint_lib" = "xyes" ; then + LINTLIB=llib-l$1.ln + else + LINTLIB=$make_lint_lib + fi +fi +AC_SUBST(LINTLIB) +AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +]) # XORG_LINT_LIBRARY + +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([AC_PROG_CC]) +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `gcc -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi +AC_SUBST(CWARNFLAGS) +]) # XORG_CWARNFLAGS +dnl Copyright 2005 Red Hat, Inc +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Adds --with/without-release-string and changes the PACKAGE and +# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If +# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_ARG_WITH(release-version, + AC_HELP_STRING([--with-release-version=STRING], + [Use release version string in package name]), + [RELEASE_VERSION="$withval"], + [RELEASE_VERSION=""]) + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + AC_MSG_NOTICE([Building with package name set to $PACKAGE]) + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# Arrange that distcleancheck ignores ChangeLog left over by distclean. +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ +mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" +AC_SUBST([CHANGELOG_CMD]) +AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) +]) # XORG_CHANGELOG + +dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ +dnl +dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XTRANS_TCP_FLAGS() +# ------------------ +# Find needed libraries for TCP sockets, and check for IPv6 support +AC_DEFUN([XTRANS_TCP_FLAGS],[ + # SVR4 hides these in libraries other than libc + AC_SEARCH_LIBS(socket, [socket]) + AC_SEARCH_LIBS(gethostbyname, [nsl]) + + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + AC_ARG_ENABLE(ipv6, + AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), + [IPV6CONN=$enableval], + [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) + AC_MSG_CHECKING([if IPv6 support should be built]) + if test "$IPV6CONN" = "yes"; then + AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) + fi + AC_MSG_RESULT($IPV6CONN) + + # 4.3BSD-Reno added a new member to struct sockaddr_in + AC_CHECK_MEMBER([struct sockaddr_in.sin_len], + AC_DEFINE([BSD44SOCKETS],1, + [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> + ]) + + # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. + AC_CHECK_TYPES([socklen_t], [], [], [ +AC_INCLUDES_DEFAULT +#include <sys/socket.h>]) + +]) # XTRANS_TCP_FLAGS + +# XTRANS_CONNECTION_FLAGS() +# ------------------------- +# Standard checks for which Xtrans transports to use by the Xorg packages +# that use Xtrans functions +AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_TYPE_SIGNAL]) + [case $host_os in + mingw*) unixdef="no" ;; + *) unixdef="yes" ;; + esac] + AC_ARG_ENABLE(unix-transport, + AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), + [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) + AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) + if test "$UNIXCONN" = "yes"; then + AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) + fi + AC_MSG_RESULT($UNIXCONN) + AC_ARG_ENABLE(tcp-transport, + AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), + [TCPCONN=$enableval], [TCPCONN=yes]) + AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) + AC_MSG_RESULT($TCPCONN) + if test "$TCPCONN" = "yes"; then + AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) + XTRANS_TCP_FLAGS + fi + [case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac] + AC_ARG_ENABLE(local-transport, + AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), + [LOCALCONN=$enableval], [LOCALCONN=$localdef]) + AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) + AC_MSG_RESULT($LOCALCONN) + if test "$LOCALCONN" = "yes"; then + AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) + fi + +]) # XTRANS_CONNECTION_FLAGS + + +# XTRANS_SECURE_RPC_FLAGS() +# ------------------------- +# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS +# so that any necessary networking libraries are already found +AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], +[AC_REQUIRE([XTRANS_TCP_FLAGS]) + AC_ARG_ENABLE(secure-rpc, + AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), + [SECURE_RPC=$enableval], [SECURE_RPC="try"]) + + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" + AC_CHECK_FUNCS([authdes_seccreate authdes_create], + [FOUND_SECURE_RPC="yes"]) + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + AC_MSG_ERROR([Secure RPC requested, but required functions not found]) + fi + SECURE_RPC="no" + else + dnl FreeBSD keeps getsecretkey in librpcsvc + AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) + SECURE_RPC="yes" + fi + fi + AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) + if test "x$SECURE_RPC" = "xyes" ; then + AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) + fi + AC_MSG_RESULT($SECURE_RPC) +]) # XTRANS_SECURE_RPC_FLAGS + + +# 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, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +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.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +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 AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[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_$1_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_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# 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 4 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[# 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. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 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 13 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + 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 +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[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. +AC_MSG_CHECKING([for style of include used by $am_make]) +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 +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# 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 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# 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. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/libXfont/autogen.sh b/libXfont/autogen.sh deleted file mode 100644 index 904cd6746..000000000 --- a/libXfont/autogen.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd $srcdir - -autoreconf -v --install || exit 1 -cd $ORIGDIR || exit $? - -$srcdir/configure --enable-maintainer-mode "$@" diff --git a/libXfont/config.guess b/libXfont/config.guess index e3ef63f6c..7b24a8728 100644 --- a/libXfont/config.guess +++ b/libXfont/config.guess @@ -1,9 +1,10 @@ #! /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 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2005-12-13' +timestamp='2008-11-15' # 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 @@ -55,8 +56,8 @@ 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 -Free Software Foundation, Inc. +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." @@ -106,7 +107,7 @@ 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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$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 ; } ; @@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 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 @@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -325,8 +330,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -527,7 +545,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *: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 @@ -764,12 +782,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + 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 ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -779,9 +804,18 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd | genuineintel) + 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 ;; @@ -815,6 +849,16 @@ EOF 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:*:*) @@ -851,7 +895,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + 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:*:*) @@ -870,7 +918,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + 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:*:*) @@ -896,6 +948,9 @@ EOF if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -925,6 +980,9 @@ EOF 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 @@ -943,9 +1001,6 @@ EOF 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. @@ -967,7 +1022,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -977,7 +1032,11 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + 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 @@ -1170,6 +1229,9 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1179,6 +1241,15 @@ EOF 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 ;; @@ -1429,9 +1500,9 @@ 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 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/libXfont/config.h.in b/libXfont/config.h.in index d7faf2833..49192eafb 100644 --- a/libXfont/config.h.in +++ b/libXfont/config.h.in @@ -12,9 +12,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ -#undef HAVE_LIBWS2_32 - /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -54,12 +51,13 @@ /* Support IPv6 for TCP connections */ #undef IPv6 -/* Support dynamically loaded font modules */ -#undef LOADABLEFONTS - /* Support os-specific local connections */ #undef LOCALCONN +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE @@ -126,12 +124,6 @@ /* Support snf format bitmap font files */ #undef XFONT_SNFFORMAT -/* Support Speedo font files */ -#undef XFONT_SPEEDO - -/* Support IBM Type 1 rasterizer for Type1 font files */ -#undef XFONT_TYPE1 - /* Support bzip2 for bitmap fonts */ #undef X_BZIP2_FONT_COMPRESSION diff --git a/libXfont/config.sub b/libXfont/config.sub index 285164700..053e7381f 100644 --- a/libXfont/config.sub +++ b/libXfont/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2005-12-11' +timestamp='2008-09-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -71,8 +72,8 @@ 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 -Free Software Foundation, Inc. +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." @@ -240,20 +241,23 @@ case $basic_machine in | 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 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -268,24 +272,23 @@ case $basic_machine in | mn10200 | mn10300 \ | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | 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 | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m32c) + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -317,25 +320,27 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | 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-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -350,28 +355,31 @@ case $basic_machine in | 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-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; - m32c-*) + # 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. @@ -443,10 +451,22 @@ case $basic_machine in 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 ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -475,8 +495,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -514,6 +534,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -668,6 +692,14 @@ case $basic_machine in 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 ;; @@ -683,6 +715,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -809,6 +845,14 @@ case $basic_machine in 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 ;; @@ -818,6 +862,12 @@ case $basic_machine in 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 ;; @@ -904,6 +954,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -915,6 +969,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1004,6 +1061,10 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1079,6 +1140,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1120,7 +1185,7 @@ case $basic_machine in sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1193,12 +1258,13 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -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* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1208,7 +1274,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1338,6 +1404,9 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; -none) ;; *) @@ -1360,6 +1429,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1369,9 +1444,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1397,6 +1472,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/libXfont/configure b/libXfont/configure index 477474ef8..7b1c851d9 100644 --- a/libXfont/configure +++ b/libXfont/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for libXfont 1.3.4. +# Generated by GNU Autoconf 2.63 for libXfont 1.4.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh 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 + # 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 @@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits +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 "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 + 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 - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + 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 # Support unset when possible. @@ -65,8 +93,6 @@ fi # 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.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -89,7 +115,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -102,17 +128,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -160,7 +179,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -242,7 +261,7 @@ IFS=$as_save_IFS 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 + # 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 @@ -263,7 +282,7 @@ _ASEOF 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 + # 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 @@ -343,10 +362,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -415,9 +434,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -453,7 +473,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -481,7 +501,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -494,19 +513,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 || + mkdir conf$$.dir 2>/dev/null +fi +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' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -531,10 +553,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -555,22 +577,22 @@ 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$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac -echo=${ECHO-echo} +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! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -580,9 +602,9 @@ fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift - cat <<EOF + cat <<_LT_EOF $* -EOF +_LT_EOF exit 0 fi @@ -590,121 +612,116 @@ fi # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -if test -z "$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 && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi +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. + 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 + 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 -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" + 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 - # maybe with a smaller string... - prev=: + # 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 + 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 + 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 -fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - exec 7<&0 </dev/null 6>&1 # Name of the host. @@ -728,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libXfont' PACKAGE_TARNAME='libXfont' -PACKAGE_VERSION='1.3.4' -PACKAGE_STRING='libXfont 1.3.4' +PACKAGE_VERSION='1.4.0' +PACKAGE_STRING='libXfont 1.4.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' # Factoring default headers for most tests. @@ -768,147 +785,170 @@ 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 -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -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 -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -GREP -EGREP -LN_S -ECHO -AR -RANLIB +ac_subst_vars='LTLIBOBJS +LIBOBJS +distcleancheck_listfiles +CHANGELOG_CMD +OS_CFLAGS +CWARNFLAGS +XFONT_LIBS +XFONT_CFLAGS +MATH_LIBS +XFONT_FC_FALSE +XFONT_FC_TRUE +XFONT_FONTFILE_FALSE +XFONT_FONTFILE_TRUE +XFONT_BITMAP_FALSE +XFONT_BITMAP_TRUE +XFONT_SNFFORMAT_FALSE +XFONT_SNFFORMAT_TRUE +XFONT_BDFFORMAT_FALSE +XFONT_BDFFORMAT_TRUE +XFONT_PCFFORMAT_FALSE +XFONT_PCFFORMAT_TRUE +XFONT_BUILTINS_FALSE +XFONT_BUILTINS_TRUE +Z_LIBS +X_BZIP2_FONT_COMPRESSION_FALSE +X_BZIP2_FONT_COMPRESSION_TRUE +X_GZIP_FONT_COMPRESSION +FREETYPE_REQUIRES +ft_config +FREETYPE_LIBS +FREETYPE_CFLAGS +XFONT_FREETYPE_FALSE +XFONT_FREETYPE_TRUE +ENCODINGSDIR +PKG_CONFIG CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -F77 -FFLAGS -ac_ct_F77 +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build LIBTOOL -PKG_CONFIG -ENCODINGSDIR -XFONT_FREETYPE_TRUE -XFONT_FREETYPE_FALSE -FREETYPE_CFLAGS -FREETYPE_LIBS -ft_config -FREETYPE_REQUIRES -XFONT_TYPE1_TRUE -XFONT_TYPE1_FALSE -XFONT_SPEEDO_TRUE -XFONT_SPEEDO_FALSE -X_GZIP_FONT_COMPRESSION -X_BZIP2_FONT_COMPRESSION_TRUE -X_BZIP2_FONT_COMPRESSION_FALSE -Z_LIBS -XFONT_BUILTINS_TRUE -XFONT_BUILTINS_FALSE -XFONT_PCFFORMAT_TRUE -XFONT_PCFFORMAT_FALSE -XFONT_BDFFORMAT_TRUE -XFONT_BDFFORMAT_FALSE -XFONT_SNFFORMAT_TRUE -XFONT_SNFFORMAT_FALSE -XFONT_BITMAP_TRUE -XFONT_BITMAP_FALSE -XFONT_FONTFILE_TRUE -XFONT_FONTFILE_FALSE -XFONT_FC_TRUE -XFONT_FC_FALSE -MATH_LIBS -XFONT_CFLAGS -XFONT_LIBS -CWARNFLAGS -OS_CFLAGS -CHANGELOG_CMD -distcleancheck_listfiles -LIBOBJS -LTLIBOBJS' +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 +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_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_encodingsdir +enable_freetype +with_freetype_config +with_bzip2 +enable_builtins +enable_pcfformat +enable_bdfformat +enable_snfformat +enable_fc +enable_unix_transport +enable_tcp_transport +enable_ipv6 +enable_local_transport +with_release_version +' ac_precious_vars='build_alias host_alias target_alias @@ -918,12 +958,6 @@ LDFLAGS LIBS CPPFLAGS CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS PKG_CONFIG FREETYPE_CFLAGS FREETYPE_LIBS @@ -934,6 +968,8 @@ XFONT_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1032,13 +1068,21 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -1051,13 +1095,21 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1248,22 +1300,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1283,7 +1351,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1292,16 +1360,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1310,22 +1378,38 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +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 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1340,7 +1424,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1356,10 +1440,10 @@ 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 .` || - { 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" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1367,12 +1451,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1399,12 +1483,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1431,7 +1515,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 libXfont 1.3.4 to adapt to many kinds of systems. +\`configure' configures libXfont 1.4.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1453,9 +1537,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1465,25 +1549,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --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/libXfont] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --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/libXfont] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1501,11 +1585,12 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXfont 1.3.4:";; + short | recursive ) echo "Configuration of libXfont 1.4.0:";; esac cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build @@ -1516,29 +1601,23 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-freetype - --enable-type1 - --disable-speedo --disable-builtins --disable-pcfformat --disable-bdfformat --disable-snfformat - --disable-loadable-font-modules - support dynamically loaded font modules (default is - enabled) --disable-fc --enable-unix-transport Enable UNIX domain socket transport --enable-tcp-transport Enable TCP socket transport - --enable-ipv6 Enable IPv6 support + --enable-IPv6 Enable IPv6 support --enable-local-transport Enable os-specific local transport Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] - --with-tags[=TAGS] include additional configurations [automatic] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-encodingsdir=ENCODINGSDIR Path to font encodings --with-freetype-config=PROG Use FreeType configuration program PROG @@ -1555,11 +1634,6 @@ Some influential environment variables: CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility FREETYPE_CFLAGS C compiler flags for FREETYPE, overriding pkg-config @@ -1580,15 +1654,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1624,7 +1700,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1633,11 +1709,11 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXfont configure 1.3.4 -generated by GNU Autoconf 2.61 +libXfont configure 1.4.0 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1647,8 +1723,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 libXfont $as_me 1.3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was +It was created by libXfont $as_me 1.4.0, which was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1684,7 +1760,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1719,7 +1795,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1771,11 +1847,12 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -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) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1805,9 +1882,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1822,9 +1899,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1840,8 +1917,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1883,21 +1960,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1907,16 +1987,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1930,29 +2010,38 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1962,10 +2051,12 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $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 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -2019,8 +2110,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { $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;} { (exit 1); exit 1; }; } fi @@ -2046,11 +2137,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2079,17 +2171,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2102,8 +2206,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2113,8 +2217,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -2137,9 +2241,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -2150,26 +2254,23 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! +$as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -2180,15 +2281,15 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -2223,8 +2324,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -2236,10 +2337,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2252,7 +2353,7 @@ do 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_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2263,22 +2364,23 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2295,12 +2397,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2319,8 +2421,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $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 @@ -2337,7 +2439,7 @@ fi # Define the identity of the package. PACKAGE='libXfont' - VERSION='1.3.4' + VERSION='1.4.0' cat >>confdefs.h <<_ACEOF @@ -2375,10 +2477,10 @@ 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -2391,7 +2493,7 @@ do 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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2402,11 +2504,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2415,10 +2517,10 @@ 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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. @@ -2431,7 +2533,7 @@ do 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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2442,11 +2544,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2454,12 +2556,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ 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 -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 STRIP=$ac_ct_STRIP @@ -2494,23 +2592,23 @@ ac_config_headers="$ac_config_headers include/X11/fonts/fontconf.h" XORG_MACROS_needed_version=1.2 XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` - { echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5 -echo $ECHO_N "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5 +$as_echo_n "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... " >&6; } XORG_MACROS_version=1.2.1 XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - { { echo "$as_me:$LINENO: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&5 -echo "$as_me: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&2;} + { { $as_echo "$as_me:$LINENO: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&5 +$as_echo "$as_me: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&2;} { (exit 1); exit 1; }; } fi if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - { { echo "$as_me:$LINENO: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&5 -echo "$as_me: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&2;} + { { $as_echo "$as_me:$LINENO: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&5 +$as_echo "$as_me: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&2;} { (exit 1); exit 1; }; } fi - { echo "$as_me:$LINENO: result: yes, $XORG_MACROS_version" >&5 -echo "${ECHO_T}yes, $XORG_MACROS_version" >&6; } + { $as_echo "$as_me:$LINENO: result: yes, $XORG_MACROS_version" >&5 +$as_echo "yes, $XORG_MACROS_version" >&6; } # Check for progs @@ -2522,10 +2620,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2538,7 +2636,7 @@ do 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_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2549,11 +2647,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2562,10 +2660,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $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_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2578,7 +2676,7 @@ do 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_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2589,11 +2687,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2601,12 +2699,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ 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 -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 @@ -2619,10 +2713,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2635,7 +2729,7 @@ do 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_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2646,11 +2740,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2659,10 +2753,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2680,7 +2774,7 @@ do continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2703,11 +2797,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2718,10 +2812,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2734,7 +2828,7 @@ do 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_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2745,11 +2839,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2762,10 +2856,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $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_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2778,7 +2872,7 @@ do 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_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2789,11 +2883,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2805,12 +2899,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ 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 -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 @@ -2820,44 +2910,50 @@ fi fi -test -z "$CC" && { { 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 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$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. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2876,27 +2972,22 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2907,10 +2998,11 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -2921,7 +3013,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2948,25 +3040,27 @@ else ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $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 -echo "$as_me: error: C compiler cannot create executables +$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 # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2975,49 +3069,53 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { 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 -echo "$as_me: error: cannot run C compiled programs. +$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 -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -3026,31 +3124,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { 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 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$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 -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3073,40 +3173,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $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 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$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 fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +{ $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_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3132,20 +3235,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3155,15 +3259,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3190,20 +3298,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3228,20 +3337,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3267,20 +3377,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3295,8 +3406,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3312,10 +3423,10 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3386,20 +3497,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3415,15 +3527,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3444,8 +3556,8 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +{ $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 @@ -3472,8 +3584,8 @@ if test "$am__include" = "#"; then fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $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. @@ -3497,10 +3609,10 @@ fi depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 @@ -3588,8 +3700,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3603,108 +3715,61 @@ else fi -# 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 +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 + + + +macro_version='2.2.6' +macro_revision='1.3012' + + + + -# 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 --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 + + + +ltmain="$ac_aux_dir/ltmain.sh" + # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { { $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; }; } -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else 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 && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { { $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` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { { $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 -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} +*) { { $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 @@ -3721,27 +3786,27 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { { $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 -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} +*) { { $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 @@ -3758,99 +3823,121 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # 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 +{ $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 lt_ac_prog in sed gsed; do + for 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 + 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 -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 +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 - 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 +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 -SED=$lt_cv_path_SED -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 + + + + + + + + + + +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 + # 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. + 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $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" - echo 'GREP' >> "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` @@ -3865,74 +3952,60 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + 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 - + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -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 + # 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. + 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $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" - echo 'EGREP' >> "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` @@ -3947,34 +4020,113 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done 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 -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + 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 - ac_cv_path_EGREP=$EGREP -fi + 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 -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +{ $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 + + + + + + + + + + + + + + + + @@ -3988,8 +4140,8 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + { $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 @@ -4002,9 +4154,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } [\\/]* | ?:[\\/]*) 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%/%"` + 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" ;; @@ -4018,14 +4170,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR @@ -4055,19 +4207,19 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6; } + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} +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; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 @@ -4079,40 +4231,22 @@ case `$LD -v 2>&1 </dev/null` in ;; esac fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +{ $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 -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$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 -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } + + + + + + +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. @@ -4155,28 +4289,493 @@ else done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${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 -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" +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 -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } + 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:4420: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4423: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4426: 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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $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 - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } + lt_unset=false fi -{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } + + + + +# 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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -4193,7 +4792,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; @@ -4215,8 +4814,20 @@ cygwin*) 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'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # 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' ;; @@ -4224,8 +4835,8 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then +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. @@ -4262,7 +4873,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +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)$' ;; @@ -4278,12 +4889,12 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + 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)$' @@ -4296,12 +4907,12 @@ newos6*) lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown +*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 + 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)$' @@ -4312,10 +4923,18 @@ 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) @@ -4343,14 +4962,14 @@ sysv4 | sysv4.3*) esac ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +{ $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 @@ -4358,6 +4977,367 @@ 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"} @@ -4368,6 +5348,256 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 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; @@ -4384,97 +5614,104 @@ ia64-*-hpux*) if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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" - ;; + *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 4402 "configure"' > conftest.$ac_ext + echo '#line 5632 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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 + 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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-*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-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; + *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* @@ -4484,10 +5721,10 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4516,26 +5753,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lt_cv_cc_needs_belf=yes else - echo "$as_me: failed program was:" >&5 + $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 @@ -4545,8 +5786,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } +{ $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" @@ -4558,40 +5799,655 @@ sparc*-*solaris*) if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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" ;; - *) LD="${LD-ld} -64" ;; + *) + 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 -need_locks="$enable_libtool_lock" + 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' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -4623,20 +6479,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4660,13 +6517,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 @@ -4674,7 +6532,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4699,8 +6557,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4728,20 +6586,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4765,13 +6624,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 @@ -4779,7 +6639,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4795,11 +6655,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { 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 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -4809,10 +6671,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4839,20 +6701,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -4944,37 +6807,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $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 @@ -4996,11 +6862,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5018,20 +6884,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -5039,12 +6906,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5055,27 +6925,20 @@ done for ac_header in dlfcn.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +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 - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -5084,1440 +6947,254 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $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 - 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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## -## ---------------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +# Set options - 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:) -{ 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 -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 - CXX=$ac_ct_CXX - fi -fi + enable_dlopen=no - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + enable_win32_dll=no -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 "echo \"\$as_me:$LINENO: $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 - 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 + # 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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + enable_shared=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 "echo \"\$as_me:$LINENO: $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 - 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 + # 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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + enable_static=yes 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 -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$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=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 -depcc="$CXX" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$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='#' +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= + pic_mode=default fi +test -z "$pic_mode" && pic_mode=default -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 -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 + # 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 - ac_cv_prog_CXXCPP=$CXXCPP + enable_fast_install=yes fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 "echo \"\$as_me:$LINENO: $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 - 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 - 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 - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -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 -fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" - 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_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - test -n "$ac_ct_F77" && break -done - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ 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 -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 - F77=$ac_ct_F77 - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - end -_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 "echo \"\$as_me:$LINENO: $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 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - end -_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 "echo \"\$as_me:$LINENO: $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 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_prog_f77_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi -G77=`test $ac_compiler_gnu = yes && echo 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 -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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*) - # 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; - ;; +test -z "$LN_S" && LN_S="ln -s" - 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 - ;; - *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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` - ;; - esac -fi -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - 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 +{ $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 -# 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 -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac -# Try without a prefix undercore, 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. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF - # Check to see that the pipe works correctly. - pipe_works=no - rm -f conftest* - cat > conftest.$ac_ext <<EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # 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=$? - 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 <<EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - cat <<EOF >> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; -#ifdef __cplusplus -} -#endif -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=$? - 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 -f 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 - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir @@ -6537,360 +7214,41 @@ 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' +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +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' -# Constants: -rm="rm -f" - # Global variables: -default_ofile=libtool +ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ 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 -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 - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ 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 -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 - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - 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 - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ 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 -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 -else - STRIP="$ac_cv_prog_STRIP" -fi +with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -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 - for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; @@ -6899,17 +7257,18 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +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 - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -6933,7 +7292,7 @@ else $EGREP "$file_magic_regex" > /dev/null; then : else - cat <<EOF 1>&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -6944,7 +7303,7 @@ else *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -6959,19 +7318,23 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $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 - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -6995,7 +7358,7 @@ else $EGREP "$file_magic_regex" > /dev/null; then : else - cat <<EOF 1>&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -7006,7 +7369,7 @@ else *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -7021,13 +7384,14 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else MAGIC_CMD=: fi @@ -7037,28 +7401,8 @@ fi ;; esac -enable_dlopen=no -enable_win32_dll=no - -# 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 - - -# 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 - # Use C for the default configuration in the libtool script -tagname= + lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7075,10 +7419,15 @@ objext=o objext=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +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);}\n' +lt_simple_link_test_code='int main(){return(0);}' + + + + + # If no C compiler was specified, use CC. @@ -7090,36 +7439,39 @@ 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 -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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* +$RM conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$RM -r conftest* +if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -7130,25 +7482,25 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7133: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7485: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7137: \$? = $ac_status" >&5 + echo "$as_me:7489: \$? = $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 + $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* + $RM conftest* fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $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" @@ -7158,12 +7510,17 @@ fi fi -lt_prog_compiler_wl= + + + + + + lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } +{ $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,' @@ -7179,19 +7536,29 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ;; amigaos*) - # 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' + 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + 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' ;; @@ -7201,7 +7568,21 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-fno-common' ;; - interix3*) + 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. ;; @@ -7213,25 +7594,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } 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 ;; - hpux*) - # 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='-fPIC' - ;; - esac - ;; - *) lt_prog_compiler_pic='-fPIC' ;; @@ -7248,18 +7622,8 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) + 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' @@ -7287,18 +7651,27 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-non_shared' ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - icc* | ecc*) + # 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) @@ -7311,15 +7684,52 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # 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' @@ -7372,22 +7782,35 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } +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 - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + { $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. @@ -7398,27 +7821,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7401: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7824: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7405: \$? = $ac_status" >&5 + echo "$as_me:7828: \$? = $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 + $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_prog_compiler_pic_works=yes + lt_cv_prog_compiler_pic_works=yes fi fi - $rm conftest* + $RM conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } +{ $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_prog_compiler_pic_works" = xyes; then +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" ;; @@ -7429,69 +7852,70 @@ else fi 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 + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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_prog_compiler_static_works=no + lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 + $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_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi else - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi fi - $rm conftest* + $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } +{ $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_prog_compiler_static_works" = xyes; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null + $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -7502,83 +7926,148 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7505: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7929: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7509: \$? = $ac_status" >&5 + echo "$as_me:7933: \$? = $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 + $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* + $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 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out cd .. - rmdir conftest - $rm conftest* + $RM -r conftest + $RM conftest* fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } +{ $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:7984: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7988: \$? = $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 - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + { $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* + $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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + { $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 -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + + + + + { $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= - enable_shared_with_static_runtimes=no + always_export_symbols=no archive_cmds= archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_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_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported + inherit_rpath=no link_all_deplibs=unknown - hardcode_automatic=no module_cmds= module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + 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= @@ -7586,26 +8075,17 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # 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_" + 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= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` case $host_os in - cygwin* | mingw* | pw32*) + 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++. @@ -7631,16 +8111,16 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # 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' + 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= + 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>/dev/null` in + 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 ... @@ -7650,11 +8130,11 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no - cat <<EOF 1>&2 + 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. @@ -7662,26 +8142,27 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. -EOF +_LT_EOF fi ;; amigaos*) - 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 - - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no + 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 + 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 @@ -7691,16 +8172,16 @@ EOF fi ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + 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' + 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 + 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... @@ -7716,7 +8197,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' @@ -7731,39 +8212,78 @@ EOF 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' ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + 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' + 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' + 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 + 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 - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + 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 $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi + 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 + ld_shlibs=no fi ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else @@ -7773,9 +8293,9 @@ EOF ;; solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no - cat <<EOF 1>&2 + cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool @@ -7784,8 +8304,8 @@ EOF *** your PATH or compiler configuration so that the native linker is *** used, and then restart. -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +_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 @@ -7809,10 +8329,14 @@ EOF _LT_EOF ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + # 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 @@ -7828,7 +8352,7 @@ _LT_EOF ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + 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 @@ -7860,7 +8384,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + 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. @@ -7870,22 +8394,22 @@ _LT_EOF 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' + 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' + 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].*|aix5*) + 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 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi done ;; esac @@ -7902,28 +8426,30 @@ _LT_EOF 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 + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null then - # We have reworked collect2 - hardcode_direct=yes + # 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= + # 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 @@ -7934,8 +8460,8 @@ _LT_EOF 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: + # 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 @@ -7946,6 +8472,7 @@ _LT_EOF 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 @@ -7953,8 +8480,9 @@ _LT_EOF # 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 + # 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 @@ -7975,44 +8503,56 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 - echo "$as_me: failed program was:" >&5 + $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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + 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. + # Determine the default libpath from the value encoded in an + # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8034,31 +8574,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 - echo "$as_me: failed program was:" >&5 + $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 @@ -8078,18 +8629,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; amigaos*) - 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 - # see comment about different semantics on the GNU ld section - ld_shlibs=no + 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*) + 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 @@ -8101,63 +8659,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # 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 "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + 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' + old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = 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' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi + + + 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*) @@ -8190,7 +8725,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -8199,9 +8734,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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' + 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' + 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=: @@ -8221,11 +8756,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 @@ -8239,7 +8774,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + 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' @@ -8264,12 +8799,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_cpu in hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' 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, @@ -8282,18 +8817,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + 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='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' + 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 + 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 @@ -8311,25 +8890,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no ;; + *nto* | *qnx*) + ;; + openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - 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' + 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 - 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 + ld_shlibs=no fi ;; @@ -8337,18 +8924,19 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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' + 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + 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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + 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=: ;; @@ -8356,49 +8944,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + 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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + 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 text' + no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + 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 - 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' + 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 linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + # 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 ;; @@ -8455,7 +9053,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + 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 @@ -8481,18 +9079,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + 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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + 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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + 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 ;; @@ -8506,12 +9104,36 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } +{ $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? # @@ -8529,15 +9151,15 @@ x|xyes) # 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + { $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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest @@ -8552,10 +9174,10 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& 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 + 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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no @@ -8566,17 +9188,225 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& else cat conftest.err 1>&5 fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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= @@ -8590,20 +9420,6 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi need_lib_prefix=unknown hardcode_into_libs=no @@ -8621,7 +9437,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8640,7 +9456,7 @@ aix4* | aix5*) 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -8666,9 +9482,18 @@ aix4* | aix5*) ;; amigaos*) - 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' + 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*) @@ -8691,25 +9516,28 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +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,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'\''`~ + 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' + 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' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -8718,20 +9546,20 @@ cygwin* | mingw* | pw32*) 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*) + 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 + 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'` + 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"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -8755,17 +9583,13 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + 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`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -8782,18 +9606,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -8831,7 +9643,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -8870,18 +9682,18 @@ hpux9* | hpux10* | hpux11*) 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 - ;; - *) + 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 @@ -8894,7 +9706,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8949,7 +9761,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -8958,6 +9770,64 @@ linux*) 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. @@ -8965,7 +9835,7 @@ linux*) # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -8978,23 +9848,11 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + 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' @@ -9015,14 +9873,16 @@ newsos6) shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*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=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -9031,13 +9891,13 @@ openbsd*) 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 ;; + 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 + 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 @@ -9071,6 +9931,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -9105,7 +9969,6 @@ sysv4 | sysv4.3*) sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -9136,13 +9999,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -9152,6 +10014,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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}' @@ -9163,8 +10036,8 @@ uts4*) dynamic_linker=no ;; esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } +{ $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" @@ -9172,19 +10045,112 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +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" || \ +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. + # 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink @@ -9197,10 +10163,11 @@ else # directories. hardcode_action=unsupported fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink; then +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 || @@ -9209,36 +10176,12 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}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" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi -if test "x$enable_dlopen" != xyes; then + + + + + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -9253,22 +10196,22 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + 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 - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -9300,33 +10243,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then +{ $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 @@ -9336,13 +10283,13 @@ else fi - ;; + ;; *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9395,38 +10342,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then +{ $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 - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -9458,39 +10409,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +{ $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 - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9543,38 +10498,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then +{ $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 - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -9606,39 +10565,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then +{ $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 - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" @@ -9670,39 +10633,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_svld_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then +{ $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 - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -9734,34 +10701,38 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_dld_link=yes else - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +{ $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 @@ -9799,18 +10770,18 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 <<EOF -#line 9813 "configure" + cat > conftest.$ac_ext <<_LT_EOF +#line 10784 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9851,10 +10822,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -9870,13 +10837,13 @@ int main () else puts (dlerror ()); - exit (status); + return status; } -EOF +_LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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=$? @@ -9894,23 +10861,23 @@ rm -fr conftest* fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } +{ $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\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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 <<EOF -#line 9913 "configure" + cat > conftest.$ac_ext <<_LT_EOF +#line 10880 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9951,10 +10918,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -9970,13 +10933,13 @@ int main () else puts (dlerror ()); - exit (status); + return status; } -EOF +_LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $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=$? @@ -9994,8 +10957,8 @@ rm -fr conftest* fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" @@ -10016,8700 +10979,103 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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. - -# 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//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# 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 - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# 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 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# 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 and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -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 - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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 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 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$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 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_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 - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\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 -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - 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 - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_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= -export_dynamic_flag_spec_CXX= -hardcode_direct_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 -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 - -# 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= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# 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 -printf "$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 -printf "$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 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 -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen 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. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 -{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$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 -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - 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].*|aix5*) - 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_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - 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 - hardcode_direct_CXX=yes - 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 - - # 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 "echo \"\$as_me:$LINENO: $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 - 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 && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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 "${wl}${allow_undefined_flag}"; 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 "echo \"\$as_me:$LINENO: $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 - 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 && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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*) - # _LT_AC_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*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - 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 - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - 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' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - 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* | kfreebsd*-gnu | 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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - 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*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; - *) - 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_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 $list' - ;; - *) - 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 - ;; - interix3*) - 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 -set_version $verstring` -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 ${wl}-set_version ${wl}$verstring` ${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 ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux*) - 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 $list' - - 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*) - # 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*) - # Portland Group C++ compiler - 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' - - 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 $templist | $SED "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 $list' - ;; - 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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - 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' - ;; - osf3*) - 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 - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - 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. - # - # 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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - 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 - ;; - 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. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - 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 -set_version $verstring` -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - 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" | grep -v "ld:"`; templist=`echo $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - 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 C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}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' - 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. - # 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. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - - -cat > conftest.$ac_ext <<EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -EOF - -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # 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 - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - 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 -interix3*) - # 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= - ;; - -solaris*) - case $cc_basename in - CC*) - # 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. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) - # 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' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | os2* | pw32*) - # 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_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= - ;; - interix3*) - # 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 IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # 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_AC_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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - 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* | kfreebsd*-gnu | 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*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # 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' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - 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 - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - 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 - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - printf "$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:12249: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12253: \$? = $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_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_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 -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 - -# -# 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\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$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_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$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:12353: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:12357: \$? = $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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$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 - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # 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*) - 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 - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 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=$? - 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* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -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' - ;; - -aix4* | aix5*) - 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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - 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 - ;; - -kfreebsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -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 - ;; - freebsd*) # from 4.6 on - 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' - ;; - -interix3*) - 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*) - 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 - # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;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' - ;; - -knetbsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU 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=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 - ;; - -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" - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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 - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } -if test "$hardcode_action_CXX" = relink; 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 -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="$ofile" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static -# 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 -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# 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 and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -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 - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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 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 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$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 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# 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 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - 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 - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -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 - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# 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 -printf "$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 -printf "$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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -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-%%"` - - -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-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_F77='-Bstatic' - fi - ;; - - amigaos*) - # 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_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # 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_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix3*) - # 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_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # 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_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # 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_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-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_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # 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:13923: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13927: \$? = $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_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$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_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$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:14027: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14031: \$? = $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_F77=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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # 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_F77="_GLOBAL_OFFSET_TABLE_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # 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_F77=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_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <<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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$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_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$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_F77='$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_F77='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_F77=no - fi - ;; - - interix3*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${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_F77='$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_F77='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' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${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_F77='${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' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$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_F77=no - cat <<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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$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_F77=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_F77=unsupported - fi - ;; - - aix4* | aix5*) - 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_F77='$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_F77='$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].*|aix5*) - 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_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - 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 - hardcode_direct_F77=yes - else - # We have old collect2 - hardcode_direct_F77=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_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - 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 - - # 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_F77=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_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_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 "echo \"\$as_me:$LINENO: $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 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$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 - program main - - end -_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 "echo \"\$as_me:$LINENO: $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 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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_F77='${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_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$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*) - archive_cmds_F77='$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_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # 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_F77=' ' - allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$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' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$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_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 +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 - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -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' - ;; - -aix4* | aix5*) - 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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - 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 - ;; - -kfreebsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -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 +# FIXME - insert some real tests, host_os isn't really good enough 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 - ;; - freebsd*) # from 4.6 on - 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" + 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 - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } 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' - ;; - -interix3*) - 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*) - 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 - # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;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' - ;; - -knetbsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU 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=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 - ;; - -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" - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; 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 - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ;; esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_F77 - -# 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_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# 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_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - 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 - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' - -# 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 -printf "$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 -printf "$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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -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-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$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:16225: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16229: \$? = $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 -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi -fi -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' - fi - ;; - amigaos*) - # 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_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | pw32* | os2*) - # 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_GCJ='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix3*) - # 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_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # 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_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) - # 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_GCJ='-DDLL_EXPORT' - ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; + # 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; } - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # 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:16493: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16497: \$? = $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_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$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_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$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:16597: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:16601: \$? = $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_GCJ=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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # 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_GCJ="_GLOBAL_OFFSET_TABLE_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` + { $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 - cygwin* | mingw* | pw32*) - # 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_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <<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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$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_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$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_GCJ='$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_GCJ='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_GCJ=no - fi - ;; - - interix3*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$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_GCJ=no - cat <<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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - 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_GCJ='$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_GCJ='$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].*|aix5*) - 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_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - 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 - hardcode_direct_GCJ=yes - else - # We have old collect2 - hardcode_direct_GCJ=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_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - 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 - - # 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_GCJ=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_GCJ='-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 "echo \"\$as_me:$LINENO: $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 - 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 && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$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 "echo \"\$as_me:$LINENO: $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 - 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 && - $as_test_x conftest$ac_exeext; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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_GCJ='${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_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$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*) - archive_cmds_GCJ='$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_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # 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_GCJ=' ' - allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -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' - ;; - -aix4* | aix5*) - 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' + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - 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 - ;; - -kfreebsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -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 - ;; - freebsd*) # from 4.6 on - 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" + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no 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' - ;; - -interix3*) - 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*) - 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 - # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;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' - ;; - -knetbsd*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU 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=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 - ;; - -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" - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; 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 - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + { $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; } -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_GCJ - -# 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_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# 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_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi fi - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18718,526 +11084,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' - -# 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. - -# 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 -printf "$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 -printf "$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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -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-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_RC - -# 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_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# 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_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# 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 - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - 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 - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - @@ -19250,10 +11096,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + ac_config_commands="$ac_config_commands libtool" +# Only expand once: @@ -19262,10 +11110,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19280,7 +11128,7 @@ do 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19292,11 +11140,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19305,10 +11153,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19323,7 +11171,7 @@ do 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19335,11 +11183,11 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -19347,12 +11195,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ 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 -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 PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -19364,14 +11208,14 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi @@ -19383,20 +11227,21 @@ fi for ac_header in endian.h poll.h sys/poll.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +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 - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $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 @@ -19412,32 +11257,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $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 @@ -19451,51 +11297,52 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 - echo "$as_me: failed program was:" >&5 + $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 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $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: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $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:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $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 https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## @@ -19504,21 +11351,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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 -if test `eval echo '${'$as_ac_Header'}'` = 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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -19528,11 +11378,11 @@ done for ac_func in poll do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19585,35 +11435,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $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 echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +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 `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19642,7 +11499,6 @@ XFONT_FONTFILE=no # # Scalable fonts in files: # FreeType -# IBM Type1 rasterizer # Bitstream Speedo rasterizer # # Check whether --enable-freetype was given. @@ -19678,51 +11534,69 @@ fi if test "$freetype_config" = "auto" ; then pkg_failed=no -{ echo "$as_me:$LINENO: checking for FREETYPE" >&5 -echo $ECHO_N "checking for FREETYPE... $ECHO_C" >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 +{ $as_echo "$as_me:$LINENO: checking for FREETYPE" >&5 +$as_echo_n "checking for FREETYPE... " >&6; } + +if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` else pkg_failed=yes fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 +if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` else pkg_failed=yes fi -else - pkg_failed=untried + else + pkg_failed=untried fi + + if test $pkg_failed = yes; then - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` + else + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` + fi # Put the nasty error message in config.log where it belongs - echo "$FREETYPE_PKG_ERRORS" 1>&5 + echo "$FREETYPE_PKG_ERRORS" >&5 - freetype_config=yes + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + freetype_config=yes elif test $pkg_failed = untried; then freetype_config=yes else FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } freetype_config=no fi fi @@ -19730,10 +11604,10 @@ fi if test "$freetype_config" = "yes"; then # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ft_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ft_config in [\\/]* | ?:[\\/]*) @@ -19748,7 +11622,7 @@ do 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_path_ft_config="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19761,17 +11635,17 @@ esac fi ft_config=$ac_cv_path_ft_config if test -n "$ft_config"; then - { echo "$as_me:$LINENO: result: $ft_config" >&5 -echo "${ECHO_T}$ft_config" >&6; } + { $as_echo "$as_me:$LINENO: result: $ft_config" >&5 +$as_echo "$ft_config" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "$ft_config" = "no"; then - { { echo "$as_me:$LINENO: error: You must have freetype installed; see http://www.freetype.org/" >&5 -echo "$as_me: error: You must have freetype installed; see http://www.freetype.org/" >&2;} + { { $as_echo "$as_me:$LINENO: error: You must have freetype installed; see http://www.freetype.org/" >&5 +$as_echo "$as_me: error: You must have freetype installed; see http://www.freetype.org/" >&2;} { (exit 1); exit 1; }; } fi else @@ -19793,54 +11667,6 @@ fi -# Check whether --enable-type1 was given. -if test "${enable_type1+set}" = set; then - enableval=$enable_type1; XFONT_TYPE1=$enableval -else - XFONT_TYPE1=yes -fi - -if test "x$XFONT_TYPE1" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define XFONT_TYPE1 1 -_ACEOF - - XFONT_FONTFILE=yes -fi - if test "x$XFONT_TYPE1" = xyes ; then - XFONT_TYPE1_TRUE= - XFONT_TYPE1_FALSE='#' -else - XFONT_TYPE1_TRUE='#' - XFONT_TYPE1_FALSE= -fi - - -# Check whether --enable-speedo was given. -if test "${enable_speedo+set}" = set; then - enableval=$enable_speedo; XFONT_SPEEDO=$enableval -else - XFONT_SPEEDO=yes -fi - - if test "x$XFONT_SPEEDO" = xyes ; then - XFONT_SPEEDO_TRUE= - XFONT_SPEEDO_FALSE='#' -else - XFONT_SPEEDO_TRUE='#' - XFONT_SPEEDO_FALSE= -fi - -if test "x$XFONT_SPEEDO" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define XFONT_SPEEDO 1 -_ACEOF - - XFONT_FONTFILE=yes -fi - # # Bitmap fonts in files: # Builtins (gzipped pcf format in .text segment) @@ -19856,10 +11682,10 @@ _ACEOF X_GZIP_FONT_COMPRESSION=1 -{ echo "$as_me:$LINENO: checking for gzopen in -lz" >&5 -echo $ECHO_N "checking for gzopen in -lz... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for gzopen in -lz" >&5 +$as_echo_n "checking for gzopen in -lz... " >&6; } if test "${ac_cv_lib_z_gzopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -19891,37 +11717,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_gzopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_gzopen=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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzopen" >&5 -echo "${ECHO_T}$ac_cv_lib_z_gzopen" >&6; } -if test $ac_cv_lib_z_gzopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzopen" >&5 +$as_echo "$ac_cv_lib_z_gzopen" >&6; } +if test "x$ac_cv_lib_z_gzopen" = x""yes; then Z_LIBS=-lz else - { { echo "$as_me:$LINENO: error: *** zlib is required" >&5 -echo "$as_me: error: *** zlib is required" >&2;} + { { $as_echo "$as_me:$LINENO: error: *** zlib is required" >&5 +$as_echo "$as_me: error: *** zlib is required" >&2;} { (exit 1); exit 1; }; } fi @@ -19935,10 +11765,10 @@ else fi if test "x$with_bzip2" = xyes; then - { echo "$as_me:$LINENO: checking for BZ2_bzopen in -lbz2" >&5 -echo $ECHO_N "checking for BZ2_bzopen in -lbz2... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for BZ2_bzopen in -lbz2" >&5 +$as_echo_n "checking for BZ2_bzopen in -lbz2... " >&6; } if test "${ac_cv_lib_bz2_BZ2_bzopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" @@ -19970,37 +11800,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bz2_BZ2_bzopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bz2_BZ2_bzopen=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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzopen" >&5 -echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzopen" >&6; } -if test $ac_cv_lib_bz2_BZ2_bzopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzopen" >&5 +$as_echo "$ac_cv_lib_bz2_BZ2_bzopen" >&6; } +if test "x$ac_cv_lib_bz2_BZ2_bzopen" = x""yes; then Z_LIBS="$Z_LIBS -lbz2" else - { { echo "$as_me:$LINENO: error: *** libbz2 is required for bzip2 support" >&5 -echo "$as_me: error: *** libbz2 is required for bzip2 support" >&2;} + { { $as_echo "$as_me:$LINENO: error: *** libbz2 is required for bzip2 support" >&5 +$as_echo "$as_me: error: *** libbz2 is required for bzip2 support" >&2;} { (exit 1); exit 1; }; } fi @@ -20149,21 +11983,6 @@ _ACEOF fi -# Check whether --enable-loadable-font-modules was given. -if test "${enable_loadable_font_modules+set}" = set; then - enableval=$enable_loadable_font_modules; LOADABLE_FONTS=$enableval -else - LOADABLE_FONTS=yes -fi - -if test "x$LOADABLE_FONTS" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define LOADABLEFONTS 1 -_ACEOF - -fi - # # Support connection to font servers? # @@ -20192,10 +12011,10 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for hypot in -lm" >&5 -echo $ECHO_N "checking for hypot in -lm... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for hypot in -lm" >&5 +$as_echo_n "checking for hypot in -lm... " >&6; } if test "${ac_cv_lib_m_hypot+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" @@ -20227,131 +12046,161 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_m_hypot=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_hypot=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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_hypot" >&5 -echo "${ECHO_T}$ac_cv_lib_m_hypot" >&6; } -if test $ac_cv_lib_m_hypot = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_hypot" >&5 +$as_echo "$ac_cv_lib_m_hypot" >&6; } +if test "x$ac_cv_lib_m_hypot" = x""yes; then MATH_LIBS=-lm else - { { echo "$as_me:$LINENO: error: *** libm is required" >&5 -echo "$as_me: error: *** libm is required" >&2;} + { { $as_echo "$as_me:$LINENO: error: *** libm is required" >&5 +$as_echo "$as_me: error: *** libm is required" >&2;} { (exit 1); exit 1; }; } fi pkg_failed=no -{ echo "$as_me:$LINENO: checking for XFONT" >&5 -echo $ECHO_N "checking for XFONT... $ECHO_C" >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto fontenc\"") >&5 +{ $as_echo "$as_me:$LINENO: checking for XFONT" >&5 +$as_echo_n "checking for XFONT... " >&6; } + +if test -n "$XFONT_CFLAGS"; then + pkg_cv_XFONT_CFLAGS="$XFONT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto fontenc") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XFONT_CFLAGS=`$PKG_CONFIG --cflags "xproto xtrans fontsproto fontenc" 2>/dev/null` else pkg_failed=yes fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto fontenc\"") >&5 +if test -n "$XFONT_LIBS"; then + pkg_cv_XFONT_LIBS="$XFONT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto fontenc") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XFONT_LIBS=`$PKG_CONFIG --libs "xproto xtrans fontsproto fontenc" 2>/dev/null` else pkg_failed=yes fi -else - pkg_failed=untried + else + pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFONT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto xtrans fontsproto fontenc"` + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xproto xtrans fontsproto fontenc" 2>&1` + else + XFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xproto xtrans fontsproto fontenc" 2>&1` + fi # Put the nasty error message in config.log where it belongs - echo "$XFONT_PKG_ERRORS" 1>&5 + echo "$XFONT_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (xproto xtrans fontsproto fontenc) were not met: + +$XFONT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xproto xtrans fontsproto fontenc) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFONT_CFLAGS and XFONT_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details." >&5 -echo "$as_me: error: Package requirements (xproto xtrans fontsproto fontenc) were not met. +Alternatively, you may set the environment variables XFONT_CFLAGS +and XFONT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (xproto xtrans fontsproto fontenc) were not met: + +$XFONT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFONT_CFLAGS and XFONT_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details." >&2;} +Alternatively, you may set the environment variables XFONT_CFLAGS +and XFONT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it + { { $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: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the XFONT_CFLAGS and XFONT_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +Alternatively, you may set the environment variables XFONT_CFLAGS +and XFONT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. +To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the XFONT_CFLAGS and XFONT_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +Alternatively, you may set the environment variables XFONT_CFLAGS +and XFONT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. +To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else XFONT_CFLAGS=$pkg_cv_XFONT_CFLAGS XFONT_LIBS=$pkg_cv_XFONT_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } : fi # Transport selection macro from xtrans.m4 -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20376,20 +12225,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_signal=int else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void @@ -20397,8 +12247,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal @@ -20419,8 +12269,8 @@ else UNIXCONN=$unixdef fi - { echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 -echo $ECHO_N "checking if Xtrans should support UNIX socket connections... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 +$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; } if test "$UNIXCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -20428,8 +12278,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - { echo "$as_me:$LINENO: result: $UNIXCONN" >&5 -echo "${ECHO_T}$UNIXCONN" >&6; } + { $as_echo "$as_me:$LINENO: result: $UNIXCONN" >&5 +$as_echo "$UNIXCONN" >&6; } # Check whether --enable-tcp-transport was given. if test "${enable_tcp_transport+set}" = set; then enableval=$enable_tcp_transport; TCPCONN=$enableval @@ -20437,10 +12287,10 @@ else TCPCONN=yes fi - { echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 -echo $ECHO_N "checking if Xtrans should support TCP socket connections... $ECHO_C" >&6; } - { echo "$as_me:$LINENO: result: $TCPCONN" >&5 -echo "${ECHO_T}$TCPCONN" >&6; } + { $as_echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 +$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $TCPCONN" >&5 +$as_echo "$TCPCONN" >&6; } if test "$TCPCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -20449,10 +12299,10 @@ _ACEOF # SVR4 hides these in libraries other than libc - { echo "$as_me:$LINENO: checking for library containing socket" >&5 -echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } if test "${ac_cv_search_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -20490,26 +12340,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_socket=$ac_res else - echo "$as_me: failed program was:" >&5 + $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_socket+set}" = set; then @@ -20524,18 +12378,18 @@ fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 -echo "${ECHO_T}$ac_cv_search_socket" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 -echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } if test "${ac_cv_search_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -20573,26 +12427,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_gethostbyname=$ac_res else - echo "$as_me: failed program was:" >&5 + $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_gethostbyname+set}" = set; then @@ -20607,8 +12465,8 @@ fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -20616,81 +12474,15 @@ if test "$ac_res" != no; then fi -{ echo "$as_me:$LINENO: checking for main in -lws2_32" >&5 -echo $ECHO_N "checking for main in -lws2_32... $ECHO_C" >&6; } -if test "${ac_cv_lib_ws2_32_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -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 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 "echo \"\$as_me:$LINENO: $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 - 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 && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ws2_32_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ws2_32_main=no -fi - -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 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ws2_32_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ws2_32_main" >&6; } -if test $ac_cv_lib_ws2_32_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF - - LIBS="-lws2_32 $LIBS" - -fi -ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main - - # Needs to come after above checks for libsocket & libnsl for SVR4 systems # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval=$enable_ipv6; IPV6CONN=$enableval else - { echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20743,32 +12535,36 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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 && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_getaddrinfo=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getaddrinfo=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 -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } -if test $ac_cv_func_getaddrinfo = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +$as_echo "$ac_cv_func_getaddrinfo" >&6; } +if test "x$ac_cv_func_getaddrinfo" = x""yes; then IPV6CONN=yes else IPV6CONN=no @@ -20776,8 +12572,8 @@ fi fi - { echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 -echo $ECHO_N "checking if IPv6 support should be built... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 +$as_echo_n "checking if IPv6 support should be built... " >&6; } if test "$IPV6CONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -20785,14 +12581,14 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - { echo "$as_me:$LINENO: result: $IPV6CONN" >&5 -echo "${ECHO_T}$IPV6CONN" >&6; } + { $as_echo "$as_me:$LINENO: result: $IPV6CONN" >&5 +$as_echo "$IPV6CONN" >&6; } # 4.3BSD-Reno added a new member to struct sockaddr_in - { echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 -echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 +$as_echo_n "checking for struct sockaddr_in.sin_len... " >&6; } if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20822,20 +12618,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_sockaddr_in_sin_len=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20866,20 +12663,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_sockaddr_in_sin_len=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_in_sin_len=no @@ -20890,9 +12688,9 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } -if test $ac_cv_member_struct_sockaddr_in_sin_len = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 +$as_echo "$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } +if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = x""yes; then cat >>confdefs.h <<\_ACEOF #define BSD44SOCKETS 1 @@ -20902,12 +12700,13 @@ fi # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. - { echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_socklen_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20917,14 +12716,48 @@ cat >>conftest.$ac_ext <<_ACEOF $ac_includes_default #include <sys/socket.h> -typedef socklen_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (socklen_t)) + 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 + 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 <sys/socket.h> + +int +main () +{ +if (sizeof ((socklen_t))) + return 0; ; return 0; } @@ -20935,30 +12768,39 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_socklen_t=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_socklen_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_socklen_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; } -if test $ac_cv_type_socklen_t = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } +if test "x$ac_cv_type_socklen_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SOCKLEN_T 1 @@ -20981,10 +12823,10 @@ else LOCALCONN=$localdef fi - { echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 -echo $ECHO_N "checking if Xtrans should support os-specific local connections... $ECHO_C" >&6; } - { echo "$as_me:$LINENO: result: $LOCALCONN" >&5 -echo "${ECHO_T}$LOCALCONN" >&6; } + { $as_echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 +$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LOCALCONN" >&5 +$as_echo "$LOCALCONN" >&6; } if test "$LOCALCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -21007,10 +12849,10 @@ if test "x$GCC" = xyes ; then ;; esac else - { echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -echo $ECHO_N "checking whether __SUNPRO_C is declared... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21036,20 +12878,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +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 - echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl___SUNPRO_C=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl___SUNPRO_C=no @@ -21057,9 +12900,9 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -echo "${ECHO_T}$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then SUNCC="yes" else SUNCC="no" @@ -21097,8 +12940,8 @@ fi if test "x$RELEASE_VERSION" != "x"; then PACKAGE="$PACKAGE-$RELEASE_VERSION" PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 -echo "$as_me: Building with package name set to $PACKAGE" >&6;} + { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 +$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;} fi cat >>confdefs.h <<_ACEOF @@ -21133,7 +12976,7 @@ distcleancheck_listfiles='find . -type f ! -name ChangeLog -print' -ac_config_files="$ac_config_files Makefile src/Makefile src/fontfile/Makefile src/FreeType/Makefile src/builtins/Makefile src/bitmap/Makefile src/Type1/Makefile src/Speedo/Makefile src/fc/Makefile src/util/Makefile src/stubs/Makefile xfont.pc" +ac_config_files="$ac_config_files Makefile src/Makefile src/fontfile/Makefile src/FreeType/Makefile src/builtins/Makefile src/bitmap/Makefile src/fc/Makefile src/util/Makefile src/stubs/Makefile xfont.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -21162,11 +13005,12 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -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) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -21199,12 +13043,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -21220,7 +13064,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -21232,110 +13076,90 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" 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 - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_FREETYPE_TRUE}" && test -z "${XFONT_FREETYPE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_FREETYPE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_FREETYPE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${XFONT_TYPE1_TRUE}" && test -z "${XFONT_TYPE1_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_TYPE1\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_TYPE1\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${XFONT_SPEEDO_TRUE}" && test -z "${XFONT_SPEEDO_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_SPEEDO\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_FREETYPE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_SPEEDO\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_FREETYPE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${X_BZIP2_FONT_COMPRESSION_TRUE}" && test -z "${X_BZIP2_FONT_COMPRESSION_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"X_BZIP2_FONT_COMPRESSION\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"X_BZIP2_FONT_COMPRESSION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"X_BZIP2_FONT_COMPRESSION\" was never defined. +$as_echo "$as_me: error: conditional \"X_BZIP2_FONT_COMPRESSION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_BUILTINS_TRUE}" && test -z "${XFONT_BUILTINS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_BUILTINS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_BUILTINS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_BUILTINS\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_BUILTINS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_PCFFORMAT_TRUE}" && test -z "${XFONT_PCFFORMAT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_PCFFORMAT\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_PCFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_PCFFORMAT\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_PCFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_BDFFORMAT_TRUE}" && test -z "${XFONT_BDFFORMAT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_BDFFORMAT\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_BDFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_BDFFORMAT\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_BDFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_SNFFORMAT_TRUE}" && test -z "${XFONT_SNFFORMAT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_SNFFORMAT\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_SNFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_SNFFORMAT\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_SNFFORMAT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_BITMAP_TRUE}" && test -z "${XFONT_BITMAP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_BITMAP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_BITMAP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_BITMAP\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_BITMAP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_FONTFILE_TRUE}" && test -z "${XFONT_FONTFILE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_FONTFILE\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_FONTFILE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_FONTFILE\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_FONTFILE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${XFONT_FC_TRUE}" && test -z "${XFONT_FC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_FC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"XFONT_FC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_FC\" was never defined. +$as_echo "$as_me: error: conditional \"XFONT_FC\" 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 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -21348,7 +13172,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -21358,7 +13182,7 @@ DUALCASE=1; export DUALCASE # for MKS sh 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 + # 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 @@ -21380,17 +13204,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits +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 "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 + 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 - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + 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 # Support unset when possible. @@ -21406,8 +13258,6 @@ fi # 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.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -21430,7 +13280,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -21443,17 +13293,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -21475,7 +13318,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -21526,7 +13369,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -21554,7 +13397,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -21567,19 +13409,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 || + mkdir conf$$.dir 2>/dev/null +fi +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' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -21604,10 +13449,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -21629,8 +13474,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 libXfont $as_me 1.3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was +This file was extended by libXfont $as_me 1.4.0, which was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -21643,7 +13488,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_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" config_headers="$ac_config_headers" @@ -21651,22 +13505,23 @@ config_commands="$ac_config_commands" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 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] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -21680,13 +13535,13 @@ $config_commands Report bugs to <bug-autoconf@gnu.org>." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -libXfont config.status 1.3.4 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +libXfont config.status 1.4.0 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -21694,11 +13549,12 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -21720,30 +13576,36 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 + { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -21762,35 +13624,292 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # 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"`' + +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; 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; 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' + + + + _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -21799,21 +13918,20 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "include/X11/fonts/fontconf.h") CONFIG_HEADERS="$CONFIG_HEADERS include/X11/fonts/fontconf.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/fontfile/Makefile") CONFIG_FILES="$CONFIG_FILES src/fontfile/Makefile" ;; "src/FreeType/Makefile") CONFIG_FILES="$CONFIG_FILES src/FreeType/Makefile" ;; "src/builtins/Makefile") CONFIG_FILES="$CONFIG_FILES src/builtins/Makefile" ;; "src/bitmap/Makefile") CONFIG_FILES="$CONFIG_FILES src/bitmap/Makefile" ;; - "src/Type1/Makefile") CONFIG_FILES="$CONFIG_FILES src/Type1/Makefile" ;; - "src/Speedo/Makefile") CONFIG_FILES="$CONFIG_FILES src/Speedo/Makefile" ;; "src/fc/Makefile") CONFIG_FILES="$CONFIG_FILES src/fc/Makefile" ;; "src/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;; "src/stubs/Makefile") CONFIG_FILES="$CONFIG_FILES src/stubs/Makefile" ;; "xfont.pc") CONFIG_FILES="$CONFIG_FILES xfont.pc" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -21854,246 +13972,144 @@ $debug || (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr='
' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -PKG_CONFIG!$PKG_CONFIG$ac_delim -ENCODINGSDIR!$ENCODINGSDIR$ac_delim -XFONT_FREETYPE_TRUE!$XFONT_FREETYPE_TRUE$ac_delim -XFONT_FREETYPE_FALSE!$XFONT_FREETYPE_FALSE$ac_delim -FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim -FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim -ft_config!$ft_config$ac_delim -FREETYPE_REQUIRES!$FREETYPE_REQUIRES$ac_delim -XFONT_TYPE1_TRUE!$XFONT_TYPE1_TRUE$ac_delim -XFONT_TYPE1_FALSE!$XFONT_TYPE1_FALSE$ac_delim -XFONT_SPEEDO_TRUE!$XFONT_SPEEDO_TRUE$ac_delim -XFONT_SPEEDO_FALSE!$XFONT_SPEEDO_FALSE$ac_delim -X_GZIP_FONT_COMPRESSION!$X_GZIP_FONT_COMPRESSION$ac_delim -X_BZIP2_FONT_COMPRESSION_TRUE!$X_BZIP2_FONT_COMPRESSION_TRUE$ac_delim -X_BZIP2_FONT_COMPRESSION_FALSE!$X_BZIP2_FONT_COMPRESSION_FALSE$ac_delim -Z_LIBS!$Z_LIBS$ac_delim -XFONT_BUILTINS_TRUE!$XFONT_BUILTINS_TRUE$ac_delim -XFONT_BUILTINS_FALSE!$XFONT_BUILTINS_FALSE$ac_delim -XFONT_PCFFORMAT_TRUE!$XFONT_PCFFORMAT_TRUE$ac_delim -XFONT_PCFFORMAT_FALSE!$XFONT_PCFFORMAT_FALSE$ac_delim -XFONT_BDFFORMAT_TRUE!$XFONT_BDFFORMAT_TRUE$ac_delim -XFONT_BDFFORMAT_FALSE!$XFONT_BDFFORMAT_FALSE$ac_delim -XFONT_SNFFORMAT_TRUE!$XFONT_SNFFORMAT_TRUE$ac_delim -XFONT_SNFFORMAT_FALSE!$XFONT_SNFFORMAT_FALSE$ac_delim -XFONT_BITMAP_TRUE!$XFONT_BITMAP_TRUE$ac_delim -XFONT_BITMAP_FALSE!$XFONT_BITMAP_FALSE$ac_delim -XFONT_FONTFILE_TRUE!$XFONT_FONTFILE_TRUE$ac_delim -XFONT_FONTFILE_FALSE!$XFONT_FONTFILE_FALSE$ac_delim -XFONT_FC_TRUE!$XFONT_FC_TRUE$ac_delim -XFONT_FC_FALSE!$XFONT_FC_FALSE$ac_delim -MATH_LIBS!$MATH_LIBS$ac_delim -XFONT_CFLAGS!$XFONT_CFLAGS$ac_delim -XFONT_LIBS!$XFONT_LIBS$ac_delim -CWARNFLAGS!$CWARNFLAGS$ac_delim -OS_CFLAGS!$OS_CFLAGS$ac_delim -CHANGELOG_CMD!$CHANGELOG_CMD$ac_delim -distcleancheck_listfiles!$distcleancheck_listfiles$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$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.sed | grep -c X` = 43; 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 - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -22109,19 +14125,133 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + 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 "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -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;; @@ -22150,26 +14280,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -22179,7 +14321,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22205,7 +14347,7 @@ echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -22214,7 +14356,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22235,17 +14377,17 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -22290,12 +14432,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -22304,13 +14447,14 @@ case `sed -n '/datarootdir/ { /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -22324,15 +14468,16 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -22343,135 +14488,75 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22491,14 +14576,23 @@ echo X$ac_file | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac 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. @@ -22508,13 +14602,13 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22558,7 +14652,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | +$as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22584,7 +14678,7 @@ echo X"$file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -22593,7 +14687,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22614,14 +14708,649 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" 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="" + +# ### 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 + +# ### 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" + + ;; esac done # for ac_tag @@ -22632,6 +15361,11 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -22653,4 +15387,8 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $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;} +fi diff --git a/libXfont/configure.ac b/libXfont/configure.ac index 4a6c1e060..c6b6ca64b 100644 --- a/libXfont/configure.ac +++ b/libXfont/configure.ac @@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) AC_INIT([libXfont], - 1.3.4, + 1.4.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXfont) dnl @@ -69,7 +69,6 @@ XFONT_FONTFILE=no # # Scalable fonts in files: # FreeType -# IBM Type1 rasterizer # Bitstream Speedo rasterizer # AC_ARG_ENABLE(freetype, [ --disable-freetype],[XFONT_FREETYPE=$enableval],[XFONT_FREETYPE=yes]) @@ -107,20 +106,6 @@ AC_SUBST(FREETYPE_LIBS) AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_REQUIRES) -AC_ARG_ENABLE(type1, [ --enable-type1 ], [XFONT_TYPE1=$enableval], [XFONT_TYPE1=yes]) -if test "x$XFONT_TYPE1" = xyes; then - AC_DEFINE(XFONT_TYPE1,1,[Support IBM Type 1 rasterizer for Type1 font files]) - XFONT_FONTFILE=yes -fi -AM_CONDITIONAL(XFONT_TYPE1, [test "x$XFONT_TYPE1" = xyes ]) - -AC_ARG_ENABLE(speedo, [ --disable-speedo ], [XFONT_SPEEDO=$enableval], [XFONT_SPEEDO=yes]) -AM_CONDITIONAL(XFONT_SPEEDO, [test "x$XFONT_SPEEDO" = xyes ]) -if test "x$XFONT_SPEEDO" = xyes; then - AC_DEFINE(XFONT_SPEEDO,1,[Support Speedo font files]) - XFONT_FONTFILE=yes -fi - # # Bitmap fonts in files: # Builtins (gzipped pcf format in .text segment) @@ -185,14 +170,6 @@ if test "x$XFONT_FONTFILE" = xyes; then AC_DEFINE(XFONT_FONTFILE,1,[Support fonts in files]) fi -AC_ARG_ENABLE(loadable-font-modules, - AC_HELP_STRING([--disable-loadable-font-modules], - [support dynamically loaded font modules (default is enabled)]), - [LOADABLE_FONTS=$enableval], [LOADABLE_FONTS=yes]) -if test "x$LOADABLE_FONTS" = xyes; then - AC_DEFINE(LOADABLEFONTS,1,[Support dynamically loaded font modules]) -fi - # # Support connection to font servers? # @@ -236,8 +213,6 @@ AC_OUTPUT([Makefile src/FreeType/Makefile src/builtins/Makefile src/bitmap/Makefile - src/Type1/Makefile - src/Speedo/Makefile src/fc/Makefile src/util/Makefile src/stubs/Makefile diff --git a/libXfont/depcomp b/libXfont/depcomp index ca5ea4e1e..e5f9736c7 100644 --- a/libXfont/depcomp +++ b/libXfont/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/libXfont/include/X11/fonts/bitmap.h b/libXfont/include/X11/fonts/bitmap.h index 731c85f5b..9b170a90a 100644 --- a/libXfont/include/X11/fonts/bitmap.h +++ b/libXfont/include/X11/fonts/bitmap.h @@ -37,11 +37,7 @@ from The Open Group. #define _BITMAP_H_ #include <X11/fonts/fntfilio.h> -#ifndef FONTMODULE #include <stdio.h> /* just for NULL */ -#else -#include "xf86_ansic.h" -#endif /* * Internal format used to store bitmap fonts @@ -94,7 +90,6 @@ extern Bool bitmapAddInkMetrics ( FontPtr pFont ); extern int bitmapComputeWeight ( FontPtr pFont ); extern void BitmapRegisterFontFileFunctions ( void ); -extern int BitmapGetRenderIndex ( FontRendererPtr renderer ); extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont, int flags, FontEntryPtr entry, char *fileName, diff --git a/libXfont/include/X11/fonts/bufio.h b/libXfont/include/X11/fonts/bufio.h index b5977b1d0..f8e58151e 100644 --- a/libXfont/include/X11/fonts/bufio.h +++ b/libXfont/include/X11/fonts/bufio.h @@ -34,13 +34,6 @@ from The Open Group. #include <X11/Xfuncproto.h> -#ifdef TEST - -#define xalloc(s) malloc(s) -#define xfree(s) free(s) - -#endif - #define BUFFILESIZE 8192 #define BUFFILEEOF -1 diff --git a/libXfont/include/X11/fonts/fntfilst.h b/libXfont/include/X11/fonts/fntfilst.h index 1a71eae7a..407c4cf17 100644 --- a/libXfont/include/X11/fonts/fntfilst.h +++ b/libXfont/include/X11/fonts/fntfilst.h @@ -34,9 +34,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _FONTFILEST_H_ #define _FONTFILEST_H_ -#ifndef FONTMODULE #include <X11/Xos.h> -#endif #ifndef XP_PSTEXT #include <X11/fonts/fontmisc.h> #endif diff --git a/libXfont/include/X11/fonts/fontconf.h.in b/libXfont/include/X11/fonts/fontconf.h.in index f12081d22..67783d389 100644 --- a/libXfont/include/X11/fonts/fontconf.h.in +++ b/libXfont/include/X11/fonts/fontconf.h.in @@ -23,12 +23,6 @@ /* Define as 1 if you have FreeType support in Xfont */ #undef XFONT_FREETYPE -/* Define as 1 if you have Type1 font support in Xfont */ -#undef XFONT_TYPE1 - -/* Define as 1 if you have Speedo support in Xfont */ -#undef XFONT_SPEEDO - /* Define as 1 if you have builtin font support in Xfont */ #undef XFONT_BUILTINS diff --git a/libXfont/include/X11/fonts/fontmisc.h b/libXfont/include/X11/fonts/fontmisc.h index 7b8651706..ed5fd1930 100644 --- a/libXfont/include/X11/fonts/fontmisc.h +++ b/libXfont/include/X11/fonts/fontmisc.h @@ -1,5 +1,3 @@ -/* $Xorg: fontmisc.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - /* Copyright 1991, 1998 The Open Group @@ -34,19 +32,10 @@ in this Software without prior written authorization from The Open Group. #ifndef _FONTMISC_H_ #define _FONTMISC_H_ -#ifndef FONTMODULE #include <X11/Xfuncs.h> #include <stdlib.h> #include <stdio.h> - -#ifndef X_NOT_POSIX #include <unistd.h> -#else -extern int close(); -#endif - -#endif /* FONTMODULE */ - #include <X11/Xdefs.h> @@ -68,32 +57,11 @@ extern Atom MakeAtom ( char *string, unsigned len, int makeit ); extern int ValidAtom ( Atom atom ); extern char *NameForAtom (Atom atom); -#ifndef _HAVE_XALLOC_DECLS -#define _HAVE_XALLOC_DECLS -extern pointer Xalloc(unsigned long); -extern pointer Xrealloc(pointer, unsigned long); -extern void Xfree(pointer); -extern pointer Xcalloc(unsigned long); -#endif -extern int f_strcasecmp(const char *s1, const char *s2); - -#ifndef xalloc -#define xalloc(n) Xalloc ((unsigned) n) -#define xfree(p) Xfree ((pointer) p) -#define xrealloc(p,n) Xrealloc ((pointer)p,n) -#define xcalloc(n,s) Xcalloc((unsigned) n * (unsigned) s) -#endif #define lowbit(x) ((x) & (~(x) + 1)) #undef assert #define assert(x) ((void)0) -#ifndef strcasecmp -#if defined(NEED_STRCASECMP) && !defined(FONTMODULE) -#define strcasecmp(s1,s2) f_strcasecmp(s1,s2) -#endif -#endif - extern void BitOrderInvert( register unsigned char *, diff --git a/libXfont/include/X11/fonts/fontmod.h b/libXfont/include/X11/fonts/fontmod.h deleted file mode 100644 index 42d277fd4..000000000 --- a/libXfont/include/X11/fonts/fontmod.h +++ /dev/null @@ -1,16 +0,0 @@ -/* $XFree86: xc/lib/font/include/fontmod.h,v 1.2 1998/07/25 06:57:09 dawes Exp $ */ - -#ifndef _FONTMOD_H_ -#define _FONTMOD_H_ - -typedef void (*InitFont)(void); - -typedef struct { - InitFont initFunc; - char * name; - pointer module; -} FontModule; - -extern FontModule *FontModuleList; - -#endif /* _FONTMOD_H_ */ diff --git a/libXfont/include/X11/fonts/pcf.h b/libXfont/include/X11/fonts/pcf.h index 673e18449..34bdf7bd3 100644 --- a/libXfont/include/X11/fonts/pcf.h +++ b/libXfont/include/X11/fonts/pcf.h @@ -94,8 +94,6 @@ typedef struct _PCFTable { extern int pcfReadFont ( FontPtr pFont, FontFilePtr file, int bit, int byte, int glyph, int scan ); extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file ); -extern int pmfReadFont ( FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan ); extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file ); extern void pcfError ( const char *, ... ); diff --git a/libXfont/install-sh b/libXfont/install-sh index 4fbbae7b7..a5897de6e 100644 --- a/libXfont/install-sh +++ b/libXfont/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -48,7 +48,7 @@ IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else @@ -58,34 +58,49 @@ fi # Put in absolute file names if you don't have them in your path; # or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 +chgrpcmd= chmodcmd=$chmodprog chowncmd= -chgrpcmd= -stripcmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - shift - shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac - continue;; + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; @@ -165,21 +170,22 @@ while test $# -ne 0; do *) break;; esac + shift done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do - if test -n "$dstarg"; then + if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" + set fnord "$@" "$dst_arg" shift # fnord fi shift # arg - dstarg=$arg + dst_arg=$arg done fi @@ -224,7 +230,7 @@ for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,22 +248,22 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst @@ -378,26 +384,19 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac + eval "$initialize_posix_glob" oIFS=$IFS IFS=/ - $posix_glob && set -f + $posix_glob set -f set fnord $dstdir shift - $posix_glob && set +f + $posix_glob set +f IFS=$oIFS prefixes= @@ -459,41 +458,54 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 trap '' 0 fi diff --git a/libXfont/ltmain.sh b/libXfont/ltmain.sh index 06823e057..6939dcc4a 100644 --- a/libXfont/ltmain.sh +++ b/libXfont/ltmain.sh @@ -1,30 +1,174 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# -# This program is free software; you can redistribute it and/or modify +# 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. # -# This program is distributed in the hope that it will be useful, but +# 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 this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# 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. # -# 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. +# --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 + + -basename="s,^.*/,,g" + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${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 @@ -34,36 +178,396 @@ basename="s,^.*/,,g" progpath="$0" # The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" +# 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 -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 +# 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 -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" +# 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: $*" +} -# 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 +# 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` -# Check that we have a working $echo. + 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! +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. + # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi @@ -76,145 +580,424 @@ EOF exit $EXIT_SUCCESS fi -default_mode= -help="Try \`$progname --help' for more information." magic="%%%MAGIC variable%%%" -mkdir="mkdir" -mv="mv -f" -rm="rm -f" - -# 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' -# 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 - SP2NL='tr \040 \012' - NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - SP2NL='tr \100 \n' - NL2SP='tr \r\n \100\100' - ;; -esac - -# NLS nuisances. -# 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). -# We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - $echo "$modename: not configured to build any kind of library" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi +magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -mode=$default_mode +# $mode is unset nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= execute_dlfiles= -duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 -##################################### -# Shell function definitions: -# This seems to be the best place for them +opt_dry_run=false +opt_duplicate_deps=false +opt_silent=false +opt_debug=: -# 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 () +# 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 () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} - if test "$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` +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi + # 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 - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } + 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 - $echo "X$my_tmpdir" | $Xsed + 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" -# 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 () + 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. { - 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" + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e '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 + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift ;; - *DLL*) - win32_libid_type="x86 DLL" + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac + 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 - $echo $win32_libid_type + + # 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 } @@ -226,39 +1009,32 @@ func_win32_libid () # 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 - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" + 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` "*) ;; + " $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 + 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. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done + # 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` "*) + " $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. @@ -272,11 +1048,10 @@ func_infer_tag () # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" fi ;; esac @@ -284,343 +1059,48 @@ func_infer_tag () } -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run 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 - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} -# func_extract_archives gentop oldlib ... -func_extract_archives () +# 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 () { - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - 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 - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - 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 have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - 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}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $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" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" + write_libobj=${1} if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" + write_lobj=\'${2}\' else - $echo "disable shared libraries" + write_lobj=none fi + if test "$build_old_libs" = yes; then - $echo "enable static libraries" + write_oldobj=\'${3}\' else - $echo "disable static libraries" + write_oldobj=none fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# 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= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute + $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. - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi +# Name of the PIC object. +pic_object=$write_lobj - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi +# Name of the non-PIC object +non_pic_object=$write_oldobj - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." +EOF + $MV "${write_libobj}T" "${write_libobj}" + } +} - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" +# 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" @@ -629,6 +1109,7 @@ if test -z "$show_help"; then arg_mode=normal libobj= later= + pie_flag= for arg do @@ -649,15 +1130,18 @@ if test -z "$show_help"; then # Accept any command-line options. case $arg in -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; - -static | -prefer-pic | -prefer-non-pic) + -pie | -fpie | -fPIE) + pie_flag="$pie_flag $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; @@ -673,31 +1157,25 @@ if test -z "$show_help"; then ;; # replaced later. I would guess that would be a bug. -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' - for arg in $args; do + for arg in $args; do IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" + func_quote_for_eval "$arg" + lastarg="$lastarg $func_quote_for_eval_result" done IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + 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. # @@ -709,64 +1187,42 @@ if test -z "$show_help"; then esac # case $arg_mode # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" + func_quote_for_eval "$lastarg" + base_compile="$base_compile $func_quote_for_eval_result" done # for arg case $arg_mode in arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE + func_fatal_error "you must specify an argument for -Xcompile" ;; target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + 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 - xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; + *.[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 - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -774,7 +1230,15 @@ if test -z "$show_help"; then 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 ;; @@ -791,28 +1255,17 @@ if test -z "$show_help"; then esac done - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi + 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 - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + 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 @@ -821,12 +1274,9 @@ if test -z "$show_help"; then removelist="$lobj $libobj ${libobj}T" fi - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | pw32* | os2*) + cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -838,10 +1288,8 @@ if test -z "$show_help"; then # 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} + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no @@ -851,13 +1299,13 @@ if test -z "$show_help"; then # 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" + 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 "\ + $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -868,34 +1316,22 @@ 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." - $run $rm $removelist + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - $echo "$srcfile" > "$lockfile" + 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 - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T <<EOF -# $libobj - a libtool object file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -EOF + 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 @@ -909,32 +1345,19 @@ EOF command="$base_compile $qsrcfile" fi - if test ! -d "${xdir}$objdir"; then - $show "$mkdir ${xdir}$objdir" - $run $mkdir ${xdir}$objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then - exit $exit_status - fi - fi + func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi - $run $rm "$lobj" "$output_obj" - - $show "$command" - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist - exit $EXIT_FAILURE - 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 "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -948,45 +1371,27 @@ 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." - $run $rm $removelist + $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 - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <<EOF -pic_object='$objdir/$objname' - -EOF - # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' + suppress_output=' >/dev/null 2>&1' fi - else - # No PIC object so indicate it doesn't exist in the libtool - # object file. - test -z "$run" && cat >> ${libobj}T <<EOF -pic_object=none - -EOF 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" + command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi @@ -996,17 +1401,12 @@ EOF # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" - $run $rm "$obj" "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - $run $rm $removelist - exit $EXIT_FAILURE - fi + 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 "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1020,53 +1420,2620 @@ 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." - $run $rm $removelist + $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 - $show "$mv $output_obj $obj" - if $run $mv $output_obj $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 - error=$? - $run $rm $removelist - exit $error + 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 - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <<EOF -# Name of the non-PIC object. -non_pic_object='$objname' + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" -EOF + # 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 - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <<EOF -# Name of the non-PIC object. -non_pic_object=none + # 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 +} -EOF +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 - $run $mv "${libobj}T" "${libobj}" + # 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\" - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $run $rm "$lockfile" + $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%/[^/]*\$%%'\` - # libtool link mode - link | relink) - modename="$modename: link" + # 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 - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *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 @@ -1084,10 +4051,10 @@ EOF allow_undefined=yes ;; esac - libtool_args="$nonopt" + libtool_args=$nonopt base_compile="$nonopt $@" - compile_command="$nonopt" - finalize_command="$nonopt" + compile_command=$nonopt + finalize_command=$nonopt compile_rpath= finalize_rpath= @@ -1102,6 +4069,7 @@ EOF dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= + new_inherited_linker_flags= avoid_version=no dlfiles= @@ -1117,7 +4085,6 @@ EOF no_install=no objs= non_pic_objects= - notinst_path= # paths that contain not-installed libtool libraries precious_files_regex= prefer_static_libs=no preload=no @@ -1131,28 +4098,44 @@ EOF 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 - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -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 - $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + 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 - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -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 @@ -1167,20 +4150,16 @@ EOF while test "$#" -gt 0; do arg="$1" shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" + 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) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" ;; esac @@ -1188,8 +4167,8 @@ EOF dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in @@ -1227,10 +4206,8 @@ EOF ;; expsyms) export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; @@ -1239,18 +4216,21 @@ EOF prev= continue ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac prev= continue ;; - release) - release="-$arg" + inst_prefix) + inst_prefix_dir="$arg" prev= continue ;; @@ -1258,39 +4238,30 @@ EOF if test -f "$arg"; then save_arg=$arg moreargs= - for fil in `cat $save_arg` + 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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + func_source "$arg" - if test -z "$pic_object" || \ + if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && \ + test "$pic_object" = none && test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. @@ -1315,7 +4286,7 @@ EOF fi # A PIC object. - libobjs="$libobjs $pic_object" + func_append libobjs " $pic_object" arg="$pic_object" fi @@ -1325,7 +4296,7 @@ EOF non_pic_object="$xdir$non_pic_object" # A standard non-PIC object - non_pic_objects="$non_pic_objects $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 @@ -1333,46 +4304,48 @@ EOF # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - + if $opt_dry_run; then # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + 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 - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE + 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]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then @@ -1389,39 +4362,37 @@ EOF prev= continue ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" + shrext) + shrext_cmds="$arg" prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" continue ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + weak) + weak_libs="$weak_libs $arg" prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" + func_append compile_command " $qarg" + func_append finalize_command " $qarg" continue ;; - shrext) - shrext_cmds="$arg" + xcompiler) + compiler_flags="$compiler_flags $qarg" prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" continue ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + 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 ;; *) @@ -1437,16 +4408,16 @@ EOF case $arg in -all-static) if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" + # 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. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue + func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -1471,8 +4442,7 @@ EOF -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE + func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms @@ -1482,15 +4452,8 @@ EOF continue ;; - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + -framework) + prev=framework continue ;; @@ -1504,25 +4467,30 @@ EOF -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" ;; esac continue ;; -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-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` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac @@ -1534,14 +4502,16 @@ EOF ;; esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + *-*-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 ;; @@ -1552,7 +4522,7 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; @@ -1566,7 +4536,7 @@ EOF ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" + deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -1590,57 +4560,35 @@ EOF continue ;; + -module) + module=yes + continue + ;; + # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" prev=xcompiler continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes + 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 ;; - # -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* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg 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*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext + -multi_module) + single_module="${wl}-multi_module" continue ;; @@ -1651,11 +4599,11 @@ EOF -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + # 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 ;; @@ -1696,13 +4644,13 @@ EOF ;; -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + func_stripname '-R' '' "$arg" + dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in @@ -1712,7 +4660,17 @@ EOF continue ;; - -static) + -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 @@ -1730,47 +4688,49 @@ EOF prev=vinfo continue ;; + -version-number) prev=vinfo vinfo_number=yes continue ;; + -weak) + prev=weak + continue + ;; + -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" + 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" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$arg" + arg=$func_stripname_result ;; -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" + 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" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$arg" + arg=$func_stripname_result ;; -Xcompiler) @@ -1788,16 +4748,36 @@ EOF 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. -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" ;; *.$objext) @@ -1809,32 +4789,23 @@ EOF # A libtool-controlled object. # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + func_source "$arg" - if test -z "$pic_object" || \ + if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && \ + test "$pic_object" = none && test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. @@ -1859,7 +4830,7 @@ EOF fi # A PIC object. - libobjs="$libobjs $pic_object" + func_append libobjs " $pic_object" arg="$pic_object" fi @@ -1869,7 +4840,7 @@ EOF non_pic_object="$xdir$non_pic_object" # A standard non-PIC object - non_pic_objects="$non_pic_objects $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 @@ -1877,28 +4848,22 @@ EOF # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - + if $opt_dry_run; then # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" + 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 ;; @@ -1931,70 +4896,51 @@ EOF *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac + 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 - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" fi done # argument parsing loop - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + 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\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + 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\'\` + 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\" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi + func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; @@ -2002,22 +4948,13 @@ EOF *) linkmode=prog ;; # Anything else should be a program. esac - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - 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 test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2032,7 +4969,7 @@ EOF # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + 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" ;; @@ -2048,15 +4985,16 @@ EOF 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 link" + passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done @@ -2072,7 +5010,20 @@ EOF *) 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" @@ -2085,31 +5036,65 @@ EOF 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) + -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 - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + func_warning "\`-l' is ignored for archives/objects" continue fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + 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}" @@ -2139,21 +5124,17 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$lib"; then library_names= old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac + 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 - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." + func_dirname "$lib" "" "." + ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" @@ -2165,19 +5146,35 @@ EOF 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" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then @@ -2190,17 +5187,19 @@ EOF compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; @@ -2218,35 +5217,41 @@ EOF fi case $linkmode in lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ + # 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 + valid_a_lib=yes + fi ;; - pass_all) - valid_a_lib=yes + 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 used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi + 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) @@ -2281,21 +5286,18 @@ EOF continue ;; esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." + func_dirname "$lib" "" "." + ladir="$func_dirname_result" dlname= dlopen= @@ -2303,6 +5305,7 @@ EOF 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 @@ -2311,11 +5314,19 @@ EOF # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - + 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 @@ -2328,26 +5339,24 @@ EOF deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + 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" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE + 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 @@ -2358,15 +5367,13 @@ EOF linklib="$l" done if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + 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 - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || @@ -2388,18 +5395,19 @@ EOF *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + 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 - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + 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 - $echo "$modename: warning: library \`$lib' was moved." 1>&2 + func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" @@ -2421,18 +5429,22 @@ EOF notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + 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" @@ -2468,7 +5480,9 @@ EOF tmp_libs= for deplib in $dependency_libs; do case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + -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 @@ -2478,7 +5492,7 @@ EOF # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2490,14 +5504,15 @@ EOF if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { 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 - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; esac fi @@ -2535,27 +5550,43 @@ EOF 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 + 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 - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi + 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) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo + # 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" + $ECHO "*** Warning: Linking the executable $output against the loadable module" else - $echo "*** Warning: Linking the shared library $output against the loadable module" + $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi - $echo "*** $linklib is not portable!" + $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then @@ -2585,17 +5616,19 @@ EOF if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` + 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*) - major=`expr $current - $age` + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result versuffix="-$major" ;; esac @@ -2606,36 +5639,22 @@ EOF # Make a new name for the extract_expsyms_cmds to use soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + 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 - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + 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 - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + 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 @@ -2657,17 +5676,21 @@ EOF *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added + # 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 | - $EGREP ": [^:]* bundle" >/dev/null ; 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" + $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 @@ -2685,7 +5708,8 @@ EOF fi ;; relink) - if test "$hardcode_direct" = yes; then + 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" @@ -2709,8 +5733,7 @@ EOF esac if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE + func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then @@ -2725,8 +5748,8 @@ EOF 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 && \ + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; @@ -2741,7 +5764,8 @@ EOF add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then + 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" @@ -2755,9 +5779,9 @@ EOF 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" + add="$inst_prefix_dir$libdir/$linklib" else - add="$libdir/$linklib" + add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. @@ -2801,21 +5825,21 @@ EOF # 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." + $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." + $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." + $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 @@ -2839,7 +5863,8 @@ EOF temp_deplibs= for libdir in $dependency_libs; do case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; @@ -2857,7 +5882,7 @@ EOF tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then + if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac @@ -2871,88 +5896,71 @@ EOF case $deplib in -L*) path="$deplib" ;; *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." + 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 - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= + if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared + 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 "$path/$depdepl" ; then - depdepl="$path/$depdepl" + 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 - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac fi - path="" ;; *) - path="-L$path" + 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 ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $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 @@ -3051,38 +6059,36 @@ EOF 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 "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + func_warning "\`-dlopen' is ignored for archives" fi - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi + 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 @@ -3094,48 +6100,48 @@ EOF # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + 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 - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + func_stripname '' '.la' "$outputname" + name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE + 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!" + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" oldlibs= if test -z "$rpath"; then @@ -3149,25 +6155,21 @@ EOF build_old_libs=yes fi - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi + 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" - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + 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 @@ -3175,9 +6177,9 @@ EOF case $vinfo_number in yes) - number_major="$2" - number_minor="$3" - number_revision="$4" + 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 @@ -3186,8 +6188,9 @@ EOF # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) - current=`expr $number_major + $number_minor` + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result age="$number_minor" revision="$number_revision" ;; @@ -3197,16 +6200,18 @@ EOF age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + func_arith $number_major + $number_minor + current=$func_arith_result age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; no) - current="$2" - revision="$3" - age="$4" + current="$1" + revision="$2" + age="$3" ;; esac @@ -3214,34 +6219,30 @@ EOF 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]) ;; *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + 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]) ;; *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + 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]) ;; *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + 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 - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + 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. @@ -3254,11 +6255,14 @@ EOF darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header - major=.`expr $current - $age` + func_arith $current - $age + major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + 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) @@ -3268,11 +6272,16 @@ EOF freebsd-elf) major=".$current" - versuffix=".$current"; + versuffix=".$current" ;; irix | nonstopux) - major=`expr $current - $age + 1` + 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 ;; @@ -3283,8 +6292,10 @@ EOF # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done @@ -3294,20 +6305,24 @@ EOF ;; linux) - major=.`expr $current - $age` + func_arith $current - $age + major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) - major=.`expr $current - $age` + 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 - iface=`expr $current - $loop` - loop=`expr $loop - 1` + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result verstring="$verstring:${iface}.0" done @@ -3315,6 +6330,11 @@ EOF verstring="$verstring:${current}.0" ;; + qnx) + major=".$current" + versuffix=".$current" + ;; + sunos) major=".$current" versuffix=".$current.$revision" @@ -3323,14 +6343,13 @@ EOF windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. - major=`expr $current - $age` + func_arith $current - $age + major=$func_arith_result versuffix="-$major" ;; *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE + func_fatal_configuration "unknown library version type \`$version_type'" ;; esac @@ -3364,7 +6383,7 @@ EOF # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi @@ -3372,21 +6391,26 @@ EOF # 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/*"` + tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in - *.$objext) + *.$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 + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then continue fi fi @@ -3395,10 +6419,8 @@ EOF *) ;; esac done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. @@ -3406,15 +6428,15 @@ EOF 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` + 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 "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done + #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. @@ -3454,12 +6476,12 @@ EOF if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + *-*-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 -framework System" + deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -3473,7 +6495,7 @@ EOF *-*-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" @@ -3510,18 +6532,18 @@ EOF # 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. - $rm conftest.c + $opt_dry_run || $RM conftest.c cat > conftest.c <<EOF int main() { return 0; } EOF - $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + $opt_dry_run || $RM conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do - name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + 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 "*) @@ -3529,40 +6551,41 @@ EOF i="" ;; esac - fi + fi if test -n "$i" ; then - libname=`eval \\$echo \"$libname_spec\"` - deplib_matches=`eval \\$echo \"$library_names_spec\"` - set dummy $deplib_matches - deplib_match=$2 + 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." + $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 - else + ;; + *) newdeplibs="$newdeplibs $i" - fi + ;; + 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 - name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then - $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + 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 @@ -3573,44 +6596,47 @@ EOF esac fi if test -n "$i" ; then - libname=`eval \\$echo \"$libname_spec\"` - deplib_matches=`eval \\$echo \"$library_names_spec\"` - set dummy $deplib_matches - deplib_match=$2 + 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." + $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." + $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 - else + ;; + *) newdeplibs="$newdeplibs $i" - fi + ;; + esac done fi ;; file_magic*) - set dummy $deplibs_check_method - file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + set dummy $deplibs_check_method; shift + file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then + 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 "*) @@ -3620,13 +6646,13 @@ EOF esac fi if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` + 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 + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an @@ -3639,12 +6665,12 @@ EOF potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then + 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 @@ -3654,32 +6680,35 @@ EOF 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" + $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)" + $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" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" fi fi - else + ;; + *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" - fi + ;; + esac done # Gone through all deplibs. ;; match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then + 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 "*) @@ -3689,14 +6718,13 @@ EOF esac fi if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` + 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 \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then + 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 @@ -3706,44 +6734,46 @@ EOF 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" + $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)" + $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" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi - else + ;; + *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" - fi + ;; + esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` + 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" | ${SED} -e "1s,^X,," -e "s,$i,,"` + 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 $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." + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else - $echo "*** Warning: inter-library dependencies are not known to be supported." + $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi - $echo "*** All declared inter-library dependencies are being dropped." + $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; @@ -3756,24 +6786,24 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + # 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." + $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." + $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" @@ -3783,16 +6813,16 @@ EOF 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." + $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." + $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 @@ -3806,7 +6836,14 @@ EOF # 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 @@ -3835,7 +6872,6 @@ EOF done deplibs="$new_libs" - # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -3906,8 +6942,9 @@ EOF eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names - realname="$2" - shift; shift + shift + realname="$1" + shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" @@ -3926,71 +6963,122 @@ EOF done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + 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 - $show "generating symbol list for \`$libname.la'" + func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols + $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\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false + 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. - $show "using reloadable object file for export list..." - skipped_export=: + # 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"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' + 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 - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + 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 + 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" @@ -3998,7 +7086,7 @@ EOF # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. @@ -4011,22 +7099,24 @@ EOF 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 + 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:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + 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. - $echo "creating reloadable object files..." + # 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 @@ -4040,77 +7130,162 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` + 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= - delfiles= last_robj= k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" + + 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 - # 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\" + 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 - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 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 ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - $echo "creating a temporary reloadable object file: $output" + 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 - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do + exit $lt_exit + } + done IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || 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. @@ -4118,6 +7293,7 @@ EOF 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. @@ -4130,28 +7306,45 @@ EOF cmds=$module_cmds fi else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds + 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" - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" + 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\" - $show "$cmd" - $run eval "$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 - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi exit $lt_exit @@ -4161,12 +7354,11 @@ EOF # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + $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 - $show "${rm}r $gentop" - $run ${rm}r "$gentop" + func_show_eval '${RM}r "$gentop"' fi fi @@ -4176,8 +7368,7 @@ EOF # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done @@ -4190,38 +7381,35 @@ EOF ;; obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + func_warning "\`-dlopen' is ignored for objects" fi - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi + 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) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` + 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= @@ -4230,7 +7418,7 @@ EOF esac # Delete the old objects. - $run $rm $obj $libobj + $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create @@ -4239,12 +7427,14 @@ EOF reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -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 reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + 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" @@ -4255,24 +7445,15 @@ EOF 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 + 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" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + 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 - $show "${rm}r $gentop" - $run ${rm}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -4280,14 +7461,13 @@ EOF if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop + 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" - # $run eval "echo timestamp > $libobj" || exit $? + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi @@ -4295,20 +7475,11 @@ EOF # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop + func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS @@ -4316,39 +7487,45 @@ EOF prog) case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi + 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 / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + 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 - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; + *-*-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 @@ -4423,14 +7600,16 @@ EOF esac fi case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + *-*-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 ;; @@ -4482,281 +7661,51 @@ EOF 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 - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - test -z "$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 arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # 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/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - 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*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - 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@%%"` + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' fi - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + 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'` + 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. - $show "$link_command" - $run eval "$link_command" - exit_status=$? + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" + 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 "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi @@ -4789,12 +7738,11 @@ static const void *lt_preloaded_setup() { # 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'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. - $run $rm $output + $opt_dry_run || $RM $output # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi @@ -4803,13 +7751,13 @@ static const void *lt_preloaded_setup() { link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 + 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'` + 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= @@ -4821,594 +7769,103 @@ static const void *lt_preloaded_setup() { fi # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - $show "$link_command" - $run eval "$link_command" || exit $? + func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. - $show "creating $output" + 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}\" || unset $var || { $var=; export $var; }; }; $relink_command" + 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 - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + 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"` + 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 + # 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"` + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi - # Only actually do things if our run command is non-null. - if test -z "$run"; then + # 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) output=`$echo $output|${SED} 's,.exe$,,'` ;; + *.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 - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - 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 - - cat > $cwrappersource <<EOF - -/* $cwrappersource - temporary wrapper executable for $objdir/$outputname - Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP - - 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* "/bin/sh $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. -*/ -EOF - cat >> $cwrappersource<<"EOF" -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <malloc.h> -#include <stdarg.h> -#include <assert.h> -#include <string.h> -#include <ctype.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 DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# 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 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#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); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <<EOF - newargz[0] = (char *) xstrdup("$SHELL"); -EOF - - cat >> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i<argc+1; i++) - { - DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); - ; - } - -EOF - - case $host_os in - mingw*) - cat >> $cwrappersource <<EOF - execv("$SHELL",(char const **)newargz); -EOF - ;; - *) - cat >> $cwrappersource <<EOF - execv("$SHELL",newargz); -EOF - ;; - esac - - cat >> $cwrappersource <<"EOF" - return 127; -} - -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; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -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; - - DEBUG("(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 * -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); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# 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' - -# 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 variable: - 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 >> $output "\ - - # 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 - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - 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 >> $output "\ - - # 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 $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - 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 >> $output "\ - # 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 >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi + 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 + } - $echo >> $output "\ - 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*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" + # 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 - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" + func_emit_wrapper no > $output + chmod +x $output ;; esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE - 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 $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi + } exit $EXIT_SUCCESS ;; esac @@ -5417,7 +7874,7 @@ fi\ for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" + oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else @@ -5426,6 +7883,9 @@ fi\ 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 @@ -5440,8 +7900,18 @@ 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 + 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 @@ -5450,32 +7920,22 @@ fi\ # not supported by libtool). if (for obj in $oldobjs do - $echo "X$obj" | $Xsed -e 's%^.*/%%' + 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..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - + $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 - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + func_basename "$obj" + objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -5483,58 +7943,62 @@ fi\ # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase - counter=`expr $counter + 1` + func_arith $counter + 1 + counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" + 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\" - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + 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 - $echo "using piecewise archive linking..." + 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 - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then + 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 + 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 @@ -5546,49 +8010,39 @@ fi\ fi fi fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" + func_execute_cmds "$cmds" 'exit $?' done - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi + 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" - $show "creating $output" + 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}\" || unset $var || { $var=; export $var; }; }; $relink_command" + 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 - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + 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"` + 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. - if test -z "$run"; then + $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then @@ -5600,12 +8054,11 @@ fi\ for deplib in $dependency_libs; do case $deplib in *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + func_basename "$deplib" + name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; @@ -5613,25 +8066,37 @@ fi\ done dependency_libs="$newdependency_libs" newdlfiles= + for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" + 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 - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" + 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 @@ -5654,15 +8119,15 @@ fi\ done dlprefiles="$newdlprefiles" fi - $rm $output + $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) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac - $echo > $output "\ + $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -5676,9 +8141,15 @@ 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 @@ -5697,746 +8168,29 @@ 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 "\ + $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done - fi + } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # 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. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # 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. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - 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. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # 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 - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "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. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run 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 - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run 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 - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run 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 - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - 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 - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - 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) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - 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. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && 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" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi +} - # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} - # 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 - ;; - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" files= rmforce= exit_status=0 @@ -6448,30 +8202,28 @@ relink_command=\"$relink_command\"" for arg do case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + func_basename "$file" + name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -6483,9 +8235,9 @@ relink_command=\"$relink_command\"" 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 + 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 @@ -6499,8 +8251,8 @@ relink_command=\"$relink_command\"" case $name in *.la) # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name + if func_lalib_p "$file"; then + func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do @@ -6515,39 +8267,17 @@ relink_command=\"$relink_command\"" *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + 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. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -6557,20 +8287,20 @@ relink_command=\"$relink_command\"" *.lo) # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$file"; then # Read the .lo file - . $dir/$name + func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then + 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 + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi @@ -6581,17 +8311,26 @@ relink_command=\"$relink_command\"" noexename=$name case $file in *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename + 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 @@ -6606,237 +8345,38 @@ relink_command=\"$relink_command\"" fi ;; esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 + 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 - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 + func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status - ;; +} - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" +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 + eval exec "$exec_cmd" exit $EXIT_FAILURE fi -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [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 - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -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 \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to <bug-libtool@gnu.org>." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. +exit $exit_status -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: $modename [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 - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [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 - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -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: $modename [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." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -6850,14 +8390,17 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared +build_libtool_libs=no +build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=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/libXfont/src/FreeType/Makefile.in b/libXfont/src/FreeType/Makefile.in index 300e3d01f..a9d808efe 100644 --- a/libXfont/src/FreeType/Makefile.in +++ b/libXfont/src/FreeType/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -46,7 +46,7 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libft_la_LIBADD = am_libft_la_OBJECTS = ftenc.lo ftfuncs.lo fttools.lo xttcap.lo libft_la_OBJECTS = $(am_libft_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -77,22 +77,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -102,17 +98,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -122,6 +125,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -135,8 +139,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -169,6 +172,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -181,6 +185,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -205,8 +210,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -285,8 +290,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -298,8 +303,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -309,13 +314,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/FreeType/ft.h b/libXfont/src/FreeType/ft.h index 7560c8dd1..d5d789ec6 100644 --- a/libXfont/src/FreeType/ft.h +++ b/libXfont/src/FreeType/ft.h @@ -76,10 +76,6 @@ typedef struct _FTMapping /* ftfuncs.c */ -#if 0 -void FreeTypeRegisterFontFileFunctions(void); -#endif - /* ftenc.c */ int FTPickMapping(char*, int, char*, FT_Face, FTMappingPtr); diff --git a/libXfont/src/FreeType/ftenc.c b/libXfont/src/FreeType/ftenc.c index f6436fc40..27964b003 100644 --- a/libXfont/src/FreeType/ftenc.c +++ b/libXfont/src/FreeType/ftenc.c @@ -24,13 +24,7 @@ THE SOFTWARE. #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifndef FONTMODULE #include <string.h> -#else -#include "Xmd.h" -#include "Xdefs.h" -#include "xf86_ansic.h" -#endif #include <X11/fonts/fntfilst.h> #include <X11/fonts/fontutil.h> diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c index fff6eec76..47ebac737 100644 --- a/libXfont/src/FreeType/ftfuncs.c +++ b/libXfont/src/FreeType/ftfuncs.c @@ -34,14 +34,8 @@ THE SOFTWARE. #endif #include <X11/fonts/fontmisc.h> -#ifndef FONTMODULE #include <string.h> #include <math.h> -#else -#include "Xmd.h" -#include "Xdefs.h" -#include "xf86_ansic.h" -#endif #include <ctype.h> #include <X11/fonts/fntfilst.h> @@ -200,24 +194,22 @@ FreeTypeOpenFace(FTFacePtr *facep, char *FTFileName, char *realFileName, int fac } /* No cached match; need to make a new one */ - face = (FTFacePtr)xalloc(sizeof(FTFaceRec)); - if(face == NULL) { + face = calloc(1, sizeof(FTFaceRec)); + if (face == NULL) { return AllocError; } - memset(face, 0, sizeof(FTFaceRec)); - face->filename = (char*)xalloc(strlen(FTFileName)+1); - if(face->filename == NULL) { - xfree(face); + face->filename = strdup(FTFileName); + if (face->filename == NULL) { + free(face); return AllocError; } - strcpy(face->filename, FTFileName); ftrc = FT_New_Face(ftypeLibrary, realFileName, faceNumber, &face->face); if(ftrc != 0) { ErrorF("FreeType: couldn't open face %s: %d\n", FTFileName, ftrc); - xfree(face->filename); - xfree(face); + free(face->filename); + free(face); return BadFontName; } @@ -263,8 +255,8 @@ FreeTypeFreeFace(FTFacePtr face) } MUMBLE1("Closing face: %s\n", face->filename); FT_Done_Face(face->face); - xfree(face->filename); - xfree(face); + free(face->filename); + free(face); } } @@ -423,7 +415,7 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, FTFacePtr face, } /* None matching found */ - instance = (FTInstancePtr)xalloc(sizeof(FTInstanceRec)); + instance = malloc(sizeof(FTInstanceRec)); if(instance == NULL) { return AllocError; } @@ -458,7 +450,7 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, FTFacePtr face, ftrc = FT_New_Size(instance->face->face, &instance->size); if(ftrc != 0) { ErrorF("FreeType: couldn't create size object: %d\n", ftrc); - xfree(instance); + free(instance); return FTtoXReturnCode(ftrc); } FreeTypeActivateInstance(instance); @@ -471,14 +463,14 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, FTFacePtr face, int xsize, ysize; xrc = FTFindSize(face->face, trans, &xsize, &ysize); if(xrc != Successful) { - xfree(instance); + free(instance); return xrc; } ftrc = FT_Set_Pixel_Sizes(instance->face->face, xsize, ysize); } if(ftrc != 0) { FT_Done_Size(instance->size); - xfree(instance); + free(instance); return FTtoXReturnCode(ftrc); } @@ -575,10 +567,10 @@ FreeTypeFreeInstance(FTInstancePtr instance) FreeTypeFreeFace(instance->face); if(instance->charcellMetrics) { - xfree(instance->charcellMetrics); + free(instance->charcellMetrics); } if(instance->forceConstantMetrics) { - xfree(instance->forceConstantMetrics); + free(instance->forceConstantMetrics); } if(instance->glyphs) { for(i = 0; i < iceil(instance->nglyphs, FONTSEGMENTSIZE); i++) { @@ -586,21 +578,21 @@ FreeTypeFreeInstance(FTInstancePtr instance) for(j = 0; j < FONTSEGMENTSIZE; j++) { if(instance->available[i][j] == FT_AVAILABLE_RASTERISED) - xfree(instance->glyphs[i][j].bits); + free(instance->glyphs[i][j].bits); } - xfree(instance->glyphs[i]); + free(instance->glyphs[i]); } } - xfree(instance->glyphs); + free(instance->glyphs); } if(instance->available) { for(i = 0; i < iceil(instance->nglyphs, FONTSEGMENTSIZE); i++) { if(instance->available[i]) - xfree(instance->available[i]); + free(instance->available[i]); } - xfree(instance->available); + free(instance->available); } - xfree(instance); + free(instance); } } @@ -623,38 +615,30 @@ FreeTypeInstanceFindGlyph(unsigned idx_in, int flags, FTInstancePtr instance, } if(*available == NULL) { - *available = - (int**)xalloc(sizeof(int*) * iceil(instance->nglyphs, - FONTSEGMENTSIZE)); + *available = calloc(iceil(instance->nglyphs, FONTSEGMENTSIZE), + sizeof(int *)); if(*available == NULL) return AllocError; - memset((char*)(*available), 0, - sizeof(int*) * iceil(instance->nglyphs, FONTSEGMENTSIZE)); } segment = ifloor(idx, FONTSEGMENTSIZE); offset = idx - segment * FONTSEGMENTSIZE; if((*available)[segment] == NULL) { - (*available)[segment] = (int*)xalloc(sizeof(int) * FONTSEGMENTSIZE); + (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int *)); if((*available)[segment] == NULL) return AllocError; - memset((char*)(*available)[segment], 0, sizeof(int) * FONTSEGMENTSIZE); } if(*glyphs == NULL) { - *glyphs = (CharInfoPtr*)xalloc(sizeof(CharInfoPtr)* - iceil(instance->nglyphs, - FONTSEGMENTSIZE)); + *glyphs = calloc(iceil(instance->nglyphs, FONTSEGMENTSIZE), + sizeof(CharInfoPtr)); if(*glyphs == NULL) return AllocError; - memset((char*)(*glyphs), 0, - sizeof(CharInfoPtr)*iceil(instance->nglyphs, FONTSEGMENTSIZE)); } if((*glyphs)[segment] == NULL) { - (*glyphs)[segment]= - (CharInfoPtr)xalloc(sizeof(CharInfoRec) * FONTSEGMENTSIZE); + (*glyphs)[segment] = malloc(sizeof(CharInfoRec) * FONTSEGMENTSIZE); if((*glyphs)[segment] == NULL) return AllocError; } @@ -1378,10 +1362,9 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp, bpr = (((wd + (instance->bmfmt.glyph<<3) - 1) >> 3) & -instance->bmfmt.glyph); - raster = (char*)xalloc(ht * bpr); + raster = calloc(1, ht * bpr); if(raster == NULL) return AllocError; - memset(raster, 0, ht * bpr); tgp->bits = raster; @@ -1540,10 +1523,10 @@ FreeTypeFreeFont(FTFontPtr font) { FreeTypeFreeInstance(font->instance); if(font->ranges) - xfree(font->ranges); + free(font->ranges); if(font->dummy_char.bits) - xfree(font->dummy_char.bits); - xfree(font); + free(font->dummy_char.bits); + free(font); } /* Free a font. If freeProps is 0, don't free the properties. */ @@ -1558,8 +1541,8 @@ FreeTypeFreeXFont(FontPtr pFont, int freeProps) FreeTypeFreeFont(tf); } if(freeProps && pFont->info.nprops>0) { - xfree(pFont->info.isStringProp); - xfree(pFont->info.props); + free(pFont->info.isStringProp); + free(pFont->info.props); } DestroyFontRec(pFont); } @@ -1639,13 +1622,13 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info, ( (font_properties && (post || t1info)) ? 3 : 0 ) + 2; /* type */ - info->props = (FontPropPtr)xalloc(maxprops * sizeof(FontPropRec)); + info->props = malloc(maxprops * sizeof(FontPropRec)); if(info->props == NULL) return AllocError; - info->isStringProp = (char*)xalloc(maxprops); + info->isStringProp = malloc(maxprops); if(info->isStringProp == NULL) { - xfree(info->props); + free(info->props); return AllocError; } @@ -2139,7 +2122,7 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol, fflush(stderr); #endif nRanges++; - ranges = (fsRange *)xrealloc(ranges, nRanges*sizeof(*ranges)); + ranges = realloc(ranges, nRanges*sizeof(*ranges)); if (NULL == ranges) break; { @@ -2170,7 +2153,7 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol, } result=i; } - xfree(ranges); + free(ranges); } return result; } @@ -2214,7 +2197,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, int dirLen = p1-fileName; int baseLen = fileName+len - p2 -1; - *dynStrRealFileName = (char *)xalloc(dirLen+baseLen+1); + *dynStrRealFileName = malloc(dirLen+baseLen+1); if( *dynStrRealFileName == NULL ) { result = AllocError; goto quit; @@ -2284,7 +2267,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, if( beginptr && 0 < *face_number ) { char *slash; *dynStrFTFileName = /* add -> ':'+strlen0+':'+strlen1+'\0' */ - (char *)xalloc(1+strlen(beginptr)+1+strlen(*dynStrRealFileName)+1); + malloc(1+strlen(beginptr)+1+strlen(*dynStrRealFileName)+1); if( *dynStrFTFileName == NULL ){ result = AllocError; goto quit; @@ -2309,7 +2292,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, } } else{ - *dynStrFTFileName = (char *)xalloc(strlen(*dynStrRealFileName)+1); + *dynStrFTFileName = malloc(strlen(*dynStrRealFileName)+1); if( *dynStrFTFileName == NULL ){ result = AllocError; goto quit; @@ -2829,7 +2812,7 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face, font->nranges = vals->nranges; font->ranges = 0; if(font->nranges) { - font->ranges = (fsRange*)xalloc(vals->nranges*sizeof(fsRange)); + font->ranges = malloc(vals->nranges*sizeof(fsRange)); if(font->ranges == NULL) return AllocError; memcpy((char*)font->ranges, (char*)vals->ranges, @@ -3157,12 +3140,11 @@ FreeTypeLoadXFont(char *fileName, char *dynStrFTFileName = NULL; /* :1:foo.ttc */ char *dynStrTTCapCodeRange = NULL; - font = (FTFontPtr)xalloc(sizeof(FTFontRec)); + font = calloc(1, sizeof(FTFontRec)); if(font == NULL) { xrc = AllocError; goto quit; } - memset(font, 0, sizeof(FTFontRec)); xrc = FreeTypeSetUpTTCap(fileName, vals, &dynStrRealFileName, &dynStrFTFileName, @@ -3467,7 +3449,7 @@ FreeTypeLoadXFont(char *fileName, } /* header's metrics */ - instance->charcellMetrics = (xCharInfo*)xalloc(sizeof(xCharInfo)); + instance->charcellMetrics = malloc(sizeof(xCharInfo)); if(instance->charcellMetrics == NULL) { xrc = AllocError; goto quit; @@ -3498,7 +3480,7 @@ FreeTypeLoadXFont(char *fileName, int c = ins_ttcap->force_c_representative_metrics_char_code; /* header's metrics */ if( instance->forceConstantMetrics == NULL ){ - instance->forceConstantMetrics = (xCharInfo*)xalloc(sizeof(xCharInfo)); + instance->forceConstantMetrics = malloc(sizeof(xCharInfo)); if(instance->forceConstantMetrics == NULL) { xrc = AllocError; goto quit; @@ -3638,9 +3620,9 @@ FreeTypeLoadXFont(char *fileName, } quit: - if ( dynStrTTCapCodeRange ) xfree(dynStrTTCapCodeRange); - if ( dynStrFTFileName ) xfree(dynStrFTFileName); - if ( dynStrRealFileName ) xfree(dynStrRealFileName); + if ( dynStrTTCapCodeRange ) free(dynStrTTCapCodeRange); + if ( dynStrFTFileName ) free(dynStrFTFileName); + if ( dynStrRealFileName ) free(dynStrRealFileName); if ( xrc != Successful ) { if( font ){ if( face && font->instance == NULL ) FreeTypeFreeFace(face); @@ -3769,9 +3751,8 @@ FreeTypeGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars, else ht=ht_actual; bpr = (((wd + (tf->instance->bmfmt.glyph<<3) - 1) >> 3) & -tf->instance->bmfmt.glyph); - raster = (char*)xalloc(ht * bpr); + raster = calloc(1, ht * bpr); if(raster) { - memset(raster, 0, ht * bpr); tf->dummy_char.bits = raster; *gp++ = &tf->dummy_char; } @@ -3917,40 +3898,24 @@ FreeTypeGetInfoScalable(FontPathElementPtr fpe, FontInfoPtr info, static FontRendererRec renderers[] = { {".ttf", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".TTF", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".ttc", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".TTC", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".otf", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".OTF", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".otc", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".OTC", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".pfa", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".PFA", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".pfb", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".PFB", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, }; static int num_renderers = sizeof(renderers) / sizeof(renderers[0]); static FontRendererRec alt_renderers[] = { {".bdf", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".BDF", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, {".pcf", 4, 0, FreeTypeOpenScalable, 0, FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".PCF", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, }; static int num_alt_renderers = diff --git a/libXfont/src/FreeType/fttools.c b/libXfont/src/FreeType/fttools.c index 10604b1f6..7277273fd 100644 --- a/libXfont/src/FreeType/fttools.c +++ b/libXfont/src/FreeType/fttools.c @@ -27,14 +27,8 @@ #include <config.h> #endif #include <X11/fonts/fontmisc.h> -#ifndef FONTMODULE #include <ctype.h> #include <string.h> -#else -#include "Xmd.h" -#include "Xdefs.h" -#include "xf86_ansic.h" -#endif #include <X11/fonts/font.h> #include <ft2build.h> diff --git a/libXfont/src/FreeType/xttcap.c b/libXfont/src/FreeType/xttcap.c index 507da80d6..89e092b0e 100644 --- a/libXfont/src/FreeType/xttcap.c +++ b/libXfont/src/FreeType/xttcap.c @@ -44,21 +44,8 @@ static char const * const releaseID = #endif #include <X11/fonts/fontmisc.h> #include <string.h> -#ifndef FONTMODULE #include <ctype.h> #include <math.h> -#else -#include "Xmd.h" -#include "Xdefs.h" -#include "xf86_ansic.h" -#endif -/* -#include <X11/X.h> -#include <X11/Xmd.h> -#include <X11/Xfuncproto.h> -#include "xf86Module.h" -#include "xf86_ansic.h" -*/ #ifndef True #define True (-1) @@ -69,17 +56,6 @@ static char const * const releaseID = #include "xttcap.h" -#if 0 -/* - Prototypes for obsoleted OS (e.g. SunOS4) - */ - -#if (defined(sun) && !(defined(SVR4) || defined(__SVR4))) -double strtod(char *str, char **ptr); -double strtol(char *str, char **ptr, int base); -#endif -#endif - /************************************************************************** Private Data Types @@ -259,7 +235,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList, { char *p; - if (NULL == (p = (char *)xalloc(strlen(strValue)+1))) { + if (NULL == (p = malloc(strlen(strValue)+1))) { fprintf(stderr, "truetype font property : " "cannot allocate memory.\n"); @@ -283,8 +259,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList, /* add to list */ SPropRecValListNodeP *newNode; - if (NULL == (newNode = - (SPropRecValListNodeP *)xalloc(sizeof(*newNode)))) { + if (NULL == (newNode = malloc(sizeof(*newNode)))) { fprintf(stderr, "truetype font property : " "cannot allocate memory.\n"); @@ -473,7 +448,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is) char *buf = NULL; char *recordHead, *valueHead = NULL; - if (NULL == (buf = xalloc(LEN_LINEBUF))) { + if (NULL == (buf = malloc(LEN_LINEBUF))) { fprintf(stderr, "truetype font property file : cannot allocate memory.\n"); result = True; @@ -508,7 +483,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is) result = SPropRecValList_add_record(pThisList, recordHead, valueHead); } quit: - xfree(buf); + free(buf); abort: return result; } @@ -649,13 +624,13 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList, char *value; len = term-p-1; - value=(char *)xalloc(len+1); + value=malloc(len+1); memcpy(value, p+1, len); value[len]='\0'; SPropRecValList_add_record(pThisList, "FaceNumber", value); - xfree(value); + free(value); term=p; } break; @@ -669,7 +644,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList, int i; char const *nextColon = strchr(strCapHead, ':'); if (0<nextColon-strCapHead) { - char *duplicated = (char *)xalloc((nextColon-strCapHead)+1); + char *duplicated = malloc((nextColon-strCapHead)+1); { char *value; @@ -698,7 +673,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList, next: ; } - xfree(duplicated); + free(duplicated); } strCapHead = nextColon+1; } @@ -719,7 +694,7 @@ XttXstrdup(char const *str) { char *result; - result = (char *)xalloc(strlen(str)+1); + result = malloc(strlen(str)+1); if (result) strcpy(result, str); diff --git a/libXfont/src/FreeType/xttcap.h b/libXfont/src/FreeType/xttcap.h index 9da3c961c..e91e5232a 100644 --- a/libXfont/src/FreeType/xttcap.h +++ b/libXfont/src/FreeType/xttcap.h @@ -121,10 +121,6 @@ SPropRecValList_dump(SRefPropRecValList *refList); Prototypes (xttmisc) */ -/* compare strings with ignoring case */ - /* False == equal, True == not equal */ -Bool mystrcasecmp(char const *s1, char const *s2); - /* strdup clone */ char * XttXstrdup(char const *str); #undef xstrdup diff --git a/libXfont/src/Makefile.am b/libXfont/src/Makefile.am index 3e0cbfae0..094275d11 100644 --- a/libXfont/src/Makefile.am +++ b/libXfont/src/Makefile.am @@ -21,6 +21,8 @@ lib_LTLIBRARIES = libXfont.la +AM_CFLAGS = $(OS_CFLAGS) + if XFONT_FONTFILE FONTFILE_DIR = fontfile FONTFILE_LIB = fontfile/libfontfile.la @@ -46,16 +48,6 @@ FC_DIR = fc FC_LIB = fc/libfc.la endif -if XFONT_TYPE1 -TYPE1_DIR = Type1 -TYPE1_LIB = Type1/libtype1.la -endif - -if XFONT_SPEEDO -SPEEDO_DIR = Speedo -SPEEDO_LIB = Speedo/libspeedo.la -endif - UTIL_DIR = util UTIL_LIB = util/libutil.la @@ -64,13 +56,11 @@ STUBS_DIR = stubs SUBDIRS=\ $(FONTFILE_DIR) $(FREETYPE_DIR) $(BITMAP_DIR) \ - $(BUILTINS_DIR) $(FC_DIR) $(UTIL_DIR) $(STUBS_DIR) \ - $(TYPE1_DIR) $(SPEEDO_DIR) + $(BUILTINS_DIR) $(FC_DIR) $(UTIL_DIR) $(STUBS_DIR) libXfont_la_LIBADD = \ $(FONTFILE_LIB) $(FREETYPE_LIB) $(BITMAP_LIB) \ $(BUILTINS_LIB) $(FC_LIB) $(UTIL_LIB) $(STUBS_LIB) \ - $(TYPE1_LIB) $(SPEEDO_LIB) \ $(FREETYPE_LIBS) $(Z_LIBS) $(MATH_LIBS) $(XFONT_LIBS) libXfont_la_SOURCES = dummy.c diff --git a/libXfont/src/Makefile.in b/libXfont/src/Makefile.in index b285616c0..abf3f969b 100644 --- a/libXfont/src/Makefile.in +++ b/libXfont/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -75,15 +75,14 @@ LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libXfont_la_DEPENDENCIES = $(FONTFILE_LIB) $(FREETYPE_LIB) \ $(BITMAP_LIB) $(BUILTINS_LIB) $(FC_LIB) $(UTIL_LIB) \ - $(STUBS_LIB) $(TYPE1_LIB) $(SPEEDO_LIB) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(STUBS_LIB) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libXfont_la_OBJECTS = dummy.lo libXfont_la_OBJECTS = $(am_libXfont_la_OBJECTS) libXfont_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libXfont_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -108,8 +107,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = fontfile FreeType bitmap builtins fc util stubs Type1 \ - Speedo +DIST_SUBDIRS = fontfile FreeType bitmap builtins fc util stubs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -125,22 +123,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -150,17 +144,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -170,6 +171,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -183,8 +185,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -217,6 +218,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -229,9 +231,11 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libXfont.la +AM_CFLAGS = $(OS_CFLAGS) @XFONT_FONTFILE_TRUE@FONTFILE_DIR = fontfile @XFONT_FONTFILE_TRUE@FONTFILE_LIB = fontfile/libfontfile.la @XFONT_FREETYPE_TRUE@FREETYPE_DIR = FreeType @@ -242,23 +246,17 @@ lib_LTLIBRARIES = libXfont.la @XFONT_BUILTINS_TRUE@BUILTINS_LIB = builtins/libbuiltins.la @XFONT_FC_TRUE@FC_DIR = fc @XFONT_FC_TRUE@FC_LIB = fc/libfc.la -@XFONT_TYPE1_TRUE@TYPE1_DIR = Type1 -@XFONT_TYPE1_TRUE@TYPE1_LIB = Type1/libtype1.la -@XFONT_SPEEDO_TRUE@SPEEDO_DIR = Speedo -@XFONT_SPEEDO_TRUE@SPEEDO_LIB = Speedo/libspeedo.la UTIL_DIR = util UTIL_LIB = util/libutil.la STUBS_LIB = stubs/libstubs.la STUBS_DIR = stubs SUBDIRS = \ $(FONTFILE_DIR) $(FREETYPE_DIR) $(BITMAP_DIR) \ - $(BUILTINS_DIR) $(FC_DIR) $(UTIL_DIR) $(STUBS_DIR) \ - $(TYPE1_DIR) $(SPEEDO_DIR) + $(BUILTINS_DIR) $(FC_DIR) $(UTIL_DIR) $(STUBS_DIR) libXfont_la_LIBADD = \ $(FONTFILE_LIB) $(FREETYPE_LIB) $(BITMAP_LIB) \ $(BUILTINS_LIB) $(FC_LIB) $(UTIL_LIB) $(STUBS_LIB) \ - $(TYPE1_LIB) $(SPEEDO_LIB) \ $(FREETYPE_LIBS) $(Z_LIBS) $(MATH_LIBS) $(XFONT_LIBS) libXfont_la_SOURCES = dummy.c @@ -271,8 +269,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -302,8 +300,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done @@ -311,8 +309,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: @@ -436,8 +434,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -462,8 +460,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -473,13 +471,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/Speedo/Makefile.am b/libXfont/src/Speedo/Makefile.am deleted file mode 100644 index 99d972d1c..000000000 --- a/libXfont/src/Speedo/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -INCLUDES = \ - -I${top_srcdir}/include - -AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) - -noinst_LTLIBRARIES = libspeedo.la - -libspeedo_la_SOURCES = \ - adobe-iso.h \ - bics-iso.h \ - bics-unicode.c \ - bics-unicode.h \ - do_char.c \ - do_trns.c \ - keys.h \ - out_bl2d.c \ - out_blk.c \ - out_outl.c \ - out_scrn.c \ - out_util.c \ - reset.c \ - set_spcs.c \ - set_trns.c \ - spdo_prv.h \ - speedo.h \ - spencode.c \ - sperr.c \ - spfile.c \ - spfont.c \ - spfuncs.c \ - spglyph.c \ - spinfo.c \ - spint.h \ - useropt.h diff --git a/libXfont/src/Speedo/Makefile.in b/libXfont/src/Speedo/Makefile.in deleted file mode 100644 index b55b517a1..000000000 --- a/libXfont/src/Speedo/Makefile.in +++ /dev/null @@ -1,497 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 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@ -subdir = src/Speedo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(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 \ - $(top_builddir)/include/X11/fonts/fontconf.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libspeedo_la_LIBADD = -am_libspeedo_la_OBJECTS = bics-unicode.lo do_char.lo do_trns.lo \ - out_bl2d.lo out_blk.lo out_outl.lo out_scrn.lo out_util.lo \ - reset.lo set_spcs.lo set_trns.lo spencode.lo sperr.lo \ - spfile.lo spfont.lo spfuncs.lo spglyph.lo spinfo.lo -libspeedo_la_OBJECTS = $(am_libspeedo_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/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 = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libspeedo_la_SOURCES) -DIST_SOURCES = $(libspeedo_la_SOURCES) -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@ -CHANGELOG_CMD = @CHANGELOG_CMD@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ENCODINGSDIR = @ENCODINGSDIR@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATH_LIBS = @MATH_LIBS@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -OS_CFLAGS = @OS_CFLAGS@ -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@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_LIBS = @XFONT_LIBS@ -X_GZIP_FONT_COMPRESSION = @X_GZIP_FONT_COMPRESSION@ -Z_LIBS = @Z_LIBS@ -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_F77 = @ac_ct_F77@ -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@ -distcleancheck_listfiles = @distcleancheck_listfiles@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -ft_config = @ft_config@ -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@ -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_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = \ - -I${top_srcdir}/include - -AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) -noinst_LTLIBRARIES = libspeedo.la -libspeedo_la_SOURCES = \ - adobe-iso.h \ - bics-iso.h \ - bics-unicode.c \ - bics-unicode.h \ - do_char.c \ - do_trns.c \ - keys.h \ - out_bl2d.c \ - out_blk.c \ - out_outl.c \ - out_scrn.c \ - out_util.c \ - reset.c \ - set_spcs.c \ - set_trns.c \ - spdo_prv.h \ - speedo.h \ - spencode.c \ - sperr.c \ - spfile.c \ - spfont.c \ - spfuncs.c \ - spglyph.c \ - spinfo.c \ - spint.h \ - useropt.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(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; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Speedo/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Speedo/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: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libspeedo.la: $(libspeedo_la_OBJECTS) $(libspeedo_la_DEPENDENCIES) - $(LINK) $(libspeedo_la_OBJECTS) $(libspeedo_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bics-unicode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/do_char.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/do_trns.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_bl2d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_blk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_outl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_scrn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_spcs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_trns.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spencode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sperr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spfile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spfont.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spfuncs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spglyph.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinfo.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@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 $@ $< - -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; } \ - END { 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; } \ - END { 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=; \ - 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; } \ - END { 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 $(LTLIBRARIES) -installdirs: -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: - -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-generic clean-libtool clean-noinstLTLIBRARIES \ - 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-dvi: install-dvi-am - -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 - -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: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES 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 - -# 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/libXfont/src/Speedo/adobe-iso.h b/libXfont/src/Speedo/adobe-iso.h deleted file mode 100644 index e1eeef1c5..000000000 --- a/libXfont/src/Speedo/adobe-iso.h +++ /dev/null @@ -1,200 +0,0 @@ -/* $Xorg: adobe-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ - -/* - * Latin 1 format from masterset format 11 (ps) - * 0 implies no valid mapping - */ - -int adobe_map[] = { - 32, 32, - 33, 33, - 34, 34, - 35, 35, - 36, 36, - 37, 37, - 38, 38, - 39, 169, - 40, 40, - 41, 41, - 42, 42, - 43, 43, - 44, 44, - 45, 45, - 46, 46, - 47, 47, - 48, 48, - 49, 49, - 50, 50, - 51, 51, - 52, 52, - 53, 53, - 54, 54, - 55, 55, - 56, 56, - 57, 57, - 58, 58, - 59, 59, - 60, 60, - 61, 61, - 62, 62, - 63, 63, - 64, 64, - 65, 65, - 66, 66, - 67, 67, - 68, 68, - 69, 69, - 70, 70, - 71, 71, - 72, 72, - 73, 73, - 74, 74, - 75, 75, - 76, 76, - 77, 77, - 78, 78, - 79, 79, - 80, 80, - 81, 81, - 82, 82, - 83, 83, - 84, 84, - 85, 85, - 86, 86, - 87, 87, - 88, 88, - 89, 89, - 90, 90, - 91, 91, - 92, 92, - 93, 93, - 94, 195, - 95, 95, - 96, 193, - 97, 97, - 98, 98, - 99, 99, - 100, 100, - 101, 101, - 102, 102, - 103, 103, - 104, 104, - 105, 105, - 106, 106, - 107, 107, - 108, 108, - 109, 109, - 110, 110, - 111, 111, - 112, 112, - 113, 113, - 114, 114, - 115, 115, - 116, 116, - 117, 117, - 118, 118, - 119, 119, - 120, 120, - 121, 121, - 122, 122, - 123, 123, - 124, 124, - 125, 125, - 126, 196, /* lc tilde */ - 127, 0, /* */ - 161, 161, /* invert exclamation */ - 162, 162, /* cent */ - 163, 163, /* pound sterling */ - 164, 168, /* intl currency */ - 165, 165, /* yen */ - 166, 320, /* split vert bar */ - 167, 167, /* section mark */ - 168, 200, /* dierisis */ - 169, 0, /* superior copyright */ - 170, 0, /* feminine ordinal */ - 171, 171, /* dbl left guillemot */ - 172, 314, /* math not */ - 173, 0, /* hyphen ? */ - 174, 0, /* superior registered */ - 175, 0, /* overscore */ - 176, 321, /* degree */ - 177, 329, /* math +- */ - 178, 333, /* superior 2 */ - 179, 332, /* superior 3 */ - 180, 194, /* lc acute */ - 181, 324, /* greek lc mu */ - 182, 182, /* Paragraph */ - 183, 180, /* center dot */ - 184, 203, /* cedilla lc */ - 185, 328, /* superior 1 */ - 186, 0, /* masculine ordinal(using superior o) */ - 187, 187, /* right dbl guillemot */ - 188, 327, /* 1/4 */ - 189, 326, /* 1/2 */ - 190, 331, /* 3/4 */ - 191, 191, /* invert question */ - 192, 259, /* A grave */ - 193, 256, /* A acute */ - 194, 257, /* A circumflex */ - 195, 261, /* A tilde */ - 196, 258, /* A dierisis */ - 197, 260, /* A angstrom */ - 198, 225, /* AE ligature */ - 199, 262, /* C cedilla */ - 200, 266, /* E grave */ - 201, 263, /* E acute */ - 202, 264, /* E circumflex */ - 203, 265, /* E dierisis */ - 204, 270, /* I grave */ - 205, 267, /* I acute */ - 206, 268, /* I circumflex */ - 207, 269, /* I dierisis */ - 208, 317, /* D bar */ - 209, 271, /* N tilde */ - 210, 275, /* O grave */ - 211, 272, /* O acute */ - 212, 273, /* O circumflex */ - 213, 276, /* O tilde */ - 214, 274, /* O dierisis */ - 215, 325, /* math multiply */ - 216, 233, /* O bar */ - 217, 281, /* U grave */ - 218, 278, /* U acute */ - 219, 279, /* U circumflex */ - 220, 280, /* U dierisis */ - 221, 319, /* Y acute */ - 222, 318, /* icelandic thorn lc */ - 223, 251, /* German dbl s */ - 224, 287, /* a grave */ - 225, 284, /* a acute */ - 226, 285, /* a circumflex */ - 227, 289, /* a tilde */ - 228, 286, /* a dierisis */ - 229, 288, /* a angstrom */ - 230, 241, /* ae ligature */ - 231, 290, /* c cedilla */ - 232, 294, /* e grave */ - 233, 291, /* e acute */ - 234, 292, /* e circumflex */ - 235, 293, /* e dierisis */ - 236, 298, /* i grave */ - 237, 295, /* i acute */ - 238, 296, /* i circumflex */ - 239, 297, /* i dierisis */ - 240, 323, /* icelandic eth lc */ - 241, 299, /* n tilde */ - 242, 303, /* o grave */ - 243, 300, /* o acute */ - 244, 301, /* o circumflex */ - 245, 304, /* o tilde */ - 246, 302, /* o dierisis */ - 247, 322, /* math divide */ - 248, 249, /* o bar */ - 249, 309, /* u grave */ - 250, 306, /* u acute */ - 251, 307, /* u circumflex */ - 252, 308, /* u dierisis */ - 253, 334, /* y acute */ - 254, 330, /* icelandic thorn uc */ - 255, 310, /* y dierisis */ -}; diff --git a/libXfont/src/Speedo/bics-iso.h b/libXfont/src/Speedo/bics-iso.h deleted file mode 100644 index 4964fa34e..000000000 --- a/libXfont/src/Speedo/bics-iso.h +++ /dev/null @@ -1,224 +0,0 @@ -/* $Xorg: bics-iso.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - -Copyright 1993, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.6 2001/01/17 19:43:17 dawes Exp $ */ - -int sp_bics_map[] = { - 32, 0, - 33, 1, - 34, 2, - 35, 3, - 36, 4, - 37, 5, - 38, 6, - 39, 264, - 40, 8, - 41, 9, - 42, 10, - 43, 11, - 44, 12, - 45, 13, - 46, 14, - 47, 15, - 48, 16, - 49, 17, - 50, 18, - 51, 19, - 52, 20, - 53, 21, - 54, 22, - 55, 23, - 56, 24, - 57, 25, - 58, 26, - 59, 27, - 60, 28, - 61, 29, - 62, 30, - 63, 31, - 64, 32, - 65, 33, - 66, 34, - 67, 35, - 68, 36, - 69, 37, - 70, 38, - 71, 39, - 72, 40, - 73, 41, - 74, 42, - 75, 43, - 76, 44, - 77, 45, - 78, 46, - 79, 47, - 80, 48, - 81, 49, - 82, 50, - 83, 51, - 84, 52, - 85, 53, - 86, 54, - 87, 55, - 88, 56, - 89, 57, - 90, 58, - 91, 59, - 92, 60, - 93, 61, - 94, 133, - 95, 63, - 96, 131, - 97, 65, - 98, 66, - 99, 67, - 100, 68, - 101, 69, - 102, 70, - 103, 71, - 104, 72, - 105, 73, - 106, 74, - 107, 75, - 108, 76, - 109, 77, - 110, 78, - 111, 79, - 112, 80, - 113, 81, - 114, 82, - 115, 83, - 116, 84, - 117, 85, - 118, 86, - 119, 87, - 120, 88, - 121, 89, - 122, 90, - 123, 91, - 124, 92, - 125, 93, - 126, 137, - 127, 358, - 161, 128, - 162, 98, - 163, 97, - 164, 278, - 165, 274, - 166, 277, - 167, 110, - 168, 135, - 169, 503, - 170, 538, - 171, 125, - 172, 309, - 173, 191, - 174, 504, - 175, 230, - 176, 339, - 177, 286, - 178, 160, - 179, 161, - 180, 129, - 181, 325, - 182, 279, - 183, 102, - 184, 141, - 185, 159, - 186, 544, - 187, 126, - 188, 151, - 189, 153, - 190, 155, - 191, 127, - 192, 259, - 193, 261, - 194, 257, - 195, 253, - 196, 255, - 197, 113, - 198, 114, - 199, 148, - 200, 249, - 201, 251, - 202, 247, - 203, 245, - 204, 239, - 205, 241, - 206, 237, - 207, 235, - 208, 169, - 209, 196, - 210, 202, - 211, 200, - 212, 204, - 213, 208, - 214, 206, - 215, 284, - 216, 115, - 217, 212, - 218, 210, - 219, 214, - 220, 216, - 221, 224, - 222, 271, - 223, 121, - 224, 260, - 225, 262, - 226, 258, - 227, 254, - 228, 256, - 229, 117, - 230, 118, - 231, 149, - 232, 250, - 233, 252, - 234, 248, - 235, 246, - 236, 240, - 237, 242, - 238, 238, - 239, 236, - 240, 273, - 241, 195, - 242, 201, - 243, 199, - 244, 203, - 245, 207, - 246, 205, - 247, 285, - 248, 119, - 249, 211, - 250, 209, - 251, 213, - 252, 215, - 253, 223, - 254, 272, - 255, 221, -}; - diff --git a/libXfont/src/Speedo/bics-unicode.c b/libXfont/src/Speedo/bics-unicode.c deleted file mode 100644 index 735508268..000000000 --- a/libXfont/src/Speedo/bics-unicode.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -/* $XFree86$ */ - -/* These data are very dodgy. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "bics-unicode.h" - -static short table_160[]= -{0, 128, 98, 97, 278, 274, 277, 110, 135, 503, 538, 125, 309, 191, 504, - 230, 339, 286, 160, 161, 129, 325, 279, 102, 141, 159, 544, 126, 151, - 153, 155, 127, 259, 261, 257, 253, 255, 113, 114, 148, 249, 251, 247, - 245, 239, 241, 237, 235, 169, 196, 202, 200, 204, 208, 206, 284, 115, - 212, 210, 214, 216, 224, 271, 121, 260, 262, 258, 254, 256, 117, 118, - 149, 250, 252, 248, 246, 240, 242, 238, 236, 273, 195, 201, 199, 203, - 207, 205, 285, 119, 211, 209, 213, 215, 223, 272, 221, 477, 476, 374, - 373, 171, 177, 376, 375, -1, -1, -1, -1, 378, 377, 379, -1, 169, 173, - 383, 382, -1, -1, -1, -1, 172, 178, 243, 244, -1, -1, -1, -1, -1, -1, - 385, -1, -1, -1, -1, -1, 233, 234, 387, 386, -1, -1, 391, 390, 389, - 122, 276, 275, -1, -1, 393, 392, -1, 395, 394, 399, 398, -1, -1, -1, - -1, 170, 174, 194, 193, 402, 401, 198, 197, 263, -1, -1, -1, -1, -1, - -1, 404, 403, 116, 120, -1, -1, 408, 407, 406, 405, 410, 409, -1, -1, - 486, 485, 412, 411, 419, 418, 364, 363, -1, -1, 218, 217, 421, 420, -1, - -1, 220, 219, 423, 422, -1, 268, 425, 424, -1, -1, 222, 368, 367, 372, - 371, 370, 369}; - -static short table_728[]={144, 181, 146, 731, 137, 183}; - -static short table_915[]= -{313, 314, -1, -1, -1, 315, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, -1, 317, -1, -1, 318, -1, -1, -1, -1, -1, -1, -1, 319, 320, - -1, 321, 322, -1, 323, 324, -1, -1, -1, 325, -1, -1, -1, 326, -1, -1, - 327, 328, -1, 329}; - -static short table_8211[]= -{111, 112, -1, -1, -1, -1, -1, 106, -1, 103, 105, 107, 104, 108, 109, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 100, -1, -1, - -1, -1, -1, -1, -1, -1, 123, 124, -1, 265}; - -static short table_8319[]= -{543, 475, 466, 467, 468, 469, 470, 471, 472, 473, 474, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 491, -1, -1, -1, 266}; - -static short table_8592[]={293, 295, 294, 292, 297, 296}; - -static short table_8712[]= -{298, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 492, -1, -1, -1, -1, -1, - -1, 302, -1, -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 299, - -1, -1, -1, -1, 428}; - - -static short table_8800[]={288, -1, -1, -1, 291, 290}; - -static short table_9600[]= -{304, -1, -1, -1, 305, -1, -1, -1, 308, -1, -1, -1, 306, -1, -1, -1, - 307, 357, 358, 359, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 348, -1, -1, -1, 345, -1, -1, -1, -1, -1, 347, -1, -1, -1, 346, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, -1, -1, -1, 342, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 344}; - -static short table_9784[]={360, -1, 361, 362, -1, -1, -1, -1, 350, -1, 349}; - -static short table_9824[]= -{354, -1, -1, 352, -1, 351, 353, -1, -1, -1, 330, 331}; - -static short table_64256[]={282, 95, 96, 281}; - -int -unicode_to_bics(unsigned code) -{ - if(code<32) return -1; - else if(code<127) return code-32; - else if(code<160) return -1; - else if(code<383) return table_160[code-160]; - else if(code==402) return 99; - else if(code==486) return 480; - else if(code==487) return 379; - else if(code==501) return 384; - else if(code==711) return 139; - else if(code<728) return -1; - else if(code<734) return table_728[code-728]; - else if(code<915) return -1; - else if(code<967) return table_915[code-915]; - else if(code<8211) return -1; - else if(code<8253) return table_8211[code-8211]; - else if(code<8319) return -1; - else if(code<8360) return table_8319[code-8319]; - else if(code<8592) return -1; - else if(code<8598) return table_8592[code-8592]; - else if(code==8616) return 340; - else if(code<8712) return -1; - else if(code<8751) return table_8712[code-8712]; - else if(code<8800) return -1; - else if(code<8806) return table_8800[code-8800]; - else if(code==8976) return 310; - else if(code==8992) return 300; - else if(code==8993) return 301; - else if(code==9400) return 332; - else if(code==9415) return 333; - else if(code==9473) return 355; - else if(code==9475) return 356; - else if(code<9600) return -1; - else if(code<9690) return table_9600[code-9600]; - else if(code==9711) return 343; - else if(code<9784) return -1; - else if(code<9795) return table_9784[code-9784]; - else if(code<9824) return -1; - else if(code<9836) return table_9824[code-9824]; - else if(code<64256) return -1; - else if(code<64261) return table_64256[code-64256]; - else return -1; -} - diff --git a/libXfont/src/Speedo/bics-unicode.h b/libXfont/src/Speedo/bics-unicode.h deleted file mode 100644 index 90fa1885b..000000000 --- a/libXfont/src/Speedo/bics-unicode.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $XFree86$ */ - -int unicode_to_bics(unsigned); diff --git a/libXfont/src/Speedo/do_char.c b/libXfont/src/Speedo/do_char.c deleted file mode 100644 index 076b41366..000000000 --- a/libXfont/src/Speedo/do_char.c +++ /dev/null @@ -1,809 +0,0 @@ -/* $Xorg: do_char.c,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - -/***************************** D O - C H A R . C ***************************** - * * - * This is the top level module for processing one simple or composite * - * character. - * * - ****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static boolean sp_make_simp_char(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); -static boolean sp_make_comp_char(PROTO_DECL2 ufix8 FONTFAR *pointer); -static ufix8 FONTFAR *sp_get_char_org(PROTO_DECL2 ufix16 char_index,boolean top_level); -static fix15 sp_get_posn_arg(PROTO_DECL2 ufix8 FONTFAR *STACKFAR *ppointer,ufix8 format); -static fix15 sp_get_scale_arg(PROTO_DECL2 ufix8 FONTFAR *STACKFAR *ppointer,ufix8 format); - - -#if INCL_METRICS -FUNCTION fix31 get_char_width( -GDECL -ufix16 char_index) /* Index to character in char directory */ -/* - * Returns character set width for specified character index in currently - * selected font in units of 1/65536 em. - * Reports Error 10 and returns 0 if no font selected. - * Reports Error 12 and returns 0 if character data not available. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix31 set_width; /* Set width of character */ - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return (fix31)0; /* Return zero character width */ - } - -pointer = sp_get_char_org(char_index, TRUE); /* Get pointer to character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return (fix31)0; /* Return zero character width */ - } - -pointer += 2; /* Skip over character id */ -set_width = (fix31)NEXT_WORD(pointer); /* Read set width and Convert units */ -set_width = ((set_width << 16) + (sp_globals.metric_resolution >> 1)) / sp_globals.metric_resolution; -return set_width; /* Return in 1/65536 em units */ -} -#endif - -#if INCL_METRICS -#ifdef old -FUNCTION boolean get_char_bbox( -GDECL -ufix16 char_index, -bbox_t *bbox) -{ -/* - * returns true if character exists, false if it doesn't - * provides transformed character bounding box in 1/65536 pixels - * in the provided bbox_t structure. Bounding box may be - * conservative in the event that the transformation is not - * normal or the character is compound. - */ - -ufix8 FONTFAR *pointer; -fix15 tmp; -point_t Pmin, Pmax; - -#if REENTRANT_ALLOC -plaid_t plaid; -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -tmp = NEXT_WORD(pointer); /* Read set width */ - -tmp = NEXT_BYTE(pointer); -if (tmp & BIT1) /* Optional data in header? */ - { - tmp = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmp; /* Skip optional data */ - } - -pointer = plaid_tcb(pointer, tmp); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax,(boolean)FALSE); /* Read bounding box */ -bbox->xmin = (fix31)Pmin.x << sp_globals.poshift; -bbox->xmax = (fix31)Pmax.x << sp_globals.poshift; -bbox->ymin = (fix31)Pmin.y << sp_globals.poshift; -bbox->ymax = (fix31)Pmax.y << sp_globals.poshift; -return TRUE; -} - -#else /* new code, 4/25/91 */ - -FUNCTION boolean get_char_bbox( -GDECL -ufix16 char_index, -bbox_t *bbox) -{ -/* - * returns true if character exists, false if it doesn't - * provides transformed character bounding box in 1/65536 pixels - * in the provided bbox_t structure. Bounding box may be - * conservative in the event that the transformation is not - * normal or the character is compound. - */ - -ufix8 FONTFAR *pointer; -fix15 tmp; -fix15 format; -ufix16 pix_adj; -point_t Pmin, Pmax; - -#if REENTRANT_ALLOC -plaid_t plaid; -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -tmp = NEXT_WORD(pointer); /* Read set width */ - -format = NEXT_BYTE(pointer); -if (format & BIT1) /* Optional data in header? */ - { - tmp = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmp; /* Skip optional data */ - } - -if (format & BIT0) - { - pix_adj = sp_globals.onepix << 1; /* Allow 2 pixel expansion ... */ - } -else - { - pix_adj = 0; - } - -pointer = plaid_tcb(pointer, format); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax,(boolean)FALSE); /* Read bounding box */ - -Pmin.x -= pix_adj; /* ... of components of ... */ -Pmin.y -= pix_adj; /* ... compound ... */ -Pmax.x += pix_adj; /* ... character ... */ -Pmax.y += pix_adj; /* ... bounding box. */ - - -bbox->xmin = (fix31)Pmin.x << sp_globals.poshift; -bbox->xmax = (fix31)Pmax.x << sp_globals.poshift; -bbox->ymin = (fix31)Pmin.y << sp_globals.poshift; -bbox->ymax = (fix31)Pmax.y << sp_globals.poshift; -return TRUE; -} -#endif /* new code */ - -#endif - - -#if INCL_ISW -FUNCTION boolean make_char_isw( -GDECL -ufix16 char_index, -ufix32 imported_setwidth) -{ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 xmax; /* Maximum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ -ufix16 return_value; - -sp_globals.import_setwidth_act = TRUE; -/* convert imported width to orus */ -sp_globals.imported_width = (sp_globals.metric_resolution * - imported_setwidth) >> 16; -return_value = do_make_char(char_index); - -if (sp_globals.isw_modified_constants) - { - /* reset fixed point constants */ - xmin = read_word_u(sp_globals.font_org + FH_FXMIN); - ymin = read_word_u(sp_globals.font_org + FH_FYMIN); - ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - sp_globals.constr.data_valid = FALSE; - xmax = read_word_u(sp_globals.font_org + FH_FXMAX); - if (!setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } - } -return (return_value); -} - -FUNCTION boolean make_char( -GDECL -ufix16 char_index) /* Index to character in char directory */ -{ -sp_globals.import_setwidth_act = FALSE; -return (do_make_char(char_index)); -} - -FUNCTION static boolean do_make_char(GDECL ufix16 char_index) -#else -FUNCTION boolean make_char(GDECL ufix16 char_index) -#endif -/* - * Outputs specified character using the currently selected font and - * scaling and output specifications. - * Reports Error 10 and returns FALSE if no font specifications - * previously set. - * Reports Error 12 and returns FALSE if character data not available. - */ -{ -ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix15 x_orus; -fix15 tmpfix15; -ufix8 format; - -#if INCL_ISW -sp_globals.isw_modified_constants = FALSE; -#endif - -#if REENTRANT_ALLOC - -plaid_t plaid; - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -intercepts_t intercepts; -sp_globals.intercepts = &intercepts; -#endif - -sp_globals.plaid = &plaid; -#endif - -if (!sp_globals.specs_valid) /* Font specs not defined? */ - { - report_error(10); /* Report font not specified */ - return FALSE; /* Error return */ - } - -#if INCL_MULTIDEV -#if INCL_OUTLINE -if (sp_globals.output_mode == MODE_OUTLINE && !sp_globals.outline_device_set) - { - report_error(2); - return FALSE; - } -else -#endif - if (!sp_globals.bitmap_device_set) - { - report_error(2); - return FALSE; - } -#endif - - -init_tcb(); /* Initialize transformation control block */ - -pointer = sp_get_char_org(char_index, TRUE); /* Point to start of character data */ -SHOW(pointer); -if (pointer == NULL) /* Character data not available? */ - { - report_error(12); /* Report character data not avail */ - return FALSE; /* Error return */ - } - -pointer += 2; /* Skip over character id */ -x_orus = NEXT_WORD(pointer); /* Read set width */ -#if INCL_SQUEEZING || INCL_ISW -sp_globals.setwidth_orus = x_orus; -#endif - -#if INCL_ISW -if (sp_globals.import_setwidth_act) - x_orus = sp_globals.imported_width; -#endif -sp_globals.Psw.x = (fix15)((fix31) - (((fix31)x_orus * (sp_globals.specs.xxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -sp_globals.Psw.y = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.yxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -format = NEXT_BYTE(pointer); -if (format & BIT1) /* Optional data in header? */ - { - tmpfix15 = (ufix8)NEXT_BYTE(pointer); /* Read size of optional data */ - pointer += tmpfix15; /* Skip optional data */ - } -if (format & BIT0) - { - return sp_make_comp_char(pointer); /* Output compound character */ - } -else - { - return sp_make_simp_char(pointer, format); /* Output simple character */ - } -} - -FUNCTION static boolean sp_make_simp_char( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Character format byte */ -/* - * Called by sp_make_char() to output a simple (non-compound) character. - * Returns TRUE on completion. - */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ -#if INCL_SQUEEZING || INCL_ISW -ufix8 FONTFAR *save_pointer; -#endif -#if INCL_ISW -fix31 char_width; -fix31 isw_scale; -#endif - -#if INCL_SQUEEZING -sp_globals.squeezing_compound = FALSE; -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) || - (sp_globals.pspecs->flags & SQUEEZE_RIGHT) || - (sp_globals.pspecs->flags & SQUEEZE_TOP) || - (sp_globals.pspecs->flags & SQUEEZE_BOTTOM) ) - { - /* get the bounding box data before processing the character */ - save_pointer = pointer; - preview_bounding_box (pointer, format); - pointer = save_pointer; - } -#endif -#if (INCL_ISW) -if (sp_globals.import_setwidth_act) - { - save_pointer = pointer; - preview_bounding_box (pointer, format); - pointer = save_pointer; - /* make sure I'm not going to get fixed point overflow */ - isw_scale = compute_isw_scale(); - if (sp_globals.bbox_xmin_orus < 0) - char_width = SQUEEZE_MULT((sp_globals.bbox_xmax_orus - sp_globals.bbox_xmin_orus), isw_scale); - else - char_width = SQUEEZE_MULT(sp_globals.bbox_xmax_orus, isw_scale); - if (char_width >= sp_globals.isw_xmax) - if (!reset_xmax(char_width)) - return FALSE; - } -#endif -pointer = plaid_tcb(pointer, format); /* Process plaid data */ -pointer = read_bbox(pointer, &Pmin, &Pmax, FALSE); /* Read bounding box */ -if (fn_begin_char(sp_globals.Psw, Pmin, Pmax)) /* Signal start of character output */ - { - do - { - proc_outl_data(pointer); /* Process outline data */ - } - while (!fn_end_char()); /* Repeat if not done */ - } -return TRUE; -} - -FUNCTION static boolean sp_make_comp_char( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of position argument */ -/* - * Called by sp_make_char() to output a compound character. - * Returns FALSE if data for any sub-character is not available. - * Returns TRUE if output completed with no error. - */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ -point_t Pssw; /* Transformed escapement vector */ -ufix8 FONTFAR *pointer_sav; /* Saved pointer to compound character data */ -ufix8 FONTFAR *sub_pointer; /* Pointer to sub-character data */ -ufix8 format; /* Format of DOCH instruction */ -ufix16 sub_char_index; /* Index to sub-character in character directory */ -fix15 x_posn; /* X position of sub-character (outline res units) */ -fix15 y_posn; /* Y position of sub-character (outline res units) */ -fix15 x_scale; /* X scale factor of sub-character (scale units) */ -fix15 y_scale; /* Y scale factor of sub-character (scale units) */ -fix15 tmpfix15; /* Temporary workspace */ -fix15 x_orus; /* Set width in outline resolution units */ -fix15 pix_adj; /* Pixel adjustment to compound char bounding box */ -#if INCL_SQUEEZING -fix31 x_factor, x_offset, top_scale, bottom_scale; -boolean squeezed_x, squeezed_y; -#endif -#if INCL_SQUEEZING || INCL_ISW -fix15 x_offset_pix; -#endif -#if INCL_ISW -fix31 char_width; -fix31 isw_scale; -#endif - - -#if INCL_SQUEEZING -sp_globals.squeezing_compound = TRUE; -#endif -pointer = read_bbox(pointer, &Pmin, &Pmax, TRUE); /* Read bounding box data */ -pix_adj = sp_globals.onepix << 1; /* Allow 2 pixel expansion ... */ -Pmin.x -= pix_adj; /* ... of components of ... */ -Pmin.y -= pix_adj; /* ... compound ... */ -Pmax.x += pix_adj; /* ... character ... */ -Pmax.y += pix_adj; /* ... bounding box. */ - -#if INCL_SQUEEZING -/* scale the bounding box if necessary before calling begin_char */ -squeezed_x = calculate_x_scale(&x_factor, &x_offset, 0); -squeezed_y = calculate_y_scale(&top_scale, &bottom_scale,0,0); - -if (squeezed_x) - { /* scale the x coordinates of the bbox */ - x_offset_pix = (fix15)(((x_offset >> 16) * sp_globals.tcb0.xppo) - >> sp_globals.mpshift); - if ((x_offset_pix >0) && (x_offset_pix < sp_globals.onepix)) - x_offset_pix = sp_globals.onepix; - Pmin.x = SQUEEZE_MULT (x_factor, Pmin.x) + x_offset_pix - pix_adj; - Pmax.x = SQUEEZE_MULT (x_factor, Pmax.x) + x_offset_pix + pix_adj; - } -if (squeezed_y) - { /* scale the y coordinates of the bbox */ - if ((Pmin.y) < 0) - Pmin.y = SQUEEZE_MULT (bottom_scale, Pmin.y) - pix_adj; - else - Pmin.y = SQUEEZE_MULT (top_scale, Pmin.y) - pix_adj; - if ((Pmax.y) < 0) - Pmax.y = SQUEEZE_MULT (bottom_scale, Pmax.y) + pix_adj; - else - Pmax.y = SQUEEZE_MULT (top_scale, Pmax.y) + pix_adj; - } -#endif -#if (INCL_ISW) -if (sp_globals.import_setwidth_act) - { - /* make sure I'm not going to get fixed point overflow */ - isw_scale = ((fix31)sp_globals.imported_width << 16)/ - (fix31)sp_globals.setwidth_orus; - char_width = SQUEEZE_MULT((sp_globals.bbox_xmax_orus - - sp_globals.bbox_xmin_orus), -isw_scale); - if (char_width >= sp_globals.isw_xmax) - if (!reset_xmax(char_width)) - return FALSE; - } -#endif - -if (fn_begin_char(sp_globals.Psw, Pmin, Pmax)) /* Signal start of character data */ - { - pointer_sav = pointer; - do - { - pointer = pointer_sav; /* Point to next DOCH or END instruction */ - while ((format = NEXT_BYTE(pointer))) /* DOCH instruction? */ - { - init_tcb(); /* Initialize transformation control block */ - x_posn = sp_get_posn_arg(&pointer, format); - y_posn = sp_get_posn_arg(&pointer, (ufix8)(format >> 2)); - x_scale = sp_get_scale_arg(&pointer, (ufix8)(format & BIT4)); - y_scale = sp_get_scale_arg(&pointer, (ufix8)(format & BIT5)); - scale_tcb(&sp_globals.tcb, x_posn, y_posn, x_scale, y_scale); /* Scale for sub-char */ - sub_char_index = (format & BIT6)? /* Read sub-char index */ - 0xffff & NEXT_WORD(pointer): - 0xffff & NEXT_BYTE(pointer); - sub_pointer = sp_get_char_org(sub_char_index, FALSE); /* Point to start of sub-char */ - if (sub_pointer == NULL) /* Character data not available? */ - { - return FALSE; /* Abort character output */ - } - sub_pointer += 2; /* Skip over character id */ - x_orus = NEXT_WORD(sub_pointer); /* Read set_width of sub-character */ - - Pssw.x = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.xxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - Pssw.y = (fix15)( - (fix31)( - ((fix31)x_orus * (sp_globals.specs.yxmult>>16) + - ( ((fix31)x_orus * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - - format = NEXT_BYTE(sub_pointer); /* Read sub-character format */ - if (format & BIT1) /* Optional data in header? */ - { - tmpfix15 = (ufix8)NEXT_BYTE(sub_pointer); /* Read size of optional data */ - sub_pointer += tmpfix15; /* Skip optional data */ - } - sub_pointer = plaid_tcb(sub_pointer, format); /* Process sub-character plaid data */ - sub_pointer = read_bbox(sub_pointer, &Pmin, &Pmax, FALSE); /* Read bounding box */ - fn_begin_sub_char(Pssw, Pmin, Pmax); /* Signal start of sub-character data */ - proc_outl_data(sub_pointer); /* Process sub-character data */ - fn_end_sub_char(); /* Signal end of sub-character data */ - } - } - while (!fn_end_char()); /* Signal end of character; repeat if required */ - } -return TRUE; -} - -#if INCL_LCD /* Dynamic load character data supported? */ -FUNCTION static ufix8 FONTFAR *sp_get_char_org( -GDECL -ufix16 char_index, /* Index of character to be accessed */ -boolean top_level) /* Not a compound character element */ -/* - * Called by sp_get_char_id(), sp_get_char_width(), sp_make_char() and - * sp_make_comp_char() to get a pointer to the start of the character data - * for the specified character index. - * Version for configuration supporting dynamic character data loading. - * Calls load_char_data() to load character data if not already loaded - * as part of the original font buffer. - * Returns NULL if character data not available - */ -{ -buff_t *pchar_data; /* Buffer descriptor requested */ -ufix8 FONTFAR *pointer; /* Pointer into character directory */ -ufix8 format; /* Character directory format byte */ -fix31 char_offset; /* Offset of char data from start of font file */ -fix31 next_char_offset; /* Offset of char data from start of font file */ -fix15 no_bytes; /* Number of bytes required for char data */ - -if (top_level) /* Not element of compound char? */ - { - if (char_index < sp_globals.first_char_idx) /* Before start of character set? */ - return NULL; - char_index -= sp_globals.first_char_idx; - if (char_index >= sp_globals.no_chars_avail) /* Beyond end of character set? */ - return NULL; - sp_globals.cb_offset = 0; /* Reset char buffer offset */ - } - -pointer = sp_globals.pchar_dir; -format = NEXT_BYTE(pointer); /* Read character directory format byte */ -pointer += char_index << 1; /* Point to indexed character entry */ -if (format) /* 3-byte entries in char directory? */ - { - pointer += char_index; /* Adjust for 3-byte entries */ - char_offset = read_long(pointer); /* Read file offset to char data */ - next_char_offset = read_long(pointer + 3); /* Read offset to next char */ - } -else - { - char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read file offset to char data */ - next_char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read offset to next char */ - } - -no_bytes = next_char_offset - char_offset; -if (no_bytes == 0) /* Character not in directory? */ - return NULL; - -if (next_char_offset <= sp_globals.font_buff_size)/* Character data already in font buffer? */ - return sp_globals.pfont->org + char_offset; /* Return pointer into font buffer */ - -pchar_data = load_char_data(char_offset, no_bytes, sp_globals.cb_offset); /* Request char data load */ -if (pchar_data->no_bytes < no_bytes) /* Correct number of bytes loaded? */ - return NULL; - -if (top_level) /* Not element of compound char? */ - { - sp_globals.cb_offset = no_bytes; - } - -return pchar_data->org; /* Return pointer into character data buffer */ -} -#endif - -#if INCL_LCD -#else /* Dynamic load character data not supported? */ -FUNCTION static ufix8 FONTFAR *sp_get_char_org( -GDECL -ufix16 char_index, /* Index of character to be accessed */ -boolean top_level) /* Not a compound character element */ -/* - * Called by sp_get_char_id(), sp_get_char_width(), sp_make_char() and - * sp_make_comp_char() to get a pointer to the start of the character data - * for the specified character index. - * Version for configuration not supporting dynamic character data loading. - * Returns NULL if character data not available - */ -{ -ufix8 FONTFAR *pointer; /* Pointer into character directory */ -ufix8 format; /* Character directory format byte */ -fix31 char_offset; /* Offset of char data from start of font file */ -fix31 next_char_offset; /* Offset of char data from start of font file */ -fix15 no_bytes; /* Number of bytes required for char data */ - -if (top_level) /* Not element of compound char? */ - { - if (char_index < sp_globals.first_char_idx) /* Before start of character set? */ - return NULL; - char_index -= sp_globals.first_char_idx; - if (char_index >= sp_globals.no_chars_avail) /* Beyond end of character set? */ - return NULL; - } - -pointer = sp_globals.pchar_dir; -format = NEXT_BYTE(pointer); /* Read character directory format byte */ -pointer += char_index << 1; /* Point to indexed character entry */ -if (format) /* 3-byte entries in char directory? */ - { - pointer += char_index; /* Adjust for 3-byte entries */ - char_offset = read_long(pointer); /* Read file offset to char data */ - next_char_offset = read_long(pointer + 3); /* Read offset to next char */ - } -else - { - char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read file offset to char data */ - next_char_offset = (fix31)(0xffff & NEXT_WORD(pointer)); /* Read offset to next char */ - } - -no_bytes = next_char_offset - char_offset; -if (no_bytes == 0) /* Character not in directory? */ - return NULL; - -return sp_globals.pfont->org + char_offset; /* Return pointer into font buffer */ -} -#endif - - -FUNCTION static fix15 sp_get_posn_arg( -GDECL -ufix8 FONTFAR * STACKFAR *ppointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Format of DOCH arguments */ -/* - * Called by sp_make_comp_char() to read a position argument from the - * specified point in the font/char buffer. - * Updates pointer to byte following position argument. - * Returns value of position argument in outline resolution units - */ -{ -switch (format & 0x03) - { -case 1: - return NEXT_WORD(*ppointer); - -case 2: - return (fix15)((fix7)NEXT_BYTE(*ppointer)); - -default: - return (fix15)0; - } -} - -FUNCTION static fix15 sp_get_scale_arg( -GDECL -ufix8 FONTFAR *STACKFAR *ppointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Format of DOCH arguments */ -/* - * Called by sp_make_comp_char() to read a scale argument from the - * specified point in the font/char buffer. - * Updates pointer to byte following scale argument. - * Returns value of scale argument in scale units (normally 1/4096) - */ -{ -if (format) - return NEXT_WORD(*ppointer); -else - return (fix15)ONE_SCALE; -} -#if INCL_ISW || INCL_SQUEEZING -FUNCTION static void preview_bounding_box( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte of position argument */ -ufix8 format) /* Character format byte */ -{ -point_t Pmin, Pmax; /* Transformed corners of bounding box */ - - sp_globals.no_X_orus = (format & BIT2)? - (fix15)NEXT_BYTE(pointer): - 0; - sp_globals.no_Y_orus = (format & BIT3)? - (fix15)NEXT_BYTE(pointer): - 0; - pointer = read_oru_table(pointer); - - /* Skip over control zone table */ - pointer = skip_control_zone(pointer,format); - - /* Skip over interpolation table */ - pointer = skip_interpolation_table(pointer,format); - /* get_args has a pathological need for this value to be set */ - sp_globals.Y_edge_org = sp_globals.no_X_orus; - pointer = read_bbox(pointer, &Pmin, &Pmax, TRUE); /* Read bounding bo -x */ - -} -#endif -#if INCL_ISW -FUNCTION static boolean reset_xmax( -GDECL -fix31 xmax) - -{ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ - - -sp_globals.isw_modified_constants = TRUE; -xmin = read_word_u(sp_globals.font_org + FH_FXMIN); -ymin = read_word_u(sp_globals.font_org + FH_FYMIN); -ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - -if (!setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } -sp_globals.constr.data_valid = FALSE; -/* recompute setwidth */ -sp_globals.Psw.x = (fix15)((fix31)( - ((fix31)sp_globals.imported_width * (sp_globals.specs.xxmult>>16) + - ( ((fix31)sp_globals.imported_width * - (sp_globals.specs.xxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); -sp_globals.Psw.y = (fix15)( - (fix31)( - ((fix31)sp_globals.imported_width * (sp_globals.specs.yxmult>>16) + - ( ((fix31)sp_globals.imported_width * (sp_globals.specs.yxmult&0xffffL) )>>16) - ) << sp_globals.pixshift) / sp_globals.metric_resolution); - -return TRUE; -} -#endif diff --git a/libXfont/src/Speedo/do_trns.c b/libXfont/src/Speedo/do_trns.c deleted file mode 100644 index 95ab102df..000000000 --- a/libXfont/src/Speedo/do_trns.c +++ /dev/null @@ -1,498 +0,0 @@ -/* $Xorg: do_trns.c,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - -/**************************** D O _ T R N S . C ****************************** - * * - * This module is responsible for executing all intelligent transformation * - * for bounding box and outline data * - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_split_curve(PROTO_DECL2 point_t P1,point_t P2,point_t P3,fix15 depth); -static ufix8 FONTFAR *sp_get_args(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format,point_t STACKFAR *pP); - - -FUNCTION ufix8 FONTFAR *read_bbox( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -point_t STACKFAR *pPmin, /* Lower left corner of bounding box */ -point_t STACKFAR *pPmax, /* Upper right corner of bounding box */ -boolean set_flag) /* flag to indicate whether global oru bbox should be saved */ -/* - * Called by make_simp_char() and make_comp_char() to read the - * bounding box data from the font. - * Sets Pmin and Pmax to the bottom left and top right corners - * of the bounding box after transformation into device space. - * The units of Pmin and Pmax are sub-pixels. - * Updates *ppointer to point to the byte following the - * bounding box data. - */ -{ -ufix8 format1; -ufix8 format = 0; -fix15 i; -point_t P; - -sp_globals.x_int = 0; -sp_globals.y_int = sp_globals.Y_int_org; -sp_globals.x_orus = sp_globals.y_orus = 0; -format1 = NEXT_BYTE(pointer); -pointer = sp_get_args(pointer, format1, pPmin); -#if INCL_SQUEEZING || INCL_ISW -if (set_flag) - { - sp_globals.bbox_xmin_orus = sp_globals.x_orus; - sp_globals.bbox_ymin_orus = sp_globals.y_orus; - } -#endif -*pPmax = *pPmin; -for (i = 1; i < 4; i++) - { - switch(i) - { - case 1: - if (format1 & BIT6) /* Xmax requires X int zone 1? */ - sp_globals.x_int++; - format = (format1 >> 4) | 0x0c; - break; - - case 2: - if (format1 & BIT7) /* Ymax requires Y int zone 1? */ - sp_globals.y_int++; - format = NEXT_BYTE(pointer); - break; - - case 3: - sp_globals.x_int = 0; - format >>= 4; - break; - - default: - break; - } - - pointer = sp_get_args(pointer, format, &P); -#if INCL_SQUEEZING || INCL_ISW - if (set_flag && (i==2)) - { - sp_globals.bbox_xmax_orus = sp_globals.x_orus; - sp_globals.bbox_ymax_orus = sp_globals.y_orus; - } -#endif - if ((i == 2) || (!sp_globals.normal)) - { - if (P.x < pPmin->x) - pPmin->x = P.x; - if (P.y < pPmin->y) - pPmin->y = P.y; - if (P.x > pPmax->x) - pPmax->x = P.x; - if (P.y > pPmax->y) - pPmax->y = P.y; - } - } - -#if DEBUG -printf("BBOX %6.1f(Xint 0), %6.1f(Yint 0), %6.1f(Xint %d), %6.1f(Yint %d)\n", - (real)pPmin->x / (real)sp_globals.onepix, - (real)pPmin->y / (real)sp_globals.onepix, - (real)pPmax->x / (real)sp_globals.onepix, - (format1 >> 6) & 0x01, - (real)pPmax->y / (real)sp_globals.onepix, - (format1 >> 7) & 0x01); - -#endif -return pointer; -} - -FUNCTION void proc_outl_data( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to next byte in char data */ -/* - * Called by make_simp_char() and make_comp_char() to read the - * outline data from the font. - * The outline data is parsed, transformed into device coordinates - * and passed to an output module for further processing. - * Note that pointer is not updated to facilitate repeated - * processing of the outline data when banding mode is in effect. - */ -{ -ufix8 format1, format2; -point_t P0, P1, P2, P3; -fix15 depth; -fix15 curve_count; - -sp_globals.x_int = 0; -sp_globals.y_int = sp_globals.Y_int_org; -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - -sp_globals.x_orus = sp_globals.y_orus = 0; -curve_count = 0; -while(TRUE) - { - format1 = NEXT_BYTE(pointer); - switch(format1 >> 4) - { - case 0: /* LINE */ - pointer = sp_get_args(pointer, format1, &P1); -#if DEBUG - printf("LINE %6.1f, %6.1f\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix); -#endif - fn_line(P1); - sp_globals.P0 = P1; - continue; - - case 1: /* Short XINT */ - sp_globals.x_int = format1 & 0x0f; -#if DEBUG - printf("XINT %d\n", sp_globals.x_int); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -#endif - continue; - - case 2: /* Short YINT */ - sp_globals.y_int = sp_globals.Y_int_org + (format1 & 0x0f); -#if DEBUG - printf("YINT %d\n", sp_globals.y_int - sp_globals.Y_int_org); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - continue; - - case 3: /* Miscellaneous */ - switch(format1 & 0x0f) - { - case 0: /* END */ - if (curve_count) - { - fn_end_contour(); - } - return; - - case 1: /* Long XINT */ - sp_globals.x_int = NEXT_BYTE(pointer); -#if DEBUG - printf("XINT %d\n", sp_globals.x_int); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_xint((fix15)sp_globals.x_int); /* Record xint data */ -#endif - continue; - - case 2: /* Long YINT */ - sp_globals.y_int = sp_globals.Y_int_org + NEXT_BYTE(pointer); -#if DEBUG - printf("YINT %d\n", sp_globals.y_int - sp_globals.Y_int_org); -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -record_yint((fix15)(sp_globals.y_int - sp_globals.Y_int_org)); /* Record yint data */ -#endif - continue; - - default: /* Not used */ - continue; - } - - case 4: /* MOVE Inside */ - case 5: /* MOVE Outside */ - if (curve_count++) - { - fn_end_contour(); - } - - pointer = sp_get_args(pointer, format1, &P0); - sp_globals.P0 = P0; -#if DEBUG - printf("MOVE %6.1f, %6.1f\n", - (real)sp_globals.P0.x / (real)sp_globals.onepix, (real)sp_globals.P0.y / (real)sp_globals.onepix); -#endif - fn_begin_contour(sp_globals.P0, (boolean)(format1 & BIT4)); - continue; - - case 6: /* Undefined */ -#if DEBUG - printf("*** Undefined instruction (Hex %4x)\n", format1); -#endif - continue; - - case 7: /* Undefined */ -#if DEBUG - printf("*** Undefined instruction (Hex %4x)\n", format1); -#endif - continue; - - default: /* CRVE */ - format2 = NEXT_BYTE(pointer); - pointer = sp_get_args(pointer, format1, &P1); - pointer = sp_get_args(pointer, format2, &P2); - pointer = sp_get_args(pointer, (ufix8)(format2 >> 4), &P3); - depth = (format1 >> 4) & 0x07; -#if DEBUG - printf("CRVE %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %d\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix, - depth); -#endif - depth += sp_globals.depth_adj; - if (sp_globals.curves_out) - { - fn_curve(P1, P2, P3, depth); - sp_globals.P0 = P3; - continue; - } - if (depth <= 0) - { - fn_line(P3); - sp_globals.P0 = P3; - continue; - } - sp_split_curve(P1, P2, P3, depth); - continue; - } - } -} - -FUNCTION static void sp_split_curve( -GDECL -point_t P1, /* First control point of Bezier curve */ -point_t P2, /* Second control point of Bezier curve */ -point_t P3, /* End point of Bezier curve */ -fix15 depth) /* Levels of recursive subdivision required */ -/* - * Called by proc_outl_data() to subdivide Bezier curves into an - * appropriate number of vectors, whenever curves are not enabled - * for output to the currently selected output module. - * sp_split_curve() calls itself recursively to the depth specified - * at which point it calls line() to deliver each vector resulting - * from the spliting process. - */ -{ -fix31 X0 = (fix31)sp_globals.P0.x; -fix31 Y0 = (fix31)sp_globals.P0.y; -fix31 X1 = (fix31)P1.x; -fix31 Y1 = (fix31)P1.y; -fix31 X2 = (fix31)P2.x; -fix31 Y2 = (fix31)P2.y; -fix31 X3 = (fix31)P3.x; -fix31 Y3 = (fix31)P3.y; -point_t Pmid; -point_t Pctrl1; -point_t Pctrl2; - -#if DEBUG -printf("CRVE(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif - - -Pmid.x = (X0 + (X1 + X2) * 3 + X3 + 4) >> 3; -Pmid.y = (Y0 + (Y1 + Y2) * 3 + Y3 + 4) >> 3; -if ((--depth) <= 0) - { - fn_line(Pmid); - sp_globals.P0 = Pmid; - fn_line(P3); - sp_globals.P0 = P3; - } -else - { - Pctrl1.x = (X0 + X1 + 1) >> 1; - Pctrl1.y = (Y0 + Y1 + 1) >> 1; - Pctrl2.x = (X0 + (X1 << 1) + X2 + 2) >> 2; - Pctrl2.y = (Y0 + (Y1 << 1) + Y2 + 2) >> 2; - sp_split_curve(Pctrl1, Pctrl2, Pmid, depth); - Pctrl1.x = (X1 + (X2 << 1) + X3 + 2) >> 2; - Pctrl1.y = (Y1 + (Y2 << 1) + Y3 + 2) >> 2; - Pctrl2.x = (X2 + X3 + 1) >> 1; - Pctrl2.y = (Y2 + Y3 + 1) >> 1; - sp_split_curve(Pctrl1, Pctrl2, P3, depth); - } -} - -FUNCTION static ufix8 FONTFAR *sp_get_args( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format, /* Format specifiaction of argument pair */ -point_t STACKFAR *pP) /* Resulting transformed point */ -/* - * Called by read_bbox() and proc_outl_data() to read an X Y argument - * pair from the font. - * The format is specified as follows: - * Bits 0-1: Type of X argument. - * Bits 2-3: Type of Y argument. - * where the 4 possible argument types are: - * Type 0: Controlled coordinate represented by one byte - * index into the X or Y controlled coordinate table. - * Type 1: Interpolated coordinate represented by a two-byte - * signed integer. - * Type 2: Interpolated coordinate represented by a one-byte - * signed increment/decrement relative to the - * proceding X or Y coordinate. - * Type 3: Repeat of preceding X or Y argument value and type. - * The units of P are sub-pixels. - * Updates *ppointer to point to the byte following the - * argument pair. - */ -{ -ufix8 edge; - -/* Read X argument */ -switch(format & 0x03) - { -case 0: /* Index to controlled oru */ - edge = NEXT_BYTE(pointer); - sp_globals.x_orus = sp_plaid.orus[edge]; - sp_globals.x_pix = sp_plaid.pix[edge]; - break; - -case 1: /* 2 byte interpolated oru value */ - sp_globals.x_orus = NEXT_WORD(pointer); - goto L1; - -case 2: /* 1 byte signed oru increment */ - sp_globals.x_orus += (fix15)((fix7)NEXT_BYTE(pointer)); -L1: - sp_globals.x_pix = TRANS(sp_globals.x_orus, sp_plaid.mult[sp_globals.x_int], sp_plaid.offset[sp_globals.x_int], sp_globals.mpshift); - break; - -default: /* No change in X value */ - break; - } - -/* Read Y argument */ -switch((format >> 2) & 0x03) - { -case 0: /* Index to controlled oru */ - edge = sp_globals.Y_edge_org + NEXT_BYTE(pointer); - sp_globals.y_orus = sp_plaid.orus[edge]; - sp_globals.y_pix = sp_plaid.pix[edge]; - break; - -case 1: /* 2 byte interpolated oru value */ - sp_globals.y_orus = NEXT_WORD(pointer); - goto L2; - -case 2: /* 1 byte signed oru increment */ - sp_globals.y_orus += (fix15)((fix7)NEXT_BYTE(pointer)); -L2: - sp_globals.y_pix = TRANS(sp_globals.y_orus, sp_plaid.mult[sp_globals.y_int], sp_plaid.offset[sp_globals.y_int], sp_globals.mpshift); - break; - -default: /* No change in X value */ - break; - } - -switch(sp_globals.tcb.xmode) - { -case 0: /* X mode 0 */ - pP->x = sp_globals.x_pix; - break; - -case 1: /* X mode 1 */ - pP->x = -sp_globals.x_pix; - break; - -case 2: /* X mode 2 */ - pP->x = sp_globals.y_pix; - break; - -case 3: /* X mode 3 */ - pP->x = -sp_globals.y_pix; - break; - -default: /* X mode 4 */ - pP->x = (MULT16(sp_globals.x_orus, sp_globals.tcb.xxmult) + - MULT16(sp_globals.y_orus, sp_globals.tcb.xymult) + - sp_globals.tcb.xoffset) >> sp_globals.mpshift; - break; - } - -switch(sp_globals.tcb.ymode) - { -case 0: /* Y mode 0 */ - pP->y = sp_globals.y_pix; - break; - -case 1: /* Y mode 1 */ - pP->y = -sp_globals.y_pix; - break; - -case 2: /* Y mode 2 */ - pP->y = sp_globals.x_pix; - break; - -case 3: /* Y mode 3 */ - pP->y = -sp_globals.x_pix; - break; - -default: /* Y mode 4 */ - pP->y = (MULT16(sp_globals.x_orus, sp_globals.tcb.yxmult) + - MULT16(sp_globals.y_orus, sp_globals.tcb.yymult) + - sp_globals.tcb.yoffset) >> sp_globals.mpshift; - break; - } - -return pointer; -} - - - diff --git a/libXfont/src/Speedo/keys.h b/libXfont/src/Speedo/keys.h deleted file mode 100644 index dd9d0bff7..000000000 --- a/libXfont/src/Speedo/keys.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $Xorg: keys.h,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - - -/***** DECRYPTION KEY CONSTANTS (PC Platform) *****/ - -#define CUS0 432 /* Customer number */ - -#define KEY0 0 /* Decryption key 0 */ -#define KEY1 72 /* Decryption key 1 */ -#define KEY2 123 /* Decryption key 2 */ -#define KEY3 1 /* Decryption key 3 */ -#define KEY4 222 /* Decryption key 4 */ -#define KEY5 194 /* Decryption key 5 */ -#define KEY6 113 /* Decryption key 6 */ -#define KEY7 119 /* Decryption key 7 */ -#define KEY8 52 /* Decryption key 8 */ - -/***** DECRYPTION KEY CONSTANTS (Sample) *****/ - -#define XSAMPLEFONTS - -#define XCUS0 0 /* Customer number */ - -#define XKEY0 0 /* Decryption key 0 */ -#define XKEY1 0 /* Decryption key 1 */ -#define XKEY2 0 /* Decryption key 2 */ -#define XKEY3 0 /* Decryption key 3 */ -#define XKEY4 0 /* Decryption key 4 */ -#define XKEY5 0 /* Decryption key 5 */ -#define XKEY6 0 /* Decryption key 6 */ -#define XKEY7 0 /* Decryption key 7 */ -#define XKEY8 0 /* Decryption key 8 */ - - diff --git a/libXfont/src/Speedo/out_bl2d.c b/libXfont/src/Speedo/out_bl2d.c deleted file mode 100644 index 6c38cb30d..000000000 --- a/libXfont/src/Speedo/out_bl2d.c +++ /dev/null @@ -1,772 +0,0 @@ -/* $Xorg: out_bl2d.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_bl2d.c,v 1.3 1999/02/07 11:47:14 dawes Exp $ */ - -/*************************** O U T _ B L 2 D . C ***************************** - * * - * This is an output module for screen writer using two dimensional scanning * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for speedo */ - -#define CLOCKWISE 1 -#define DEBUG 0 -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -#if INCL_2D -static void sp_draw_vector_to_2d(PROTO_DECL2 fix15 x0,fix15 y0,fix15 x1,fix15 y1,band_t GLOBALFAR *band); -static void sp_add_intercept_2d(PROTO_DECL2 fix15 y,fix15 x); -static void sp_proc_intercepts_2d(PROTO_DECL1); -#endif - -#if INCL_2D -FUNCTION boolean init_2d( -GDECL -specs_t GLOBALFAR *specsarg) -/* - * init_out_2d() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ - -if (specsarg->flags & CURVES_OUT) - return FALSE; /* Curves out, clipping not supported */ - -#if DEBUG -printf("INIT_OUT__2d()\n"); -#endif -return TRUE; -} -#endif - -#if INCL_2D -FUNCTION boolean begin_char_2d( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - * Initializes intercept table, either calculates pixel maxima or - * decides that they need to be collected - */ -{ -#if DEBUG -printf("BEGIN_CHAR__2d(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -/* Convert PIX.FRAC to 16.16 form */ -sp_globals.x_scan_active = TRUE; /* Assume x-scanning from the start */ - -init_char_out(Psw,Pmin,Pmax); -return TRUE; -} -#endif - - -#if INCL_2D -FUNCTION void begin_contour_2d( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR__2d(%3.4f, %3.4f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, - (real)P1.y / (real)sp_globals.onepix, - outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -} -#endif - -#if INCL_2D -FUNCTION void line_2d( -GDECL -point_t P1) -/* - * Called for each vector in the transformed character - * "draws" vector into intercept table - */ -{ - -#if DEBUG -printf("LINE_0(%3.4f, %3.4f)\n", - (real)P1.x / (real)sp_globals.onepix, - (real)P1.y / (real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (!sp_globals.intercept_oflo) - { - sp_draw_vector_to_2d(sp_globals.x0_spxl, - sp_globals.y0_spxl, - P1.x, - P1.y, - &sp_globals.y_band); /* y-scan */ - - if (sp_globals.x_scan_active) - sp_draw_vector_to_2d(sp_globals.y0_spxl, - sp_globals.x0_spxl, - P1.y, - P1.x, - &sp_globals.x_band); /* x-scan if selected */ - } - -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; /* update endpoint */ -} - -FUNCTION static void sp_draw_vector_to_2d( -GDECL -fix15 x0, /* X coordinate */ -fix15 y0, /* Y coordinate */ -fix15 x1, -fix15 y1, -band_t GLOBALFAR *band) -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 y_pxl; - -yc = (y0 + sp_globals.pixrnd) >> sp_globals.pixshift; /* current scan line = end of last line */ -y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan line */ - -if ((how_many_y = y_pxl - yc) == 0) return; /* Don't draw a null line */ - -if (how_many_y < 0) yc--; /* Predecrment downward lines */ - -if (yc > band->band_max) /* Is start point above band? */ - { - if (y_pxl > band->band_max) return; /* line has to go down! */ - how_many_y = y_pxl - (yc = band->band_max) - 1; /* Yes, limit it */ - } - -if (yc < band->band_min) /* Is start point below band? */ - { - if (y_pxl < band->band_min) return; /* line has to go up! */ - how_many_y = y_pxl - (yc = band->band_min); /* Yes, limit it */ - } - -xc = (fix31)(x0 + sp_globals.pixrnd) << 16; /* Original x coordinate with built in */ - /* rounding. int.16 + pixshift form */ - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - dx_dy = 0L; /* Zero slope, leave xc alone */ - goto skip_calc; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independent. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)0xFFFF) && - (temp2 != 0x0000) ) - { /* Overflow. Pick point closest to yc + .5 */ - if (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } - goto skip_calc; - } -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we leave it as an int.pixshift + 16 delta */ - -xc += (fix31)temp1 * dx_dy; -dx_dy <<= sp_globals.pixshift; -skip_calc: - -yc -= band->band_array_offset; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < band->band_floor) - how_many_y = band->band_floor; /* can't go below floor */ - while(yc >= how_many_y) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_2d(yc--,temp1); - xc -= dx_dy; - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > band->band_ceiling) - how_many_y = band->band_ceiling; - while(yc < how_many_y) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_2d(yc++,temp1); - xc += dx_dy; - } - } -} - -#endif - -#if INCL_2D -FUNCTION boolean end_char_2d() -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; -#if INCL_CLIPPING -fix31 em_max, em_min, bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR__2d()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - sp_globals.x_scan_active = FALSE; - sp_globals.no_x_lists = 0; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_2d(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_2d(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_2D -FUNCTION static void sp_add_intercept_2d( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix15 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; - -#if DEBUG -/* Bounds checking IS done in debug mode */ -if ((y >= MAX_INTERCEPTS) || (y < 0)) - { - printf("Intercept out of table!!!!! (%d)\n",y); - return; - } - -if (y >= sp_globals.no_y_lists) - { - printf(" Add x intercept(%2d, %f)\n", - y + sp_globals.x_band.band_min - sp_globals.no_y_lists, - (real)x/(real)sp_globals.onepix); - if (y > (sp_globals.no_x_lists + sp_globals.no_y_lists)) - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } - } - else - { - printf(" Add y intercept(%2d, %f)\n", y + sp_globals.y_band.band_min,(real)x/(real)sp_globals.onepix); - } - -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = x; - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) >= sp_globals.first_offset) /* Until to == end of list */ - { - if (x <= sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_2D -FUNCTION static void sp_proc_intercepts_2d() -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to xmin, xmax, sp_globals.ymin, ymax boundaries - */ -{ -register fix15 i; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 local_bmap_xmin; - fix15 local_bmap_xmax; - fix15 first_y, last_y; - fix15 j,k; - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax << sp_globals.pixshift; - xmin = sp_globals.clip_xmin << sp_globals.pixshift; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if (sp_globals.x_scan_active) /* If xscanning, we need to make sure we don't miss any important pixels */ - { - first_y = sp_globals.x_band.band_floor; /* start of x lists */ - last_y = sp_globals.x_band.band_ceiling; /* end of x lists */ - for (y = first_y; y != last_y; y++) /* scan all xlists */ - { - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - from = sp_intercepts.car[i]; - j = i; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { -#if DEBUG - printf("****** proc_intercepts: odd number of intercepts in x list\n"); -#endif - break; - } - to = sp_intercepts.car[i]; - k = sp_intercepts.cdr[i]; - if (((to >> sp_globals.pixshift) >= (from >> sp_globals.pixshift)) && - ((to - from) < (sp_globals.onepix + 1))) - { - from = ((fix31)to + (fix31)from - (fix31)sp_globals.onepix) >> (sp_globals.pixshift + 1); - if (from > sp_globals.y_band.band_max) - from = sp_globals.y_band.band_max; - if ((from -= sp_globals.y_band.band_min) < 0) - from = 0; - to = ((y - sp_globals.x_band.band_floor + sp_globals.x_band.band_min) - << sp_globals.pixshift) - + sp_globals.pixrnd; - sp_intercepts.car[j] = to; - sp_intercepts.car[i] = to + sp_globals.onepix; - sp_intercepts.cdr[i] = sp_intercepts.cdr[from]; - sp_intercepts.cdr[from] = j; - } - i = k; - } - } - } -#if DEBUG -printf("\nIntercept lists:\n"); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_array_offset; - -local_bmap_xmin = sp_globals.xmin << sp_globals.pixshift; -local_bmap_xmax = (sp_globals.xmax << sp_globals.pixshift) + sp_globals.pixrnd; - -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - local_bmap_xmin) < 0) - from = 0; /* Clip to xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.bmap_xmax) - to = sp_globals.bmap_xmax - local_bmap_xmin; /* Clip to xmax boundary */ - else - to -= local_bmap_xmin; - printf(" Y = %2d (scanline %2d): %3.4f %3.4f:\n", - y + sp_globals.y_band.band_min, - scan_line, - (real)from / (real)sp_globals.onepix, - (real)to / (real)sp_globals.onepix); - } - } -#endif - -/* Draw the image */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - local_bmap_xmin) < 0) - from = 0; /* Clip to xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - - if ((to = sp_intercepts.car[i]) > local_bmap_xmax) - to = sp_globals.bmap_xmax - local_bmap_xmin; /* Clip to xmax boundary */ - else - to -= local_bmap_xmin; -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - continue; - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - continue; - if (to > xmax) - to = xmax; - } -#endif - if ( (to - from) <= sp_globals.onepix) - { - from = (to + from - sp_globals.onepix) >> (sp_globals.pixshift + 1); - set_bitmap_bits(scan_line, from, from + 1); - } - else - { - set_bitmap_bits(scan_line, from >> sp_globals.pixshift, to >> sp_globals.pixshift); - } - } - } -} - -#endif diff --git a/libXfont/src/Speedo/out_blk.c b/libXfont/src/Speedo/out_blk.c deleted file mode 100644 index a5b669b2a..000000000 --- a/libXfont/src/Speedo/out_blk.c +++ /dev/null @@ -1,706 +0,0 @@ -/* $Xorg: out_blk.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_blk.c,v 1.2 1999/02/07 06:18:16 dawes Exp $ */ - - -/*************************** O U T _ B L K . C ********************************* - * * - * This is an output module for black-writer mode. * - * * - *****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 -#define LOCAL static -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -#if INCL_BLACK -static void sp_add_intercept_black(PROTO_DECL2 fix15 y, fix15 x); -static void sp_proc_intercepts_black(PROTO_DECL1); -#endif - - -#if INCL_BLACK -FUNCTION boolean init_black( -GDECL -specs_t GLOBALFAR *specsarg) -/* - * init_out0() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_BLK()\n"); -#endif -if (specsarg->flags & CURVES_OUT) - return FALSE; /* Curves out not supported */ -return (TRUE); -} -#endif - - -#if INCL_BLACK -FUNCTION boolean begin_char_black( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - */ -{ -#if DEBUG -printf("BEGIN_CHAR_BLACK(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -init_char_out(Psw,Pmin,Pmax); -return TRUE; -} -#endif - - -#if INCL_BLACK -FUNCTION void begin_contour_black( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR_BLACK(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -sp_globals.y_pxl = (sp_globals.y0_spxl + sp_globals.pixrnd) >> sp_globals.pixshift; -} -#endif - -#if INCL_BLACK -FUNCTION void line_black( -GDECL -point_t P1) -/* Called for each vector in the transformed character - */ -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc, i; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 x0,y0,x1,y1; /* PIX.FRAC start and endpoints */ - -x0 = sp_globals.x0_spxl; /* get start of line (== current point) */ -y0 = sp_globals.y0_spxl; -sp_globals.x0_spxl = x1 = P1.x; /* end of line */ -sp_globals.y0_spxl = y1 = P1.y; /* (also update current point to end of line) */ - -yc = sp_globals.y_pxl; /* current scan line = end of last line */ -sp_globals.y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ - - -#if DEBUG -printf("LINE_BLACK(%3.4f, %3.4f)\n", - (real)P1.x/(real)sp_globals.onepix, - (real)P1.y/(real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (sp_globals.intercept_oflo) return; - -if ((how_many_y = sp_globals.y_pxl - yc) == 0) return; /* Don't draw a null line */ - -if (how_many_y < 0) yc--; /* Predecrment downward lines */ - -if (yc > sp_globals.y_band.band_max) /* Is start point above band? */ - { - if (sp_globals.y_pxl > sp_globals.y_band.band_max) return; /* line has to go down! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_max) - 1; /* Yes, limit it */ - } - -if (yc < sp_globals.y_band.band_min) /* Is start point below band? */ - { - if (sp_globals.y_pxl < sp_globals.y_band.band_min) return; /* line has to go up! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_min); /* Yes, limit it */ - } - -xc = (fix31)(x0 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); /* Original x coordinate with built in */ - /* rounding. 16.16 form */ - - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - temp1 = (fix15)(xc >> 16); - if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - for (i = yc; i >= how_many_y; i--) - sp_add_intercept_black(i,temp1); - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - for (i = yc; i != how_many_y; i++) - sp_add_intercept_black(i,temp1); - } - return; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independant. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)0xFFFF) && - (temp2 != 0x0000) && - /* Overflow. Pick point closest to yc + .5 */ - (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) ) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } -else - { -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we shift it to be a 16.16 delta */ - - xc += ((fix31)temp1 * dx_dy) >> sp_globals.pixshift; - } - -yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if (how_many_y == -1) - sp_add_intercept_black(yc, (fix15) (xc >> 16)); - else - { - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - for (i = yc; i >= how_many_y; i--) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_black(i,temp1); - xc -= dx_dy; - } - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if (how_many_y == 1) - sp_add_intercept_black(yc, (fix15) (xc >> 16)); - else - { - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - for (i = yc; i != how_many_y; i++) - { - temp1 = (fix15)(xc >> 16); - sp_add_intercept_black(i,temp1); - xc += dx_dy; - } - } - } -} -#endif -#if INCL_BLACK -FUNCTION boolean end_char_black() -GDECL -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; -#if INCL_CLIPPING -fix31 bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR_BLACK()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_black(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_black(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_BLACK -FUNCTION LOCAL void sp_add_intercept_black( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix15 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; - -#if DEBUG -printf(" Add intercept(%2d, %d)\n", y + sp_globals.y_band.band_min,x); - -/* Bounds checking IS done in debug mode */ -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } - -if (y > (sp_globals.no_y_lists - 1)) /* Y value above top of current band? */ - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = x; - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) >= sp_globals.first_offset) /* Until to == end of list */ - { - if (x <= sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "sp_globals.next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_BLACK -FUNCTION LOCAL void sp_proc_intercepts_black() -GDECL - -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries - */ -{ -register fix15 i; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 first_y, last_y; - -#if DEBUG -printf("\nIntercept lists:\n"); -#endif - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax; - xmin = sp_globals.clip_xmin; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to sp_globals.ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_min; -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* Draw the image */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - if (from >= to) - { - if (from >= sp_globals.xmax - sp_globals.xmin) - { - --from ; - } - to = from+1; - } -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - continue; - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - continue; - if (to > xmax) - to = xmax; - } -#endif - set_bitmap_bits(scan_line, from, to); - } - } -} - -#endif - - - - diff --git a/libXfont/src/Speedo/out_outl.c b/libXfont/src/Speedo/out_outl.c deleted file mode 100644 index 013901092..000000000 --- a/libXfont/src/Speedo/out_outl.c +++ /dev/null @@ -1,290 +0,0 @@ -/* $Xorg: out_outl.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ - - -/**************************** O U T _ 2 _ 1 . C ****************************** - * * - * This is the standard output module for vector output mode. * - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/* the following macro is used to limit points on the outline to the bounding box */ - -#define RANGECHECK(value,min,max) (((value) >= (min) ? (value) : (min)) < (max) ? (value) : (max)) -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - - -#if INCL_OUTLINE -FUNCTION boolean init_outline(specsarg) -GDECL -specs_t GLOBALFAR *specsarg; -/* - * init_out2() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_OUT_2()\n"); -#endif -if (specsarg->flags & (CLIP_LEFT + CLIP_RIGHT + CLIP_TOP + CLIP_BOTTOM)) - return FALSE; /* Clipping not supported */ -return (TRUE); -} -#endif - -#if INCL_OUTLINE -FUNCTION boolean begin_char_outline(Psw, Pmin, Pmax) -GDECL -point_t Psw; /* End of escapement vector (sub-pixels) */ -point_t Pmin; /* Bottom left corner of bounding box */ -point_t Pmax; /* Top right corner of bounding box */ -/* - * If two or more output modules are included in the configuration, begin_char2() - * is called by begin_char() to signal the start of character output data. - * If only one output module is included in the configuration, begin_char() is - * called by make_simp_char() and make_comp_char(). - */ -{ -fix31 set_width_x; -fix31 set_width_y; -fix31 xmin; -fix31 xmax; -fix31 ymin; -fix31 ymax; - -#if DEBUG -printf("BEGIN_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix, - (real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix, - (real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix); -#endif -sp_globals.poshift = 16 - sp_globals.pixshift; -set_width_x = (fix31)Psw.x << sp_globals.poshift; -set_width_y = (fix31)Psw.y << sp_globals.poshift; -xmin = (fix31)Pmin.x << sp_globals.poshift; -xmax = (fix31)Pmax.x << sp_globals.poshift; -ymin = (fix31)Pmin.y << sp_globals.poshift; -ymax = (fix31)Pmax.y << sp_globals.poshift; -sp_globals.xmin = Pmin.x; -sp_globals.xmax = Pmax.x; -sp_globals.ymin = Pmin.y; -sp_globals.ymax = Pmax.y; -open_outline(set_width_x, set_width_y, xmin, xmax, ymin, ymax); -return TRUE; -} -#endif - -#if INCL_OUTLINE -FUNCTION void begin_sub_char_outline(Psw, Pmin, Pmax) -GDECL -point_t Psw; /* End of sub-char escapement vector */ -point_t Pmin; /* Bottom left corner of sub-char bounding box */ -point_t Pmax; /* Top right corner of sub-char bounding box */ -/* - * If two or more output modules are included in the configuration, begin_sub_char2() - * is called by begin_sub_char() to signal the start of sub-character output data. - * If only one output module is included in the configuration, begin_sub_char() is - * called by make_comp_char(). - */ -{ -#if DEBUG -printf("BEGIN_SUB_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix, - (real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix, - (real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix); -#endif -start_new_char(); -} -#endif - - -#if INCL_OUTLINE -FUNCTION void begin_contour_outline(P1, outside) -GDECL -point_t P1; /* Start point of contour */ -boolean outside; /* TRUE if outside (counter-clockwise) contour */ -/* - * If two or more output modules are included in the configuration, begin_contour2() - * is called by begin_contour() to define the start point of a new contour - * and to indicate whether it is an outside (counter-clockwise) contour - * or an inside (clockwise) contour. - * If only one output module is included in the configuration, begin_sub_char() is - * called by proc_outl_data(). - */ -{ -fix15 x,y; -#if DEBUG -printf("BEGIN_CONTOUR_2(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)onepix, (real)P1.y / (real)onepix, outside? "outside": "inside"); -#endif -x = RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y = RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -start_contour((fix31)x << sp_globals.poshift, (fix31)y << sp_globals.poshift, outside); -} -#endif - -#if INCL_OUTLINE -FUNCTION void curve_outline(P1, P2, P3,depth) -GDECL -point_t P1; /* First control point of Bezier curve */ -point_t P2; /* Second control point of Bezier curve */ -point_t P3; /* End point of Bezier curve */ -fix15 depth; -/* - * If two or more output modules are included in the configuration, curve2() - * is called by curve() to output one curve segment. - * If only one output module is included in the configuration, curve() is - * called by proc_outl_data(). - * This function is only called when curve output is enabled. - */ -{ -fix15 x1,y1,x2,y2,x3,y3; -#if DEBUG -printf("CURVE_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)onepix, (real)P1.y / (real)onepix, - (real)P2.x / (real)onepix, (real)P2.y / (real)onepix, - (real)P3.x / (real)onepix, (real)P3.y / (real)onepix); -#endif -x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -x2= RANGECHECK(P2.x,sp_globals.xmin,sp_globals.xmax); -y2= RANGECHECK(P2.y,sp_globals.ymin,sp_globals.ymax); - -x3= RANGECHECK(P3.x,sp_globals.xmin,sp_globals.xmax); -y3= RANGECHECK(P3.y,sp_globals.ymin,sp_globals.ymax); - -curve_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift, - (fix31)x2<< sp_globals.poshift, (fix31)y2 << sp_globals.poshift, - (fix31)x3 << sp_globals.poshift, (fix31)y3 << sp_globals.poshift); -} -#endif - -#if INCL_OUTLINE -FUNCTION void line_outline(P1) -GDECL -point_t P1; /* End point of vector */ -/* - * If two or more output modules are included in the configuration, line2() - * is called by line() to output one vector. - * If only one output module is included in the configuration, line() is - * called by proc_outl_data(). If curve output is enabled, line() is also - * called by split_curve(). - */ -{ -fix15 x1,y1; -#if DEBUG -printf("LINE_2(%3.1f, %3.1f)\n", (real)P1.x / (real)onepix, (real)P1.y / (real)onepix); -#endif -x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax); -y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax); - -line_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift); -} -#endif - -#if INCL_OUTLINE -FUNCTION void end_contour_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_contour2() - * is called by end_contour() to signal the end of a contour. - * If only one output module is included in the configuration, end_contour() is - * called by proc_outl_data(). - */ -{ -#if DEBUG -printf("END_CONTOUR_2()\n"); -#endif -close_contour(); -} -#endif - - -#if INCL_OUTLINE -FUNCTION void end_sub_char_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_sub_char2() - * is called by end_sub_char() to signal the end of sub-character data. - * If only one output module is included in the configuration, end_sub_char() is - * called by make_comp_char(). - */ -{ -#if DEBUG -printf("END_SUB_CHAR_2()\n"); -#endif -} -#endif - - -#if INCL_OUTLINE -FUNCTION boolean end_char_outline() -GDECL -/* - * If two or more output modules are included in the configuration, end_char2() - * is called by end_char() to signal the end of the character data. - * If only one output module is included in the configuration, end_char() is - * called by make_simp_char() and make_comp_char(). - * Returns TRUE if output process is complete - * Returns FALSE to repeat output of the transformed data beginning - * with the first contour (of the first sub-char if compound). - */ -{ -#if DEBUG -printf("END_CHAR_2()\n"); -#endif -close_outline(); -return TRUE; -} -#endif - diff --git a/libXfont/src/Speedo/out_scrn.c b/libXfont/src/Speedo/out_scrn.c deleted file mode 100644 index 172386ac7..000000000 --- a/libXfont/src/Speedo/out_scrn.c +++ /dev/null @@ -1,1090 +0,0 @@ -/* $Xorg: out_scrn.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_scrn.c,v 1.4 1999/12/27 00:39:25 robin Exp $ */ - - -/*************************** O U T _ S C R N . C ***************************** - * * - * This is an output module for screen-writer mode. * - * * - *****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 -#define LOCAL static -#define ABS(X) ( (X < 0) ? -X : X) - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_add_intercept_screen(PROTO_DECL2 fix15 y,fix31 x); -static void sp_proc_intercepts_screen(PROTO_DECL1); - - -#if INCL_SCREEN -FUNCTION boolean init_screen( -GDECL -specs_t FONTFAR *specsarg) -/* - * init_out0() is called by sp_set_specs() to initialize the output module. - * Returns TRUE if output module can accept requested specifications. - * Returns FALSE otherwise. - */ -{ -#if DEBUG -printf("INIT_SCREEN()\n"); -#endif -return (TRUE); -} -#endif - - -#if INCL_SCREEN -FUNCTION boolean begin_char_screen( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called once at the start of the character generation process - */ -{ -#if DEBUG -printf("BEGIN_CHAR_SCREEN(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -if (sp_globals.pixshift > 8) - sp_intercepts.fracpix = sp_globals.onepix << (8 - sp_globals.pixshift); -else - sp_intercepts.fracpix = sp_globals.onepix >> (sp_globals.pixshift - 8); - -init_char_out(Psw,Pmin,Pmax); - -return TRUE; -} -#endif - - -#if INCL_SCREEN -FUNCTION void begin_contour_screen( -GDECL -point_t P1, -boolean outside) -/* Called at the start of each contour - */ -{ - -#if DEBUG -printf("BEGIN_CONTOUR_SCREEN(%3.1f, %3.1f, %s)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, outside? "outside": "inside"); -#endif -sp_globals.x0_spxl = P1.x; -sp_globals.y0_spxl = P1.y; -sp_globals.y_pxl = (sp_globals.y0_spxl + sp_globals.pixrnd) >> sp_globals.pixshift; -} -#endif - -#if INCL_SCREEN - -static FUNCTION void vert_line_screen( -GDECL -fix31 x, -fix15 y1, fix15 y2) -{ - -#ifdef DBGCRV -printf("VERT_LINE_SCREEN(%6.4f, %6.4f, %6.4f)\n", - (real)(x - 32768) / 65536.0, - (real)(y1 - 32768) / 65536.0, - (real)(y2 - 32768) / 65536.0); -#endif - -if (sp_globals.intercept_oflo) - return; - -if (y1 > y2) /* Line goes downwards ? */ - { - if (y1 > (sp_globals.y_band.band_max + 1)) /* Start point above top of band? */ - y1 = sp_globals.y_band.band_max + 1; /* Adjust start point to top of band */ - if (y2 < sp_globals.y_band.band_min) /* End point below bottom of band? */ - y2 = sp_globals.y_band.band_min; /* Adjust end point bottom of band */ - - y1 -= sp_globals.y_band.band_min; /* Translate start point to band origin */ - y2 -= sp_globals.y_band.band_min; /* Translate end point to band origin */ - - while (y2 < y1) /* At least one intercept left? */ - { - sp_add_intercept_screen(--y1, x); /* Add intercept */ - } - } -else if (y2 > y1) /* Line goes upwards ? */ - { - if (y1 < sp_globals.y_band.band_min) /* Start point below bottom of band? */ - y1 = sp_globals.y_band.band_min; /* Adjust start point to bottom of band */ - if (y2 > (sp_globals.y_band.band_max + 1)) /* End point above top of band? */ - y2 = sp_globals.y_band.band_max + 1; /* Adjust end point to top of band */ - - y1 -= sp_globals.y_band.band_min; /* Translate start point to band origin */ - y2 -= sp_globals.y_band.band_min; /* Translate end point to band origin */ - - while (y1 < y2) /* At least one intercept left? */ - { - sp_add_intercept_screen(y1++, x); /* Add intercept */ - } - } - - -} - -static FUNCTION void scan_curve_screen( -GDECL -fix31 X0, fix31 Y0, fix31 X1, fix31 Y1, fix31 X2, fix31 Y2, fix31 X3, fix31 Y3) -/* Called for each curve in the transformed character if curves out enabled - */ -{ -fix31 Pmidx; -fix31 Pmidy; -fix31 Pctrl1x; -fix31 Pctrl1y; -fix31 Pctrl2x; -fix31 Pctrl2y; - -#ifdef DBGCRV -printf("SCAN_CURVE_SCREEN(%6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f)\n", - (real)(X0-32768) / 65536.0, (real)(Y0-32768) / 65536.0, - (real)(X1-32768) / 65536.0, (real)(Y1-32768) / 65536.0, - (real)(X2-32768) / 65536.0, (real)(Y2-32768) / 65536.0, - (real)(X3-32768) / 65536.0, (real)(Y3-32768) / 65536.0); -#endif - -if (((Y3 >> 16)) == (Y0 >> 16) || (Y3+1) == Y0 || Y3 == (Y0+1)) - { - return; - } -if ((X3 >> 16) == (X0 >> 16)) - { - vert_line_screen(X3,(fix15)(Y0>>16),(fix15)(Y3>>16)); - return; - } -Pmidx = (X0 + (X1 + X2) * 3 + X3 + 4 ) >> 3; -Pmidy = (Y0 + (Y1 + Y2) * 3 + Y3 + 4 ) >> 3; - -Pctrl1x = (X0 + X1 + 1 ) >> 1; -Pctrl1y = (Y0 + Y1 + 1) >> 1; -Pctrl2x = (X0 + (X1 << 1) + X2 + 2 ) >> 2; -Pctrl2y = (Y0 + (Y1 << 1) + Y2 + 2 ) >> 2; -scan_curve_screen(X0,Y0, Pctrl1x, Pctrl1y, Pctrl2x,Pctrl2y, Pmidx,Pmidy); - -Pctrl1x = (X1 + (X2 << 1) + X3 + 2 ) >> 2; -Pctrl1y = (Y1 + (Y2 << 1) + Y3 + 2 ) >> 2; -Pctrl2x = (X2 + X3 + 1 ) >> 1; -Pctrl2y = (Y2 + Y3 + 1 ) >> 1; -scan_curve_screen(Pmidx,Pmidy, Pctrl1x,Pctrl1y, Pctrl2x,Pctrl2y, X3,Y3); -} - -FUNCTION void curve_screen( -GDECL -point_t P1, point_t P2, point_t P3, -fix15 depth) -{ -fix31 X0; -fix31 Y0; -fix31 X1; -fix31 Y1; -fix31 X2; -fix31 Y2; -fix31 X3; -fix31 Y3; -#if DEBUG -printf("CURVE_SCREEN(%6.4f, %6.4f, %6.4f, %6.4f, %6.4f, %6.4f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif - - -if (sp_globals.extents_running) /* Accumulate actual character extents if required */ - { - if (P3.x > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = P3.x; - if (P3.x < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = P3.x; - if (P3.y > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = P3.y; - if (P3.y < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = P3.y; - } - -X0 = ((fix31)sp_globals.x0_spxl << sp_globals.poshift) + (fix31)32768; -Y0 = ((fix31)sp_globals.y0_spxl << sp_globals.poshift) + (fix31)32768; -X1 = ((fix31)P1.x << sp_globals.poshift) + (fix31)32768; -Y1 = ((fix31)P1.y << sp_globals.poshift) + (fix31)32768; -X2 = ((fix31)P2.x << sp_globals.poshift) + (fix31)32768; -Y2 = ((fix31)P2.y << sp_globals.poshift) + (fix31)32768; -X3 = ((fix31)P3.x << sp_globals.poshift) + (fix31)32768; -Y3 = ((fix31)P3.y << sp_globals.poshift) + (fix31)32768; - -if (((Y0 - Y3) * sp_globals.tcb.mirror) > 0) - { - sp_intercepts.leftedge = LEFT_INT; - } -else - { - sp_intercepts.leftedge = 0; - } - -scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3); -sp_globals.x0_spxl = P3.x; -sp_globals.y0_spxl = P3.y; -sp_globals.y_pxl = (P3.y + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ -} -#endif - - -#if INCL_SCREEN -FUNCTION void line_screen( -GDECL -point_t P1) -/* Called for each vector in the transformed character - */ -{ -register fix15 how_many_y; /* # of intercepts at y = n + 1/2 */ -register fix15 yc; /* Current scan-line */ - fix15 temp1; /* various uses */ - fix15 temp2; /* various uses */ -register fix31 dx_dy; /* slope of line in 16.16 form */ -register fix31 xc; /* high-precision (16.16) x coordinate */ - fix15 x0,y0,x1,y1; /* PIX.FRAC start and endpoints */ - -x0 = sp_globals.x0_spxl; /* get start of line (== current point) */ -y0 = sp_globals.y0_spxl; -sp_globals.x0_spxl = x1 = P1.x; /* end of line */ -sp_globals.y0_spxl = y1 = P1.y; /* (also update current point to end of line) */ - -yc = sp_globals.y_pxl; /* current scan line = end of last line */ -sp_globals.y_pxl = (y1 + sp_globals.pixrnd) >> sp_globals.pixshift; /* calculate new end-scan sp_globals.line */ - - -#if DEBUG -printf("LINE_SCREEN(%3.4f, %3.4f)\n", - (real)P1.x/(real)sp_globals.onepix, - (real)P1.y/(real)sp_globals.onepix); -#endif - -if (sp_globals.extents_running) - { - if (sp_globals.x0_spxl > sp_globals.bmap_xmax) - sp_globals.bmap_xmax = sp_globals.x0_spxl; - if (sp_globals.x0_spxl < sp_globals.bmap_xmin) - sp_globals.bmap_xmin = sp_globals.x0_spxl; - if (sp_globals.y0_spxl > sp_globals.bmap_ymax) - sp_globals.bmap_ymax = sp_globals.y0_spxl; - if (sp_globals.y0_spxl < sp_globals.bmap_ymin) - sp_globals.bmap_ymin = sp_globals.y0_spxl; - } - -if (sp_globals.intercept_oflo) return; - -if ((how_many_y = sp_globals.y_pxl - yc) == 0) return; /* Don't draw a null line */ - -xc = (fix31)(x0 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); /* Original x coordinate with built in */ - /* rounding. 16.16 form */ - -if (how_many_y < 0) - { - yc--; /* Predecrment downward lines */ - } - -if ((how_many_y * sp_globals.tcb.mirror) < 0) - { - sp_intercepts.leftedge = LEFT_INT; - } -else - { - sp_intercepts.leftedge = 0; - } - -if (yc > sp_globals.y_band.band_max) /* Is start point above band? */ - { - if (sp_globals.y_pxl > sp_globals.y_band.band_max) return; /* line has to go down! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_max) - 1; /* Yes, limit it */ - } - -if (yc < sp_globals.y_band.band_min) /* Is start point below band? */ - { - if (sp_globals.y_pxl < sp_globals.y_band.band_min) return; /* line has to go up! */ - how_many_y = sp_globals.y_pxl - (yc = sp_globals.y_band.band_min); /* Yes, limit it */ - } - -if ( (temp1 = (x1 - x0)) == 0) /* check for vertical line */ - { - dx_dy = 0L; /* Zero slope, leave xc alone */ - goto skip_calc; - } - -/* calculate dx_dy at 16.16 fixed point */ - -dx_dy = ( (fix31)temp1 << 16 )/(fix31)(y1 - y0); - -/* We have to check for a @#$%@# possible multiply overflow */ -/* by doing another @#$*& multiply. In assembly language, */ -/* the program could just check the OVerflow flag or whatever*/ -/* works on the particular processor. This C code is meant */ -/* to be processor independant. */ - -temp1 = (yc << sp_globals.pixshift) - y0 + sp_globals.pixrnd; -/* This sees if the sign bits start at bit 15 */ -/* if they do, no overflow has occurred */ - -temp2 = (fix15)(MULT16(temp1,(fix15)(dx_dy >> 16)) >> 15); - -if ( (temp2 != (fix15)-1) && - (temp2 != 0x0000) ) - { /* Overflow. Pick point closest to yc + .5 */ - if (ABS(temp1) < ABS((yc << sp_globals.pixshift) - y1 + sp_globals.pixrnd)) - { /* use x1 instead of x0 */ - xc = (fix31)(x1 + sp_globals.pixrnd) << (16 - sp_globals.pixshift); - } - goto skip_calc; - } -/* calculate new xc at the center of the *current* scan line */ -/* due to banding, yc may be several lines away from y0 */ -/* xc += (yc + .5 - y0) * dx_dy */ -/* This multiply generates a subpixel delta. */ -/* So we shift it to be a 16.16 delta */ - -xc += ((fix31)temp1 * dx_dy) >> sp_globals.pixshift; - -skip_calc: - -yc -= sp_globals.y_band.band_min; /* yc is now an offset relative to the band */ - -if (how_many_y < 0) - { /* Vector down */ - if ((how_many_y += yc + 1) < 0) how_many_y = 0; /* can't go below 0 */ - while(yc >= how_many_y) - { - sp_add_intercept_screen(yc--,xc); - xc -= dx_dy; - } - } - else - { /* Vector up */ - /* check to see that line doesn't extend beyond top of band */ - if ((how_many_y += yc) > sp_globals.no_y_lists) how_many_y = sp_globals.no_y_lists; - while(yc != how_many_y) - { - sp_add_intercept_screen(yc++,xc); - xc += dx_dy; - } - } -} -#endif - -#if INCL_SCREEN -FUNCTION void end_contour_screen() -GDECL -/* Called after the last vector in each contour - */ -{ -#if DEBUG -printf("END_CONTOUR_SCREEN()\n"); -#endif -sp_intercepts.inttype[sp_globals.next_offset-1] |= END_INT; -} -#endif - - - -#if INCL_SCREEN -FUNCTION boolean end_char_screen() -GDECL -/* Called when all character data has been output - * Return TRUE if output process is complete - * Return FALSE to repeat output of the transformed data beginning - * with the first contour - */ -{ - -fix31 xorg; -fix31 yorg; - -#if INCL_CLIPPING -fix31 em_max, em_min, bmap_max, bmap_min; -#endif - -#if DEBUG -printf("END_CHAR_SCREEN()\n"); -#endif - -if (sp_globals.first_pass) - { - if (sp_globals.bmap_xmax >= sp_globals.bmap_xmin) - { - sp_globals.xmin = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.xmax = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - } - else - { - sp_globals.xmin = sp_globals.xmax = 0; - } - if (sp_globals.bmap_ymax >= sp_globals.bmap_ymin) - { - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - sp_globals.clip_ymin = -1 * sp_globals.clip_ymin; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - sp_globals.clip_xmax = -sp_globals.xmin; - sp_globals.clip_xmin = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - case 2: /* 90 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize to x origin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max < sp_globals.clip_xmax) - sp_globals.xmax = bmap_max; - else - sp_globals.xmax = sp_globals.clip_xmax; - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - /* normalize to x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - break; - case 3: /* 270 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_xmin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmin = sp_globals.clip_xmin >> sp_globals.multshift; - sp_globals.clip_xmin = -1 * sp_globals.clip_xmin; - bmap_min = (sp_globals.bmap_xmin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - - /* let the minimum be the larger of these two values */ - if (bmap_min > sp_globals.clip_xmin) - sp_globals.clip_xmin = bmap_min; - - /* normalize the x value to new xorgin */ - sp_globals.clip_xmin -= sp_globals.xmin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_xmax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_xmax = sp_globals.clip_xmax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_xmax + sp_globals.pixrnd) >> sp_globals.pixshift; - - /* let the max be the lesser of these two values */ - if (bmap_max < sp_globals.clip_xmax) - { - sp_globals.xmax = bmap_max; - sp_globals.clip_xmax = bmap_max; - } - else - sp_globals.xmax = sp_globals.clip_xmax; - - /* normalize the x value to new x origin */ - sp_globals.clip_xmax -= sp_globals.xmin; - } - /* compute y clip values */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - bmap_max = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - if (bmap_max > sp_globals.clip_ymax) - sp_globals.ymax = bmap_max; - else - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - bmap_min = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - if (bmap_min < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - else - sp_globals.ymin = bmap_min; - } - sp_globals.clip_xmin = -sp_globals.xmin; - sp_globals.clip_xmax = ((sp_globals.set_width.x+32768L) >> 16) - - sp_globals.xmin; - break; - } -if ( !(sp_globals.specs.flags & CLIP_TOP)) -#endif - sp_globals.ymax = (sp_globals.bmap_ymax + sp_globals.pixrnd) >> sp_globals.pixshift; - -#if INCL_CLIPPING -if ( !(sp_globals.specs.flags & CLIP_BOTTOM)) -#endif - - sp_globals.ymin = (sp_globals.bmap_ymin + sp_globals.pixrnd + 1) >> sp_globals.pixshift; - } - else - { - sp_globals.ymin = sp_globals.ymax = 0; - } - - /* add in the rounded out part (from xform.) of the left edge */ - if (sp_globals.tcb.xmode == 0) /* for X pix is function of X orus only add the round */ - xorg = (((fix31)sp_globals.xmin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.xmode == 1) /* for X pix is function of -X orus only, subtr. round */ - xorg = (((fix31)sp_globals.xmin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)) ; - else - xorg = (fix31)sp_globals.xmin << 16; /* for other cases don't use round on x */ - - if (sp_globals.tcb.ymode == 2) /* for Y pix is function of X orus only, add round error */ - yorg = (((fix31)sp_globals.ymin << 16) + (sp_globals.rnd_xmin << sp_globals.poshift)); - else - if (sp_globals.tcb.ymode == 3) /* for Y pix is function of -X orus only, sub round */ - yorg = (((fix31)sp_globals.ymin << 16) - (sp_globals.rnd_xmin << sp_globals.poshift)); - else /* all other cases have no round error on yorg */ - yorg = (fix31)sp_globals.ymin << 16; - - open_bitmap(sp_globals.set_width.x, sp_globals.set_width.y, xorg, yorg, - sp_globals.xmax - sp_globals.xmin, sp_globals.ymax - sp_globals.ymin); - if (sp_globals.intercept_oflo) - { - sp_globals.y_band.band_min = sp_globals.ymin; - sp_globals.y_band.band_max = sp_globals.ymax; - init_intercepts_out(); - sp_globals.first_pass = FALSE; - sp_globals.extents_running = FALSE; - return FALSE; - } - else - { - sp_proc_intercepts_screen(); - close_bitmap(); - return TRUE; - } - } -else - { - if (sp_globals.intercept_oflo) - { - reduce_band_size_out(); - init_intercepts_out(); - return FALSE; - } - else - { - sp_proc_intercepts_screen(); - if (next_band_out()) - { - init_intercepts_out(); - return FALSE; - } - close_bitmap(); - return TRUE; - } - } -} -#endif - -#if INCL_SCREEN -FUNCTION LOCAL void sp_add_intercept_screen( -GDECL -fix15 y, /* Y coordinate in relative pixel units */ - /* (0 is lowest sample in band) */ -fix31 x) /* X coordinate of intercept in subpixel units */ - -/* Called by line() to add an intercept to the intercept list structure - */ - -{ -register fix15 from; /* Insertion pointers for the linked list sort */ -register fix15 to; -register fix15 xloc; -register fix15 xfrac; - -#if DEBUG -printf(" Add intercept(%2d, %x)\n", y + sp_globals.y_band.band_min, x); - -/* Bounds checking IS done in debug mode */ -if (y < 0) /* Y value below bottom of current band? */ - { - printf(" Intecerpt less than 0!!!\007\n"); - return; - } - -if (y > (sp_globals.no_y_lists - 1)) /* Y value above top of current band? */ - { - printf(" Intercept too big for band!!!!!\007\n"); - return; - } -#endif - -/* Store new values */ - -sp_intercepts.car[sp_globals.next_offset] = xloc = (fix15)(x >> 16); -sp_intercepts.inttype[sp_globals.next_offset] = sp_intercepts.leftedge | (xfrac = ((x >> 8) & FRACTION)); - -/* Find slot to insert new element (between from and to) */ - -from = y; /* Start at list head */ - -while( (to = sp_intercepts.cdr[from]) != 0) /* Until to == end of list */ - { - if (xloc < sp_intercepts.car[to]) /* If next item is larger than or same as this one... */ - goto insert_element; /* ... drop out and insert here */ - else if (xloc == sp_intercepts.car[to] && xfrac < (sp_intercepts.inttype[to] & FRACTION)) - goto insert_element; /* ... drop out and insert here */ - from = to; /* move forward in list */ - } - -insert_element: /* insert element "sp_globals.next_offset" between elements "from" */ - /* and "to" */ - -sp_intercepts.cdr[from] = sp_globals.next_offset; -sp_intercepts.cdr[sp_globals.next_offset] = to; - -if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */ - { - sp_globals.intercept_oflo = TRUE; -/* There may be a few more calls to "add_intercept" from the current line */ -/* To avoid problems, we set next_offset to a safe value. We don't care */ -/* if the intercept table gets trashed at this point */ - sp_globals.next_offset = sp_globals.first_offset; - } -} - -#endif - -#if INCL_SCREEN -FUNCTION LOCAL void sp_proc_intercepts_screen() -GDECL - -/* Called by sp_make_char to output accumulated intercept lists - * Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries - */ -{ -register fix15 i,j, jplus1, iminus1; -fix15 k,nextk, previ; -register fix15 from, to; /* Start and end of run in pixel units - relative to left extent of character */ -register fix15 y; -register fix15 scan_line; - fix15 first_y, last_y; - fix15 xsave; - - -fix15 diff; - -#if DEBUG -printf("\nPROC_INTERCEPTS_SCREEN: Intercept lists before:\n"); -#endif - -#if INCL_CLIPPING -if ((sp_globals.specs.flags & CLIP_LEFT) != 0) - clipleft = TRUE; -else - clipleft = FALSE; -if ((sp_globals.specs.flags & CLIP_RIGHT) != 0) - clipright = TRUE; -else - clipright = FALSE; -if (clipleft || clipright) - { - xmax = sp_globals.clip_xmax + sp_globals.xmin; - xmin = sp_globals.clip_xmin + sp_globals.xmin; - } -if (!clipright) - xmax = ((sp_globals.set_width.x+32768L) >> 16); -#endif - -if ((first_y = sp_globals.y_band.band_max) >= sp_globals.ymax) - first_y = sp_globals.ymax - 1; /* Clip to sp_globals.ymax boundary */ - -if ((last_y = sp_globals.y_band.band_min) < sp_globals.ymin) - last_y = sp_globals.ymin; /* Clip to sp_globals.ymin boundary */ - -last_y -= sp_globals.y_band.band_min; - -#if DEBUG -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* CHECK INTERCEPT LIST FOR DROPOUT AND WINDING, FIX IF NECESSARY */ - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--) - { - previ = y; - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - j = i; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (sp_intercepts.inttype[i] & LEFT_INT) - { - if (sp_intercepts.inttype[j] & LEFT_INT) - { - do { i = sp_intercepts.cdr[i]; } while (sp_intercepts.inttype[i] & LEFT_INT); - do { i = sp_intercepts.cdr[i]; } while (sp_intercepts.cdr[i] && !(sp_intercepts.inttype[sp_intercepts.cdr[i]] & LEFT_INT)); - sp_intercepts.cdr[j] = i; - } - else - { - xsave = sp_intercepts.car[j]; - sp_intercepts.car[j] = sp_intercepts.car[i]; - sp_intercepts.car[i] = xsave; - - xsave = sp_intercepts.inttype[j]; - sp_intercepts.inttype[j] = sp_intercepts.inttype[i] & FRACTION; - sp_intercepts.inttype[i] = xsave | LEFT_INT; - - sp_intercepts.cdr[previ] = i; - sp_intercepts.cdr[j] = sp_intercepts.cdr[i]; - sp_intercepts.cdr[i] = j; - i = j; - j = sp_intercepts.cdr[previ]; - } - } - - if (sp_intercepts.car[j] < sp_globals.xmin) - sp_intercepts.car[j] = sp_globals.xmin; /* Clip to sp_globals.xmin boundary */ - - if (sp_intercepts.car[i] > sp_globals.xmax) - sp_intercepts.car[i] = sp_globals.xmax; - - if (sp_intercepts.car[j] >= sp_intercepts.car[i]) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + (ufix16)(sp_intercepts.inttype[i] & FRACTION) > sp_intercepts.fracpix) - ++sp_intercepts.car[i]; - else - --sp_intercepts.car[j]; - } - if (sp_globals.first_pass) - { - if (sp_intercepts.inttype[i-1] & END_INT) - { - for (iminus1 = i+1; !(sp_intercepts.inttype[iminus1] & END_INT); iminus1++) - ; - } - else - iminus1 = i-1; - - if (sp_intercepts.inttype[j] & END_INT) - { - for (jplus1 = j-1; !(sp_intercepts.inttype[jplus1] & END_INT); jplus1--) - ; - jplus1++; - } - else - jplus1 = j+1; - - if ((sp_intercepts.inttype[iminus1] & LEFT_INT)) - { - if ( sp_intercepts.car[jplus1] > sp_intercepts.car[i]) - { - diff = sp_intercepts.car[jplus1] - sp_intercepts.car[i]; - sp_intercepts.car[i] += diff/2; - sp_intercepts.car[jplus1] -= diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[i] & FRACTION) + (ufix16)(sp_intercepts.inttype[jplus1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i] ++; - else - sp_intercepts.car[jplus1]--; - } - } - } - else if (!(sp_intercepts.inttype[jplus1] & LEFT_INT)) - { - if (sp_intercepts.car[iminus1] < sp_intercepts.car[j]) - { - diff = sp_intercepts.car[j] - sp_intercepts.car[iminus1]; - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[iminus1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + - (ufix16)(sp_intercepts.inttype[iminus1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[iminus1]++; - else - sp_intercepts.car[j]--; - } - } - } - if (sp_globals.tcb.mirror == -1) - { - if (sp_intercepts.inttype[j-1] & END_INT) - { - for (jplus1 = j+1; !(sp_intercepts.inttype[jplus1] & END_INT); jplus1++) - ; - } - else - { - jplus1 = j-1; - } - } - - if (!(sp_intercepts.inttype[jplus1] & LEFT_INT) && - sp_intercepts.car[j] > sp_intercepts.car[jplus1]) - { - k = sp_intercepts.cdr[y - 1]; - while (k > 0) - { - nextk = sp_intercepts.cdr[k]; - if (!(sp_intercepts.inttype[k] & LEFT_INT) && - (sp_intercepts.inttype[nextk] & LEFT_INT) && - sp_intercepts.car[nextk] > sp_intercepts.car[jplus1]) - { - if ((diff=sp_intercepts.car[j] - sp_intercepts.car[k]) > 0) - { - if (diff <= (sp_intercepts.car[nextk] - sp_intercepts.car[jplus1])) - { - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[k] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + - (ufix16)(sp_intercepts.inttype[k] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[j]--; - else - sp_intercepts.car[k]++; - } - } - else - { - diff = sp_intercepts.car[nextk] - sp_intercepts.car[jplus1]; - sp_intercepts.car[nextk] -= diff/2; - sp_intercepts.car[jplus1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[jplus1] & FRACTION) + - (ufix16)(sp_intercepts.inttype[nextk] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[nextk]--; - else - sp_intercepts.car[jplus1]++; - } - } - } - break; - } - k = nextk; - } - } - if (j > 0 && sp_intercepts.car[j-1] > sp_intercepts.car[i] && !(sp_intercepts.inttype[j-1] & END_INT)) - { - diff = sp_intercepts.car[j-1] - sp_intercepts.car[i]; - sp_intercepts.car[i] += diff/2; - sp_intercepts.car[j-1] -= diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[i] & FRACTION) + (ufix16)(sp_intercepts.inttype[j-1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i]++; - else - sp_intercepts.car[j-1]--; - } - } - if (sp_intercepts.car[i+1] < sp_intercepts.car[j] && !(sp_intercepts.inttype[i] & END_INT)) - { - diff = sp_intercepts.car[j] - sp_intercepts.car[i+1]; - sp_intercepts.car[j] -= diff/2; - sp_intercepts.car[i+1] += diff/2; - if (diff & 1) - { - if ((ufix16)(sp_intercepts.inttype[j] & FRACTION) + (ufix16)(sp_intercepts.inttype[i+1] & FRACTION) > sp_intercepts.fracpix) - sp_intercepts.car[i+1]++; - else - sp_intercepts.car[j]--; - } - - } - previ = i; - } - i = sp_intercepts.cdr[i]; - } - } - -#if DEBUG -printf("\nPROC_INTERCEPTS_SCREEN: Intercept lists after:\n"); -/* Print out all of the intercept info */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = y; /* Index head of intercept list */ - while ((i = sp_intercepts.cdr[i]) != 0) /* Link to next intercept if present */ - { - if ((from = sp_intercepts.car[i] - sp_globals.xmin) < 0) - from = 0; /* Clip to sp_globals.xmin boundary */ - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - if (i == 0) /* End of list? */ - { - printf("****** proc_intercepts: odd number of intercepts\n"); - break; - } - if ((to = sp_intercepts.car[i]) > sp_globals.xmax) - to = sp_globals.xmax - sp_globals.xmin; /* Clip to sp_globals.xmax boundary */ - else - to -= sp_globals.xmin; - printf(" Y = %2d (scanline %2d): %d %d:\n", - y + sp_globals.y_band.band_min, scan_line, from, to); - } - } -#endif - -/* INTERCEPTS ALL PATCHED, NOW DRAW THE IMAGE */ -scan_line = sp_globals.ymax - first_y - 1; - -for (y = first_y - sp_globals.y_band.band_min; y >= last_y; y--, scan_line++) - { - i = sp_intercepts.cdr[y]; /* Index head of intercept list */ - while (i != 0) /* Link to next intercept if present */ - { - from = sp_intercepts.car[i]; - i = sp_intercepts.cdr[i]; /* Link to next intercept */ - to = sp_intercepts.car[i]; -#if INCL_CLIPPING - if (clipleft) - { - if (to <= xmin) - { - i = sp_intercepts.cdr[i]; - continue; - } - if (from < xmin) - from = xmin; - } - if (clipright) - { - if (from >= xmax) - { - i = sp_intercepts.cdr[i]; - continue; - } - if (to > xmax) - to = xmax; - } -#endif - set_bitmap_bits(scan_line, from-sp_globals.xmin, to-sp_globals.xmin); - i = sp_intercepts.cdr[i]; - } - } -} - -#endif diff --git a/libXfont/src/Speedo/out_util.c b/libXfont/src/Speedo/out_util.c deleted file mode 100644 index baf942747..000000000 --- a/libXfont/src/Speedo/out_util.c +++ /dev/null @@ -1,339 +0,0 @@ -/* $Xorg: out_util.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/out_util.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#define DEBUG 0 - -/*************************** O U T _ U T I L . C ***************************** - * * - * This is a utility module share by all bitmap output modules * - * * - *****************************************************************************/ - - -#include "spdo_prv.h" /* General definitions for Speedo */ -/* absolute value function */ -#define ABS(X) ( (X < 0) ? -X : X) -#if INCL_BLACK || INCL_2D || INCL_SCREEN - -static FUNCTION void restart_intercepts_out(void) -GDECL -/* Called by sp_make_char when a new sub character is started - * Freezes current sorted lists - */ -{ -#if DEBUG -printf(" Restart intercepts:\n"); -#endif -sp_globals.first_offset = sp_globals.next_offset; -} - -static FUNCTION void set_first_band_out( -GDECL -point_t Pmin, -point_t Pmax) -{ - -sp_globals.ymin = Pmin.y; -sp_globals.ymax = Pmax.y; - -sp_globals.ymin = (sp_globals.ymin - sp_globals.onepix + 1) >> sp_globals.pixshift; -sp_globals.ymax = (sp_globals.ymax + sp_globals.onepix - 1) >> sp_globals.pixshift; - -#if INCL_CLIPPING - switch(sp_globals.tcb0.xtype) - { - case 1: /* 180 degree rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymin = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - sp_globals.clip_ymin = -1* sp_globals.clip_ymin; - if (sp_globals.ymin < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymax = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - if (sp_globals.ymax > sp_globals.clip_ymax) - sp_globals.ymax = sp_globals.clip_ymax; - } - break; - case 2: /* 90 degree rotation */ - sp_globals.clip_ymax = 0; - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - case 3: /* 270 degree rotation */ - sp_globals.clip_ymax = ((sp_globals.set_width.y+32768L) >> 16); - if ((sp_globals.specs.flags & CLIP_TOP) && - (sp_globals.ymax > sp_globals.clip_ymax)) - sp_globals.ymax = sp_globals.clip_ymax; - sp_globals.clip_ymin = 0; - if ((sp_globals.specs.flags & CLIP_BOTTOM) && - (sp_globals.ymin < sp_globals.clip_ymin)) - sp_globals.ymin = sp_globals.clip_ymin; - break; - default: /* this is for zero degree rotation and arbitrary rotation */ - if (sp_globals.specs.flags & CLIP_TOP) - { - sp_globals.clip_ymax = (fix31)((fix31)EM_TOP * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymax = sp_globals.clip_ymax >> sp_globals.multshift; - if (sp_globals.ymax > sp_globals.clip_ymax) - sp_globals.ymax = sp_globals.clip_ymax; - } - if (sp_globals.specs.flags & CLIP_BOTTOM) - { - sp_globals.clip_ymin = (fix31)((fix31)(-1 * EM_BOT) * sp_globals.tcb0.yppo + ((1<<sp_globals.multshift)/2)); - sp_globals.clip_ymin = sp_globals.clip_ymin >> sp_globals.multshift; - sp_globals.clip_ymin = - sp_globals.clip_ymin; - if (sp_globals.ymin < sp_globals.clip_ymin) - sp_globals.ymin = sp_globals.clip_ymin; - } - break; - } -#endif -sp_globals.y_band.band_min = sp_globals.ymin; -sp_globals.y_band.band_max = sp_globals.ymax - 1; - -sp_globals.xmin = (Pmin.x + sp_globals.pixrnd) >> sp_globals.pixshift; -sp_globals.xmax = (Pmax.x + sp_globals.pixrnd) >> sp_globals.pixshift; - - -#if INCL_2D -sp_globals.x_band.band_min = sp_globals.xmin - 1; /* subtract one pixel of "safety margin" */ -sp_globals.x_band.band_max = sp_globals.xmax /* - 1 + 1 */; /* Add one pixel of "safety margin" */ -#endif -} - -FUNCTION void init_char_out( -GDECL -point_t Psw, point_t Pmin, point_t Pmax) -{ -sp_globals.set_width.x = (fix31)Psw.x << sp_globals.poshift; -sp_globals.set_width.y = (fix31)Psw.y << sp_globals.poshift; -set_first_band_out(Pmin, Pmax); -init_intercepts_out(); -if (sp_globals.normal) - { - sp_globals.bmap_xmin = Pmin.x; - sp_globals.bmap_xmax = Pmax.x; - sp_globals.bmap_ymin = Pmin.y; - sp_globals.bmap_ymax = Pmax.y; - sp_globals.extents_running = FALSE; - } -else - { - sp_globals.bmap_xmin = 32000; - sp_globals.bmap_xmax = -32000; - sp_globals.bmap_ymin = 32000; - sp_globals.bmap_ymax = -32000; - sp_globals.extents_running = TRUE; - } -sp_globals.first_pass = TRUE; -} - -FUNCTION void begin_sub_char_out( -GDECL -point_t Psw, -point_t Pmin, -point_t Pmax) -/* Called at the start of each sub-character in a composite character - */ -{ -#if DEBUG -printf("BEGIN_SUB_CHAR_out(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n", - (real)Psw.x / (real)sp_globals.onepix, (real)Psw.y / (real)sp_globals.onepix, - (real)Pmin.x / (real)sp_globals.onepix, (real)Pmin.y / (real)sp_globals.onepix, - (real)Pmax.x / (real)sp_globals.onepix, (real)Pmax.y / (real)sp_globals.onepix); -#endif -restart_intercepts_out(); -if (!sp_globals.extents_running) - { - sp_globals.bmap_xmin = 32000; - sp_globals.bmap_xmax = -32000; - sp_globals.bmap_ymin = 32000; - sp_globals.bmap_ymax = -32000; - sp_globals.extents_running = TRUE; - } -} - -FUNCTION void curve_out( -GDECL -point_t P1, point_t P2, point_t P3, -fix15 depth) -/* Called for each curve in the transformed character if curves out enabled - */ -{ -#if DEBUG -printf("CURVE_OUT(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n", - (real)P1.x / (real)sp_globals.onepix, (real)P1.y / (real)sp_globals.onepix, - (real)P2.x / (real)sp_globals.onepix, (real)P2.y / (real)sp_globals.onepix, - (real)P3.x / (real)sp_globals.onepix, (real)P3.y / (real)sp_globals.onepix); -#endif -} - - - -FUNCTION void end_contour_out() -GDECL -/* Called after the last vector in each contour - */ -{ -#if DEBUG -printf("END_CONTOUR_OUT()\n"); -#endif -} - - -FUNCTION void end_sub_char_out() -GDECL -/* Called after the last contour in each sub-character in a compound character - */ -{ -#if DEBUG -printf("END_SUB_CHAR_OUT()\n"); -#endif -} - - -FUNCTION void init_intercepts_out() -GDECL -/* Called to initialize intercept storage data structure - */ - -{ -fix15 i; -fix15 no_lists; - -#if DEBUG -printf(" Init intercepts (Y band from %d to %d)\n", sp_globals.y_band.band_min, sp_globals.y_band.band_max); -if (sp_globals.x_scan_active) - printf(" (X band from %d to %d)\n", sp_globals.x_band.band_min, sp_globals.x_band.band_max); -#endif - -sp_globals.intercept_oflo = FALSE; - -sp_globals.no_y_lists = sp_globals.y_band.band_max - sp_globals.y_band.band_min + 1; -#if INCL_2D -if (sp_globals.output_mode == MODE_2D) - { - sp_globals.no_x_lists = sp_globals.x_scan_active ? - sp_globals.x_band.band_max - sp_globals.x_band.band_min + 1 : 0; - no_lists = sp_globals.no_y_lists + sp_globals.no_x_lists; - } -else -#endif - no_lists = sp_globals.no_y_lists; - -#if INCL_2D -sp_globals.y_band.band_floor = 0; -sp_globals.y_band.band_ceiling = sp_globals.no_y_lists; -#endif - -if (no_lists >= MAX_INTERCEPTS) /* Not enough room for list table? */ - { - no_lists = sp_globals.no_y_lists = MAX_INTERCEPTS; - sp_globals.intercept_oflo = TRUE; - sp_globals.y_band.band_min = sp_globals.y_band.band_max - sp_globals.no_y_lists + 1; -#if INCL_2D - sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; - sp_globals.y_band.band_ceiling = sp_globals.no_y_lists; - sp_globals.no_x_lists = 0; - sp_globals.x_scan_active = FALSE; -#endif - } - -for (i = 0; i < no_lists; i++) /* For each active value... */ - { -#if INCL_SCREEN - if (sp_globals.output_mode == MODE_SCREEN) - sp_intercepts.inttype[i]=0; -#endif - sp_intercepts.cdr[i] = 0; /* Mark each intercept list empty */ - } - -sp_globals.first_offset = sp_globals.next_offset = no_lists; - -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -sp_globals.x_band.band_array_offset = sp_globals.x_band.band_min - sp_globals.no_y_lists; -sp_globals.x_band.band_floor = sp_globals.no_y_lists; -sp_globals.x_band.band_ceiling = no_lists; -#endif -#if INCL_SCREEN -sp_intercepts.inttype[sp_globals.no_y_lists-1] = END_INT; -#endif - -} - - - - - - - - - - - -FUNCTION void reduce_band_size_out() -GDECL -{ -sp_globals.y_band.band_min = sp_globals.y_band.band_max - ((sp_globals.y_band.band_max - sp_globals.y_band.band_min) >> 1); -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -#endif -} - - -FUNCTION boolean next_band_out() -GDECL -{ -fix15 tmpfix15; - -if (sp_globals.y_band.band_min <= sp_globals.ymin) - return FALSE; -tmpfix15 = sp_globals.y_band.band_max - sp_globals.y_band.band_min; -sp_globals.y_band.band_max = sp_globals.y_band.band_min - 1; -sp_globals.y_band.band_min = sp_globals.y_band.band_max - tmpfix15; -if (sp_globals.y_band.band_min < sp_globals.ymin) - sp_globals.y_band.band_min = sp_globals.ymin; -#if INCL_2D -sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min; -#endif -return TRUE; -} -#endif - diff --git a/libXfont/src/Speedo/reset.c b/libXfont/src/Speedo/reset.c deleted file mode 100644 index 215349473..000000000 --- a/libXfont/src/Speedo/reset.c +++ /dev/null @@ -1,129 +0,0 @@ -/* $Xorg: reset.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/reset.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */ - - - -/******************************* R E S E T . C ******************************* - * * - * This module provides initialization functions. * - * * - ****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ -#include "keys.h" /* Font decryption keys */ - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - - -FUNCTION void reset() -GDECL -/* - * Called by the host software to intialize the Speedo mechanism - */ -{ -sp_globals.specs_valid = FALSE; /* Flag specs not valid */ - -/* Reset decryption key */ -sp_globals.key32 = (KEY3 << 8) | KEY2; -sp_globals.key4 = KEY4; -sp_globals.key6 = KEY6; -sp_globals.key7 = KEY7; -sp_globals.key8 = KEY8; - -sp_globals.constr.font_id_valid = FALSE; - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -sp_globals.bitmap_device_set = FALSE; -#endif -#if INCL_OUTLINE -sp_globals.outline_device_set = FALSE; -#endif -#endif -} - -#if INCL_KEYS -FUNCTION void set_key( -GDECL -ufix8 key[]) /* Specified decryption key */ -/* - * Dynamically sets font decryption key. - */ -{ -sp_globals.key32 = ((ufix16)key[3] << 8) | key[2]; -sp_globals.key4 = key[4]; -sp_globals.key6 = key[6]; -sp_globals.key7 = key[7]; -sp_globals.key8 = key[8]; -} -#endif - - - -FUNCTION ufix16 get_cust_no( -GDECL -buff_t font_buff) -/* - returns customer number from font -*/ -{ -ufix8 FONTFAR *hdr2_org; -ufix16 private_off; - -private_off = read_word_u(font_buff.org + FH_HEDSZ); -if (private_off + FH_CUSNR > font_buff.no_bytes) - { - report_error(1); /* Insufficient font data loaded */ - return FALSE; - } - -hdr2_org = font_buff.org + private_off; - -return (read_word_u(hdr2_org + FH_CUSNR)); -} - - diff --git a/libXfont/src/Speedo/set_spcs.c b/libXfont/src/Speedo/set_spcs.c deleted file mode 100644 index 8fbdf1fd2..000000000 --- a/libXfont/src/Speedo/set_spcs.c +++ /dev/null @@ -1,763 +0,0 @@ -/* $Xorg: set_spcs.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ - - -/*************************** S E T _ S P C S . C ***************************** - * * - * This module implements all sp_set_specs() functionality. * - * * - ****************************************************************************/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#define SET_SPCS -#include "spdo_prv.h" /* General definitions for Speedo */ -#include "keys.h" - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/****** EXTERNAL VARIABLES *****/ - -/***** STATIC VARIABLES *****/ - - -/****** STATIC FUNCTIONS *****/ - -static boolean sp_setup_consts(PROTO_DECL2 fix15 xmin, fix15 xmax, - fix15 ymin, fix15 ymax); -static void sp_setup_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb); -static fix15 sp_setup_mult(PROTO_DECL2 fix31 input_mult); -static fix31 sp_setup_offset(PROTO_DECL2 fix31 input_offset); - - - -FUNCTION boolean set_specs( -GDECL -specs_t STACKFAR *specsarg) /* Bundle of conversion specifications */ -/* - * Called by host software to set character generation specifications - */ -{ -fix31 offcd; /* Offset to start of character directory */ -fix31 ofcns; /* Offset to start of constraint data */ -fix31 cd_size; /* Size of character directory */ -fix31 no_bytes_min; /* Min number of bytes in font buffer */ -ufix16 font_id; /* Font ID */ -ufix16 private_off; /* offset to private header */ -fix15 xmin; /* Minimum X ORU value in font */ -fix15 xmax; /* Maximum X ORU value in font */ -fix15 ymin; /* Minimum Y ORU value in font */ -fix15 ymax; /* Maximum Y ORU value in font */ - -sp_globals.specs_valid = FALSE; /* Flag specs not valid */ - -sp_globals.specs = *specsarg; /* copy specs structure into sp_globals */ -sp_globals.pspecs = &sp_globals.specs; -sp_globals.font = *sp_globals.pspecs->pfont; -sp_globals.pfont = &sp_globals.font; -sp_globals.font_org = sp_globals.font.org; - -if (read_word_u(sp_globals.font_org + FH_FMVER + 4) != 0x0d0a) - { - report_error(4); /* Font format error */ - return FALSE; - } -if (read_word_u(sp_globals.font_org + FH_FMVER + 6) != 0x0000) - { - report_error(4); /* Font format error */ - return FALSE; - } - -if (get_cust_no(*specsarg->pfont) == 0) - { - sp_globals.key32 = 0; - sp_globals.key4 = 0; - sp_globals.key6 = 0; - sp_globals.key7 = 0; - sp_globals.key8 = 0; - } -else - { - sp_globals.key32 = (KEY3 << 8) | KEY2; - sp_globals.key4 = KEY4; - sp_globals.key6 = KEY6; - sp_globals.key7 = KEY7; - sp_globals.key8 = KEY8; - } - - -sp_globals.no_chars_avail = read_word_u(sp_globals.font_org + FH_NCHRF); - -/* Read sp_globals.orus per em from font header */ -sp_globals.orus_per_em = read_word_u(sp_globals.font_org + FH_ORUPM); - -/* compute address of private header */ -private_off = read_word_u(sp_globals.font_org + FH_HEDSZ); -sp_globals.hdr2_org = sp_globals.font_org + private_off; - -/* set metric resolution if specified, default to outline res otherwise */ -if (private_off > EXP_FH_METRES) - { - sp_globals.metric_resolution = read_word_u(sp_globals.font_org + EXP_FH_METRES); - } -else - { - sp_globals.metric_resolution = sp_globals.orus_per_em; - } - -#if INCL_METRICS -sp_globals.kern.tkorg = sp_globals.font_org + read_long(sp_globals.hdr2_org + FH_OFFTK); -sp_globals.kern.pkorg = sp_globals.font_org + read_long(sp_globals.hdr2_org + FH_OFFPK); -sp_globals.kern.no_tracks = read_word_u(sp_globals.font_org + FH_NKTKS); -sp_globals.kern.no_pairs = read_word_u(sp_globals.font_org + FH_NKPRS); -#endif - -offcd = read_long(sp_globals.hdr2_org + FH_OFFCD); /* Read offset to character directory */ -ofcns = read_long(sp_globals.hdr2_org + FH_OFCNS); /* Read offset to constraint data */ -cd_size = ofcns - offcd; -if ((((sp_globals.no_chars_avail << 1) + 3) != cd_size) && - (((sp_globals.no_chars_avail * 3) + 4) != cd_size)) - { - report_error(4); /* Font format error */ - return FALSE; - } - -#if INCL_LCD /* Dynamic character data load suppoorted? */ -#if INCL_METRICS -no_bytes_min = read_long(sp_globals.hdr2_org + FH_OCHRD); /* Offset to character data */ -#else /* Dynamic character data load not supported? */ -no_bytes_min = read_long(sp_globals.hdr2_org + FH_OFFTK); /* Offset to track kerning data */ -#endif -#else /* Dynamic character data load not supported? */ -no_bytes_min = read_long(sp_globals.hdr2_org + FH_NBYTE); /* Offset to EOF + 1 */ -#endif - -sp_globals.font_buff_size = sp_globals.pfont->no_bytes; -if (sp_globals.font_buff_size < no_bytes_min) /* Minimum data not loaded? */ - { - report_error(1); /* Insufficient font data loaded */ - return FALSE; - } - -sp_globals.pchar_dir = sp_globals.font_org + offcd; -sp_globals.first_char_idx = read_word_u(sp_globals.font_org + FH_FCHRF); - -/* Register font name with sp_globals.constraint mechanism */ -font_id = read_word_u(sp_globals.font_org + FH_FNTID); -if (!(sp_globals.constr.font_id_valid) || (sp_globals.constr.font_id != font_id)) - { - sp_globals.constr.font_id = font_id; - sp_globals.constr.font_id_valid = TRUE; - sp_globals.constr.data_valid = FALSE; - } -sp_globals.constr.org = sp_globals.font_org + ofcns; -sp_globals.constr.active = ((sp_globals.pspecs->flags & CONSTR_OFF) == 0); - -/* Set up sliding point constants */ -/* Set pixel shift to accomodate largest transformed pixel value */ -xmin = read_word_u(sp_globals.font_org + FH_FXMIN); -xmax = read_word_u(sp_globals.font_org + FH_FXMAX); -ymin = read_word_u(sp_globals.font_org + FH_FYMIN); -ymax = read_word_u(sp_globals.font_org + FH_FYMAX); - -if (!sp_setup_consts(xmin,xmax,ymin,ymax)) - { - report_error(3); /* Requested specs out of range */ - return FALSE; - } -#if INCL_ISW -/* save the value of the max x oru that the fixed point constants are based on*/ -sp_globals.isw_xmax = xmax; -#endif - -/* Setup transformation control block */ -sp_setup_tcb(&sp_globals.tcb0); - - -/* Select output module */ -sp_globals.output_mode = sp_globals.pspecs->flags & 0x0007; - -#if INCL_USEROUT -if (!init_userout(sp_globals.pspecs)) -#endif - -switch (sp_globals.output_mode) - { -#if INCL_BLACK -case MODE_BLACK: /* Output mode 0 (Black writer) */ - sp_globals.init_out = sp_init_black; - sp_globals.begin_char = sp_begin_char_black; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_black; - sp_globals.curve = sp_curve_out; - sp_globals.line = sp_line_black; - sp_globals.end_contour = sp_end_contour_out; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_black; - break; -#endif - -#if INCL_SCREEN -case MODE_SCREEN: /* Output mode 1 (Screen writer) */ - sp_globals.init_out = sp_init_screen; - sp_globals.begin_char = sp_begin_char_screen; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_screen; - sp_globals.curve = sp_curve_screen; - sp_globals.line = sp_line_screen; - sp_globals.end_contour = sp_end_contour_screen; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_screen; - break; -#endif - -#if INCL_OUTLINE -case MODE_OUTLINE: /* Output mode 2 (Vector) */ - sp_globals.init_out = sp_init_outline; - sp_globals.begin_char = sp_begin_char_outline; - sp_globals.begin_sub_char = sp_begin_sub_char_outline; - sp_globals.begin_contour = sp_begin_contour_outline; - sp_globals.curve = sp_curve_outline; - sp_globals.line = sp_line_outline; - sp_globals.end_contour = sp_end_contour_outline; - sp_globals.end_sub_char = sp_end_sub_char_outline; - sp_globals.end_char = sp_end_char_outline; - break; -#endif - -#if INCL_2D -case MODE_2D: /* Output mode 3 */ - sp_globals.init_out = sp_init_2d; - sp_globals.begin_char = sp_begin_char_2d; - sp_globals.begin_sub_char = sp_begin_sub_char_out; - sp_globals.begin_contour = sp_begin_contour_2d; - sp_globals.curve = sp_curve_out; - sp_globals.line = sp_line_2d; - sp_globals.end_contour = sp_end_contour_out; - sp_globals.end_sub_char = sp_end_sub_char_out; - sp_globals.end_char = sp_end_char_2d; - break; -#endif - -default: - report_error(8); /* Unsupported mode requested */ - return FALSE; - } - - if (!fn_init_out(sp_globals.pspecs)) - { - report_error(5); - return FALSE; - } - - -sp_globals.curves_out = sp_globals.pspecs->flags & CURVES_OUT; - -if (sp_globals.pspecs->flags & BOGUS_MODE) /* Linear transformation requested? */ - { - sp_globals.tcb0.xtype = sp_globals.tcb0.ytype = 4; - } - -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) || - (sp_globals.pspecs->flags & SQUEEZE_RIGHT) || - (sp_globals.pspecs->flags & SQUEEZE_TOP) || - (sp_globals.pspecs->flags & SQUEEZE_BOTTOM) ) - { -#if (INCL_SQUEEZING) -#else - report_error(11); - return FALSE; -#endif - } - -if ((sp_globals.pspecs->flags & CLIP_LEFT) || - (sp_globals.pspecs->flags & CLIP_RIGHT) || - (sp_globals.pspecs->flags & CLIP_TOP) || - (sp_globals.pspecs->flags & CLIP_BOTTOM) ) - { -#if (INCL_CLIPPING) -#else - report_error(11); - return FALSE; -#endif - } - -sp_globals.specs_valid = TRUE; -return TRUE; -} - - - -#if INCL_MULTIDEV -#if INCL_BLACK || INCL_SCREEN || INCL_2D -FUNCTION boolean set_bitmap_device( -GDECL -bitmap_t *bfuncs, -ufix16 size) -{ - -if (size != sizeof(sp_globals.bitmap_device)) - return FALSE; - -sp_globals.bitmap_device = *bfuncs; -sp_globals.bitmap_device_set = TRUE; -} -#endif - -#if INCL_OUTLINE -FUNCTION boolean set_outline_device( -GDECL -outline_t *ofuncs, -ufix16 size) -{ - -if (size != sizeof(sp_globals.outline_device)) - return FALSE; - -sp_globals.outline_device = *ofuncs; -sp_globals.outline_device_set = TRUE; -} -#endif -#endif - - -#ifdef old -FUNCTION boolean sp_setup_consts( -GDECL -fix15 xmin, /* Minimum X ORU value in font */ -fix15 xmax, /* Maximum X ORU value in font */ -fix15 ymin, /* Minimum Y ORU value in font */ -fix15 ymax) /* Maximum Y ORU value in font */ -#else -static FUNCTION boolean sp_setup_consts( -GDECL -fix15 xmin, /* Minimum X ORU value in font */ -fix15 xmax, /* Maximum X ORU value in font */ -fix15 ymin, /* Minimum Y ORU value in font */ -fix15 ymax) /* Maximum Y ORU value in font */ -#endif -/* - * Sets the following constants used for fixed point arithmetic: - * sp_globals.multshift multipliers and products; range is 14 to 8 - * sp_globals.pixshift pixels: range is 0 to 8 - * sp_globals.mpshift shift from product to sub-pixels (sp_globals.multshift - sp_globals.pixshift) - * sp_globals.multrnd rounding for products - * sp_globals.pixrnd rounding for pixels - * sp_globals.mprnd rounding for sub-pixels - * sp_globals.onepix 1 pixel in shifted pixel units - * sp_globals.pixfix mask to eliminate fractional bits of shifted pixels - * sp_globals.depth_adj curve splitting depth adjustment - * Returns FALSE if specs are out of range - */ -{ -fix31 mult; /* Successive multiplier values */ -ufix32 num; /* Numerator of largest multiplier value */ -ufix32 numcopy; /* Copy of numerator */ -ufix32 denom; /* Denominator of largest multiplier value */ -ufix32 denomcopy; /* Copy of denominator */ -ufix32 pix_max; /* Maximum pixel rounding error */ -fix31 xmult; /* Coefficient of X oru value in transformation */ -fix31 ymult; /* Coefficient of Y oru value in transformation */ -fix31 offset; /* Constant in transformation */ -fix15 i; /* Loop counter */ -fix15 x, y; /* Successive corners of bounding box in ORUs */ -fix31 pixval; /* Successive pixel values multiplied by orus per em */ -fix15 xx = 0, yy = 0;/* Bounding box corner that produces max pixel value */ - -/* Determine numerator and denominator of largest multiplier value */ -mult = sp_globals.pspecs->xxmult >> 16; -if (mult < 0) - mult = -mult; -num = mult; - -mult = sp_globals.pspecs->xymult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; - -mult = sp_globals.pspecs->yxmult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; - -mult = sp_globals.pspecs->yymult >> 16; -if (mult < 0) - mult = -mult; -if (mult > num) - num = mult; -num++; /* Max absolute pixels per em (rounded up) */ -denom = (ufix32)sp_globals.orus_per_em; - -/* Set curve splitting depth adjustment to accomodate largest multiplier value */ -sp_globals.depth_adj = 0; /* 0 = 0.5 pel, 1 = 0.13 pel, 2 = 0.04 pel accuracy */ -denomcopy = denom; -/* The following two occurances of a strange method of shifting twice by 1 - are intentional and should not be changed to a single shift by 2. - It prevents MicroSoft C 5.1 from generating functions calls to do the shift. - Worse, using the REENTRANT_ALLOC option in conjunction with the /AC compiler - option, the function appears to be called incorrectly, causing depth_adj to always - be set to -7, causing very angular characters. */ - -while ((num > denomcopy) && (sp_globals.depth_adj < 5)) /* > 1, 4, 16, ... pixels per oru? */ - { - denomcopy <<= 1; - denomcopy <<= 1; - sp_globals.depth_adj++; /* Add 1, 2, 3, ... to depth adjustment */ - } -numcopy = num << 2; -while ((numcopy <= denom) && (sp_globals.depth_adj > -4)) /* <= 1/4, 1/16, 1/64 pix per oru? */ - { - numcopy <<= 1; - numcopy <<= 1; - sp_globals.depth_adj--; /* Subtract 1, 2, 3, ... from depth adjustment */ - } -SHOW(sp_globals.depth_adj); - -/* Set multiplier shift to accomodate largest multiplier value */ -sp_globals.multshift = 14; -numcopy = num; -while (numcopy >= denom) /* More than 1, 2, 4, ... pix per oru? */ - { - numcopy >>= 1; - sp_globals.multshift--; /* sp_globals.multshift is 13, 12, 11, ... */ - } - -sp_globals.multrnd = ((fix31)1 << sp_globals.multshift) >> 1; -SHOW(sp_globals.multshift); - - -pix_max = (ufix32)( 0xffff & read_word_u(sp_globals.hdr2_org + FH_PIXMX)); - -num = 0; -xmult = ((sp_globals.pspecs->xxmult >> 16) + 1) >> 1; -ymult = ((sp_globals.pspecs->xymult >> 16) + 1) >> 1; -offset = ((sp_globals.pspecs->xoffset >> 16) + 1) >> 1; -for (i = 0; i < 8; i++) - { - if (i == 4) - { - xmult = ((sp_globals.pspecs->yxmult >> 16) + 1) >> 1; - ymult = ((sp_globals.pspecs->yymult >> 16) + 1) >> 1; - offset = ((sp_globals.pspecs->yoffset >> 16) + 1) >> 1; - } - x = (i & BIT1)? xmin: xmax; - y = (i & BIT0)? ymin: ymax; - pixval = (fix31)x * xmult + (fix31)y * ymult + offset * denom; - if (pixval < 0) - pixval = -pixval; - if (pixval > num) - { - num = pixval; - xx = x; - yy = y; - } - } -if (xx < 0) - xx = -xx; -if (yy < 0) - yy = -yy; -num += xx + yy + ((pix_max + 2) * denom); - /* Allow (with 2:1 safety margin) for 1 pixel rounding errors in */ - /* xmult, ymult and offset values, pix_max pixel expansion */ - /* due to intelligent scaling, and */ - /* 1 pixel rounding of overall character position */ -denom = denom << 14; /* Note num is in units of half pixels times orus per em */ - -sp_globals.pixshift = -1; -while ((num <= denom) && (sp_globals.pixshift < 8)) /* Max pixels <= 32768, 16384, 8192, ... pixels? */ - { - num <<= 1; - sp_globals.pixshift++; /* sp_globals.pixshift = 0, 1, 2, ... */ - } -if (sp_globals.pixshift < 0) - return FALSE; - -SHOW(sp_globals.pixshift); -sp_globals.poshift = 16 - sp_globals.pixshift; - -sp_globals.onepix = (fix15)1 << sp_globals.pixshift; -sp_globals.pixrnd = sp_globals.onepix >> 1; -sp_globals.pixfix = ~0 << sp_globals.pixshift; - -sp_globals.mpshift = sp_globals.multshift - sp_globals.pixshift; -if (sp_globals.mpshift < 0) - return FALSE; -sp_globals.mprnd = ((fix31)1 << sp_globals.mpshift) >> 1; - -return TRUE; -} - -#ifdef old -FUNCTION void sp_setup_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -#else -static FUNCTION void sp_setup_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -#endif -/* - * Convert transformation coeffs to internal form - */ -{ - -ptcb->xxmult = sp_setup_mult(sp_globals.pspecs->xxmult); -ptcb->xymult = sp_setup_mult(sp_globals.pspecs->xymult); -ptcb->xoffset = sp_setup_offset(sp_globals.pspecs->xoffset); -ptcb->yxmult = sp_setup_mult(sp_globals.pspecs->yxmult); -ptcb->yymult = sp_setup_mult(sp_globals.pspecs->yymult); -ptcb->yoffset = sp_setup_offset(sp_globals.pspecs->yoffset); - -SHOW(ptcb->xxmult); -SHOW(ptcb->xymult); -SHOW(ptcb->xoffset); -SHOW(ptcb->yxmult); -SHOW(ptcb->yymult); -SHOW(ptcb->yoffset); - -type_tcb(ptcb); /* Classify transformation type */ -} - -FUNCTION static fix15 sp_setup_mult( -GDECL -fix31 input_mult) /* Multiplier in input format */ -/* - * Called by sp_setup_tcb() to convert multiplier in transformation - * matrix from external to internal form. - */ -{ -fix15 imshift; /* Right shift to internal format */ -fix31 imdenom; /* Divisor to internal format */ -fix31 imrnd; /* Rounding for division operation */ - -imshift = 15 - sp_globals.multshift; -imdenom = (fix31)sp_globals.orus_per_em << imshift; -imrnd = imdenom >> 1; - -input_mult >>= 1; -if (input_mult >= 0) - return (fix15)((input_mult + imrnd) / imdenom); -else - return -(fix15)((-input_mult + imrnd) / imdenom); -} - -FUNCTION static fix31 sp_setup_offset( -GDECL -fix31 input_offset) /* Multiplier in input format */ -/* - * Called by sp_setup_tcb() to convert offset in transformation - * matrix from external to internal form. - */ -{ -fix15 imshift; /* Right shift to internal format */ -fix31 imrnd; /* Rounding for right shift operation */ - -imshift = 15 - sp_globals.multshift; -imrnd = ((fix31)1 << imshift) >> 1; - -return (((input_offset >> 1) + imrnd) >> imshift) + sp_globals.mprnd; -} - -FUNCTION void type_tcb( -GDECL -tcb_t GLOBALFAR *ptcb) /* Pointer to transformation control bloxk */ -{ -fix15 x_trans_type; -fix15 y_trans_type; -fix15 xx_mult; -fix15 xy_mult; -fix15 yx_mult; -fix15 yy_mult; -fix15 h_pos; -fix15 v_pos; -fix15 x_ppo; -fix15 y_ppo; -fix15 x_pos; -fix15 y_pos; - -/* check for mirror image transformations */ -xx_mult = ptcb->xxmult; -xy_mult = ptcb->xymult; -yx_mult = ptcb->yxmult; -yy_mult = ptcb->yymult; - -ptcb->mirror = ((((fix31)xx_mult*(fix31)yy_mult)- - ((fix31)xy_mult*(fix31)yx_mult)) < 0) ? -1 : 1; - -if (sp_globals.pspecs->flags & BOGUS_MODE) /* Linear transformation requested? */ - { - ptcb->xtype = 4; - ptcb->ytype = 4; - - ptcb->xppo = 0; - ptcb->yppo = 0; - ptcb->xpos = 0; - ptcb->ypos = 0; - } -else /* Intelligent tranformation requested? */ - { - h_pos = ((ptcb->xoffset >> sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - v_pos = ((ptcb->yoffset >> sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - - x_trans_type = 4; - x_ppo = 0; - x_pos = 0; - - y_trans_type = 4; - y_ppo = 0; - y_pos = 0; - - if (xy_mult == 0) - { - if (xx_mult >= 0) - { - x_trans_type = 0; /* X pix is function of X orus only */ - x_ppo = xx_mult; - x_pos = h_pos; - } - else - { - x_trans_type = 1; /* X pix is function of -X orus only */ - x_ppo = -xx_mult; - x_pos = -h_pos; - } - } - - else if (xx_mult == 0) - { - if (xy_mult >= 0) - { - x_trans_type = 2; /* X pix is function of Y orus only */ - y_ppo = xy_mult; - y_pos = h_pos; - } - else - { - x_trans_type = 3; /* X pix is function of -Y orus only */ - y_ppo = -xy_mult; - y_pos = -h_pos; - } - } - - if (yx_mult == 0) - { - if (yy_mult >= 0) - { - y_trans_type = 0; /* Y pix is function of Y orus only */ - y_ppo = yy_mult; - y_pos = v_pos; - } - else - { - y_trans_type = 1; /* Y pix is function of -Y orus only */ - y_ppo = -yy_mult; - y_pos = -v_pos; - } - } - else if (yy_mult == 0) - { - if (yx_mult >= 0) - { - y_trans_type = 2; /* Y pix is function of X orus only */ - x_ppo = yx_mult; - x_pos = v_pos; - } - else - { - y_trans_type = 3; /* Y pix is function of -X orus only */ - x_ppo = -yx_mult; - x_pos = -v_pos; - } - } - - ptcb->xtype = x_trans_type; - ptcb->ytype = y_trans_type; - - ptcb->xppo = x_ppo; - ptcb->yppo = y_ppo; - ptcb->xpos = x_pos; - ptcb->ypos = y_pos; - } - -sp_globals.normal = (ptcb->xtype != 4) && (ptcb->ytype != 4); - -ptcb->xmode = 4; -ptcb->ymode = 4; - -SHOW(ptcb->xtype); -SHOW(ptcb->ytype); -SHOW(ptcb->xppo); -SHOW(ptcb->yppo); -SHOW(ptcb->xpos); -SHOW(ptcb->ypos); -} - -FUNCTION fix31 read_long( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of encrypted 3-byte integer */ -/* - * Reads a 3-byte encrypted integer from the byte string starting at - * the specified point. - * Returns the decrypted value read as a signed integer. - */ -{ -fix31 tmpfix31; - -tmpfix31 = (fix31)((*pointer++) ^ sp_globals.key4) << 8; /* Read middle byte */ -tmpfix31 += (fix31)(*pointer++) << 16; /* Read most significant byte */ -tmpfix31 += (fix31)((*pointer) ^ sp_globals.key6); /* Read least significant byte */ -return tmpfix31; -} - -FUNCTION fix15 read_word_u( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte of unencrypted 2-byte integer */ -/* - * Reads a 2-byte unencrypted integer from the byte string starting at - * the specified point. - * Returns the decrypted value read as a signed integer. - */ -{ -fix15 tmpfix15; - -tmpfix15 = (fix15)(*pointer++) << 8; /* Read most significant byte */ -tmpfix15 += (fix15)(*pointer); /* Add least significant byte */ -return tmpfix15; -} - - diff --git a/libXfont/src/Speedo/set_trns.c b/libXfont/src/Speedo/set_trns.c deleted file mode 100644 index 35c2e33cf..000000000 --- a/libXfont/src/Speedo/set_trns.c +++ /dev/null @@ -1,1214 +0,0 @@ -/* $Xorg: set_trns.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.5tsi Exp $ */ - - - -/*************************** S E T _ T R N S . C ***************************** - * * - * This module is called from do_char.c to set up the intelligent * - * transformation for one character (or sub-character of a composite * - * character. - * * - ****************************************************************************/ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spdo_prv.h" /* General definitions for Speedo */ - -#define DEBUG 0 - -#if DEBUG -#include <stdio.h> -#define SHOW(X) printf("X = %d\n", X) -#else -#define SHOW(X) -#endif -/***** LOCAL MACROS *****/ - -#define SQUEEZE_X_ORU(A,B,C) ((((fix31)A * (fix31)B) + C) >> 16) -#define ABS(A) ((A < 0)? -A:A) /* absolute value */ -#define IMPORT_FACTOR \ - shift = 16;\ - while (*x_factor > (0x7fffffffL / (isw_scale >> (16 - shift))))\ - shift--;\ - *x_factor = (*x_factor * (isw_scale>>(16-shift))) >> shift; - -/***** GLOBAL VARIABLES *****/ - -/***** GLOBAL FUNCTIONS *****/ - -/***** EXTERNAL VARIABLES *****/ - -/***** EXTERNAL FUNCTIONS *****/ - -/***** STATIC VARIABLES *****/ - -/***** STATIC FUNCTIONS *****/ - -static void sp_constr_update(PROTO_DECL1); -static ufix8 FONTFAR *sp_setup_pix_table(PROTO_DECL2 ufix8 FONTFAR *pointer,boolean short_form,fix15 no_X_ctrl_zones,fix15 no_Y_ctrl_zones); -static ufix8 FONTFAR *sp_setup_int_table(PROTO_DECL2 ufix8 FONTFAR *pointer,fix15 no_X_int_zones,fix15 no_Y_int_zones); - - -FUNCTION void init_tcb() -GDECL -/* - * Called by sp_make_char() and make_comp_char() to initialize the current - * transformation control block to the top level transformation. - */ -{ -sp_globals.tcb = sp_globals.tcb0; -} - -FUNCTION void scale_tcb( -GDECL -tcb_t GLOBALFAR *ptcb, /* Transformation control block */ -fix15 x_pos, /* X position (outline res units) */ -fix15 y_pos, /* Y position (outline res units) */ -fix15 x_scale, /* X scale factor * ONE_SCALE */ -fix15 y_scale) /* Y scale factor * ONE_SCALE */ -/* - * Called by make_comp_char() to apply position and scale for each of the - * components of a compound character. - */ -{ -fix15 xx_mult = ptcb->xxmult; -fix15 xy_mult = ptcb->xymult; -fix31 x_offset = ptcb->xoffset; -fix15 yx_mult = ptcb->yxmult; -fix15 yy_mult = ptcb->yymult; -fix31 y_offset = ptcb->yoffset; - -ptcb->xxmult = TRANS(xx_mult, x_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->xymult = TRANS(xy_mult, y_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->xoffset = MULT16(xx_mult, x_pos) + MULT16(xy_mult, y_pos) + x_offset; -ptcb->yxmult = TRANS(yx_mult, x_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->yymult = TRANS(yy_mult, y_scale, (fix31)SCALE_RND, SCALE_SHIFT); -ptcb->yoffset = MULT16(yx_mult, x_pos) + MULT16(yy_mult, y_pos) + y_offset; - -type_tcb(ptcb); /* Reclassify transformation types */ -} - - -static FUNCTION ufix8 FONTFAR *read_oru_table( -GDECL -ufix8 FONTFAR *pointer) /* Pointer to first byte in controlled coord table */ -/* - * Called by plaid_tcb() to read the controlled coordinate table from the - * character data in the font. - * Updates the pointer to the byte following the controlled coordinate - * data. - */ -{ -fix15 i, j, k, n; -boolean zero_not_in; -boolean zero_added; -fix15 oru; - -fix15 pos; - -i = 0; -n = sp_globals.no_X_orus; -pos = sp_globals.tcb.xpos; -for (j = 0; ; j++) - { - zero_not_in = TRUE; - zero_added = FALSE; - for (k = 0; k < n; k++) - { - oru = NEXT_WORD(pointer); - if (zero_not_in && (oru >= 0)) /* First positive oru value? */ - { - sp_plaid.pix[i] = pos; /* Insert position in pix array */ - if (oru != 0) /* Zero oru value omitted? */ - { - sp_plaid.orus[i++] = 0; /* Insert zero value in oru array */ - zero_added = TRUE; /* Remember to increment size of array */ - } - zero_not_in = FALSE; /* Inhibit further testing for zero ins */ - } - sp_plaid.orus[i++] = oru; /* Add specified oru value to array */ - } - if (zero_not_in) /* All specified oru values negative? */ - { - sp_plaid.pix[i] = pos; /* Insert position in pix array */ - sp_plaid.orus[i++] = 0; /* Add zero oru value */ - zero_added = TRUE; /* Remember to increment size of array */ - } - if (j) /* Both X and Y orus read? */ - break; - if (zero_added) - sp_globals.no_X_orus++; /* Increment X array size */ - n = sp_globals.no_Y_orus; /* Prepare to read Y oru values */ - pos = sp_globals.tcb.ypos; - } -if (zero_added) /* Zero Y oru value added to array? */ - sp_globals.no_Y_orus++; /* Increment Y array size */ - -#if DEBUG -printf("\nX ORUS\n"); -n = sp_globals.no_X_orus; -for (i = 0; i < n; i++) - { - printf("%2d %4d\n", i, sp_plaid.orus[i]); - } -printf("\nY ORUS\n"); -n = sp_globals.no_Y_orus; -for (i = 0; i < n; i++) - { - printf("%2d %4d\n", i, sp_plaid.orus[i + sp_globals.no_X_orus]); - } -#endif - -return pointer; /* Update pointer */ -} - -FUNCTION ufix8 FONTFAR *plaid_tcb( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to next byte in char data */ -ufix8 format) /* Character format byte */ -/* - * Called by make_simp_char() and make_comp_char() to set up the controlled - * coordinate table and process all intelligent scaling rules embedded - * in the character data. - * Updates pointer to first byte after plaid data. - * This is used only if intelligent scaling is enabled in the - * configuration definitions. - */ -{ -fix15 no_X_ctrl_zones; -fix15 no_Y_ctrl_zones; -fix15 no_X_int_zones; -fix15 no_Y_int_zones; - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_plaid_data(); -#endif - -sp_constr_update(); /* Update constraint table if required */ - -sp_globals.no_X_orus = (format & BIT2)? - (fix15)NEXT_BYTE(pointer): - 0; -sp_globals.no_Y_orus = (format & BIT3)? - (fix15)NEXT_BYTE(pointer): - 0; -pointer = read_oru_table(pointer); /* Updates no_X/Y/orus to include zero values */ -sp_globals.Y_edge_org = sp_globals.no_X_orus; -if (sp_globals.no_X_orus > 1) /* 2 or more controlled X coordinates? */ - sp_globals.tcb.xmode = sp_globals.tcb.xtype; /* Enable intelligent scaling in X */ - -if (sp_globals.no_Y_orus > 1) /* 2 or more controlled Y coordinates? */ - sp_globals.tcb.ymode = sp_globals.tcb.ytype; /* Enable intelligent scaling in Y */ - -no_X_ctrl_zones = sp_globals.no_X_orus - 1; -no_Y_ctrl_zones = sp_globals.no_Y_orus - 1; -pointer = sp_setup_pix_table(pointer, (boolean)(format & BIT4), - no_X_ctrl_zones, no_Y_ctrl_zones); - -no_X_int_zones = (format & BIT6)? - (fix15)NEXT_BYTE(pointer): - 0; -no_Y_int_zones = (format & BIT7)? - (fix15)NEXT_BYTE(pointer): - 0; -sp_globals.Y_int_org = no_X_int_zones; -pointer = sp_setup_int_table(pointer, no_X_int_zones, no_Y_int_zones); - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -end_plaid_data(); -#endif - -return pointer; -} - -FUNCTION static void sp_constr_update() -GDECL -/* - * Called by plaid_tcb() to update the constraint table for the current - * transformation. - * This is always carried out whenever a character is generated following - * a change of font or scale factor or after initialization. - */ -{ -fix31 ppo; -fix15 xppo; -fix15 yppo; -ufix8 FONTFAR *pointer; -fix15 no_X_constr; -fix15 no_Y_constr; -fix15 i, j, k, l, n; -fix15 ppm; -ufix8 format; -ufix8 format1; -fix15 limit; -ufix16 constr_org; -fix15 constr_nr; -fix15 size; -fix31 off; -fix15 min; -fix15 orus; -fix15 pix; -ufix16 tmpufix16; /* in extended mode, macro uses secnd term */ - -if (sp_globals.constr.data_valid && /* Constr table already done and ... */ - (sp_globals.tcb.xppo == sp_globals.constr.xppo) && /* ... X pix per oru unchanged and ... */ - (sp_globals.tcb.yppo == sp_globals.constr.yppo)) /* ... Y pix per oru unchanged? */ - { - return; /* No need to update constraint table */ - } - -sp_globals.constr.xppo = xppo = sp_globals.tcb.xppo; /* Update X pixels per oru indicator */ -sp_globals.constr.yppo = yppo = sp_globals.tcb.yppo; /* Update Y pixels per oru indicator */ -sp_globals.constr.data_valid = TRUE; /* Mark constraint table valid */ - -pointer = sp_globals.constr.org; /* Point to first byte of constraint data */ -no_X_constr = NEXT_BYTES(pointer, tmpufix16); /* Read nmbr of X constraints */ -no_Y_constr = NEXT_BYTES(pointer, tmpufix16); /* Read nmbr of Y constraints */ - -i = 0; -constr_org = 0; -n = no_X_constr; -ppo = xppo; -for (j = 0; ; j++) - { - sp_globals.c_act[i] = FALSE; /* Flag constraint 0 not active */ - sp_globals.c_pix[i++] = 0; /* Constraint 0 implies no minimum */ - sp_globals.c_act[i] = FALSE; /* Flag constraint 1 not active */ - sp_globals.c_pix[i++] = sp_globals.onepix; /* Constraint 1 implies min 1 pixel*/ - ppm = (ppo * (fix31)sp_globals.orus_per_em) >> sp_globals.multshift; - for (k = 0; k < n; k++) - { - format = NEXT_BYTE(pointer); /* Read format byte */ - limit = (fix15)NEXT_BYTE(pointer); /* Read limit field */ - sp_globals.c_act[i] = - ((ppm < limit) || (limit == 255)) && - sp_globals.constr.active; - if (sp_globals.c_act[i]) /* Constraint active? */ - { - if ((format & BIT1) && /* Constraint specified and ... */ - (constr_nr = constr_org + - ((format & BIT0)? /* Read unsigned constraint value */ - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer)), - sp_globals.c_act[constr_nr])) /* ... and specified constraint active? */ - { - pix = sp_globals.c_pix[constr_nr]; /* Use constrained pixel value */ - format1 = format; - for (l = 2; l > 0; l--) /* Skip 2 arguments */ - { - format1 >>= 2; - if ((size = format1 & 0x03)) - pointer += size - 1; - } - } - else /* Constraint absent or inactive? */ - { - orus = (format & BIT2)? /* Read unsigned oru value */ - NEXT_WORD(pointer): - (fix15)NEXT_BYTE(pointer); - - if (format & BIT5) /* Specified offset value? */ - { - off = (fix31)((format & BIT4)? /* Read offset value */ - NEXT_WORD(pointer): - (fix7)NEXT_BYTE(pointer)); - off = (off << (sp_globals.multshift - 6)) + sp_globals.multrnd; - } - else /* Unspecified (zero) offset value? */ - { - off = sp_globals.multrnd; - } - - pix = (fix15)(((fix31)orus * ppo + off) / (1 << sp_globals.mpshift)) & sp_globals.pixfix; - } - } - else /* Constraint inactive? */ - { - format1 = format; - for (l = 3; l > 0; l--) /* Skip over 3 arguments */ - { - if ((size = format1 & 0x03)) - pointer += size - 1; - format1 >>= 2; - } - pix = 0; - } - - if (format & 0xc0) /* Specified minimum value? */ - { - min = (format & BIT7)? /* Read unsigned minimum value */ - (fix15)NEXT_BYTE(pointer) << sp_globals.pixshift: - sp_globals.onepix; - } - else /* Unspecified (zero) minimum value? */ - { - min = 0; - } - - sp_globals.c_pix[i] = (pix < min)? min: pix; - i++; - } - if (j) break; /* Finished if second time around loop */ - constr_org = sp_globals.Y_constr_org = i; - n = no_Y_constr; - ppo = yppo; - } - -#if DEBUG -printf("\nCONSTRAINT TABLE\n"); -n = no_X_constr + 2; -for (i = 0; i < n; i++) - { - printf("%3d ", i); - if (sp_globals.c_act[i]) - { - printf("T "); - } - else - { - printf("F "); - } - printf("%5.1f\n", ((real)sp_globals.c_pix[i] / (real)sp_globals.onepix)); - } -printf("--------------\n"); -n = no_Y_constr + 2; -for (i = 0; i < n; i++) - { - j = i + sp_globals.Y_constr_org; - printf("%3d ", i); - if (sp_globals.c_act[j]) - { - printf("T "); - } - else - { - printf("F "); - } - printf("%5.1f\n", ((real)sp_globals.c_pix[j] / (real)sp_globals.onepix)); - } -#endif - -} - -#if INCL_SQUEEZING || INCL_ISW -FUNCTION static void calculate_x_pix( -GDECL -ufix8 start_edge, ufix8 end_edge, -ufix16 constr_nr, -fix31 x_scale, -fix31 x_offset, -fix31 ppo, -fix15 setwidth_pix) -/* - * Called by sp_setup_pix_table() when X squeezing is necessary - * to insert the correct edge in the global pix array - */ -{ -fix15 zone_pix; -fix15 start_oru, end_oru; - -/* compute scaled oru coordinates */ -start_oru= (fix15)(SQUEEZE_X_ORU(sp_plaid.orus[start_edge], x_scale, x_offset)); -end_oru = (fix15)(SQUEEZE_X_ORU(sp_plaid.orus[end_edge], x_scale, x_offset)); - -if (!sp_globals.c_act[constr_nr]) /* constraint inactive */ - { - /* calculate zone width */ - zone_pix = (fix15)(((((fix31)end_oru - (fix31)start_oru) * ppo) / - (1<<sp_globals.mpshift)) + sp_globals.pixrnd) & sp_globals.pixfix; - /* check for overflow */ - if (((end_oru-start_oru) > 0) && (zone_pix < 0)) - zone_pix = 0x7ffff; - /* check for minimum */ - if ((ABS(zone_pix)) >= sp_globals.c_pix[constr_nr]) - goto Lx; - } -/* use the zone size from the constr table - scale it */ -zone_pix = (fix15)(((SQUEEZE_MULT(x_scale,sp_globals.c_pix[constr_nr])) - + sp_globals.pixrnd) & sp_globals.pixfix); - -/* look for overflow */ -if ((sp_globals.c_pix[constr_nr] > 0) && (zone_pix < 0)) - zone_pix = 0x7fff; - -if (start_edge > end_edge) - { - zone_pix = -zone_pix; - } -Lx: -/* assign pixel value to global pix array */ -sp_plaid.pix[end_edge]=sp_plaid.pix[start_edge] + zone_pix; - -/* check for overflow */ -if (((sp_plaid.pix[start_edge] >0) && (zone_pix >0)) && - (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0x7fff; /* set it to the max */ - -/* be sure to be in the setwidth !*/ -#if INCL_ISW -if (!sp_globals.import_setwidth_act) /* only check left edge if not isw only */ -#endif -if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) && (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0; -if ((sp_globals.pspecs->flags & SQUEEZE_RIGHT) && - (sp_plaid.pix[end_edge] > setwidth_pix)) - sp_plaid.pix[end_edge] = setwidth_pix; - -} -#endif - -#if INCL_SQUEEZING -FUNCTION static void calculate_y_pix( -GDECL -ufix8 start_edge, ufix8 end_edge, -ufix16 constr_nr, -fix31 top_scale, fix31 bottom_scale, -fix31 ppo, -fix15 em_top_pix, fix15 em_bot_pix) - -/* - * Called by sp_setup_pix_table() when Y squeezing is necessary - * to insert the correct edge in the global pix array - */ -{ -fix15 zone_pix; -fix15 start_oru, end_oru; -fix31 zone_width, above_base, below_base; - -/* check whether edge is above or below the baseline */ -/* and apply appropriate scale factor to get scaled oru coordinates */ -if (sp_plaid.orus[start_edge] < 0) - start_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[start_edge], bottom_scale)); -else - start_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[start_edge], top_scale)); - -if (sp_plaid.orus[end_edge] < 0) - end_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[end_edge], bottom_scale)); -else - end_oru =(fix15)(SQUEEZE_MULT(sp_plaid.orus[end_edge], top_scale)); - -if (!sp_globals.c_act[constr_nr]) /* Constraint inactive? */ - { - /* calculate zone width */ - zone_pix = (fix15)(((((fix31)end_oru - (fix31)start_oru) * ppo) - >> sp_globals.mpshift)+ sp_globals.pixrnd) & sp_globals.pixfix; - /* check minimum */ - if ((ABS(zone_pix)) >= sp_globals.c_pix[constr_nr]) - goto Ly; - } - -/* Use zone size from constr table */ -if ((end_oru >= 0) && (start_oru >=0)) - /* all above baseline */ - zone_pix = (fix15)(SQUEEZE_MULT(top_scale, sp_globals.c_pix[constr_nr])); -else if ((end_oru <= 0) && (start_oru <=0)) - /* all below baseline */ - zone_pix = (fix15)(SQUEEZE_MULT(bottom_scale, sp_globals.c_pix[constr_nr])); -else - { - /* mixture */ - if (start_oru > 0) - { - zone_width = start_oru - end_oru; - /* get % above baseline in 16.16 fixed point */ - above_base = (((fix31)start_oru) << 16) / - ((fix31)zone_width) ; - /* get % below baseline in 16.16 fixed point */ - below_base = (((fix31)-end_oru) << 16) / - ((fix31)zone_width) ; - } - else - { - zone_width = end_oru - start_oru; - /* get % above baseline in 16.16 fixed point */ - above_base = (((fix31)-start_oru) << 16) / - ((fix31)zone_width) ; - /* get % below baseline in 16.16 fixed point */ - below_base = (((fix31)end_oru) << 16) / - ((fix31)zone_width) ; - } - /* % above baseline * total zone * top_scale + */ - /* % below baseline * total zone * bottom_scale */ - zone_pix = ((((above_base * (fix31)sp_globals.c_pix[constr_nr]) >> 16) * - top_scale) + - (((below_base * (fix31)sp_globals.c_pix[constr_nr]) >> 16) * - bottom_scale)) >> 16; - } - -/* make this zone pix fall on a pixel boundary */ -zone_pix = (zone_pix + sp_globals.pixrnd) & sp_globals.pixfix; - -/* if minimum is in effect make the zone one pixel */ -if ((sp_globals.c_pix[constr_nr] != 0) && (zone_pix < sp_globals.onepix)) - zone_pix = sp_globals.onepix; - -if (start_edge > end_edge) - { - zone_pix = -zone_pix; /* Use negatve zone size */ - } -Ly: -/* assign global pix value */ -sp_plaid.pix[end_edge] = sp_plaid.pix[start_edge] + zone_pix; /* Insert end pixels */ - -/* make sure it is in the EM !*/ -if ((sp_globals.pspecs->flags & SQUEEZE_TOP) && - (sp_plaid.pix[end_edge] > em_top_pix)) - sp_plaid.pix[end_edge] = em_top_pix; -if ((sp_globals.pspecs->flags & SQUEEZE_BOTTOM) && - (sp_plaid.pix[end_edge] < em_bot_pix)) - sp_plaid.pix[end_edge] = em_bot_pix; -} - -FUNCTION boolean calculate_x_scale(x_factor, x_offset, no_X_ctrl_zones) -GDECL -fix31 *x_factor, -fix31 *x_offset, -fix15 no_X_ctrl_zones) /* Number of X control zones */ -/* - * Called by sp_setup_pix_table() when squeezing is included - * to determine whether X scaling is necessary. If it is, the - * scale factor and offset are computed. This function returns - * a boolean value TRUE = X squeezind is necessary, FALSE = no - * X squeezing is necessary. - */ -{ -boolean squeeze_left, squeeze_right; -boolean out_on_right, out_on_left; -fix15 bbox_width,set_width; -fix15 bbox_xmin, bbox_xmax; -fix15 x_offset_pix; -fix15 i; -#if INCL_ISW -fix31 isw_scale; -fix15 shift; -#endif - - -/* set up some flags and common calculations */ -squeeze_left = (sp_globals.pspecs->flags & SQUEEZE_LEFT)? TRUE:FALSE; -squeeze_right = (sp_globals.pspecs->flags & SQUEEZE_RIGHT)? TRUE:FALSE; -bbox_xmin = sp_globals.bbox_xmin_orus; -bbox_xmax = sp_globals.bbox_xmax_orus; -set_width = sp_globals.setwidth_orus; - -if (bbox_xmax > set_width) - out_on_right = TRUE; -else - out_on_right = FALSE; -if (bbox_xmin < 0) - out_on_left = TRUE; -else - out_on_left = FALSE; -bbox_width =bbox_xmax - bbox_xmin; - -/* - * don't need X squeezing if: - * - X squeezing not enabled - * - bbox doesn't violate on left or right - * - left squeezing only is enabled and char isn't out on left - * - right squeezing only is enabled and char isn't out on right - */ - -if ((!squeeze_left && !squeeze_right) || - (!out_on_right && !out_on_left) || - (squeeze_left && !squeeze_right && !out_on_left) || - (squeeze_right && !squeeze_left && !out_on_right)) - return FALSE; - -#if INCL_ISW -if (sp_globals.import_setwidth_act) - { - /* if both isw and squeezing is going on - let the imported */ - /* setwidth factor be factored in with the squeeze */ - isw_scale = compute_isw_scale(); - /*sp_globals.setwidth_orus = sp_globals.imported_width;*/ - } -else - isw_scale = 0x10000L; /* 1 in 16.16 notation */ -#endif - -/* squeezing on left and right ? */ -if (squeeze_left && squeeze_right) - { - /* calculate scale factor */ - if (bbox_width < set_width) - *x_factor = 0x10000L; /* 1 in 16.16 notation */ - else - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; -#if INCL_ISW - IMPORT_FACTOR -#endif - /* calculate offset */ - if (out_on_left) /* fall out on left ? */ - *x_offset = -(fix31)*x_factor * (fix31)bbox_xmin; - /* fall out on right and I am shifting only ? */ - else if (out_on_right && (*x_factor == 0x10000L)) - *x_offset = -(fix31)*x_factor * (fix31)(bbox_xmax - set_width); - else - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } -/* squeezing on left only and violates left */ -else if (squeeze_left) - { - if (bbox_width < set_width) /* will it fit if I shift it ? */ - *x_factor = 0x10000L; /* 1 in 16.16 notation */ - else if (out_on_right) - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; - else - *x_factor = ((fix31)set_width<<16)/ - (fix31)(bbox_width - (bbox_xmax-set_width)); -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = (fix31)-*x_factor * (fix31)bbox_xmin; - } - -/* I must be squeezing on right, and violates right */ -else - { - if (bbox_width < set_width) /* will it fit if I shift it ? */ - { /* just shift it left - it will fit in the bbox */ - *x_factor = 0x10000L; /* 1 in 16.16 notation */ -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = (fix31)-*x_factor * (fix31)bbox_xmin; - } - else if (out_on_left) - { - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_width; -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } - else - { - *x_factor = ((fix31)set_width<<16)/(fix31)bbox_xmax; -#if INCL_ISW - IMPORT_FACTOR -#endif - *x_offset = 0x0L; /* 0 in 16.16 notation */ - } - } - -x_offset_pix = (fix15)(((*x_offset >> 16) * sp_globals.tcb0.xppo) - / (1<<sp_globals.mpshift)); - -if ((x_offset_pix >0) && (x_offset_pix < sp_globals.onepix)) - x_offset_pix = sp_globals.onepix; - -/* look for the first non-negative oru value, scale and add the offset */ -/* to the corresponding pixel value - note that the pixel value */ -/* is set in read_oru_table. */ - -/* look at all the X edges */ -for (i=0; i < (no_X_ctrl_zones+1); i++) - if (sp_plaid.orus[i] >= 0) - { - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *x_factor) - +sp_globals.pixrnd + x_offset_pix) & sp_globals.pixfix; - break; - } - -return TRUE; -} - -FUNCTION boolean calculate_y_scale( -GDECL -fix31 *top_scale, fix31 *bottom_scale, -fix15 first_Y_zone, -fix15 no_Y_ctrl_zones) -/* - * Called by sp_setup_pix_table() when squeezing is included - * to determine whether Y scaling is necessary. If it is, - * two scale factors are computed, one for above the baseline, - * and one for below the basline. - * This function returns a boolean value TRUE = Y squeezind is necessary, - * FALSE = no Y squeezing is necessary. - */ -{ -boolean squeeze_top, squeeze_bottom; -boolean out_on_top, out_on_bottom; -fix15 bbox_top, bbox_bottom; -fix15 bbox_height; -fix15 i; - -/* set up some flags and common calculations */ -squeeze_top = (sp_globals.pspecs->flags & SQUEEZE_TOP)? TRUE:FALSE; -squeeze_bottom = (sp_globals.pspecs->flags & SQUEEZE_BOTTOM)? TRUE:FALSE; -bbox_top = sp_globals.bbox_ymax_orus; -bbox_bottom = sp_globals.bbox_ymin_orus; -bbox_height = bbox_top - bbox_bottom; - -if (bbox_top > EM_TOP) - out_on_top = TRUE; -else - out_on_top = FALSE; - -if (bbox_bottom < EM_BOT) - out_on_bottom = TRUE; -else - out_on_bottom = FALSE; - -/* - * don't need Y squeezing if: - * - Y squeezing not enabled - * - bbox doesn't violate on top or bottom - * - top squeezing only is enabled and char isn't out on top - * - bottom squeezing only is enabled and char isn't out on bottom - */ -if ((!squeeze_top && !squeeze_bottom) || - (!out_on_top && !out_on_bottom) || - (squeeze_top && !squeeze_bottom && !out_on_top) || - (squeeze_bottom && !squeeze_top && !out_on_bottom)) - return FALSE; - -if (squeeze_top && (bbox_top > EM_TOP)) - *top_scale = ((fix31)EM_TOP << 16)/(fix31)(bbox_top); -else - *top_scale = 0x10000L; /* 1 in 16.16 fixed point */ - -if (squeeze_bottom && (bbox_bottom < EM_BOT)) - *bottom_scale = ((fix31)-(EM_BOT) << 16)/(fix31)-bbox_bottom; -else - *bottom_scale = 0x10000L; - -if (sp_globals.squeezing_compound) - { - for (i=first_Y_zone; i < (first_Y_zone + no_Y_ctrl_zones + 1); i++) - { - if (sp_plaid.orus[i] >= 0) - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *top_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - else - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], *bottom_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - } - } -return TRUE; -} -#endif - -FUNCTION static ufix8 FONTFAR *sp_setup_pix_table( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte in control zone table */ -boolean short_form, /* TRUE if 1 byte from/to specification */ -fix15 no_X_ctrl_zones, /* Number of X control zones */ -fix15 no_Y_ctrl_zones) /* Number of Y control zones */ -/* - * Called by plaid_tcb() to read the control zone table from the - * character data in the font. - * Sets up a table of pixel values for all controlled coordinates. - * Updates the pointer to the byte following the control zone - * data. - */ -{ -fix15 i, j, n; -fix31 ppo; -#if INCL_SQUEEZING || INCL_ISW -fix31 xppo0; /* top level pixels per oru */ -fix31 yppo0; /* top level pixels per oru */ -#endif -ufix8 edge_org; -ufix8 edge; -ufix8 start_edge; -ufix8 end_edge; -ufix16 constr_org; -fix15 constr_nr; -fix15 zone_pix; -fix31 whole_zone; /* non-transformed value of the first X zone */ -ufix16 tmpufix16; /* in extended mode, macro uses secnd term */ -#if INCL_SQUEEZING -fix31 x_scale; -fix31 y_top_scale, y_bottom_scale; -fix31 x_offset; -boolean squeezed_y; -fix15 setwidth_pix, em_top_pix, em_bot_pix; -#endif - -#if INCL_ISW -boolean imported_width; -fix31 isw_scale; -fix15 isw_setwidth_pix; -#endif - -#if INCL_ISW || INCL_SQUEEZING -boolean squeezed_x; -#endif - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_ctrl_zones(no_X_ctrl_zones, no_Y_ctrl_zones); -#endif - - -edge_org = 0; -constr_org = 0; -sp_globals.rnd_xmin = 0; /* initialize the error for chars with no zone */ -n = no_X_ctrl_zones; -ppo = sp_globals.tcb.xppo; -#if INCL_SQUEEZING || INCL_ISW -xppo0 = sp_globals.tcb0.xppo; -yppo0 = sp_globals.tcb0.yppo; -squeezed_x = FALSE; -#endif - -#if INCL_SQUEEZING -squeezed_x = calculate_x_scale (&x_scale, &x_offset, no_X_ctrl_zones); -squeezed_y = calculate_y_scale(&y_top_scale,&y_bottom_scale,(n+1), - no_Y_ctrl_zones); -#if INCL_ISW -if (sp_globals.import_setwidth_act == TRUE) -setwidth_pix = ((fix15)(((fix31)sp_globals.imported_width * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; - -else -#endif -setwidth_pix = ((fix15)(((fix31)sp_globals.setwidth_orus * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -/* check for overflow */ -if (setwidth_pix < 0) - setwidth_pix = 0x7fff; /* set to maximum */ -em_bot_pix = ((fix15)(((fix31)EM_BOT * yppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -em_top_pix = ((fix15)(((fix31)EM_TOP * yppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -#endif - -#if INCL_ISW -/* convert to pixels */ -isw_setwidth_pix = ((fix15)(((fix31)sp_globals.imported_width * xppo0) >> - sp_globals.mpshift) + sp_globals.pixrnd) & sp_globals.pixfix; -/* check for overflow */ -if (isw_setwidth_pix < 0) - isw_setwidth_pix = 0x7fff; /* set to maximum */ -if (!squeezed_x && ((imported_width = sp_globals.import_setwidth_act) == TRUE)) - { - isw_scale = compute_isw_scale(); - - /* look for the first non-negative oru value, scale and add the offset */ - /* to the corresponding pixel value - note that the pixel value */ - /* is set in read_oru_table. */ - - /* look at all the X edges */ - for (i=0; i < (no_X_ctrl_zones+1); i++) - if (sp_plaid.orus[i] >= 0) - { - sp_plaid.pix[i] = (SQUEEZE_MULT(sp_plaid.pix[i], isw_scale) - +sp_globals.pixrnd) & sp_globals.pixfix; - break; - } - - } -#endif - -for (i = 0; ; i++) /* For X and Y control zones... */ - { - for (j = 0; j < n; j++) /* For each zone in X or Y... */ - { - if (short_form) /* 1 byte from/to specification? */ - { - edge = NEXT_BYTE(pointer); /* Read packed from/to spec */ - start_edge = edge_org + (edge & 0x0f); /* Extract start edge */ - end_edge = edge_org + (edge >> 4); /* Extract end edge */ - } - else /* 2 byte from/to specification? */ - { - start_edge = edge_org + NEXT_BYTE(pointer); /* Read start edge */ - end_edge = edge_org + NEXT_BYTE(pointer); /* read end edge */ - } - constr_nr = constr_org + - NEXT_BYTES(pointer, tmpufix16); /* Read constraint number */ -#if INCL_SQUEEZING - if (i == 0 && squeezed_x) - calculate_x_pix(start_edge, end_edge, constr_nr, - x_scale, x_offset, ppo, setwidth_pix); - else if (i == 1 && squeezed_y) - calculate_y_pix(start_edge, end_edge,constr_nr, - y_top_scale, y_bottom_scale, ppo, em_top_pix, em_bot_pix); - else - { -#endif -#if INCL_ISW - if (i==0 && imported_width) - calculate_x_pix(start_edge, end_edge, constr_nr, - isw_scale, 0, ppo, isw_setwidth_pix); - else - { -#endif - if (!sp_globals.c_act[constr_nr]) /* Constraint inactive? */ - { - zone_pix = ((fix15)((((fix31)sp_plaid.orus[end_edge] - - (fix31)sp_plaid.orus[start_edge]) * ppo) / - (1<<sp_globals.mpshift)) + sp_globals.pixrnd) & - sp_globals.pixfix; - if ((ABS(zone_pix)) >= sp_globals.c_pix[constr_nr]) - goto L1; - } - zone_pix = sp_globals.c_pix[constr_nr]; /* Use zone size from constr table */ - if (start_edge > end_edge) /* sp_plaid.orus[start_edge] > sp_plaid.orus[end_edge]? */ - { - zone_pix = -zone_pix; /* Use negatve zone size */ - } - L1: - /* inter-character spacing fix */ - if ((j == 0) && (i == 0)) /* if this is the 1st X zone, save rounding error */ - { /* get the non-xformed - xformed zone, in right direction */ - whole_zone = (((fix31)sp_plaid.orus[end_edge] - - (fix31)sp_plaid.orus[start_edge]) * - ppo) / (1<<sp_globals.mpshift); - sp_globals.rnd_xmin = whole_zone - zone_pix; - } - sp_plaid.pix[end_edge] = sp_plaid.pix[start_edge] + zone_pix; /* Insert end pixels */ -#if INCL_SQUEEZING - if (i == 0) /* in the x direction */ - { /* brute force squeeze */ - if ((sp_globals.pspecs->flags & SQUEEZE_LEFT) && - (sp_plaid.pix[end_edge] < 0)) - sp_plaid.pix[end_edge] = 0; - if ((sp_globals.pspecs->flags & SQUEEZE_RIGHT) && - (sp_plaid.pix[end_edge] > setwidth_pix)) - sp_plaid.pix[end_edge] = setwidth_pix; - } - if (i == 1) /* in the y direction */ - { /* brute force squeeze */ - if ((sp_globals.pspecs->flags & SQUEEZE_TOP) && - (sp_plaid.pix[end_edge] > em_top_pix)) - sp_plaid.pix[end_edge] = em_top_pix; - if ((sp_globals.pspecs->flags & SQUEEZE_BOTTOM) && - (sp_plaid.pix[end_edge] < em_bot_pix)) - sp_plaid.pix[end_edge] = em_bot_pix; - } -#endif -#if INCL_SQUEEZING - } -#endif -#if INCL_ISW - } -#endif -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ - record_ctrl_zone( - (fix31)sp_plaid.pix[start_edge] << (16 - sp_globals.pixshift), - (fix31)sp_plaid.pix[end_edge] << (16 - sp_globals.pixshift), - (fix15)(constr_nr - constr_org)); -#endif - } - if (i) /* Y pixels done? */ - break; - edge_org = sp_globals.Y_edge_org; /* Prepare to process Y ctrl zones */ - constr_org = sp_globals.Y_constr_org; - n = no_Y_ctrl_zones; - ppo = sp_globals.tcb.yppo; - } - -#if DEBUG -printf("\nX PIX TABLE\n"); -n = no_X_ctrl_zones + 1; -for (i = 0; i < n; i++) - printf("%2d %6.1f\n", i, (real)sp_plaid.pix[i] / (real)sp_globals.onepix); -printf("\nY PIX TABLE\n"); -n = no_Y_ctrl_zones + 1; -for (i = 0; i < n; i++) - { - j = i + no_X_ctrl_zones + 1; - printf("%2d %6.1f\n", i, (real)sp_plaid.pix[j] / (real)sp_globals.onepix); - } -#endif - -return pointer; -} - - -FUNCTION static ufix8 FONTFAR *sp_setup_int_table( -GDECL -ufix8 FONTFAR *pointer, /* Pointer to first byte in interpolation zone table */ -fix15 no_X_int_zones, /* Number of X interpolation zones */ -fix15 no_Y_int_zones) /* Number of X interpolation zones */ -/* - * Called by plaid_tcb() to read the interpolation zone table from the - * character data in the font. - * Sets up a table of interpolation coefficients with one entry for - * every X or Y interpolation zone. - * Updates the pointer to the byte following the interpolation zone - * data. - */ -{ -fix15 i, j, k, l, n; -ufix8 format; -ufix8 format_copy; -ufix8 tmpufix8; -fix15 start_orus = 0; -ufix8 edge_org; -ufix8 edge; -ufix16 adj_factor; -fix15 adj_orus; -fix15 end_orus = 0; -fix31 zone_orus; -fix15 start_pix = 0; -fix15 end_pix = 0; - - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -begin_int_zones(no_X_int_zones, no_Y_int_zones); -#endif - -i = 0; -edge_org = 0; -n = no_X_int_zones; -for (j = 0; ; j++) - { - for (k = 0; k < n; k++) - { - format = NEXT_BYTE(pointer); - if (format & BIT7) /* Short start/end point spec? */ - { - tmpufix8 = NEXT_BYTE(pointer); - edge = edge_org + (tmpufix8 & 0xf); - start_orus = sp_plaid.orus[edge]; - start_pix = sp_plaid.pix[edge]; - edge = edge_org + (tmpufix8 >> 4); - end_orus = sp_plaid.orus[edge]; - end_pix = sp_plaid.pix[edge]; - } - else /* Standard start and end point spec? */ - { - format_copy = format; - for (l = 0; ; l++) /* Loop for start and end point */ - { - switch (format_copy & 0x7) /* Decode start/end point format */ - { - - case 0: /* Index to control edge */ - edge = edge_org + NEXT_BYTE(pointer); - end_orus = sp_plaid.orus[edge]; - end_pix = sp_plaid.pix[edge]; - break; - - case 1: /* 1 byte fractional distance to next edge */ - adj_factor = 0xffff & NEXT_BYTE(pointer) << 8; - goto L1; - - - case 2: /* 2 byte fractional distance to next edge */ - adj_factor = 0xffff & NEXT_WORD(pointer); - L1: edge = edge_org + NEXT_BYTE(pointer); - end_orus = sp_plaid.orus[edge] + - ((((fix31)sp_plaid.orus[edge + 1] - (fix31)sp_plaid.orus[edge]) * - (ufix32)adj_factor + (fix31)32768) >> 16); - end_pix = sp_plaid.pix[edge] + - ((((fix31)sp_plaid.pix[edge + 1] - (fix31)sp_plaid.pix[edge]) * - (ufix32)adj_factor + (fix31)32768) >> 16); - break; - - case 3: /* 1 byte delta orus before first edge */ - adj_orus = -(fix15)NEXT_BYTE(pointer); - goto L2; - - case 4: /* 2 byte delta orus before first edge */ - adj_orus = -NEXT_WORD(pointer); - L2: edge = edge_org; - goto L4; - - case 5: /* 1 byte delta orus after last edge */ - adj_orus = (fix15)NEXT_BYTE(pointer); - goto L3; - - case 6: /* 2 byte delta orus after last edge */ - adj_orus = NEXT_WORD(pointer); - L3: edge = j? sp_globals.Y_edge_org + sp_globals.no_Y_orus - 1: sp_globals.no_X_orus - 1; - L4: end_orus = sp_plaid.orus[edge] + adj_orus; - end_pix = sp_plaid.pix[edge] + - (((fix31)adj_orus * (fix31)(j? sp_globals.tcb.yppo: sp_globals.tcb.xppo) + - sp_globals.mprnd) / (1<<sp_globals.mpshift)); - break; - - } - - if (l) /* Second time round loop? */ - break; - format_copy >>= 3; /* Adj format to decode end point format */ - start_orus = end_orus; /* Save start point oru value */ - start_pix = end_pix; /* Save start point pixel value */ - } - } -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ - record_int_zone( - (fix31)start_pix << (16 - sp_globals.pixshift), - (fix31)end_pix << (16 - sp_globals.pixshift)); -#endif - zone_orus = (fix31)end_orus - (fix31)start_orus; - sp_plaid.mult[i] = ((((fix31)end_pix - (fix31)start_pix) << sp_globals.mpshift) + - (zone_orus / 2)) / zone_orus; - sp_plaid.offset[i] = - (((((fix31)start_pix + (fix31)end_pix) << sp_globals.mpshift) - - ((fix31)sp_plaid.mult[i] * ((fix31)start_orus + (fix31)end_orus))) / 2) + - sp_globals.mprnd; - i++; - } - if (j) /* Finished? */ - break; - edge_org = sp_globals.Y_edge_org; /* Prepare to process Y ctrl zones */ - n = no_Y_int_zones; - } - -#if DEBUG -printf("\nX INT TABLE\n"); -n = no_X_int_zones; -for (i = 0; i < n; i++) - { - printf("%2d %7.4f %7.4f\n", i, - (real)sp_plaid.mult[i] / (real)(1 << sp_globals.multshift), - (real)sp_plaid.offset[i] / (real)(1 << sp_globals.multshift)); - } -printf("\nY INT TABLE\n"); -n = no_Y_int_zones; -for (i = 0; i < n; i++) - { - j = i + no_X_int_zones; - printf("%2d %7.4f %7.4f\n", i, - (real)sp_plaid.mult[j] / (real)(1 << sp_globals.multshift), - (real)sp_plaid.offset[j] / (real)(1 << sp_globals.multshift)); - } -#endif - -return pointer; -} -#if INCL_ISW -FUNCTION fix31 compute_isw_scale() -GDECL -{ -fix31 isw_scale; - -if (sp_globals.setwidth_orus == 0) - isw_scale = 0x00010000; -else - isw_scale = ((fix31)sp_globals.imported_width << 16)/ - (fix31)sp_globals.setwidth_orus; -return isw_scale; -} -#endif diff --git a/libXfont/src/Speedo/spdo_prv.h b/libXfont/src/Speedo/spdo_prv.h deleted file mode 100644 index 2b3882c22..000000000 --- a/libXfont/src/Speedo/spdo_prv.h +++ /dev/null @@ -1,262 +0,0 @@ -/* $Xorg: spdo_prv.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/spdo_prv.h,v 1.4 1999/03/14 03:21:17 dawes Exp $ */ - - - -/***************************** S P D O _ P R V . H *******************************/ - -#include "speedo.h" /* include public definitions */ - -/***** CONFIGURATION DEFINITIONS *****/ - - -/***** PRIVATE FONT HEADER OFFSET CONSTANTS *****/ -#define FH_ORUMX 0 /* U Max ORU value 2 bytes */ -#define FH_PIXMX 2 /* U Max Pixel value 2 bytes */ -#define FH_CUSNR 4 /* U Customer Number 2 bytes */ -#define FH_OFFCD 6 /* E Offset to Char Directory 3 bytes */ -#define FH_OFCNS 9 /* E Offset to Constraint Data 3 bytes */ -#define FH_OFFTK 12 /* E Offset to Track Kerning 3 bytes */ -#define FH_OFFPK 15 /* E Offset to Pair Kerning 3 bytes */ -#define FH_OCHRD 18 /* E Offset to Character Data 3 bytes */ -#define FH_NBYTE 21 /* E Number of Bytes in File 3 bytes */ - - -/***** MODE FLAGS CONSTANTS *****/ -#define CURVES_OUT 0X0008 /* Output module accepts curves */ -#define BOGUS_MODE 0X0010 /* Linear scaling mode */ -#define CONSTR_OFF 0X0020 /* Inhibit constraint table */ -#define IMPORT_WIDTHS 0X0040 /* Imported width mode */ -#define SQUEEZE_LEFT 0X0100 /* Squeeze left mode */ -#define SQUEEZE_RIGHT 0X0200 /* Squeeze right mode */ -#define SQUEEZE_TOP 0X0400 /* Squeeze top mode */ -#define SQUEEZE_BOTTOM 0X0800 /* Squeeze bottom mode */ -#define CLIP_LEFT 0X1000 /* Clip left mode */ -#define CLIP_RIGHT 0X2000 /* Clip right mode */ -#define CLIP_TOP 0X4000 /* Clip top mode */ -#define CLIP_BOTTOM 0X8000 /* Clip bottom mode */ - - -/***** MACRO DEFINITIONS *****/ - -#define SQUEEZE_MULT(A,B) (((fix31)A * (fix31)B) / (1 << 16)) - -#define NEXT_BYTE(A) (*(A)++) - -#define NEXT_WORD(A) \ - ((fix15)(sp_globals.key32 ^ ((A) += 2, \ - ((fix15)((A)[-1]) << 8) | (fix15)((A)[-2]) | \ - ((A)[-1] & 0x80? ~0xFFFF : 0)))) - -#if INCL_EXT /* Extended fonts supported? */ - -#define NEXT_BYTES(A, B) \ - (((B = (ufix16)(*(A)++) ^ sp_globals.key7) >= 248)? \ - ((ufix16)(B & 0x07) << 8) + ((*(A)++) ^ sp_globals.key8) + 248: \ - B) - -#else /* Compact fonts only supported? */ - -#define NEXT_BYTES(A, B) ((*(A)++) ^ sp_globals.key7) - -#endif - - -#define NEXT_BYTE_U(A) (*(A)++) - -#define NEXT_WORD_U(A, B) \ - (fix15)(B = (*(A)++) << 8, (fix15)(*(A)++) + B) - -#define NEXT_CHNDX(A, B) \ - ((B)? (ufix16)NEXT_WORD(A): (ufix16)NEXT_BYTE(A)) - -/* Multiply (fix15)X by (fix15)Y to produce (fix31)product */ -#define MULT16(X, Y) \ - ((fix31)X * (fix31)Y) - -/* Multiply (fix15)X by (fix15)MULT, add (fix31)OFFSET, - * shift right SHIFT bits to produce (fix15)result */ -#define TRANS(X, MULT, OFFSET, SHIFT) \ - ((fix15)((((fix31)X * (fix31)MULT) + OFFSET) / (1 << SHIFT))) - -/****************************************************************************** - * - * the following block of definitions redefines every function - * reference to be prefixed with an "sp_". In addition, if this - * is a reentrant version, the parameter sp_globals will be added - * as the first parameter. - * - *****************************************************************************/ - -#define GDECL - -#define get_char_id(char_index) sp_get_char_id(char_index) -#define get_char_width(char_index) sp_get_char_width(char_index) -#define get_track_kern(track,point_size) sp_get_track_kern(track,point_size) -#define get_pair_kern(char_index1,char_index2) sp_get_pair_kern(char_index1,char_index2) -#define get_char_bbox(char_index,bbox) sp_get_char_bbox(char_index,bbox) -#define make_char(char_index) sp_make_char(char_index) -#if INCL_ISW -#define compute_isw_scale() sp_compute_isw_scale() -#define do_make_char(char_index) sp_do_make_char(char_index) -#define make_char_isw(char_index,imported_width) sp_make_char_isw(char_index,imported_width) -#define reset_xmax(xmax) sp_reset_xmax(xmax) -#endif -#if INCL_ISW || INCL_SQUEEZING -#define preview_bounding_box(pointer,format) sp_preview_bounding_box(pointer,format) -#endif -#define make_simp_char(pointer,format) sp_make_simp_char(pointer,format) -#define make_comp_char(pointer) sp_make_comp_char(pointer) -#define get_char_org(char_index,top_level) sp_get_char_org(char_index,top_level) -#define get_posn_arg(ppointer,format) sp_get_posn_arg(ppointer,format) -#define get_scale_arg(ppointer,format) sp_get_scale_arg(ppointer,format) -#define read_bbox(ppointer,pPmin,pPmax,set_flag) sp_read_bbox(ppointer,pPmin,pPmax,set_flag) -#define proc_outl_data(pointer) sp_proc_outl_data(pointer) -#define split_curve(P1,P2,P3,depth) sp_split_curve(P1,P2,P3,depth) -#define get_args(ppointer,format,pP) sp_get_args(ppointer,format,pP) - -#define init_black(specsarg) sp_init_black(specsarg) -#define begin_char_black(Psw,Pmin,Pmax) sp_begin_char_black(Psw,Pmin,Pmax) -#define begin_contour_black(P1,outside) sp_begin_contour_black(P1,outside) -#define line_black(P1) sp_line_black(P1) -#define end_char_black() sp_end_char_black() -#define add_intercept_black(y,x) sp_add_intercept_black(y,x) -#define proc_intercepts_black() sp_proc_intercepts_black() - -#define init_screen(specsarg) sp_init_screen(specsarg) -#define begin_char_screen(Psw,Pmin,Pmax) sp_begin_char_screen(Psw,Pmin,Pmax) -#define begin_contour_screen(P1,outside) sp_begin_contour_screen(P1,outside) -#define curve_screen(P1,P2,P3,depth) sp_curve_screen(P1,P2,P3,depth) -#define scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) sp_scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) -#define vert_line_screen(x,y1,y2) sp_vert_line_screen(x,y1,y2) -#define line_screen(P1) sp_line_screen(P1) -#define end_contour_screen() sp_end_contour_screen() -#define end_char_screen() sp_end_char_screen() -#define add_intercept_screen(y,x) sp_add_intercept_screen(y,x) -#define proc_intercepts_screen() sp_proc_intercepts_screen() - -#define init_outline(specsarg) sp_init_outline(specsarg) -#define begin_char_outline(Psw,Pmin,Pmax) sp_begin_char_outline(Psw,Pmin,Pmax) -#define begin_sub_char_outline(Psw,Pmin,Pmax) sp_begin_sub_char_outline(Psw,Pmin,Pmax) -#define begin_contour_outline(P1,outside) sp_begin_contour_outline(P1,outside) -#define curve_outline(P1,P2,P3,depth) sp_curve_outline(P1,P2,P3,depth) -#define line_outline(P1) sp_line_outline(P1) -#define end_contour_outline() sp_end_contour_outline() -#define end_sub_char_outline() sp_end_sub_char_outline() -#define end_char_outline() sp_end_char_outline() - -#define init_2d(specsarg) sp_init_2d(specsarg) -#define begin_char_2d(Psw, Pmin, Pmax) sp_begin_char_2d(Psw, Pmin, Pmax) -#define begin_contour_2d(P1, outside) sp_begin_contour_2d(P1, outside) -#define line_2d(P1) sp_line_2d(P1) -#define end_char_2d() sp_end_char_2d() -#define add_intercept_2d(y, x) sp_add_intercept_2d(y, x) -#define proc_intercepts_2d() sp_proc_intercepts_2d() -#define draw_vector_to_2d(x0, y0, x1, y1, band) sp_draw_vector_to_2d(x0, y0, x1, y1, band) - -#define init_char_out(Psw,Pmin,Pmax) sp_init_char_out(Psw,Pmin,Pmax) -#define begin_sub_char_out(Psw,Pmin,Pmax) sp_begin_sub_char_out(Psw,Pmin,Pmax) -#define curve_out(P1,P2,P3,depth) sp_curve_out(P1,P2,P3,depth) -#define end_contour_out() sp_end_contour_out() -#define end_sub_char_out() sp_end_sub_char_out() -#define init_intercepts_out() sp_init_intercepts_out() -#define restart_intercepts_out sp_restart_intercepts_out -#define set_first_band_out(Pmin,Pmax) sp_set_first_band_out(Pmin,Pmax) -#define reduce_band_size_out() sp_reduce_band_size_out() -#define next_band_out() sp_next_band_out() - -#define init_userout(specsarg) sp_init_userout(specsarg) - -#define reset() sp_reset() -#define set_key(key) sp_set_key(key) -#define get_cust_no(font_buff) sp_get_cust_no(font_buff) -#define set_specs(specsarg) sp_set_specs(specsarg) -#define setup_consts(xmin,xmax,ymin,ymax) sp_setup_consts(xmin,xmax,ymin,ymax) -#define setup_tcb(ptcb) sp_setup_tcb(ptcb) -#define setup_mult(input_mult) sp_setup_mult(input_mult) -#define setup_offset(input_offset) sp_setup_offset(input_offset) -#define type_tcb(ptcb) sp_type_tcb(ptcb) -#define read_long(pointer) sp_read_long(pointer) -#define read_word_u(pointer) sp_read_word_u(pointer) -#define init_tcb() sp_init_tcb() -#define scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) sp_scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) -#define plaid_tcb(ppointer,format) sp_plaid_tcb(ppointer,format) -#define skip_orus(ppointer,short_form,no_ctrl_zones) sp_skip_orus(ppointer,short_form,no_ctrl_zones) -#define skip_interpolation_table(ppointer,format) sp_skip_interpolation_table(ppointer,format) -#define skip_control_zone(ppointer,format) sp_skip_control_zone(ppointer,format) -#define constr_update() sp_constr_update() -#define read_oru_table(ppointer) sp_read_oru_table(ppointer) -#define calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) sp_calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) -#define calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) sp_calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) -#define calculate_x_scale(x_factor,x_offset,no_x_ctrl_zones) sp_calculate_x_scale(x_factor,x_offset,no_x_ctrl_zones) -#define calculate_y_scale(top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) sp_calculate_y_scale(top_scale,bottom_scale,first_y_zone,no_Y_ctrl_zones) -#define setup_pix_table(ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) sp_setup_pix_table(ppointer,short_form,no_X_ctrl_zones,no_Y_ctrl_zones) -#define setup_int_table(ppointer,no_X_int_zones, no_Y_int_zones) sp_setup_int_table(ppointer,no_X_int_zones, no_Y_int_zones) - -#define fn_init_out(specsarg) (*sp_globals.init_out)(specsarg) -#define fn_begin_char(Psw,Pmin,Pmax) (*sp_globals.begin_char)(Psw,Pmin,Pmax) -#define fn_begin_sub_char(Psw,Pmin,Pmax) (*sp_globals.begin_sub_char)(Psw,Pmin,Pmax) -#define fn_end_sub_char() (*sp_globals.end_sub_char)() -#define fn_end_char() (*sp_globals.end_char)() -#define fn_line(P1) (*sp_globals.line)(P1) -#define fn_end_contour() (*sp_globals.end_contour)() -#define fn_begin_contour(P0,fmt) (*sp_globals.begin_contour)(P0,fmt) -#define fn_curve(P1,P2,P3,depth) (*sp_globals.curve)(P1,P2,P3,depth) - -#define load_char_data(offset, no_bytes, buff_off) sp_load_char_data(offset, no_bytes, buff_off) -#define report_error(n) sp_report_error(n) - -#if INCL_MULTIDEV - -#define set_bitmap_device(bfuncs,size) sp_set_bitmap_device(bfuncs,size) -#define set_outline_device(ofuncs,size) sp_set_outline_device(ofuncs,size) - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) (*sp_globals.bitmap_device.p_open_bitmap)(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2) (*sp_globals.bitmap_device.p_set_bits)(y, xbit1, xbit2) -#define close_bitmap() (*sp_globals.bitmap_device.p_close_bitmap)() - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) (*sp_globals.outline_device.p_open_outline)(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char() (*sp_globals.outline_device.p_start_char)() -#define start_contour(x,y,outside) (*sp_globals.outline_device.p_start_contour)(x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3) (*sp_globals.outline_device.p_curve)(x1,y1,x2,y2,x3,y3) -#define line_to(x,y) (*sp_globals.outline_device.p_line)(x,y) -#define close_contour() (*sp_globals.outline_device.p_close_contour)() -#define close_outline() (*sp_globals.outline_device.p_close_outline)() - -#else - -#define open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_bitmap(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define set_bitmap_bits(y, xbit1, xbit2) sp_set_bitmap_bits(y, xbit1, xbit2) -#define close_bitmap() sp_close_bitmap() - -#define open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) sp_open_outline(x_set_width, y_set_width, xmin, xmax, ymin, ymax) -#define start_new_char() sp_start_new_char() -#define start_contour(x,y,outside) sp_start_contour(x,y,outside) -#define curve_to(x1,y1,x2,y2,x3,y3) sp_curve_to(x1,y1,x2,y2,x3,y3) -#define line_to(x,y) sp_line_to(x,y) -#define close_contour() sp_close_contour() -#define close_outline() sp_close_outline() - -#endif diff --git a/libXfont/src/Speedo/speedo.h b/libXfont/src/Speedo/speedo.h deleted file mode 100644 index a5ba3a06a..000000000 --- a/libXfont/src/Speedo/speedo.h +++ /dev/null @@ -1,874 +0,0 @@ -/* $Xorg: speedo.h,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ - -/* - -Copyright 1989-1991, Bitstream Inc., Cambridge, MA. -You are hereby granted permission under all Bitstream propriety rights to -use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo -software and the Bitstream Charter outline font for any purpose and without -restrictions; provided, that this notice is left intact on all copies of such -software or font and that Bitstream's trademark is acknowledged as shown below -on all unmodified copies of such font. - -BITSTREAM CHARTER is a registered trademark of Bitstream Inc. - - -BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT -DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER -INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED -WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. - -*/ -/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.5 2001/01/17 19:43:18 dawes Exp $ */ - -#ifndef _SPEEDO_H_ -#define _SPEEDO_H_ - -#include <X11/Xmd.h> - -/***************************** S P E E D O . H ******************************* - ****************************************************************************/ - -/***** USER OPTIONS OVERRIDE DEFAULTS ******/ -#include "useropt.h" - -/***** CONFIGURATION DEFINITIONS *****/ - -#ifndef INCL_CLIPPING -#define INCL_CLIPPING 0 /* 0 indicates CLIPPING code is not compiled in*/ -#endif - -#ifndef INCL_SQUEEZING -#define INCL_SQUEEZING 0 /* 0 indicates SQUEEZE code is not compiled in*/ -#endif - -#ifndef INCL_EXT -#define INCL_EXT 1 /* 1 to include extended font support */ -#endif /* 0 to omit extended font support */ - -#ifndef INCL_RULES -#define INCL_RULES 1 /* 1 to include intelligent scaling support */ -#endif /* 0 to omit intelligent scaling support */ - -#ifndef INCL_BLACK -#define INCL_BLACK 1 /* 1 to include blackwriter output support */ -#endif /* 0 to omit output mode 0 support */ - -#ifndef INCL_SCREEN -#define INCL_SCREEN 0 /* 1 to include screen writeroutput support */ -#endif /* 0 to omit support */ - -#ifndef INCL_OUTLINE -#define INCL_OUTLINE 0 /* 1 to include outline output support */ -#endif /* 0 to omit output mode 2 support */ - -#ifndef INCL_2D -#define INCL_2D 0 /* 1 to include 2d blackwriter output support */ -#endif /* 0 to omit output mode 3 support */ - -#ifndef INCL_USEROUT -#define INCL_USEROUT 0 /* 1 to include user defined output module support */ -#endif /* 0 to omit user defined output module support */ - -#ifndef INCL_LCD -#define INCL_LCD 1 /* 1 to include load char data support*/ -#endif /* 0 to omit load char data support */ -#ifndef INCL_ISW -#define INCL_ISW 0 /* 1 to include imported width support */ -#endif /* 0 to omit imported width support */ - -#ifndef INCL_METRICS -#define INCL_METRICS 1 /* 1 to include metrics support */ -#endif /* 0 to omit metrics support */ - -#ifndef INCL_KEYS -#define INCL_KEYS 0 /* 1 to include multi key support */ -#endif /* 0 to omit multi key support */ - -#ifndef INCL_MULTIDEV -#define INCL_MULTIDEV 0 /* 1 to include multiple output device support */ -#endif /* 0 to omit multi device support */ - -#ifndef SHORT_LISTS -#define SHORT_LISTS 1 /* 1 to allocate small intercept lists */ -#endif - -#ifndef INCL_PLAID_OUT -#define INCL_PLAID_OUT 0 /* 1 to include plaid data monitoring */ -#endif /* 0 to omit plaid data monitoring */ - -#ifndef FONTFAR /* if Intel mixed memory model implementation */ -#define FONTFAR /* pointer type modifier for font buffer */ -#endif - -#ifndef STACKFAR /* if Intel mixed memory model implementation */ -#define STACKFAR /* pointer type modifier for font buffer */ -#endif - -#ifndef GLOBALFAR -#define GLOBALFAR -#endif - -#define MODE_BLACK 0 -#define MODE_SCREEN MODE_BLACK + INCL_BLACK -#define MODE_OUTLINE MODE_SCREEN + INCL_SCREEN -#define MODE_2D MODE_OUTLINE + INCL_OUTLINE - -#ifdef DYNAMIC_ALLOC -#if DYNAMIC_ALLOC -#define STATIC_ALLOC 0 -#endif -#endif - -#ifdef REENTRANT_ALLOC -#if REENTRANT_ALLOC -#define STATIC_ALLOC 0 -#endif -#endif - -#ifndef STATIC_ALLOC -#define STATIC_ALLOC 1 -#endif - -#ifndef DYNAMIC_ALLOC -#define DYNAMIC_ALLOC 0 -#endif - -#ifndef REENTRANT_ALLOC -#define REENTRANT_ALLOC 0 -#endif - -/***** TYPE DEFINITIONS *****/ - -#ifndef STDEF -#ifndef SPD_BMAP - -typedef INT8 fix7; - -typedef double real; - -typedef CARD8 ufix8; -#ifndef VFONT -typedef CARD8 boolean; -#endif -#endif - -typedef INT16 fix15; - -typedef CARD16 ufix16; - -typedef INT32 fix31; - -typedef CARD32 ufix32; -#endif - -/***** GENERAL CONSTANTS *****/ - -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#ifndef NULL -#include <stddef.h> -#endif - -#define FUNCTION - -#define BIT0 0x01 -#define BIT1 0x02 -#define BIT2 0x04 -#define BIT3 0x08 -#define BIT4 0x10 -#define BIT5 0x20 -#define BIT6 0x40 -#define BIT7 0x80 - -#if INCL_EXT /* Extended fonts supported? */ - -#define MAX_CONSTR 750 /* Max constraints (incl 4 dummies) */ -#define MAX_CTRL_ZONES 256 /* Max number of controlled orus */ -#define MAX_INT_ZONES 256 /* Max number of interpolation zones */ - -#else /* Compact fonts only supported */ - -#define MAX_CONSTR 512 /* Max constraints (incl 4 dummies) */ -#define MAX_CTRL_ZONES 64 /* Max number of controlled orus */ -#define MAX_INT_ZONES 64 /* Max number of interpolation zones */ - -#endif - -#define SCALE_SHIFT 12 /* Binary point positiion for scale values */ -#define SCALE_RND 2048 /* Rounding bit for scaling transformation */ -#define ONE_SCALE 4096 /* Unity scale value */ - -#ifdef INCL_SCREEN /* constants used by Screenwriter module */ -#define LEFT_INT 1 /* left intercept */ -#define END_INT 2 /* last intercept */ -#define FRACTION 0xFC /* fractional portion of intercept type list */ -#endif - -#if INCL_SQUEEZING || INCL_CLIPPING /* constants used by SQUEEZEing code */ -#define EM_TOP 764 -#define EM_BOT -236 -#endif - -/***** STRUCTURE DEFINITIONS *****/ -#if REENTRANT_ALLOC -#define PROTO_DECL1 struct speedo_global_data GLOBALFAR *sp_global_ptr -#define PROTO_DECL2 PROTO_DECL1 , -#else -#define PROTO_DECL1 void -#define PROTO_DECL2 -#endif - -typedef -struct buff_tag - { - ufix8 FONTFAR *org; /* Pointer to start of buffer */ - ufix32 no_bytes; /* Size of buffer in bytes */ - } -buff_t; /* Buffer descriptor */ - -typedef struct constr_tag - { - ufix8 FONTFAR *org; /* Pointer to first byte in constr data */ - ufix16 font_id; /* Font id for calculated data */ - fix15 xppo; /* X pixels per oru for calculated data */ - fix15 yppo; /* Y pixels per oru for calculated data */ - boolean font_id_valid; /* TRUE if font id valid */ - boolean data_valid; /* TRUE if calculated data valid */ - boolean active; /* TRUE if constraints enabled */ - } -constr_t; /* Constraint data state */ - -typedef struct kern_tag - { - ufix8 FONTFAR *tkorg; /* First byte of track kerning data */ - ufix8 FONTFAR *pkorg; /* First byte of pair kerning data */ - fix15 no_tracks; /* Number of kerning tracks */ - fix15 no_pairs; /* Number of kerning pairs */ - } -kern_t; /* Kerning control block */ - -typedef struct specs_tag - { - buff_t STACKFAR *pfont; /* Pointer to font data */ - fix31 xxmult; /* Coeff of X orus to compute X pix */ - fix31 xymult; /* Coeff of Y orus to compute X pix */ - fix31 xoffset; /* Constant to compute X pix */ - fix31 yxmult; /* Coeff of X orus to compute Y pix */ - fix31 yymult; /* Coeff of Y orus to compute Y pix */ - fix31 yoffset; /* Constant to compute Y pix */ - ufix32 flags; /* Mode flags: */ - /* Bit 0 - 2: Output module selector: */ - /* Bit 3: Send curves to output module*/ - /* Bit 4: Use linear scaling if set */ - /* Bit 5: Inhibit constraint table */ - /* Bit 6: Import set width if set */ - /* Bit 7: not used */ - /* Bit 8: Squeeze left if set */ - /* Bit 9: Squeeze right if set */ - /* Bit 10: Squeeze top if set */ - /* Bit 11: Squeeze bottom if set */ - /* Bit 12: Clip left if set */ - /* Bit 13: Clip right if set */ - /* Bit 14: Clip top if set */ - /* Bit 15: Clip bottom if set */ - /* Bits 16-31 not used */ - void *out_info; /* information for output module */ - } -specs_t; /* Specs structure for fw_set_specs */ - -typedef struct tcb_tag - { - fix15 xxmult; /* Linear coeff of Xorus to compute Xpix */ - fix15 xymult; /* Linear coeff of Yorus to compute Xpix */ - fix31 xoffset; /* Linear constant to compute Xpix */ - fix15 yxmult; /* Linear coeff of Xorus to compute Ypix */ - fix15 yymult; /* Linear coeff of Yorus to compute Ypix */ - fix31 yoffset; /* Linear constant to compute Ypix */ - fix15 xppo; /* Pixels per oru in X dimension of char */ - fix15 yppo; /* Pixels per oru in Y dimension of char */ - fix15 xpos; /* Origin in X dimension of character */ - fix15 ypos; /* Origin in Y dimension of character */ - ufix16 xtype; /* Transformation type for X oru coords */ - ufix16 ytype; /* Transformation type for Y oru coords */ - ufix16 xmode; /* Transformation mode for X oru coords */ - ufix16 ymode; /* Transformation mode for Y oru coords */ - fix15 mirror; /* Transformation creates mirror image */ - } -tcb_t; /* Transformation control block */ - -typedef struct point_tag - { - fix15 x; /* X coord of point (shifted pixels) */ - fix15 y; /* Y coord of point (shifted pixels) */ - } -point_t; /* Point in device space */ - -typedef struct band_tag - { - fix15 band_max; - fix15 band_min; - fix15 band_array_offset; - fix15 band_floor; - fix15 band_ceiling; - } band_t; - -typedef struct bbox_tag - { - fix31 xmin; - fix31 xmax; - fix31 ymin; - fix31 ymax; - } bbox_t; - -#if SHORT_LISTS -#define MAX_INTERCEPTS 256 /* Max storage for intercepts */ -typedef ufix8 cdr_t; /* 8 bit links in intercept chains */ -#else -#define MAX_INTERCEPTS 1000 /* Max storage for intercepts */ -typedef ufix16 cdr_t; /* 16 bit links in intercept chains */ -#endif - -#if REENTRANT_ALLOC - -typedef struct intercepts_tag - { - fix15 car[MAX_INTERCEPTS]; - fix15 cdr[MAX_INTERCEPTS]; -#if INCL_SCREEN - ufix8 inttype[MAX_INTERCEPTS]; - ufix8 leftedge; - ufix16 fracpix; -#endif - } intercepts_t; - -typedef struct plaid_tag - { - fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */ - fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ - fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ - fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */ - } plaid_t; -#endif - -#if INCL_MULTIDEV -typedef struct bitmap_tag - { - void (*p_open_bitmap)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, fix15 xsize,fix15 ysize); - void (*p_set_bits)(PROTO_DECL2 fix15 y, fix15 xbit1, fix15 xbit2); - void (*p_close_bitmap)(PROTO_DECL1); - } bitmap_t; - -typedef struct outline_tag - { - void (*p_open_outline)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xmin, fix31 xmax, fix31 ymin,fix31 ymax); - void (*p_start_char)(PROTO_DECL1); - void (*p_start_contour)(PROTO_DECL2 fix31 x,fix31 y,boolean outside); - void (*p_curve)(PROTO_DECL2 fix31 x1, fix31 y1, fix31 x2, fix31 y2, fix31 x3, fix31 y3); - void (*p_line)(PROTO_DECL2 fix31 x, fix31 y); - void (*p_close_contour)(PROTO_DECL1); - void (*p_close_outline)(PROTO_DECL1); - } outline_t; -#endif - -/* ---------------------------------------------------*/ -/**** MAIN GLOBAL DATA STRUCTURE, SPEEDO_GLOBALS *****/ - -typedef struct speedo_global_data - { -/* do_char.c data definitions */ -#if INCL_METRICS /* Metrics functions supported? */ - kern_t kern; /* Kerning control block */ -#endif /* endif incl_metrics */ - point_t Psw; /* End of escapement vector (1/65536 pixel units) */ - -#if INCL_LCD /* Dynamic load character data supported? */ - fix15 cb_offset; /* Offset to sub-char data in char buffer */ -#endif /* endif incl_lcd */ - -/* do_trns.c data definitions */ - point_t P0; /* Current point (sub-pixels) */ - fix15 x_orus; /* Current X argument (orus) */ - fix15 y_orus; /* Current Y argument (orus) */ - fix15 x_pix; /* Current X argument (sub-pixels) */ - fix15 y_pix; /* Current Y argument (sub-pixels) */ - ufix8 x_int; /* Current X interpolation zone */ - ufix8 y_int; /* Current Y interpolation zone */ - -#if INCL_MULTIDEV && INCL_OUTLINE - outline_t outline_device; - boolean outline_device_set; -#endif - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -#if INCL_MULTIDEV - bitmap_t bitmap_device; - boolean bitmap_device_set; -#endif - band_t y_band; /* Y current band(whole pixels) */ - - struct set_width_tag - { - fix31 x; - fix31 y; - } set_width; /* Character escapement vector */ - - boolean first_pass; /* TRUE during first pass thru outline data */ - boolean extents_running; /* T if extent accumulation for each vector */ - fix15 x0_spxl; /* X coord of current point (sub pixels) */ - fix15 y0_spxl; /* Y coord of current point (sub pixels) */ - fix15 y_pxl; /* Y coord of current point (whole pixels) */ -#if REENTRANT_ALLOC - intercepts_t STACKFAR *intercepts; -#else /* else if not reentrant */ - fix15 car[MAX_INTERCEPTS]; /* Data field of intercept storage */ - cdr_t cdr[MAX_INTERCEPTS]; /* Link field of intercept storage */ -#if INCL_SCREEN - ufix8 inttype[MAX_INTERCEPTS]; - ufix8 leftedge; - ufix16 fracpix; -#endif /* endif incl_screen */ -#endif /* endif reentrant */ - fix15 bmap_xmin; /* Min X value (sub-pixel units) */ - fix15 bmap_xmax; /* Max X value (sub-pixel units) */ - fix15 bmap_ymin; /* Min Y value (sub-pixel units) */ - fix15 bmap_ymax; /* Max Y value (sub-pixel units) */ - fix15 no_y_lists; /* Number of active intercept lists */ - fix15 first_offset; /* Index of first active list cell */ - fix15 next_offset; /* Index of next free list cell */ - boolean intercept_oflo; /* TRUE if intercepts data lost */ -#endif /* endif incl_black, incl_screen, incl_2d */ - -/* bounding box now used by all output modules, including outline */ - fix15 xmin; /* Min X value in whole character */ - fix15 xmax; /* Max X value in whole character */ - fix15 ymin; /* Min Y value in whole character */ - fix15 ymax; /* Max Y value in whole character */ - -#if INCL_2D - fix15 no_x_lists; /* Number of active x intercept lists */ - band_t x_band; /* X current band(whole pixels) */ - boolean x_scan_active; /* X scan flag during scan conversion */ -#endif - -/* reset.c data definitions */ - ufix16 key32; /* Decryption keys 3,2 combined */ - ufix8 key4; /* Decryption key 4 */ - ufix8 key6; /* Decryption key 6 */ - ufix8 key7; /* Decryption key 7 */ - ufix8 key8; /* Decryption key 8 */ - -/* set_spcs.c data definitions */ - buff_t font; - buff_t GLOBALFAR *pfont; /* Pointer to font buffer structure */ - fix31 font_buff_size; /* Number of bytes loaded in font buffer */ - ufix8 FONTFAR *pchar_dir; /* Pointer to character directory */ - fix15 first_char_idx; /* Index to first character in font */ - fix15 no_chars_avail; /* Total characters in font layout */ - fix15 orus_per_em; /* Outline resolution */ - fix15 metric_resolution; /* metric resolution for setwidths, kerning pairs - (defaults to orus_per_em) */ - tcb_t tcb0; /* Top level transformation control block */ - - boolean specs_valid; /* TRUE if fw_set_specs() successful */ - - fix15 depth_adj; /* Curve splitting depth adjustment */ - boolean curves_out; /* Allow curves to output module */ - fix15 output_mode; /* Output module selector */ - fix15 thresh; /* Scan conversion threshold (sub-pixels) */ - boolean normal; /* TRUE if 0 obl and mult of 90 deg rot */ - - fix15 multshift; /* Fixed point shift for multipliers */ - fix15 pixshift; /* Fixed point shift for sub-pixels */ - fix15 poshift; /* Left shift from pixel to output format */ - fix15 mpshift; /* Fixed point shift for mult to sub-pixels */ - fix31 multrnd; /* 0.5 in multiplier units */ - fix15 pixrnd; /* 0.5 in sub-pixel units */ - fix31 mprnd; /* 0.5 sub-pixels in multiplier units */ - fix15 pixfix; /* Mask to remove fractional pixels */ - fix15 onepix; /* 1.0 pixels in sub-pixel units */ - - boolean (*init_out)(PROTO_DECL2 specs_t GLOBALFAR *specsarg); - boolean (*begin_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); - void (*begin_sub_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); - void (*begin_contour)(PROTO_DECL2 point_t P1,boolean outside); - void (*curve)(PROTO_DECL2 point_t P1, point_t P2, point_t P3, fix15 depth); - void (*line)(PROTO_DECL2 point_t P1); - void (*end_contour)(PROTO_DECL1); - void (*end_sub_char)(PROTO_DECL1); - boolean (*end_char)(PROTO_DECL1); - specs_t GLOBALFAR *pspecs; /* Pointer to specifications bundle */ - specs_t specs; /* copy specs onto stack */ - ufix8 FONTFAR *font_org; /* Pointer to start of font data */ - ufix8 FONTFAR *hdr2_org; /* Pointer to start of private header data */ - -/* set_trns.c data definitions */ - tcb_t tcb; /* Current transformation control block */ - ufix8 Y_edge_org; /* Index to first Y controlled coordinate */ - ufix8 Y_int_org; /* Index to first Y interpolation zone */ - fix31 rnd_xmin; /* rounded out value of xmin for int-char spac. fix */ - -#if REENTRANT_ALLOC - plaid_t STACKFAR *plaid; -#else /* if not reentrant */ - fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */ - fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ - fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ - fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */ -#endif /* endif not reentrant */ - - fix15 no_X_orus; /* Number of X controlled coordinates */ - fix15 no_Y_orus; /* Number of Y controlled coordinates */ - ufix16 Y_constr_org; /* Origin of constraint table in font data */ - - constr_t constr; /* Constraint data state */ - boolean c_act[MAX_CONSTR]; /* TRUE if constraint currently active */ - fix15 c_pix[MAX_CONSTR]; /* Size of constrained zone if active */ -#if INCL_ISW - boolean import_setwidth_act; /* boolean to indicate imported setwidth */ - boolean isw_modified_constants; - ufix32 imported_width; /* value of imported setwidth */ - fix15 isw_xmax; /* maximum oru value for constants*/ -#endif -#if INCL_SQUEEZING || INCL_ISW - fix15 setwidth_orus; /* setwidth value in orus */ - /* bounding box in orus for squeezing */ - fix15 bbox_xmin_orus; /* X minimum in orus */ - fix15 bbox_xmax_orus; /* X maximum in orus */ - fix15 bbox_ymin_orus; /* Y minimum in orus */ - fix15 bbox_ymax_orus; /* Y maximum in orus */ -#endif -#ifdef INCL_SQUEEZING - boolean squeezing_compound; /* flag to indicate a compound character*/ -#endif -#ifdef INCL_CLIPPING - fix31 clip_xmax; - fix31 clip_ymax; - fix31 clip_xmin; - fix31 clip_ymin; -#endif - } SPEEDO_GLOBALS; - -/*********************************************************************************** - * - * Speedo global data structure allocation - * - ***********************************************************************************/ - -#ifdef SET_SPCS -#define EXTERN -#else -#define EXTERN extern -#endif -#if STATIC_ALLOC -EXTERN SPEEDO_GLOBALS GLOBALFAR sp_globals; -#define sp_intercepts sp_globals -#define sp_plaid sp_globals -#else -#if DYNAMIC_ALLOC -EXTERN SPEEDO_GLOBALS GLOBALFAR *sp_global_ptr; -#define sp_globals (*sp_global_ptr) -#define sp_intercepts (*sp_global_ptr) -#define sp_plaid (*sp_global_ptr) -#else -#if REENTRANT_ALLOC -#define sp_globals (*sp_global_ptr) -#define sp_intercepts (*(*sp_global_ptr).intercepts) -#define sp_plaid (*(*sp_global_ptr).plaid) -#endif -#endif -#endif -#ifdef EXTERN -#undef EXTERN -#endif - - -/***** PUBLIC FONT HEADER OFFSET CONSTANTS *****/ -#define FH_FMVER 0 /* U D4.0 CR LF NULL NULL 8 bytes */ -#define FH_FNTSZ 8 /* U Font size (bytes) 4 bytes */ -#define FH_FBFSZ 12 /* U Min font buffer size (bytes) 4 bytes */ -#define FH_CBFSZ 16 /* U Min char buffer size (bytes) 2 bytes */ -#define FH_HEDSZ 18 /* U Header size (bytes) 2 bytes */ -#define FH_FNTID 20 /* U Source Font ID 2 bytes */ -#define FH_SFVNR 22 /* U Source Font Version Number 2 bytes */ -#define FH_FNTNM 24 /* U Source Font Name 70 bytes */ -#define FH_MDATE 94 /* U Manufacturing Date 10 bytes */ -#define FH_LAYNM 104 /* U Layout Name 70 bytes */ -#define FH_CPYRT 174 /* U Copyright Notice 78 bytes */ -#define FH_NCHRL 252 /* U Number of Chars in Layout 2 bytes */ -#define FH_NCHRF 254 /* U Total Number of Chars in Font 2 bytes */ -#define FH_FCHRF 256 /* U Index of first char in Font 2 bytes */ -#define FH_NKTKS 258 /* U Number of kerning tracks in font 2 bytes */ -#define FH_NKPRS 260 /* U Number of kerning pairs in font 2 bytes */ -#define FH_FLAGS 262 /* U Font flags 1 byte: */ - /* Bit 0: Extended font */ - /* Bit 1: not used */ - /* Bit 2: not used */ - /* Bit 3: not used */ - /* Bit 4: not used */ - /* Bit 5: not used */ - /* Bit 6: not used */ - /* Bit 7: not used */ -#define FH_CLFGS 263 /* U Classification flags 1 byte: */ - /* Bit 0: Italic */ - /* Bit 1: Monospace */ - /* Bit 2: Serif */ - /* Bit 3: Display */ - /* Bit 4: not used */ - /* Bit 5: not used */ - /* Bit 6: not used */ - /* Bit 7: not used */ -#define FH_FAMCL 264 /* U Family Classification 1 byte: */ - /* 0: Don't care */ - /* 1: Serif */ - /* 2: Sans serif */ - /* 3: Monospace */ - /* 4: Script or calligraphic */ - /* 5: Decorative */ - /* 6-255: not used */ -#define FH_FRMCL 265 /* U Font form Classification 1 byte: */ - /* Bits 0-3 (width type): */ - /* 0-3: not used */ - /* 4: Condensed */ - /* 5: not used */ - /* 6: Semi-condensed */ - /* 7: not used */ - /* 8: Normal */ - /* 9: not used */ - /* 10: Semi-expanded */ - /* 11: not used */ - /* 12: Expanded */ - /* 13-15: not used */ - /* Bits 4-7 (Weight): */ - /* 0: not used */ - /* 1: Thin */ - /* 2: Ultralight */ - /* 3: Extralight */ - /* 4: Light */ - /* 5: Book */ - /* 6: Normal */ - /* 7: Medium */ - /* 8: Semibold */ - /* 9: Demibold */ - /* 10: Bold */ - /* 11: Extrabold */ - /* 12: Ultrabold */ - /* 13: Heavy */ - /* 14: Black */ - /* 15-16: not used */ -#define FH_SFNTN 266 /* U Short Font Name 32 bytes */ -#define FH_SFACN 298 /* U Short Face Name 16 bytes */ -#define FH_FNTFM 314 /* U Font form 14 bytes */ -#define FH_ITANG 328 /* U Italic angle 2 bytes (1/256th deg) */ -#define FH_ORUPM 330 /* U Number of ORUs per em 2 bytes */ -#define FH_WDWTH 332 /* U Width of Wordspace 2 bytes */ -#define FH_EMWTH 334 /* U Width of Emspace 2 bytes */ -#define FH_ENWTH 336 /* U Width of Enspace 2 bytes */ -#define FH_TNWTH 338 /* U Width of Thinspace 2 bytes */ -#define FH_FGWTH 340 /* U Width of Figspace 2 bytes */ -#define FH_FXMIN 342 /* U Font-wide min X value 2 bytes */ -#define FH_FYMIN 344 /* U Font-wide min Y value 2 bytes */ -#define FH_FXMAX 346 /* U Font-wide max X value 2 bytes */ -#define FH_FYMAX 348 /* U Font-wide max Y value 2 bytes */ -#define FH_ULPOS 350 /* U Underline position 2 bytes */ -#define FH_ULTHK 352 /* U Underline thickness 2 bytes */ -#define FH_SMCTR 354 /* U Small caps transformation 6 bytes */ -#define FH_DPSTR 360 /* U Display sups transformation 6 bytes */ -#define FH_FNSTR 366 /* U Footnote sups transformation 6 bytes */ -#define FH_ALSTR 372 /* U Alpha sups transformation 6 bytes */ -#define FH_CMITR 378 /* U Chemical infs transformation 6 bytes */ -#define FH_SNMTR 384 /* U Small nums transformation 6 bytes */ -#define FH_SDNTR 390 /* U Small denoms transformation 6 bytes */ -#define FH_MNMTR 396 /* U Medium nums transformation 6 bytes */ -#define FH_MDNTR 402 /* U Medium denoms transformation 6 bytes */ -#define FH_LNMTR 408 /* U Large nums transformation 6 bytes */ -#define FH_LDNTR 414 /* U Large denoms transformation 6 bytes */ - /* Transformation data format: */ - /* Y position 2 bytes */ - /* X scale 2 bytes (1/4096ths) */ - /* Y scale 2 bytes (1/4096ths) */ -#define SIZE_FW FH_LDNTR + 6 /* size of nominal font header */ -#define EXP_FH_METRES SIZE_FW /* offset to expansion field metric resolution (optional) */ - - - -/***** MODE FLAGS CONSTANTS *****/ -#define CURVES_OUT 0X0008 /* Output module accepts curves */ -#define BOGUS_MODE 0X0010 /* Linear scaling mode */ -#define CONSTR_OFF 0X0020 /* Inhibit constraint table */ -#define IMPORT_WIDTHS 0X0040 /* Imported width mode */ -#define SQUEEZE_LEFT 0X0100 /* Squeeze left mode */ -#define SQUEEZE_RIGHT 0X0200 /* Squeeze right mode */ -#define SQUEEZE_TOP 0X0400 /* Squeeze top mode */ -#define SQUEEZE_BOTTOM 0X0800 /* Squeeze bottom mode */ -#define CLIP_LEFT 0X1000 /* Clip left mode */ -#define CLIP_RIGHT 0X2000 /* Clip right mode */ -#define CLIP_TOP 0X4000 /* Clip top mode */ -#define CLIP_BOTTOM 0X8000 /* Clip bottom mode */ - -/*********************************************************************************** - * - * Speedo function declarations - use prototypes if available - * - ***********************************************************************************/ - -/* do_char.c functions */ -boolean sp_make_char(PROTO_DECL2 ufix16 char_index); -#if INCL_ISW -fix31 sp_compute_isw_scale(PROTO_DECL2); -static boolean sp_do_make_char(PROTO_DECL2 ufix16 char_index); -boolean sp_make_char_isw(PROTO_DECL2 ufix16 char_index, ufix32 imported_width); -static boolean sp_reset_xmax(PROTO_DECL2 fix31 xmax); -#endif -#if INCL_ISW || INCL_SQUEEZING -static void sp_preview_bounding_box(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); -#endif - -#if INCL_METRICS /* Metrics functions supported? */ -fix31 sp_get_char_width(PROTO_DECL2 ufix16 char_index); -boolean sp_get_char_bbox(PROTO_DECL2 ufix16 char_index, bbox_t *bbox); -#endif - -/* do_trns.c functions */ -ufix8 FONTFAR *sp_read_bbox(PROTO_DECL2 ufix8 FONTFAR *pointer,point_t STACKFAR *pPmin,point_t STACKFAR *pPmax,boolean set_flag); -void sp_proc_outl_data(PROTO_DECL2 ufix8 FONTFAR *pointer); - -/* out_blk.c functions */ -#if INCL_BLACK -boolean sp_init_black(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_black(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_black(PROTO_DECL2 point_t P1,boolean outside); -void sp_line_black(PROTO_DECL2 point_t P1); -boolean sp_end_char_black(PROTO_DECL1); -#endif - -/* out_scrn.c functions */ -#if INCL_SCREEN -boolean sp_init_screen(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_screen(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_screen(PROTO_DECL2 point_t P1,boolean outside); -void sp_curve_screen(PROTO_DECL2 point_t P1,point_t P2,point_t P3, fix15 depth); -void sp_line_screen(PROTO_DECL2 point_t P1); -void sp_end_contour_screen(PROTO_DECL1); -boolean sp_end_char_screen(PROTO_DECL1); -#endif - -/* out_outl.c functions */ -#if INCL_OUTLINE -#if INCL_MULTIDEV -boolean sp_set_outline_device(PROTO_DECL2 outline_t *ofuncs, ufix16 size); -#endif - - -boolean sp_init_outline(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_outline(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_sub_char_outline(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_outline(PROTO_DECL2 point_t P1,boolean outside); -void sp_curve_outline(PROTO_DECL2 point_t P1,point_t P2,point_t P3, fix15 depth); -void sp_line_outline(PROTO_DECL2 point_t P1); -void sp_end_contour_outline(PROTO_DECL1); -void sp_end_sub_char_outline(PROTO_DECL1); -boolean sp_end_char_outline(PROTO_DECL1); -#endif - -/* out_bl2d.c functions */ -#if INCL_2D -boolean sp_init_2d(PROTO_DECL2 specs_t GLOBALFAR *specsarg); -boolean sp_begin_char_2d(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); -void sp_begin_contour_2d(PROTO_DECL2 point_t P1,boolean outside); -void sp_line_2d(PROTO_DECL2 point_t P1); -boolean sp_end_char_2d(PROTO_DECL1); -#endif - -/* out_util.c functions */ -#if INCL_BLACK || INCL_SCREEN || INCL_2D - -#if INCL_MULTIDEV -boolean sp_set_bitmap_device(PROTO_DECL2 bitmap_t *bfuncs, ufix16 size); -#endif - -void sp_init_char_out(PROTO_DECL2 point_t Psw, point_t Pmin, point_t Pmax); -void sp_begin_sub_char_out(PROTO_DECL2 point_t Psw, point_t Pmin, point_t Pmax); -void sp_curve_out(PROTO_DECL2 point_t P1, point_t P2, point_t P3, fix15 depth); -void sp_end_contour_out(PROTO_DECL1); -void sp_end_sub_char_out(PROTO_DECL1); -void sp_init_intercepts_out(PROTO_DECL1); -void sp_reduce_band_size_out(PROTO_DECL1); -boolean sp_next_band_out(PROTO_DECL1); -#endif - -#if INCL_USEROUT -boolean sp_init_userout(specs_t *specsarg); -#endif - - -/* reset.c functions */ -void sp_reset(PROTO_DECL1); -#if INCL_KEYS -void sp_set_key(PROTO_DECL2 ufix8 key[]); -#endif -ufix16 sp_get_cust_no(PROTO_DECL2 buff_t font_buff); - -/* set_spcs.c functions */ -boolean sp_set_specs(PROTO_DECL2 specs_t STACKFAR *specsarg); -void sp_type_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb); - -fix31 sp_read_long(PROTO_DECL2 ufix8 FONTFAR *pointer); -fix15 sp_read_word_u(PROTO_DECL2 ufix8 FONTFAR *pointer); - -/* set_trns.c functions */ -void sp_init_tcb(PROTO_DECL1); -void sp_scale_tcb(PROTO_DECL2 tcb_t GLOBALFAR *ptcb,fix15 x_pos,fix15 y_pos,fix15 x_scale,fix15 y_scale); -ufix8 FONTFAR *sp_plaid_tcb(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format); - -#if INCL_SQUEEZING || INCL_ISW -static void sp_calculate_x_pix(PROTO_DECL2 ufix8 start_edge,ufix8 end_edge,ufix16 constr_nr,fix31 x_scale,fix31 x_offset,fix31 ppo,fix15 setwidth_pix); -#endif -#if INCL_SQUEEZING -static void sp_calculate_y_pix(PROTO_DECL2 ufix8 start_edge,ufix8 end_edge,ufix16 constr_nr,fix31 top_scale,fix31 bottom_scale,fix31 ppo,fix15 emtop_pix,fix15 embot_pix); -boolean sp_calculate_x_scale(PROTO_DECL2 fix31 *x_factor,fix31 *x_offset,fix15 no_x_ctrl_zones); -boolean sp_calculate_y_scale(PROTO_DECL2 fix31 *top_scale,fix31 *bottom_scale,fix15 first_y_zone, fix15 no_Y_ctrl_zones); -#endif - - -/* user defined functions */ - -void sp_report_error(PROTO_DECL2 fix15 n); - -#if INCL_BLACK || INCL_SCREEN || INCL_2D -void sp_open_bitmap(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, fix15 xsize,fix15 ysize); -void sp_set_bitmap_bits(PROTO_DECL2 fix15 y, fix15 xbit1, fix15 xbit2); -void sp_close_bitmap(PROTO_DECL1); -#endif - -#if INCL_OUTLINE -void sp_open_outline(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xmin, fix31 xmax, fix31 ymin,fix31 ymax); -void sp_start_new_char(PROTO_DECL1); -void sp_start_contour(PROTO_DECL2 fix31 x,fix31 y,boolean outside); -void sp_curve_to(PROTO_DECL2 fix31 x1, fix31 y1, fix31 x2, fix31 y2, fix31 x3, fix31 y3); -void sp_line_to(PROTO_DECL2 fix31 x, fix31 y); -void sp_close_contour(PROTO_DECL1); -void sp_close_outline(PROTO_DECL1); -#endif - -#if INCL_LCD /* Dynamic load character data supported? */ -buff_t *sp_load_char_data(PROTO_DECL2 fix31 file_offset,fix15 no_bytes,fix15 cb_offset); /* Load character data from font file */ -#endif - -#if INCL_PLAID_OUT /* Plaid data monitoring included? */ -void sp_record_xint(PROTO_DECL2 fix15 int_num); /* Record xint data */ -void sp_record_yint(PROTO_DECL2 fix15 int_num); /* Record yint data */ -void sp_begin_plaid_data(PROTO_DECL1); /* Signal start of plaid data */ -void sp_begin_ctrl_zones(PROTO_DECL2 fix15, no_X_zones, fix15 no_Y_zones); /* Signal start of control zones */ -void sp_record_ctrl_zone(PROTO_DECL2 fix31 start, fix31 end, fix15 constr); /* Record control zone data */ -void sp_begin_int_zones(PROTO_DECL2 fix15 no_X_int_zones, fix15 no_Y_int_zones); /* Signal start of interpolation zones */ -void sp_record_int_zone(PROTO_DECL2 fix31 start, fix31 end); /* Record interpolation zone data */ -void sp_end_plaid_data(PROTO_DECL1); /* Signal end of plaid data */ -#endif - -#endif /* _SPEEDO_H_ */ diff --git a/libXfont/src/Speedo/spencode.c b/libXfont/src/Speedo/spencode.c deleted file mode 100644 index 96a13504a..000000000 --- a/libXfont/src/Speedo/spencode.c +++ /dev/null @@ -1,67 +0,0 @@ -/* $Xorg: spencode.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.6 2001/01/17 19:43:18 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spint.h" - -/* No longer needed with new encoding code */ -/* #include "bics-iso.h" - -int sp_bics_map_size = (sizeof(sp_bics_map) / (sizeof(int) * 2));*/ - -#ifdef EXTRAFONTS -#include "adobe-iso.h" - -int adobe_map_size = (sizeof(adobe_map) / (sizeof(int) * 2)); - -#endif /* EXTRAFONTS */ diff --git a/libXfont/src/Speedo/sperr.c b/libXfont/src/Speedo/sperr.c deleted file mode 100644 index 36ce51125..000000000 --- a/libXfont/src/Speedo/sperr.c +++ /dev/null @@ -1,127 +0,0 @@ -/* $Xorg: sperr.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of M.I.T., Network Computing Devices, - * or Digital not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. Network Computing Devices, or Digital - * make no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -/* - -Copyright 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.6 2001/12/14 19:56:41 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "spint.h" - -#ifndef FONTMODULE -#include <stdarg.h> -#endif - -extern void ErrorF(const char* f, ...); - -void -SpeedoErr(char *str, ...) -{ - va_list v; - int a1; - - va_start(v, str); - ErrorF("Speedo: "); - a1 = va_arg(v, int); - ErrorF(str, a1); - va_end(v); -} - -/* - * Called by Speedo character generator to report an error. - * - * Since character data not available is one of those errors - * that happens many times, don't report it to user - */ -void -sp_report_error(fix15 n) -{ - switch (n) { - case 1: - SpeedoErr("Insufficient font data loaded\n"); - break; - case 3: - SpeedoErr("Transformation matrix out of range\n"); - break; - case 4: - SpeedoErr("Font format error\n"); - break; - case 5: - SpeedoErr("Requested specs not compatible with output module\n"); - break; - case 7: - SpeedoErr("Intelligent transformation requested but not supported\n"); - break; - case 8: - SpeedoErr("Unsupported output mode requested\n"); - break; - case 9: - SpeedoErr("Extended font loaded but only compact fonts supported\n"); - break; - case 10: - SpeedoErr("Font specs not set prior to use of font\n"); - break; - case 12: - break; - case 13: - SpeedoErr("Track kerning data not available()\n"); - break; - case 14: - SpeedoErr("Pair kerning data not available()\n"); - break; - default: - SpeedoErr("report_error(%d)\n", n); - break; - } -} diff --git a/libXfont/src/Speedo/spfile.c b/libXfont/src/Speedo/spfile.c deleted file mode 100644 index c58c0e471..000000000 --- a/libXfont/src/Speedo/spfile.c +++ /dev/null @@ -1,460 +0,0 @@ -/* $Xorg: spfile.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.13 2001/08/13 21:46:47 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontenc.h> -#ifndef FONTMODULE -#include <stdio.h> -#else -#include "xf86_ansic.h" -#endif - -#include "spint.h" -#include "bics-unicode.h" - -SpeedoFontPtr sp_fp_cur = (SpeedoFontPtr) 0; - -#ifdef EXTRAFONTS -#include "ncdkeys.h" -#endif - -#include "keys.h" - -#ifdef EXTRAFONTS -static ufix8 skey[] = -{ - SKEY0, - SKEY1, - SKEY2, - SKEY3, - SKEY4, - SKEY5, - SKEY6, - SKEY7, - SKEY8 -}; /* Sample Font decryption key */ - -static ufix8 rkey[] = -{ - RKEY0, - RKEY1, - RKEY2, - RKEY3, - RKEY4, - RKEY5, - RKEY6, - RKEY7, - RKEY8 -}; /* Retail Font decryption key */ - -#endif /* EXTRAFONTS */ - -#ifdef XSAMPLEFONTS -static ufix8 xkey[] = -{ - XKEY0, - XKEY1, - XKEY2, - XKEY3, - XKEY4, - XKEY5, - XKEY6, - XKEY7, - XKEY8 -}; /* Sample Font decryption key */ -#endif - -static ufix8 mkey[] = -{ - KEY0, - KEY1, - KEY2, - KEY3, - KEY4, - KEY5, - KEY6, - KEY7, - KEY8 -}; /* Font decryption key */ - - -static fix15 -read_2b(ufix8 *ptr) -{ - fix15 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -static fix31 -read_4b(ufix8 *ptr) -{ - fix31 tmp; - - tmp = *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr++; - tmp = (tmp << 8) + *ptr; - return tmp; -} - -/* - * loads the specified char's data - */ -buff_t * -sp_load_char_data(fix31 file_offset, fix15 num, fix15 cb_offset) -{ - SpeedoMasterFontPtr master = sp_fp_cur->master; - - if (fseek(master->fp, (long) file_offset, (int) 0)) { - SpeedoErr("can't seek to char\n"); - } - if ((num + cb_offset) > master->mincharsize) { - SpeedoErr("char buf overflow\n"); - } - if (fread((master->c_buffer + cb_offset), sizeof(ufix8), num, - master->fp) != num) { - SpeedoErr("can't get char data\n"); - } - master->char_data.org = (ufix8 *) master->c_buffer + cb_offset; - master->char_data.no_bytes = num; - - return &master->char_data; -} - -struct speedo_encoding { - char *name; - int *enc; - int enc_size; -}; - -/* Takes care of caching encodings already referenced */ -static int -find_encoding(const char *fontname, const char *filename, - int **enc, int *enc_size) -{ - static struct speedo_encoding *known_encodings=0; - static int number_known_encodings=0; - static int known_encodings_size=0; - - char *encoding_name; - int iso8859_1; - FontMapPtr mapping; - int i, j, k, size; - struct speedo_encoding *temp; - int *new_enc; - char *new_name; - - iso8859_1 = 0; - - encoding_name = FontEncFromXLFD(fontname, strlen(fontname)); - if(!encoding_name) { - encoding_name="iso8859-1"; - iso8859_1=1; - } - /* We don't go through the font library if asked for Latin-1 */ - iso8859_1 = iso8859_1 || !strcmp(encoding_name, "iso8859-1"); - - for(i=0; i<number_known_encodings; i++) { - if(!strcmp(encoding_name, known_encodings[i].name)) { - *enc=known_encodings[i].enc; - *enc_size=known_encodings[i].enc_size; - return Successful; - } - } - - /* it hasn't been cached yet, need to compute it */ - - /* ensure we've got enough storage first */ - - if(known_encodings==0) { - if((known_encodings= - (struct speedo_encoding*)xalloc(2*sizeof(struct speedo_encoding))) - ==0) - return AllocError; - number_known_encodings=0; - known_encodings_size=2; - } - - if(number_known_encodings >= known_encodings_size) { - if((temp= - (struct speedo_encoding*)xrealloc(known_encodings, - 2*sizeof(struct speedo_encoding)* - known_encodings_size))==0) - return AllocError; - known_encodings=temp; - known_encodings_size*=2; - } - - mapping=0; - if(!iso8859_1) { - mapping = FontEncMapFind(encoding_name, - FONT_ENCODING_UNICODE, -1, -1, - filename); - } -#define SPEEDO_RECODE(c) \ - (mapping? \ - unicode_to_bics(FontEncRecode(c, mapping)): \ - unicode_to_bics(c)) - - if((new_name = (char*)xalloc(strlen(encoding_name)))==0) - return AllocError; - strcpy(new_name, encoding_name); - - /* For now, we limit ourselves to 256 glyphs */ - size=0; - for(i=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) - if(SPEEDO_RECODE(i)>=0) - size++; - new_enc = (int*)xalloc(2*size*sizeof(int)); - if(!new_enc) { - xfree(new_name); - return AllocError; - } - for(i=j=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) - if((k = SPEEDO_RECODE(i))>=0) { - new_enc[2*j] = i; - new_enc[2*j+1] = k; - j++; - } - known_encodings[number_known_encodings].name = new_name; - known_encodings[number_known_encodings].enc = new_enc; - known_encodings[number_known_encodings].enc_size = size; - number_known_encodings++; - - *enc = new_enc; - *enc_size = size; - return Successful; -#undef SPEEDO_RECODE -} - -int -sp_open_master(const char *fontname, const char *filename, - SpeedoMasterFontPtr *master) -{ - SpeedoMasterFontPtr spmf; - ufix8 tmp[16]; - ufix16 cust_no; - FILE *fp; - ufix32 minbufsize; - ufix16 mincharsize; - ufix8 *f_buffer; - ufix8 *c_buffer; - int ret; - ufix8 *key; - - spmf = (SpeedoMasterFontPtr) xalloc(sizeof(SpeedoMasterFontRec)); - if (!spmf) - return AllocError; - bzero(spmf, sizeof(SpeedoMasterFontRec)); - spmf->entry = NULL; - spmf->f_buffer = NULL; - spmf->c_buffer = NULL; - - /* open font */ - spmf->fname = (char *) xalloc(strlen(filename) + 1); - if (!spmf->fname) - return AllocError; - fp = fopen(filename, "r"); - if (!fp) { - ret = BadFontName; - goto cleanup; - } - strcpy(spmf->fname, filename); - spmf->fp = fp; - spmf->state |= MasterFileOpen; - - if (fread(tmp, sizeof(ufix8), 16, fp) != 16) { - ret = BadFontName; - goto cleanup; - } - minbufsize = (ufix32) read_4b(tmp + FH_FBFSZ); - f_buffer = (ufix8 *) xalloc(minbufsize); - if (!f_buffer) { - ret = AllocError; - goto cleanup; - } - spmf->f_buffer = f_buffer; - - fseek(fp, (ufix32) 0, 0); - - /* read in the font */ - if (fread(f_buffer, sizeof(ufix8), (ufix16) minbufsize, fp) != minbufsize) { - ret = BadFontName; - goto cleanup; - } - spmf->copyright = (char *) (f_buffer + FH_CPYRT); - spmf->mincharsize = mincharsize = read_2b(f_buffer + FH_CBFSZ); - - c_buffer = (ufix8 *) xalloc(mincharsize); - if (!c_buffer) { - ret = AllocError; - goto cleanup; - } - spmf->c_buffer = c_buffer; - - spmf->font.org = spmf->f_buffer; - spmf->font.no_bytes = minbufsize; - - cust_no = sp_get_cust_no(spmf->font); - - /* XXX add custom encryption stuff here */ - -#ifdef EXTRAFONTS - if (cust_no == SCUS0) { - key = skey; - } else if (cust_no == RCUS0) { - key = rkey; - } else -#endif - -#ifdef XSAMPLEFONTS - if (cust_no == XCUS0) { - key = xkey; - } else -#endif - - if (cust_no == CUS0) { - key = mkey; - } else { - SpeedoErr("Non - standard encryption for \"%s\"\n", filename); - ret = BadFontName; - goto cleanup; - } - spmf->key = key; - sp_set_key(key); - - spmf->first_char_id = read_2b(f_buffer + FH_FCHRF); - spmf->num_chars = read_2b(f_buffer + FH_NCHRL); - - - spmf->enc = 0; - spmf->enc_size = 0; - -#ifdef EXTRAFONTS - { /* choose the proper encoding */ - char *f; - - f = strrchr(filename, '/'); - if (f) { - f++; - if (strncmp(f, "bx113", 5) == 0) { - spmf->enc = adobe_map; - spmf->enc_size = adobe_map_size; - } - } - } -#endif - - if(!spmf->enc) - if((ret=find_encoding(fontname, filename, &spmf->enc, &spmf->enc_size)) - !=Successful) - goto cleanup; - - spmf->first_char_id = spmf->enc[0]; - /* size of extents array */ - spmf->max_id = spmf->enc[(spmf->enc_size - 1) * 2]; - spmf->num_chars = spmf->enc_size; - - *master = spmf; - - return Successful; - -cleanup: - *master = (SpeedoMasterFontPtr) 0; - sp_close_master_font(spmf); - return ret; -} - -void -sp_close_master_font(SpeedoMasterFontPtr spmf) -{ - if (!spmf) - return; - if (spmf->state & MasterFileOpen) - fclose(spmf->fp); - if (spmf->entry) - spmf->entry->u.scalable.extra->private = NULL; - xfree(spmf->fname); - xfree(spmf->f_buffer); - xfree(spmf->c_buffer); - xfree(spmf); -} - -void -sp_close_master_file(SpeedoMasterFontPtr spmf) -{ - (void) fclose(spmf->fp); - spmf->state &= ~MasterFileOpen; -} - - -/* - * reset the encryption key, and make sure the file is opened - */ -void -sp_reset_master(SpeedoMasterFontPtr spmf) -{ - sp_set_key(spmf->key); - if (!(spmf->state & MasterFileOpen)) { - spmf->fp = fopen(spmf->fname, "r"); - /* XXX -- what to do if we can't open the file? */ - spmf->state |= MasterFileOpen; - } - fseek(spmf->fp, 0, 0); -} diff --git a/libXfont/src/Speedo/spfont.c b/libXfont/src/Speedo/spfont.c deleted file mode 100644 index c209d5a51..000000000 --- a/libXfont/src/Speedo/spfont.c +++ /dev/null @@ -1,453 +0,0 @@ -/* $Xorg: spfont.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ -/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.12tsi Exp $ */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -/* - * Speedo font loading - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/fonts/FSproto.h> -#include "spint.h" -#include <X11/fonts/fontutil.h> -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include <math.h> -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include <math.h> -#undef _XOPEN_SOURCE -#endif -#else -#include "servermd.h" -#include "xf86_ansic.h" -#endif - -#ifndef M_PI -#define M_PI 3.14159 -#endif /* M_PI */ -#ifndef DEFAULT_BIT_ORDER - -#ifdef BITMAP_BIT_ORDER -#define DEFAULT_BIT_ORDER BITMAP_BIT_ORDER -#else -#define DEFAULT_BIT_ORDER UNKNOWN_BIT_ORDER -#endif - -#endif - -static void SpeedoCloseFont(FontPtr pfont); - -static int -sp_get_glyphs( - FontPtr pFont, - unsigned long count, - register unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - SpeedoFontPtr spf; - unsigned int firstCol; - register unsigned int numCols; - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr encoding; - CharInfoPtr pDefault; -#ifdef notyet - int itemSize; -#endif - int err = Successful; - - spf = (SpeedoFontPtr) pFont->fontPrivate; - encoding = spf->encoding; - pDefault = spf->pDefault; - firstCol = pFont->info.firstCol; - numCols = pFont->info.lastCol - firstCol + 1; - glyphsBase = glyphs; - - - /* XXX - this should be much smarter */ - /* make sure the glyphs are there */ -#ifdef notyet - if (charEncoding == Linear8Bit || charEncoding == TwoD8Bit) - itemSize = 1; - else - itemSize = 2; - - if (!fsd->complete) - err = fs_load_glyphs(NULL, pFont, count, itemSize, chars); -#endif - - if (err != Successful) - return err; - - switch (charEncoding) { - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - if (pFont->info.allExist && pDefault) { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols) - *glyphs++ = &encoding[c]; - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = (*chars++) - firstCol; - if (c < numCols && (pci = &encoding[c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - case Linear16Bit: - if (pFont->info.allExist && pDefault) { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols) - *glyphs++ = &encoding[c]; - else - *glyphs++ = pDefault; - } - } else { - while (count--) { - c = *chars++ << 8; - c = (c | *chars++) - firstCol; - if (c < numCols && (pci = &encoding[c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++) - firstCol; - if (r < numRows && c < numCols && - (pci = &encoding[r * numCols + c])->bits) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; -} - -static CharInfoRec nonExistantChar; - -static int -sp_get_metrics( - FontPtr pFont, - unsigned long count, - register unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - int ret; - SpeedoFontPtr spf; - CharInfoPtr oldDefault; - - spf = (SpeedoFontPtr) pFont->fontPrivate; - oldDefault = spf->pDefault; - spf->pDefault = &nonExistantChar; - ret = sp_get_glyphs(pFont, count, chars, charEncoding, - glyphCount, (CharInfoPtr *) glyphs); - - spf->pDefault = oldDefault; - return ret; -} - -int -sp_open_font( - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Mask flags, - SpeedoFontPtr *spfont) -{ - SpeedoFontPtr spf; - SpeedoMasterFontPtr spmf; - int ret; - specs_t specs; - int xx8, xy8, yx8, yy8; - - /* find a master (create it if necessary) */ - spmf = (SpeedoMasterFontPtr) entry->u.scalable.extra->private; - if (!spmf) - { - ret = sp_open_master(fontname, filename, &spmf); - if (ret != Successful) - return ret; - entry->u.scalable.extra->private = (pointer) spmf; - spmf->entry = entry; - } - - spf = (SpeedoFontPtr) xalloc(sizeof(SpeedoFontRec)); - if (!spf) - return AllocError; - bzero((char *) spf, sizeof(SpeedoFontRec)); - - *spfont = spf; - - /* clobber everything -- this may be leaking, but other wise evil - * stuff is left behind -- succesive transformed fonts get mangled */ - bzero((char *)&sp_globals, sizeof(sp_globals)); - - spf->master = spmf; - spf->entry = entry; - spmf->refcount++; - sp_reset_master(spmf); - /* now we've done enough that if we bail out we must call sp_close_font */ - - spf->vals = *vals; - - /* set up specs */ - - specs.pfont = &spmf->font; - - specs.xxmult = (int)(vals->pixel_matrix[0] * (double)(1L << 16)); - specs.xymult = (int)(vals->pixel_matrix[2] * (double)(1L << 16)); - specs.yxmult = (int)(vals->pixel_matrix[1] * (double)(1L << 16)); - specs.yymult = (int)(vals->pixel_matrix[3] * (double)(1L << 16)); - - specs.xoffset = 0L << 16; /* XXX tweak? */ - specs.yoffset = 0L << 16; /* XXX tweak? */ - - specs.flags = MODE_SCREEN; - specs.out_info = NULL; - - /* When Speedo tries to generate a very small font bitmap, it - often crashes or goes into an infinite loop. - Don't know why this is so, but until we can fix it properly, - return BadFontName for anything smaller than 4 pixels. - */ -#define TINY_FACTOR (16 << 16) - xx8 = specs.xxmult >> 8; - xy8 = specs.xymult >> 8; - yx8 = specs.yxmult >> 8; - yy8 = specs.yymult >> 8; - if (xx8 * xx8 + xy8 * xy8 < TINY_FACTOR || - yx8 * yx8 + yy8 * yy8 < TINY_FACTOR) - { - sp_close_font(spf); - return BadFontName; - } - - /* clobber global state to avoid wrecking future transformed fonts */ - bzero ((char *) &sp_globals, sizeof(sp_globals)); - - if (!sp_set_specs(&specs)) - { - sp_close_font(spf); - return BadFontName; - } - - spf->specs = specs; - spf->master = spmf; - - *spfont = spf; - return Successful; -} - -static int -sp_load_font( - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr pfont, - Mask flags) -{ - SpeedoFontPtr spf; - SpeedoMasterFontPtr spmf; - int esize; - int ret; - long sWidth; - - ret = sp_open_font(fontname, filename, entry, vals, format, fmask, - flags, &spf); - - if (ret != Successful) - return ret; - - spmf = spf->master; - sp_reset_master(spmf); - esize = sizeof(CharInfoRec) * (spmf->max_id - spmf->first_char_id + 1); - - spf->encoding = (CharInfoPtr) xalloc(esize); - if (!spf->encoding) { - sp_close_font(spf); - return AllocError; - } - bzero((char *) spf->encoding, esize); - - sp_fp_cur = spf; - - sp_make_header(spf, &pfont->info); - - sp_compute_bounds(spf, &pfont->info, SaveMetrics, &sWidth); - - sp_compute_props(spf, fontname, &pfont->info, sWidth); - - pfont->fontPrivate = (pointer) spf; - -/* XXX */ - flags |= FontLoadBitmaps; - - if (flags & FontLoadBitmaps) { - sp_fp_cur = spf; - ret = sp_build_all_bitmaps(pfont, format, fmask); - } - if (ret != Successful) - return ret; - - /* compute remaining accelerators */ - FontComputeInfoAccelerators(&pfont->info); - - pfont->format = format; - - pfont->get_metrics = sp_get_metrics; - pfont->get_glyphs = sp_get_glyphs; - pfont->unload_font = SpeedoCloseFont; - pfont->unload_glyphs = NULL; - pfont->refcnt = 0; - - /* have to hold on to master for min/max id */ - sp_close_master_file(spmf); - - return ret; -} - -int -SpeedoFontLoad( - FontPtr *ppfont, - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - Mask flags) -{ - FontPtr pfont; - int ret; - - /* Reject ridiculously small sizes that will blow up the math */ - if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) - return BadFontName; - - if (!(pfont = CreateFontRec())) - return AllocError; - - ret = sp_load_font(fontname, filename, entry, vals, format, fmask, - pfont, flags); - - if (ret == Successful) - *ppfont = pfont; - else - DestroyFontRec (pfont); - - return ret; -} - -void -sp_close_font(SpeedoFontPtr spf) -{ - SpeedoMasterFontPtr spmf; - - spmf = spf->master; - --spmf->refcount; - if (spmf->refcount == 0) - sp_close_master_font (spmf); - xfree(spf->encoding); - xfree(spf->bitmaps); - xfree(spf); -} - -static void -SpeedoCloseFont(FontPtr pfont) -{ - SpeedoFontPtr spf; - - spf = (SpeedoFontPtr) pfont->fontPrivate; - sp_close_font(spf); - xfree(pfont->info.isStringProp); - xfree(pfont->info.props); - DestroyFontRec(pfont); - -} diff --git a/libXfont/src/Speedo/spfuncs.c b/libXfont/src/Speedo/spfuncs.c deleted file mode 100644 index da4d5c55e..000000000 --- a/libXfont/src/Speedo/spfuncs.c +++ /dev/null @@ -1,167 +0,0 @@ -/* $Xorg: spfuncs.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.7 2001/08/27 19:49:51 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifndef FONTMODULE -#include <X11/Xos.h> -#endif -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontutil.h> -#include "spint.h" - -/* ARGSUSED */ -static int -SpeedoOpenScalable ( - FontPathElementPtr fpe, - FontPtr *pFont, - int flags, - FontEntryPtr entry, - char *fileName, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - char fullName[MAXFONTNAMELEN]; - - strcpy (fullName, entry->name.name); - return SpeedoFontLoad (pFont, fullName, fileName, entry, vals, - format, fmask, flags); -} - -/* - * XXX - * - * this does a lot more then i'd like, but it has to get the bitmaps - * in order to get accurate metrics (which it *must* have). - * - * a possible optimization is to avoid allocating the glyph memory - * and to simply save the values without doing the work. - */ -static int -get_font_info( - FontInfoPtr pinfo, - char *fontname, - char *filename, - FontEntryPtr entry, - FontScalablePtr vals, - SpeedoFontPtr *spfont) -{ - SpeedoFontPtr spf; - int err; - long sWidth; - - err = sp_open_font(fontname, filename, entry, vals, - (fsBitmapFormat) 0, (fsBitmapFormatMask) 0, (unsigned long) 0, - &spf); - - if (err != Successful) - return err; - - sp_fp_cur = spf; - sp_reset_master(spf->master); - - sp_make_header(spf, pinfo); - - sp_compute_bounds(spf, pinfo, (unsigned long) 0, &sWidth); - - sp_compute_props(spf, fontname, pinfo, sWidth); - - /* compute remaining accelerators */ - FontComputeInfoAccelerators (pinfo); - - *spfont = spf; - - return Successful; -} - -/* ARGSUSED */ -static int -SpeedoGetInfoScaleable( - FontPathElementPtr fpe, - FontInfoPtr pFontInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr vals) -{ - SpeedoFontPtr spf = NULL; - char fullName[MAXFONTNAMELEN]; - int err; - - strcpy(fullName, entry->name.name); - FontParseXLFDName(fullName, vals, FONT_XLFD_REPLACE_VALUE); - - err = get_font_info(pFontInfo, fullName, fileName, entry, vals, &spf); - - if (spf) - sp_close_font(spf); - - return err; -} - -static FontRendererRec renderer = { - ".spd", 4, NULL, SpeedoOpenScalable, - NULL, SpeedoGetInfoScaleable, 0 - , CAP_MATRIX | CAP_CHARSUBSETTING -}; - -void -SpeedoRegisterFontFileFunctions() -{ - sp_make_standard_props(); - sp_reset(); - FontFileRegisterRenderer(&renderer); -} diff --git a/libXfont/src/Speedo/spglyph.c b/libXfont/src/Speedo/spglyph.c deleted file mode 100644 index 113f37882..000000000 --- a/libXfont/src/Speedo/spglyph.c +++ /dev/null @@ -1,399 +0,0 @@ -/* $Xorg: spglyph.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Dave Lemke, Network Computing Devices Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/X.h> /* for bit order #defines */ -#include "spint.h" -#include <X11/fonts/fontutil.h> - -#undef CLIP_BBOX_NOISE - -static CurrentFontValuesRec current_font_values; -static CurrentFontValuesPtr cfv = ¤t_font_values; -static int bit_order, - byte_order, - scan; - -static unsigned long -sp_compute_data_size( - FontPtr pfont, - int mappad, - int scanlinepad, - unsigned long start, - unsigned long end) -{ - unsigned long ch; - unsigned long size = 0; - int bpr; - SpeedoFontPtr spf = (SpeedoFontPtr) pfont->fontPrivate; - FontInfoPtr pinfo = &pfont->info; - int firstChar; - - firstChar = spf->master->first_char_id; - - /* allocate the space */ - switch (mappad) { - int charsize; - CharInfoPtr ci; - xCharInfo *cim; - - case BitmapFormatImageRectMin: - cfv->bpr = 0; - for (ch = start; ch <= end; ch++) { - ci = &spf->encoding[ch - firstChar]; - if (!ci) - ci = spf->pDefault; - cim = &ci->metrics; - charsize = GLYPH_SIZE(ci, scanlinepad); - charsize *= cim->ascent + cim->descent; - size += charsize; - } - break; - case BitmapFormatImageRectMaxWidth: - bpr = GLWIDTHBYTESPADDED(FONT_MAX_WIDTH(pinfo), scanlinepad); - cfv->bpr = bpr; - for (ch = start; ch <= end; ch++) { - ci = &spf->encoding[ch - firstChar]; - if (!ci) - ci = spf->pDefault; - cim = &ci->metrics; - charsize = bpr * (cim->ascent + cim->descent); - size += charsize; - } - break; - case BitmapFormatImageRectMax: - bpr = GLWIDTHBYTESPADDED(FONT_MAX_WIDTH(pinfo), scanlinepad); - cfv->bpr = bpr; - size = (end - start + 1) * bpr * FONT_MAX_HEIGHT(pinfo); - break; - default: - assert(0); - } - - return size; -} - -static void -finish_line(SpeedoFontPtr spf) -{ - int bpr = cfv->bpr; - CharInfoPtr ci = &spf->encoding[cfv->char_id - spf->master->first_char_id]; - - if (bpr == 0) { - bpr = GLYPH_SIZE(ci, cfv->scanpad); - } - if (bpr) { /* char may not have any metrics... */ - cfv->bp = (char *)cfv->bp + bpr; - } - assert(cfv->bp - sp_fp_cur->bitmaps <= sp_fp_cur->bitmap_size); -} - - -void -sp_set_bitmap_bits(fix15 y, fix15 xbit1, fix15 xbit2) -{ - int nmiddle; - CARD8 startmask, - endmask; - CARD8 *dst; - - if (xbit1 > cfv->bit_width) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Run wider than bitmap width -- truncated\n"); -#endif - - xbit1 = cfv->bit_width; - } - if (xbit2 > cfv->bit_width) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Run wider than bitmap width -- truncated\n"); -#endif - - xbit2 = cfv->bit_width; - } - - if (xbit2 < xbit1) { - xbit2 = xbit1; - } - - while (cfv->cur_y != y) { - finish_line(sp_fp_cur); - cfv->cur_y++; - } - - cfv->last_y = y; - if (y >= cfv->bit_height) { - -#ifdef CLIP_BBOX_NOISE - SpeedoErr("Y larger than bitmap height -- truncated\n"); -#endif - - cfv->trunc = 1; - return; - } - if (xbit1 < 0) /* XXX this is more than a little bit rude... */ - xbit1 = 0; - - nmiddle = (xbit1 >> 3); - dst = (CARD8 *)cfv->bp + nmiddle; - xbit2 -= (xbit1 & ~7); - nmiddle = (xbit2 >> 3); - xbit1 &= 7; - xbit2 &= 7; - if (bit_order == MSBFirst) { - startmask = ((CARD8) ~0) >> xbit1; - endmask = ~(((CARD8) ~0) >> xbit2); - } else { - startmask = ((CARD8) ~0) << xbit1; - endmask = ~(((CARD8) ~0) << xbit2); - } - if (nmiddle == 0) - *dst |= endmask & startmask; - else { - *dst++ |= startmask; - while (--nmiddle) - *dst++ = (CARD8)~0; - *dst |= endmask; - } -} - -/* ARGSUSED */ -void -sp_open_bitmap(fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, - fix15 xsize, fix15 ysize) -{ - CharInfoPtr ci = &sp_fp_cur->encoding[cfv->char_id - sp_fp_cur->master->first_char_id]; - -/*- - * this is set to provide better quality bitmaps. since the Speedo - * sp_get_bbox() function returns an approximate (but guarenteed to contain) - * set of metrics, some of the bitmaps can be place poorly inside and - * look bad. - * - * with this set, the actual bitmap values are used instead of the bboxes. - * it makes things look better, but causes two possible problems: - * - * 1 - the reported min & max bounds may not correspond to the extents - * reported - * 2 - if the extents are reported before the character is generated, - * a client could see them change. this currently never happens, - * but will when a desired enhancement (don't reneder till needed) - * is made. - */ - -#define BBOX_FIXUP 1 - -#ifdef BBOX_FIXUP - int off_horz; - int off_vert; - - if (xorg < 0) - off_horz = (fix15) ((xorg - 32768L) / 65536); - else - off_horz = (fix15) ((xorg + 32768L) / 65536); - if (yorg < 0) - off_vert = (fix15) ((yorg - 32768L) / 65536); - else - off_vert = (fix15) ((yorg + 32768L) / 65536); - if (xsize != 0 || ysize != 0 || ci->metrics.characterWidth) - { - ci->metrics.leftSideBearing = off_horz; - ci->metrics.descent = -off_vert; - ci->metrics.rightSideBearing = xsize + off_horz; - ci->metrics.ascent = ysize + off_vert; - } - else - { - /* If setting the proper size would cause the character to appear to - be non-existent, fudge things by giving it a pixel to occupy. */ - xsize = ysize = 1; - ci->metrics.leftSideBearing = ci->metrics.descent = 0; - ci->metrics.rightSideBearing = ci->metrics.ascent = 1; - } - - cfv->bit_width = xsize; - cfv->bit_height = ysize; -#else - cfv->bit_width = ci->metrics.rightSideBearing - - ci->metrics.leftSideBearing; - cfv->bit_height = ci->metrics.ascent + ci->metrics.descent; -#endif - - assert(cfv->bp - sp_fp_cur->bitmaps <= sp_fp_cur->bitmap_size); - ci->bits = (char *) cfv->bp; - - cfv->cur_y = 0; -} - -void -sp_close_bitmap() -{ - CharInfoPtr ci = &sp_fp_cur->encoding[cfv->char_id - sp_fp_cur->master->first_char_id]; - int bpr = cfv->bpr; - - if (bpr == 0) - bpr = GLYPH_SIZE(ci, cfv->scanpad); - if (!cfv->trunc) - finish_line(sp_fp_cur); - cfv->trunc = 0; - cfv->last_y++; - while (cfv->last_y < cfv->bit_height) { - finish_line(sp_fp_cur); - cfv->last_y++; - } - if (byte_order != bit_order) { - switch (scan) { - case 1: - break; - case 2: - TwoByteSwap(cfv->bp, bpr * cfv->bit_height); - break; - case 4: - FourByteSwap(cfv->bp, bpr * cfv->bit_height); - break; - } - } -} - -int -sp_build_all_bitmaps( - FontPtr pfont, - fsBitmapFormat format, - fsBitmapFormatMask fmask) -{ - int ret, - glyph = 1, - image = BitmapFormatImageRectMin; - unsigned long glyph_size; - SpeedoFontPtr spf = (SpeedoFontPtr) pfont->fontPrivate; - SpeedoMasterFontPtr spmf = spf->master; - pointer bitmaps; - int start, - end, - i; - - scan = 1; - ret = CheckFSFormat(format, fmask, - &bit_order, &byte_order, &scan, &glyph, &image); - - pfont->bit = bit_order; - pfont->byte = byte_order; - pfont->glyph = glyph; - pfont->scan = scan; - if (ret != Successful) - return BadFontFormat; - - start = spmf->first_char_id; - end = spmf->max_id; - glyph_size = sp_compute_data_size(pfont, image, glyph, start, end); - - /* XXX -- MONDO KLUDGE -- add some slop */ - /* - * not sure why this is wanted, but it keeps the packer from going off the - * end and toasting us down the line - */ - glyph_size += 20; - -#ifdef DEBUG - spf->bitmap_size = glyph_size; -#endif - - bitmaps = (pointer) xalloc(glyph_size); - if (!bitmaps) - return AllocError; - bzero((char *) bitmaps, glyph_size); - - /* set up some state */ - sp_fp_cur = spf; - spf->bitmaps = bitmaps; - cfv->format = format; - cfv->scanpad = glyph; - cfv->bp = bitmaps; - - for (i = 0; i < spmf->num_chars; i++) { - int j; - cfv->char_index = spmf->enc[i * 2 + 1]; - cfv->char_id = spmf->enc[i * 2]; -#ifdef DEBUG -fprintf(stderr, "build_all_sp_bitmaps:i = %d, Char ID = %d\n", i, cfv->char_id); -#endif - if (!cfv->char_id) - continue; - - /* - * See if this character is in the list of ranges specified in the - * XLFD name - */ - for (j = 0; j < spf->vals.nranges; j++) - if (cfv->char_id >= mincharno(spf->vals.ranges[j]) && - cfv->char_id <= maxcharno(spf->vals.ranges[j])) - break; - - /* If not, don't realize it. */ - if (spf->vals.nranges && j == spf->vals.nranges) - continue; - - if (!sp_make_char(cfv->char_index)) { - -#ifdef DEBUG /* can be very common with some encodings */ - SpeedoErr("Can't make char %d\n", cfv->char_index); -#endif - } - } - - return Successful; -} diff --git a/libXfont/src/Speedo/spinfo.c b/libXfont/src/Speedo/spinfo.c deleted file mode 100644 index d7a1edd98..000000000 --- a/libXfont/src/Speedo/spinfo.c +++ /dev/null @@ -1,462 +0,0 @@ -/* $Xorg: spinfo.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Dave Lemke, Network Computing Devices, Inc - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.12 2001/12/14 19:56:42 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontutil.h> -#include "spint.h" -#ifndef FONTMODULE -#include <math.h> -#else -#include "xf86_ansic.h" -#endif - -/* percentage of pointsize used to specify ascent & descent */ -#define STRETCH_FACTOR 120 - -enum scaleType { - atom, truncate_atom, pixel_size, point_size, resolution_x, - resolution_y, average_width -}; - -typedef struct _fontProp { - char *name; - long atom; - enum scaleType type; -} fontProp; - -static fontProp fontNamePropTable[] = { - { "FOUNDRY", 0, atom }, - { "FAMILY_NAME", 0, atom }, - { "WEIGHT_NAME", 0, atom }, - { "SLANT", 0, atom }, - { "SETWIDTH_NAME", 0, atom }, - { "ADD_STYLE_NAME", 0, atom }, - { "PIXEL_SIZE", 0, pixel_size }, - { "POINT_SIZE", 0, point_size }, - { "RESOLUTION_X", 0, resolution_x }, - { "RESOLUTION_Y", 0, resolution_y }, - { "SPACING", 0, atom }, - { "AVERAGE_WIDTH", 0, average_width }, - { "CHARSET_REGISTRY", 0, atom }, - { "CHARSET_ENCODING", 0, truncate_atom } -}; - -/* Warning: following array is closely related to the sequence of - defines after it. */ - -static fontProp extraProps[] = { - { "FONT", 0, }, - { "COPYRIGHT", 0, }, - { "RAW_PIXEL_SIZE", 0, }, - { "RAW_POINT_SIZE", 0, }, - { "RAW_ASCENT", 0, }, - { "RAW_DESCENT", 0, }, - { "RAW_AVERAGE_WIDTH", 0, }, - { "FONT_TYPE", 0, }, - { "RASTERIZER_NAME", 0, } -}; - -/* this is a bit kludgy */ -#define FONTPROP 0 -#define COPYRIGHTPROP 1 -#define RAWPIXELPROP 2 -#define RAWPOINTPROP 3 -#define RAWASCENTPROP 4 -#define RAWDESCENTPROP 5 -#define RAWWIDTHPROP 6 -#define FONT_TYPEPROP 7 -#define RASTERIZER_NAMEPROP 8 - -#define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) -#define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) - -#define NPROPS (NNAMEPROPS + NEXTRAPROPS) - -void -sp_make_standard_props() -{ - int i; - fontProp *t; - - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - i = sizeof(extraProps) / sizeof(fontProp); - for (t = extraProps; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); -} - -void -sp_make_header( - SpeedoFontPtr spf, - FontInfoPtr pinfo) -{ - int pixel_size; - SpeedoMasterFontPtr spmf = spf->master; - - pinfo->firstCol = spmf->first_char_id & 0xff; - pinfo->firstRow = spmf->first_char_id >> 8; - pinfo->lastCol = spmf->max_id & 0xff; - pinfo->lastRow = spmf->max_id >> 8; - - /* XXX -- hackery here */ - pinfo->defaultCh = 0; -/* computed by FontComputeInfoAccelerators: - * noOverlap - * constantMetrics - * terminalFont - * constantWidth - * inkInside - */ - pinfo->inkMetrics = 0; - pinfo->allExist = 0; - pinfo->drawDirection = LeftToRight; - pinfo->cachable = 1; - if (spf->specs.xxmult != spf->specs.yymult) - pinfo->anamorphic = TRUE; - else - pinfo->anamorphic = FALSE; -/* computed by sp_compute_bounds: - * maxOverlap - * maxbounds - * minbounds - * ink_maxbounds - * ink_minbounds - */ - pixel_size = spf->vals.pixel_matrix[3] * STRETCH_FACTOR / 100; - pinfo->fontAscent = pixel_size * 764 / 1000; /* 764 == EM_TOP */ - pinfo->fontDescent = pixel_size - pinfo->fontAscent; -} - -static void -adjust_min_max( - xCharInfo *minc, - xCharInfo *maxc, - xCharInfo *tmp) -{ -#define MINMAX(field,ci) \ - if (minc->field > (ci)->field) \ - minc->field = (ci)->field; \ - if (maxc->field < (ci)->field) \ - maxc->field = (ci)->field; - - MINMAX(ascent, tmp); - MINMAX(descent, tmp); - MINMAX(leftSideBearing, tmp); - MINMAX(rightSideBearing, tmp); - MINMAX(characterWidth, tmp); - - if ((INT16)minc->attributes > (INT16)tmp->attributes) - minc->attributes = tmp->attributes; - if ((INT16)maxc->attributes < (INT16)tmp->attributes) - maxc->attributes = tmp->attributes; - -#undef MINMAX -} - - -void -sp_compute_bounds( - SpeedoFontPtr spf, - FontInfoPtr pinfo, - unsigned long flags, - long *sWidth) -{ - int i, - id, - index, - maxOverlap, - overlap, - total_width = 0; - xCharInfo minchar, - maxchar, - tmpchar; - bbox_t bbox; - fix31 width; - double pix_width; - SpeedoMasterFontPtr spmf = spf->master; - int firstChar; - int num_chars = 0; - - firstChar = spmf->first_char_id; - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - maxOverlap = -32767; - *sWidth = 0; - for (i = 0; i < spmf->num_chars; i++) { - int j; - int char_id; - - index = spmf->enc[i * 2 + 1]; - char_id = spmf->enc[i * 2]; - /* - * See if this character is in the list of ranges specified in the - * XLFD name - */ - for (j = 0; j < spf->vals.nranges; j++) - if (char_id >= mincharno(spf->vals.ranges[j]) && - char_id <= maxcharno(spf->vals.ranges[j])) - break; - if (spf->vals.nranges && j == spf->vals.nranges) - continue; - num_chars++; - - if (!(flags & ComputeBoundsOnly)) { - - width = sp_get_char_width(index); - - /* convert to pixel coords */ - pix_width = (int)width * (spf->specs.xxmult / 65536L) + - ((int) width * (spf->specs.xxmult % 65536L)) - / 65536L; - pix_width /= 65536L; - - (void) sp_get_char_bbox(index, &bbox); - bbox.ymax = (bbox.ymax + 32768L) >> 16; - bbox.ymin = (bbox.ymin + 32768L) >> 16; - bbox.xmin = (bbox.xmin + 32768L) >> 16; - bbox.xmax = (bbox.xmax + 32768L) >> 16; - tmpchar.ascent = bbox.ymax; - tmpchar.descent = -bbox.ymin; - tmpchar.characterWidth = (int)(pix_width + /* round */ - (pix_width > 0 ? 0.5 : -0.5)); - tmpchar.rightSideBearing = bbox.xmax; - tmpchar.leftSideBearing = bbox.xmin; - - if (!tmpchar.characterWidth && - tmpchar.ascent == -tmpchar.descent && - tmpchar.rightSideBearing == tmpchar.leftSideBearing) - { - /* Character appears non-existent, probably as a result - of the transformation. Let's give it one pixel in - the universe so it's not mistaken for non-existent. */ - tmpchar.leftSideBearing = tmpchar.descent = 0; - tmpchar.rightSideBearing = tmpchar.ascent = 1; - } - - tmpchar.attributes = (int)((double)(int)width / 65.536 + .5); - } - else - tmpchar = spf->encoding[char_id - firstChar].metrics; - - adjust_min_max(&minchar, &maxchar, &tmpchar); - overlap = tmpchar.rightSideBearing - tmpchar.characterWidth; - if (maxOverlap < overlap) - maxOverlap = overlap; - - total_width += ((int)(INT16)tmpchar.attributes); - *sWidth += abs((int)(INT16)tmpchar.attributes); - - if (flags & SaveMetrics) { - id = spmf->enc[i * 2] - firstChar; - assert(id <= spmf->max_id - firstChar); - spf->encoding[id].metrics = tmpchar; - } - } - - - if (num_chars > 0) - { - *sWidth = (int)(((double)*sWidth * 10.0 + (double)num_chars / 2.0) / - num_chars); - if (total_width < 0) - { - /* Predominant direction is R->L */ - *sWidth = -*sWidth; - } - spf->vals.width = (int)((double)*sWidth * spf->vals.pixel_matrix[0] / - 1000.0 + - (spf->vals.pixel_matrix[0] > 0 ? .5 : -.5)); - } - else - { - spf->vals.width = 0; - } - pinfo->maxbounds = maxchar; - pinfo->minbounds = minchar; - pinfo->ink_maxbounds = maxchar; - pinfo->ink_minbounds = minchar; - pinfo->maxOverlap = maxOverlap; -} - -void -sp_compute_props( - SpeedoFontPtr spf, - char *fontname, - FontInfoPtr pinfo, - long sWidth) -{ - FontPropPtr pp; - int i, - nprops; - fontProp *fpt; - char *is_str; - char *ptr1 = NULL, - *ptr2; - char *ptr3; - char tmpname[1024]; - FontScalableRec tmpvals; - - nprops = pinfo->nprops = NPROPS; - pinfo->isStringProp = (char *) xalloc(sizeof(char) * nprops); - pinfo->props = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops); - if (!pinfo->isStringProp || !pinfo->props) { - xfree(pinfo->isStringProp); - pinfo->isStringProp = (char *) 0; - xfree(pinfo->props); - pinfo->props = (FontPropPtr) 0; - pinfo->nprops = 0; - return; - } - bzero(pinfo->isStringProp, (sizeof(char) * nprops)); - - ptr2 = fontname; - for (i = NNAMEPROPS, pp = pinfo->props, fpt = fontNamePropTable, - is_str = pinfo->isStringProp; - i; - i--, pp++, fpt++, is_str++) { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - pp->name = fpt->atom; - switch (fpt->type) { - case atom: - *is_str = TRUE; - pp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - break; - case truncate_atom: - *is_str = TRUE; - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - pp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - break; - case pixel_size: - pp->value = (int)(spf->vals.pixel_matrix[3] + - (spf->vals.pixel_matrix[3] > 0 ? .5 : -.5)); - break; - case point_size: - pp->value = (int)(spf->vals.point_matrix[3] * 10.0 + - (spf->vals.point_matrix[3] > 0 ? .5 : -.5)); - break; - case resolution_x: - pp->value = spf->vals.x; - break; - case resolution_y: - pp->value = spf->vals.y; - break; - case average_width: - pp->value = spf->vals.width; - break; - } - } - - for (i = 0, fpt = extraProps; i < NEXTRAPROPS; i++, is_str++, pp++, fpt++) { - pp->name = fpt->atom; - switch (i) { - case FONTPROP: - *is_str = TRUE; - strcpy(tmpname, fontname); - FontParseXLFDName(tmpname, &tmpvals, FONT_XLFD_REPLACE_ZERO); - FontParseXLFDName(tmpname, &spf->vals, FONT_XLFD_REPLACE_VALUE); - pp->value = MakeAtom(tmpname, strlen(tmpname), TRUE); - break; - case COPYRIGHTPROP: - *is_str = TRUE; - pp->value = MakeAtom(spf->master->copyright, - strlen(spf->master->copyright), TRUE); - break; - case FONT_TYPEPROP: - *is_str = TRUE; - pp->value = MakeAtom("Speedo", strlen("Speedo"), TRUE); - break; - case RASTERIZER_NAMEPROP: - *is_str = TRUE; - pp->value = MakeAtom("X Consortium Speedo Rasterizer", - strlen("X Consortium Speedo Rasterizer"), - TRUE); - break; - case RAWPIXELPROP: - *is_str = FALSE; - pp->value = 1000; - break; - case RAWPOINTPROP: - *is_str = FALSE; - pp->value = (long)(72270.0 / (double)spf->vals.y + .5); - break; - case RAWASCENTPROP: - *is_str = FALSE; - pp->value = STRETCH_FACTOR * 764 / 100; - break; - case RAWDESCENTPROP: - *is_str = FALSE; - pp->value = STRETCH_FACTOR * 236 / 100; - break; - case RAWWIDTHPROP: - *is_str = FALSE; - pp->value = sWidth; - break; - } - } -} diff --git a/libXfont/src/Speedo/spint.h b/libXfont/src/Speedo/spint.h deleted file mode 100644 index 299882c96..000000000 --- a/libXfont/src/Speedo/spint.h +++ /dev/null @@ -1,178 +0,0 @@ -/* $Xorg: spint.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.9 2001/01/17 19:43:20 dawes Exp $ */ - -#ifndef _SPINT_H_ -#define _SPINT_H_ - -#include <X11/fonts/fntfilst.h> -#ifndef XFree86LOADER -#include <stdio.h> -#else -#include <xf86_ansic.h> -#endif -#include <X11/Xfuncproto.h> -#include "speedo.h" - -#define SaveMetrics 0x1 -#define ComputeBoundsOnly 0x2 - -#define GLWIDTHBYTESPADDED(bits,nbytes) \ - ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ - :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ - :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ - :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ - : 0) - -#define GLYPH_SIZE(ch, nbytes) \ - GLWIDTHBYTESPADDED((ch)->metrics.rightSideBearing - \ - (ch)->metrics.leftSideBearing, (nbytes)) - -#define mincharno(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxcharno(p) ((p).max_char_low + ((p).max_char_high << 8)) - -#define MasterFileOpen 0x1 - -typedef struct _sp_master { - FontEntryPtr entry; /* back pointer */ - FILE *fp; - char *fname; - ufix8 *f_buffer; - ufix8 *c_buffer; - char *copyright; - ufix8 *key; - buff_t font; - buff_t char_data; - ufix16 mincharsize; - int first_char_id; - int num_chars; - int max_id; - int state; /* open, closed */ - int refcount; /* number of instances */ - int *enc; - int enc_size; -} SpeedoMasterFontRec, *SpeedoMasterFontPtr; - -typedef struct _cur_font_stats { - fsBitmapFormat format; - /* current glyph info */ - ufix16 char_index; - ufix16 char_id; - - fix15 bit_width, - bit_height; - fix15 cur_y; - int bpr; - - /* - * since Speedo returns extents that are not identical to what it feeds to - * the bitmap builder, and we want to be able to use the extents for - * preformance reasons, some of the bitmaps require padding out. the next - * two flags keep track of this. - */ - fix15 last_y; - int trunc; - - pointer bp; - int scanpad; -} CurrentFontValuesRec, *CurrentFontValuesPtr; - - -typedef struct _sp_font { - struct _sp_master *master; - specs_t specs; - - FontEntryPtr entry; - - FontScalableRec vals; - - /* char & metric data */ - CharInfoPtr encoding; - CharInfoPtr pDefault; - pointer bitmaps; - -#ifdef DEBUG - unsigned long bitmap_size; -#endif - -} SpeedoFontRec, *SpeedoFontPtr; - -extern SpeedoFontPtr sp_fp_cur; - -extern int sp_open_font(char *, char *, FontEntryPtr, FontScalablePtr, - fsBitmapFormat, fsBitmapFormatMask, Mask, - SpeedoFontPtr *); -extern int sp_open_master(const char *, const char *, SpeedoMasterFontPtr *); -extern void sp_close_font(SpeedoFontPtr); -extern void sp_close_master_font(SpeedoMasterFontPtr); -extern void sp_close_master_file(SpeedoMasterFontPtr); -extern void sp_reset_master(SpeedoMasterFontPtr); -extern void SpeedoErr(char *fmt, ...); - -extern void sp_make_standard_props(void); -extern void sp_make_header(SpeedoFontPtr, FontInfoPtr); -extern void sp_compute_bounds(SpeedoFontPtr, FontInfoPtr, unsigned long, long *); -extern void sp_compute_props(SpeedoFontPtr, char *, FontInfoPtr, long); -extern int sp_build_all_bitmaps(FontPtr, fsBitmapFormat, fsBitmapFormatMask); - -extern int SpeedoFontLoad(FontPtr *, char *, char *, FontEntryPtr, - FontScalablePtr, fsBitmapFormat, fsBitmapFormatMask, - Mask); - -extern int sp_bics_map[]; -extern int sp_bics_map_size; - -#ifdef EXTRAFONTS -extern int adobe_map[]; -extern int adobe_map_size; - -#endif - -#endif /* _SPINT_H_ */ diff --git a/libXfont/src/Speedo/useropt.h b/libXfont/src/Speedo/useropt.h deleted file mode 100644 index e879aae96..000000000 --- a/libXfont/src/Speedo/useropt.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Xorg: useropt.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ -/* - -Copyright 1993, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -#define INCL_LCD 1 -#define STATIC_ALLOC 1 - -#define INCL_BLACK 1 -#define INCL_SCREEN 1 -#define INCL_2D 1 -#define SHORT_LISTS 0 - -#define INCL_RULES 1 -#define INCL_METRICS 1 - -#define INCL_KEYS 1 diff --git a/libXfont/src/Type1/Makefile.am b/libXfont/src/Type1/Makefile.am deleted file mode 100644 index cf5eb7d4f..000000000 --- a/libXfont/src/Type1/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -INCLUDES = \ - -I${top_srcdir}/include - -AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) - -noinst_LTLIBRARIES = libtype1.la - -libtype1_la_SOURCES = \ - arith.c \ - arith.h \ - blues.h \ - cluts.h \ - curves.c \ - curves.h \ - digit.h \ - fontfcn.c \ - fontfcn.h \ - fonts.h \ - hdigit.h \ - hints.c \ - hints.h \ - lines.c \ - lines.h \ - objects.c \ - objects.h \ - paths.c \ - paths.h \ - pictures.h \ - regions.c \ - regions.h \ - scanfont.c \ - spaces.c \ - spaces.h \ - strokes.h \ - t1funcs.c \ - t1hdigit.h \ - t1imager.h \ - t1info.c \ - t1intf.h \ - t1io.c \ - t1malloc.c \ - t1snap.c \ - t1stdio.h \ - t1unicode.c \ - t1unicode.h \ - token.c \ - token.h \ - tokst.h \ - trig.h \ - type1.c \ - util.c \ - util.h diff --git a/libXfont/src/Type1/Makefile.in b/libXfont/src/Type1/Makefile.in deleted file mode 100644 index c4da78f47..000000000 --- a/libXfont/src/Type1/Makefile.in +++ /dev/null @@ -1,516 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 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@ -subdir = src/Type1 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(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 \ - $(top_builddir)/include/X11/fonts/fontconf.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libtype1_la_LIBADD = -am_libtype1_la_OBJECTS = arith.lo curves.lo fontfcn.lo hints.lo \ - lines.lo objects.lo paths.lo regions.lo scanfont.lo spaces.lo \ - t1funcs.lo t1info.lo t1io.lo t1malloc.lo t1snap.lo \ - t1unicode.lo token.lo type1.lo util.lo -libtype1_la_OBJECTS = $(am_libtype1_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/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 = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtype1_la_SOURCES) -DIST_SOURCES = $(libtype1_la_SOURCES) -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@ -CHANGELOG_CMD = @CHANGELOG_CMD@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ENCODINGSDIR = @ENCODINGSDIR@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATH_LIBS = @MATH_LIBS@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -OS_CFLAGS = @OS_CFLAGS@ -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@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_LIBS = @XFONT_LIBS@ -X_GZIP_FONT_COMPRESSION = @X_GZIP_FONT_COMPRESSION@ -Z_LIBS = @Z_LIBS@ -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_F77 = @ac_ct_F77@ -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@ -distcleancheck_listfiles = @distcleancheck_listfiles@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -ft_config = @ft_config@ -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@ -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_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = \ - -I${top_srcdir}/include - -AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) -noinst_LTLIBRARIES = libtype1.la -libtype1_la_SOURCES = \ - arith.c \ - arith.h \ - blues.h \ - cluts.h \ - curves.c \ - curves.h \ - digit.h \ - fontfcn.c \ - fontfcn.h \ - fonts.h \ - hdigit.h \ - hints.c \ - hints.h \ - lines.c \ - lines.h \ - objects.c \ - objects.h \ - paths.c \ - paths.h \ - pictures.h \ - regions.c \ - regions.h \ - scanfont.c \ - spaces.c \ - spaces.h \ - strokes.h \ - t1funcs.c \ - t1hdigit.h \ - t1imager.h \ - t1info.c \ - t1intf.h \ - t1io.c \ - t1malloc.c \ - t1snap.c \ - t1stdio.h \ - t1unicode.c \ - t1unicode.h \ - token.c \ - token.h \ - tokst.h \ - trig.h \ - type1.c \ - util.c \ - util.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(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; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Type1/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Type1/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: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtype1.la: $(libtype1_la_OBJECTS) $(libtype1_la_DEPENDENCIES) - $(LINK) $(libtype1_la_OBJECTS) $(libtype1_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curves.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontfcn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hints.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objects.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paths.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanfont.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spaces.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1funcs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1malloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1snap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1unicode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/token.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@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 $@ $< - -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; } \ - END { 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; } \ - END { 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=; \ - 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; } \ - END { 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 $(LTLIBRARIES) -installdirs: -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: - -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-generic clean-libtool clean-noinstLTLIBRARIES \ - 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-dvi: install-dvi-am - -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 - -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: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES 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 - -# 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/libXfont/src/Type1/arith.c b/libXfont/src/Type1/arith.c deleted file mode 100644 index 92a372a17..000000000 --- a/libXfont/src/Type1/arith.c +++ /dev/null @@ -1,212 +0,0 @@ -/* $Xorg: arith.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/arith.c,v 1.6tsi Exp $ */ - - /* ARITH CWEB V0006 ******** */ -/* -:h1.ARITH Module - Portable Module for Multiple Precision Fixed Point Arithmetic - -This module provides division and multiplication of 64-bit fixed point -numbers. (To be more precise, the module works on numbers that take -two 'longs' to store. That is almost always equivalent to saying 64-bit -numbers.) - -Note: it is frequently easy and desirable to recode these functions in -assembly language for the particular processor being used, because -assembly language, unlike C, will have 64-bit multiply products and -64-bit dividends. This module is offered as a portable version. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) and Sten F. Andler - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "arith.h" - - -/* -:h3. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Reference for all algorithms: Donald E. Knuth, "The Art of Computer -Programming, Volume 2, Semi-Numerical Algorithms," Addison-Wesley Co., -Massachusetts, 1969, pp. 229-279. - -Knuth talks about a 'digit' being an arbitrary sized unit and a number -being a sequence of digits. We'll take a digit to be a 'short'. -The following assumption must be valid for these algorithms to work: -:ol. -:li.A 'long' is two 'short's. -:eol. -The following code is INDEPENDENT of: -:ol. -:li.The actual size of a short. -:li.Whether shorts and longs are stored most significant byte -first or least significant byte first. -:eol. - -SHORTSIZE is the number of bits in a short; LONGSIZE is the number of -bits in a long; MAXSHORT is the maximum unsigned short: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -ASSEMBLE concatenates two shorts to form a long: -*/ -#define ASSEMBLE(hi,lo) ((((unsigned long)hi)<<SHORTSIZE)+(lo)) -/* -HIGHDIGIT extracts the most significant short from a long; LOWDIGIT -extracts the least significant short from a long: -*/ -#define HIGHDIGIT(u) ((u)>>SHORTSIZE) -#define LOWDIGIT(u) ((u)&MAXSHORT) - -/* -SIGNBITON tests the high order bit of a long 'w': -*/ -#define SIGNBITON(w) (((long)w)<0) - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Double Long Arithmetic - -:h3.DLmult() - Multiply Two Longs to Yield a Double Long - -The two multiplicands must be positive. -*/ - -static void -DLmult(doublelong *product, unsigned long u, unsigned long v) -{ -#ifdef LONG64 -/* printf("DLmult(? ?, %lx, %lx)\n", u, v); */ - *product = u*v; -/* printf("DLmult returns %lx\n", *product); */ -#else - register unsigned long u1, u2; /* the digits of u */ - register unsigned long v1, v2; /* the digits of v */ - register unsigned int w1, w2, w3, w4; /* the digits of w */ - register unsigned long t; /* temporary variable */ -/* printf("DLmult(? ?, %x, %x)\n", u, v); */ - u1 = HIGHDIGIT(u); - u2 = LOWDIGIT(u); - v1 = HIGHDIGIT(v); - v2 = LOWDIGIT(v); - - if (v2 == 0) w4 = w3 = w2 = 0; - else - { - t = u2 * v2; - w4 = LOWDIGIT(t); - t = u1 * v2 + HIGHDIGIT(t); - w3 = LOWDIGIT(t); - w2 = HIGHDIGIT(t); - } - - if (v1 == 0) w1 = 0; - else - { - t = u2 * v1 + w3; - w3 = LOWDIGIT(t); - t = u1 * v1 + w2 + HIGHDIGIT(t); - w2 = LOWDIGIT(t); - w1 = HIGHDIGIT(t); - } - - product->high = ASSEMBLE(w1, w2); - product->low = ASSEMBLE(w3, w4); -#endif /* LONG64 else */ -} - -/* -:h3.DLrightshift() - Macro to Shift Double Long Right by N -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Fractional Pel Arithmetic -*/ -/* -:h3.FPmult() - Multiply Two Fractional Pel Values - -This funtion first calculates w = u * v to "doublelong" precision. -It then shifts w right by FRACTBITS bits, and checks that no -overflow will occur when the resulting value is passed back as -a fractpel. -*/ - -fractpel -FPmult(fractpel u, fractpel v) -{ - doublelong w; - register int negative = FALSE; /* sign flag */ -#ifdef LONG64 - register fractpel ret; -#endif - - if ((u == 0) || (v == 0)) return (0); - - - if (u < 0) {u = -u; negative = TRUE;} - if (v < 0) {v = -v; negative = !negative;} - - if (u == TOFRACTPEL(1)) return ((negative) ? -v : v); - if (v == TOFRACTPEL(1)) return ((negative) ? -u : u); - - DLmult(&w, u, v); - DLrightshift(w, FRACTBITS); -#ifndef LONG64 - if (w.high != 0 || SIGNBITON(w.low)) { - w.low = TOFRACTPEL(MAXSHORT); - } - - return ((negative) ? -w.low : w.low); -#else - if (w & 0xffffffff80000000L ) { - ret = TOFRACTPEL(MAXSHORT); - } - else - ret = (fractpel)w; - - return ((negative) ? -ret : ret); -#endif -} diff --git a/libXfont/src/Type1/arith.h b/libXfont/src/Type1/arith.h deleted file mode 100644 index 73b84a7c3..000000000 --- a/libXfont/src/Type1/arith.h +++ /dev/null @@ -1,71 +0,0 @@ -/* $Xorg: arith.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/arith.h,v 1.4 1999/08/21 13:47:39 dawes Exp $ */ - -/*SHARED*/ - -#include <X11/Xmd.h> /* LONG64 */ - -/*END SHARED*/ -/*SHARED*/ - -#undef SHORTSIZE -#define SHORTSIZE (sizeof(short)*8) -#undef LONGSIZE -#define LONGSIZE (SHORTSIZE*2) -#undef MAXSHORT -#define MAXSHORT ((1<<SHORTSIZE)-1) - -/*END SHARED*/ -/*SHARED*/ - -#ifdef LONG64 -typedef long doublelong; -#else -typedef struct { - long high; - unsigned long low; -} doublelong; -#endif /* LONG64 else */ - -/*END SHARED*/ -/*SHARED*/ - -#ifdef LONG64 -#define DLrightshift(dl,N) ((dl) >>= (N)) -#else -#define DLrightshift(dl,N) { \ - dl.low = (dl.low >> N) + (((unsigned long) dl.high) << (LONGSIZE - N)); \ - dl.high >>= N; \ -} -#endif - -extern fractpel FPmult ( fractpel u, fractpel v ); - -/*END SHARED*/ diff --git a/libXfont/src/Type1/blues.h b/libXfont/src/Type1/blues.h deleted file mode 100644 index 88602f79e..000000000 --- a/libXfont/src/Type1/blues.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $Xorg: blues.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * Portions Copyright (c) 1990 Adobe Systems Incorporated. - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark or Adobe - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * IBM, LEXMARK, AND ADOBE PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY - * WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE - * ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING - * ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY - * PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM, - * LEXMARK, OR ADOBE) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND - * CORRECTION. IN NO EVENT SHALL IBM, LEXMARK, OR ADOBE BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/blues.h,v 1.3 1999/08/22 08:58:49 dawes Exp $ */ - - -extern psobj *GetType1CharString ( psfont *fontP, unsigned char code ); - -#define TOPLEFT 1 -#define BOTTOMRIGHT 2 - -#define NUMBLUEVALUES 14 -#define NUMOTHERBLUES 10 -#define NUMFAMILYBLUES 14 -#define NUMFAMILYOTHERBLUES 10 -#define NUMSTEMSNAPH 12 -#define NUMSTEMSNAPV 12 -#define NUMSTDHW 1 -#define NUMSTDVW 1 - -#define DEFAULTBOLDSTEMWIDTH 2.0 - -#define MAXALIGNMENTZONES ((NUMBLUEVALUES+NUMOTHERBLUES)/2) -#define DEFAULTBLUESCALE 0.039625 -#define DEFAULTBLUESHIFT 7 -#define DEFAULTBLUEFUZZ 1 -#define DEFAULTSTDHW 0 -#define DEFAULTSTDVW 0 -#define DEFAULTFORCEBOLD FALSE -#define DEFAULTLANGUAGEGROUP 0 -#define DEFAULTRNDSTEMUP FALSE -#define DEFAULTLENIV 4 -#define DEFAULTEXPANSIONFACTOR 0.06 - -/* see Type 1 Font Format book for explanations of these values */ -/* Note that we're currently doing nothing for minfeature and password. */ -struct blues_struct { - struct blues_struct *next; /* ptr to next Blues structure in list */ - int numBlueValues; /* # of BlueValues in following array */ - int BlueValues[NUMBLUEVALUES]; - int numOtherBlues; /* # of OtherBlues values in following array */ - int OtherBlues[NUMOTHERBLUES]; - int numFamilyBlues; /* # of FamilyBlues values in following array */ - int FamilyBlues[NUMFAMILYBLUES]; - int numFamilyOtherBlues; /* # of FamilyOtherBlues values in */ - int FamilyOtherBlues[NUMFAMILYOTHERBLUES]; /* this array */ - double BlueScale; - int BlueShift; - int BlueFuzz; - double StdHW; - double StdVW; - int numStemSnapH; /* # of StemSnapH values in following array */ - double StemSnapH[NUMSTEMSNAPH]; - int numStemSnapV; /* # of StemSnapV values in following array */ - double StemSnapV[NUMSTEMSNAPV]; - int ForceBold; - int LanguageGroup; - int RndStemUp; - int lenIV; - double ExpansionFactor; -}; - -/* the alignment zone structure -- somewhat similar to the stem structure */ -/* see Adobe Type1 Font Format book about the terms used in this structure */ -struct alignmentzone { - int topzone; /* TRUE if a topzone, FALSE if a bottom zone */ - double bottomy, topy; /* interval of this alignment zone */ -}; diff --git a/libXfont/src/Type1/cluts.h b/libXfont/src/Type1/cluts.h deleted file mode 100644 index 67d930324..000000000 --- a/libXfont/src/Type1/cluts.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $Xorg: cluts.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* STUB */ - -#define KillCLUT(T) -#define CopyCLUT(T) T -#define UniqueCLUT(T) - diff --git a/libXfont/src/Type1/curves.c b/libXfont/src/Type1/curves.c deleted file mode 100644 index 9d0c3f8cc..000000000 --- a/libXfont/src/Type1/curves.c +++ /dev/null @@ -1,228 +0,0 @@ -/* $Xorg: curves.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 */ -/* All Rights Reserved */ - -/* License to use, copy, modify, and distribute this software */ -/* and its documentation for any purpose and without fee is */ -/* hereby granted, provided that licensee provides a license to */ -/* IBM, Corp. to use, copy, modify, and distribute derivative */ -/* works and their documentation for any purpose and without */ -/* fee, that the above copyright notice appear in all copies */ -/* and that both that copyright notice and this permission */ -/* notice appear in supporting documentation, and that the name */ -/* of IBM not be used in advertising or publicity pertaining to */ -/* distribution of the software without specific, written prior */ -/* permission. */ - -/* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES */ -/* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT */ -/* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, */ -/* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF */ -/* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND */ -/* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT */ -/* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF */ -/* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES */ -/* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN */ -/* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR */ -/* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING */ -/* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF */ -/* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT */ -/* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */ -/* SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/curves.c,v 1.7 2001/08/27 19:49:52 dawes Exp $ */ - -/* -:h1.CURVES Module - Stepping Beziers - -This module is responsible for "rasterizing" -third order curves. That is, it changes the high level curve -specification into a list of pels that that curve travels -through. - -:h3.Include Files - -Include files needed: -*/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "curves.h" -#include "lines.h" -#include "arith.h" - - -/* -:h3.Functions Provided to Other Modules - -External entry points: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -Note that "stepping" and "flattening" are so similiar that they use the -same routine. When the "region" parameter is NULL, that is a flag that -we are flattening instead of stepping. -*/ -/* -:h2.Bezier Third Order Curves -*/ -/* -:h3.The "bezierinfo" Structure - -This structure is used to store information used when we subdivide -Bezier curves. -*/ - -struct bezierinfo { - struct region *region; /* the region being built or NULL */ - struct fractpoint last; /* not used yet; maybe could save some work */ - struct fractpoint origin; /* the origin of the bezier */ -} ; - -/* - Checking for termination of the subdivision process: - This is the stupidest test in the world, just check if the coordinatewise - distance from an end control point to the next control point is less than - one half pel. If so, we must be done. - This returns 1 if the subdivision is terminated and 0 if you still need - to subdivide. -*/ - -static int -BezierTerminationTest(fractpel xa, fractpel ya, - fractpel xb, fractpel yb, - fractpel xc, fractpel yc, - fractpel xd, fractpel yd) -{ - fractpel dmax; - dmax = ABS(xa - xb); - dmax = MAX(dmax,ABS(ya - yb)); - dmax = MAX(dmax,ABS(xd - xc)); - dmax = MAX(dmax,ABS(yd - yc)); - if(dmax > FPHALF) - return(0); /* not done yet */ - else - return(1); /* done */ -} - -/* -:h3.StepBezierRecurse() - The Recursive Logic in StepBezier() - -The recursion involves dividing the control polygon into two smaller -control polygons by finding the midpoints of the lines. This idea is -described in any graphics text book and its simplicity is what caused -Bezier to define his curves as he did. If the input region 'R' is NULL, -the result is a path that is the 'flattened' curve; otherwise StepBezier -returns nothing special. -*/ -static struct segment * -StepBezierRecurse(struct bezierinfo *I, /* Region under construction or NULL */ - fractpel xA, fractpel yA, /* A control point */ - fractpel xB, fractpel yB, /* B control point */ - fractpel xC, fractpel yC, /* C control point */ - fractpel xD, fractpel yD) /* D control point */ -{ - if (BezierTerminationTest(xA,yA,xB,yB,xC,yC,xD,yD)) - { - if (I->region == NULL) - return(PathSegment(LINETYPE, xD - xA, yD - yA)); - else - StepLine(I->region, I->origin.x + xA, I->origin.y + yA, - I->origin.x + xD, I->origin.y + yD); - } - else - { - fractpel xAB,yAB; - fractpel xBC,yBC; - fractpel xCD,yCD; - fractpel xABC,yABC; - fractpel xBCD,yBCD; - fractpel xABCD,yABCD; - - xAB = xA + xB; yAB = yA + yB; - xBC = xB + xC; yBC = yB + yC; - xCD = xC + xD; yCD = yC + yD; - - xABC = xAB + xBC; yABC = yAB + yBC; - xBCD = xBC + xCD; yBCD = yBC + yCD; - - xABCD = xABC + xBCD; yABCD = yABC + yBCD; - - xAB >>= 1; yAB >>= 1; - xBC >>= 1; yBC >>= 1; - xCD >>= 1; yCD >>= 1; - xABC >>= 2; yABC >>= 2; - xBCD >>= 2; yBCD >>= 2; - xABCD >>= 3; yABCD >>= 3; - - if (I->region == NULL) - { - return( Join( - StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD), - StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD) - ) - ); - } - else - { - StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD); - StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD); - } - } - return NULL; - /*NOTREACHED*/ -} - -/* -:h3.TOOBIG() - Macro to Test if a Coordinate is Too Big to Bezier SubDivide Normally - -Intermediate values in the Bezier subdivision are 8 times bigger than -the starting values. If this overflows, a 'long', we are in trouble: -*/ - -#undef BITS -#define BITS (sizeof(long)*8) -#define HIGHTEST(p) (((p)>>(BITS-4)) != 0) /* includes sign bit */ -#define TOOBIG(xy) ((xy < 0) ? HIGHTEST(-xy) : HIGHTEST(xy)) - -/* -:h3.StepBezier() - Produce Run Ends for a Bezier Curve - -This is the entry point called from outside the module. -*/ - -struct segment * -StepBezier(struct region *R, /* Region under construction or NULL */ - fractpel xA, fractpel yA, /* A control point */ - fractpel xB, fractpel yB, /* B control point */ - fractpel xC, fractpel yC, /* C control point */ - fractpel xD, fractpel yD) /* D control point */ -{ - struct bezierinfo Info; - - Info.region = R; - Info.origin.x = xA; - Info.origin.y = yA; - - xB -= xA; - xC -= xA; - xD -= xA; - yB -= yA; - yC -= yA; - yD -= yA; - - if ( TOOBIG(xB) || TOOBIG(yB) || TOOBIG(xC) || TOOBIG(yC) - || TOOBIG(xD) || TOOBIG(yD) ) - Abort("Beziers this big not yet supported"); - - return(StepBezierRecurse(&Info, - (fractpel) 0, (fractpel) 0, xB, yB, xC, yC, xD, yD)); -} - diff --git a/libXfont/src/Type1/curves.h b/libXfont/src/Type1/curves.h deleted file mode 100644 index ca54bad62..000000000 --- a/libXfont/src/Type1/curves.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $Xorg: curves.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/curves.h,v 1.3 1999/08/22 08:58:50 dawes Exp $ */ - -/*SHARED*/ - -#define StepConic(R,xA,yA,xB,yB,xC,yC,r) t1_StepConic(R,xA,yA,xB,yB,xC,yC,r) -#define StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD) t1_StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD) - -#define FlattenConic(xM,yM,xC,yC,r) t1_StepConic(NULL,(fractpel)0,(fractpel)0,xM,yM,xC,yC,r) -#define FlattenBezier(xB,yB,xC,yC,xD,yD) t1_StepBezier(NULL,(fractpel)0,(fractpel)0,xB,yB,xC,yC,xD,yD) - -#if 0 -struct segment *t1_StepConic(); -#endif -extern struct segment *t1_StepBezier ( struct region *R, fractpel xA, fractpel yA, fractpel xB, fractpel yB, fractpel xC, fractpel yC, fractpel xD, fractpel yD ); - -/*END SHARED*/ diff --git a/libXfont/src/Type1/digit.h b/libXfont/src/Type1/digit.h deleted file mode 100644 index 44e418c8c..000000000 --- a/libXfont/src/Type1/digit.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: digit.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef DIGIT -#define DIGIT 1 - -/* - * Digit Value Table -- - * - * The entries in the Digit Value Table map character - * codes in the set {0-9,a-z,A-Z} to their numeric - * values as part of numbers of radix 2-36. - * - */ -static const unsigned char digit_value[256] = { -0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18, - 0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18, - 0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF -}; - -#endif diff --git a/libXfont/src/Type1/fontfcn.c b/libXfont/src/Type1/fontfcn.c deleted file mode 100644 index ba5db0e67..000000000 --- a/libXfont/src/Type1/fontfcn.c +++ /dev/null @@ -1,317 +0,0 @@ -/* $Xorg: fontfcn.c,v 1.4 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ -/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.10 2001/04/05 17:42:27 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef FONTMODULE -#include <stdio.h> -#include <string.h> -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#include "t1imager.h" -#include "util.h" -#include <X11/fonts/fntfilst.h> -#include "fontfcn.h" - -extern struct segment *Type1Char ( char *env, XYspace S, - psobj *charstrP, psobj *subrsP, - psobj *osubrsP, - struct blues_struct *bluesP, int *modeP ); - - -/***================================================================***/ -/* GLOBALS */ -/***================================================================***/ -static char CurFontName[120]; -static char *vm_base = NULL; -psfont *FontP = NULL; -static psfont TheCurrentFont; - -/***================================================================***/ -/* SearchDict - look for name */ -/* - compare for match on len and string */ -/* return 0 - not found. */ -/* return n - nth element in dictionary. */ -/***================================================================***/ -int -SearchDictName(psdict *dictP, psobj *keyP) -{ - int i,n; - - - n = dictP[0].key.len; - for (i=1;i<=n;i++) { /* scan the intire dictionary */ - if ( - (dictP[i].key.len == keyP->len ) - && - (strncmp(dictP[i].key.data.valueP, - keyP->data.valueP, - keyP->len) == 0 - ) - ) return(i); - } - return(0); -} - -static boolean -initFont(int cnt) -{ - - if (!(vm_init(cnt))) return(FALSE); - vm_base = vm_next_byte(); - if (!(Init_BuiltInEncoding())) return(FALSE); - strcpy(CurFontName, ""); /* iniitialize to none */ - FontP = &TheCurrentFont; - FontP->vm_start = vm_next_byte(); - FontP->FontFileName.len = 0; - FontP->FontFileName.data.valueP = CurFontName; - return(TRUE); -} -/***================================================================***/ -static void -resetFont(char *env) -{ - - vm_next = FontP->vm_start; - vm_free = vm_size - ( vm_next - vm_base); - FontP->Subrs.len = 0; - FontP->Subrs.data.stringP = NULL; - FontP->CharStringsP = NULL; - FontP->Private = NULL; - FontP->fontInfoP = NULL; - FontP->BluesP = NULL; - /* This will load the font into the FontP */ - strcpy(CurFontName,env); - FontP->FontFileName.len = strlen(CurFontName); - FontP->FontFileName.data.valueP = CurFontName; - -} - -static int -readFont(char *env) -{ - int rcode; - - /* restore the virtual memory and eliminate old font */ - resetFont(env); - /* This will load the font into the FontP */ - rcode = scan_font(FontP); - if (rcode == SCAN_OUT_OF_MEMORY) { - if (!(initFont(vm_size * 2))) { - /* we are really out of memory */ - return(SCAN_OUT_OF_MEMORY); - } - resetFont(env); - rcode = scan_font(FontP); - /* only double the memory once, then report error */ - } - return(rcode); -} -/***================================================================***/ -struct xobject * -fontfcnB(struct XYspace *S, unsigned char *code, int *lenP, int *mode) -{ - psobj *charnameP; /* points to psobj that is name of character*/ - int N; - psdict *CharStringsDictP; /* dictionary with char strings */ - psobj CodeName; /* used to store the translation of the name*/ - psobj *SubrsArrayP; - psobj *theStringP; - - struct xobject *charpath; /* the path for this character */ - - charnameP = &CodeName; - charnameP->len = *lenP; - charnameP->data.stringP = code; - - CharStringsDictP = FontP->CharStringsP; - - /* search the chars string for this charname as key */ - N = SearchDictName(CharStringsDictP,charnameP); - if (N<=0) { - *mode = FF_PARSE_ERROR; - return(NULL); - } - /* ok, the nth item is the psobj that is the string for this char */ - theStringP = &(CharStringsDictP[N].value); - - /* get the dictionary pointers to the Subrs */ - - SubrsArrayP = &(FontP->Subrs); - /* scale the Adobe fonts to 1 unit high */ - /* call the type 1 routine to rasterize the character */ - charpath = (struct xobject *)Type1Char((char *)FontP,S,theStringP, - SubrsArrayP,NULL, - FontP->BluesP , mode); - /* if Type1Char reported an error, then return */ - if ( *mode == FF_PARSE_ERROR) return(NULL); - /* fill with winding rule unless path was requested */ - if (*mode != FF_PATH) { - charpath = (struct xobject *)Interior((struct segment *)charpath, - WINDINGRULE+CONTINUITY); - } - return(charpath); -} - - -/***================================================================***/ -/* fontfcnA(env, mode) */ -/* */ -/* env is a pointer to a string that contains the fontname. */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/***================================================================***/ -Bool -fontfcnA(char *env, int *mode) -{ - int rc; - - /* Has the FontP initialized? If not, then */ - /* Initialize */ - if (FontP == NULL) { - InitImager(); - if (!(initFont(VM_SIZE))) { - /* we are really out of memory */ - *mode = SCAN_OUT_OF_MEMORY; - return(FALSE); - } - } - - /* if the env is null, then use font already loaded */ - - /* if the not same font name */ - if ( (env) && (strcmp(env,CurFontName) != 0 ) ) { - /* restore the virtual memory and eliminate old font, read new one */ - rc = readFont(env); - if (rc != 0 ) { - strcpy(CurFontName, ""); /* no font loaded */ - *mode = rc; - return(FALSE); - } - } - return(TRUE); - -} - -/***================================================================***/ -/* QueryFontLib(env, infoName,infoValue,rcodeP) */ -/* */ -/* env is a pointer to a string that contains the fontname. */ -/* */ -/* 1) initialize the font - global indicates it has been done */ -/* 2) load the font */ -/* 3) use the font to call getInfo for that value. */ -/***================================================================***/ - -void -QueryFontLib(char *env, char *infoName, - pointer infoValue, /* parameter returned here */ - int *rcodeP) -{ - int rc,N,i; - psdict *dictP; - psobj nameObj; - psobj *valueP; - - /* Has the FontP initialized? If not, then */ - /* Initialize */ - if (FontP == NULL) { - InitImager(); - if (!(initFont(VM_SIZE))) { - *rcodeP = 1; - return; - } - } - /* if the env is null, then use font already loaded */ - /* if the not same font name, reset and load next font */ - if ( (env) && (strcmp(env,CurFontName) != 0 ) ) { - /* restore the virtual memory and eliminate old font */ - rc = readFont(env); - if (rc != 0 ) { - strcpy(CurFontName, ""); /* no font loaded */ - *rcodeP = 1; - return; - } - } - dictP = FontP->fontInfoP; - objFormatName(&nameObj,strlen(infoName),infoName); - N = SearchDictName(dictP,&nameObj); - /* if found */ - if ( N > 0 ) { - *rcodeP = 0; - switch (dictP[N].value.type) { - case OBJ_ARRAY: - valueP = dictP[N].value.data.arrayP; - /* Just double check valueP. H.J. */ - if (valueP == NULL) break; - if (strcmp(infoName,"FontMatrix") == 0) { - /* 6 elments, return them as floats */ - for (i=0;i<6;i++) { - if (valueP->type == OBJ_INTEGER ) - ((float *)infoValue)[i] = valueP->data.integer; - else - ((float *)infoValue)[i] = valueP->data.real; - valueP++; - } - } - if (strcmp(infoName,"FontBBox") == 0) { - /* 4 elments for Bounding Box. all integers */ - for (i=0;i<4;i++) { - ((int *)infoValue)[i] = valueP->data.integer; - valueP++; - } - break; - case OBJ_INTEGER: - case OBJ_BOOLEAN: - *((int *)infoValue) = dictP[N].value.data.integer; - break; - case OBJ_REAL: - *((float *)infoValue) = dictP[N].value.data.real; - break; - case OBJ_NAME: - case OBJ_STRING: - *((char **)infoValue) = dictP[N].value.data.valueP; - break; - default: - *rcodeP = 1; - break; - } - } - } - else *rcodeP = 1; -} diff --git a/libXfont/src/Type1/fontfcn.h b/libXfont/src/Type1/fontfcn.h deleted file mode 100644 index 023302f3a..000000000 --- a/libXfont/src/Type1/fontfcn.h +++ /dev/null @@ -1,114 +0,0 @@ -/* $Xorg: fontfcn.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.4 1999/08/22 08:58:50 dawes Exp $ */ - - -/* modular config.h defines VERSION as libXfont version */ -#ifdef VERSION -#undef VERSION -#endif - -#include "util.h" - -/* Definition of a PostScript FONT */ -typedef struct ps_font { - char *vm_start; - psobj FontFileName; - psobj Subrs; - psdict *CharStringsP; - psdict *Private; - psdict *fontInfoP; -struct blues_struct *BluesP; -} psfont; -/***================================================================***/ -/* Routines in scan_font */ -/***================================================================***/ - -extern boolean Init_BuiltInEncoding ( void ); -extern int scan_font ( psfont *FontP ); -/***================================================================***/ -/* Return codes from scan_font */ -/***================================================================***/ -#define SCAN_OK 0 -#define SCAN_FILE_EOF -1 -#define SCAN_ERROR -2 -#define SCAN_OUT_OF_MEMORY -3 -#define SCAN_FILE_OPEN_ERROR -4 -#define SCAN_TRUE -5 -#define SCAN_FALSE -6 -#define SCAN_END -7 - -/***================================================================***/ -/* Name of FontInfo fields */ -/***================================================================***/ - -#define FONTNAME 1 -#define PAINTTYPE 2 -#define FONTTYPENUM 3 -#define FONTMATRIX 4 -#define FONTBBOX 5 -#define UNIQUEID 6 -#define STROKEWIDTH 7 -#define VERSION 8 -#define NOTICE 9 -#define FULLNAME 10 -#define FAMILYNAME 11 -#define WEIGHT 12 -#define ITALICANGLE 13 -#define ISFIXEDPITCH 14 -#define UNDERLINEPOSITION 15 -#define UNDERLINETHICKNESS 16 -#define ENCODING 17 -/***================================================================***/ -/* Name of Private values */ -/***================================================================***/ -#define BLUEVALUES 1 -#define OTHERBLUES 2 -#define FAMILYBLUES 3 -#define FAMILYOTHERBLUES 4 -#define BLUESCALE 5 -#define BLUESHIFT 6 -#define BLUEFUZZ 7 -#define STDHW 8 -#define STDVW 9 -#define STEMSNAPH 10 -#define STEMSNAPV 11 -#define FORCEBOLD 12 -#define LANGUAGEGROUP 13 -#define LENIV 14 -#define RNDSTEMUP 15 -#define EXPANSIONFACTOR 16 - -extern int SearchDictName ( psdict *dictP, psobj *keyP ); -extern struct xobject *fontfcnB ( struct XYspace *S, unsigned char *code, - int *lenP, int *mode ); -extern Bool fontfcnA ( char *env, int *mode ); -extern void QueryFontLib ( char *env, char *infoName, pointer infoValue, - int *rcodeP ); diff --git a/libXfont/src/Type1/fonts.h b/libXfont/src/Type1/fonts.h deleted file mode 100644 index 7215e0f7a..000000000 --- a/libXfont/src/Type1/fonts.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $Xorg: fonts.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* STUB */ - -#define CopyFont(f) f -#define UniqueFont(f) f -#define KillFont(f) -#define KillText(t) -#define CopyText(t) t -#define I_DumpText(t) -#define CoerceText(t) t -#define TextDelta(t,pt) -#define XformText(p,s) -#define GimeSpace() FALSE - -#define LibInit() -#define InitFonts() -#define InitFiles() -#define TraceClose() - -#define FF_PARSE_ERROR -1 diff --git a/libXfont/src/Type1/hdigit.h b/libXfont/src/Type1/hdigit.h deleted file mode 100644 index fbaa9c1db..000000000 --- a/libXfont/src/Type1/hdigit.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Xorg: hdigit.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef HDIGIT -#define HDIGIT 1 - -/* - * Hex Digit Value Table -- - * - * The entries in the Digit Value Table map character codes in the set - * {0-9,a-f,A-F} to their numeric values for readhexstring - * (00 10...F0 for the high hex digit and 00 01...0F for the low). - * The white-space and hex string termination characters are. - * mapped to codes > 0xf0 to enable usage by several modules. - * 2 tables are build HighHex and LowHex. - * - */ - -/* Indicators for special characters in these tables */ -#define HERROR (0xfe) -#define HWHITE_SPACE (0xfd) -#define HRIGHT_ANGLE (0xfc) -#define LAST_HDIGIT (0xf0) - -#define HighHexP (HighHex+1) -unsigned char HighHex[257] = { 0xFF, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE, - 0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE -}; -#define LowHexP (LowHex+1) -unsigned char LowHex[257] = { 0xFF, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE, - 0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE, - 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE -}; - -#endif diff --git a/libXfont/src/Type1/hints.c b/libXfont/src/Type1/hints.c deleted file mode 100644 index 14deac229..000000000 --- a/libXfont/src/Type1/hints.c +++ /dev/null @@ -1,890 +0,0 @@ -/* $Xorg: hints.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/hints.c,v 1.7tsi Exp $ */ - - /* HINTS CWEB V0006 ******** */ -/* -:h1.HINTS Module - Processing Rasterization Hints - -&author. Sten F. Andler; continuity by Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) and Duaine -W. Pryor, Jr. - - -:h3.Include Files - -The included files are: -*/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "hints.h" - -/* -:h3.Functions Provided to the TYPE1IMAGER User - -None. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry point to other modules: -*/ - - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Macros Provided to Other Modules - -None. -*/ - -/* -:h2.InitHints() - Initialize hint data structure -*/ - -#define MAXLABEL 20 -static struct { - int inuse; - int computed; - struct fractpoint hint; -} oldHint[MAXLABEL]; - -#define ODD(x) (((int)(x)) & 01) -#define FPFLOOR(fp) TOFRACTPEL((fp) >> FRACTBITS) -#define FPROUND(fp) FPFLOOR((fp) + FPHALF) - -void -InitHints(void) -{ - int i; - - for (i = 0; i < MAXLABEL; i++) - { - oldHint[i].inuse = FALSE; - oldHint[i].computed = FALSE; - } -} - -/* -:h3.CloseHints(hintP) - Reverse hints that are still open -*/ - -void -CloseHints(struct fractpoint *hintP) -{ - int i; - - for (i = 0; i < MAXLABEL; i++) - { - if (oldHint[i].inuse) - { - hintP->x -= oldHint[i].hint.x; - hintP->y -= oldHint[i].hint.y; - - oldHint[i].inuse = FALSE; - } - } -} - -/* -:h3.ComputeHint(hP, currX, currY, hintP) - Compute the value of a hint -*/ - -static void -ComputeHint(struct hintsegment *hP, - fractpel currX, fractpel currY, - struct fractpoint *hintP) -{ - fractpel currRef, currWidth; - int idealWidth; - fractpel hintValue; - char orientation; - -/* -By construction, width is never zero. Therefore we can use the -width value to determine if the hint has been rotated by a -multiple of 90 degrees. -*/ - - if (hP->width.y == 0) - { - orientation = 'v'; /* vertical */ - } - else if (hP->width.x == 0) - { - orientation = 'h'; /* horizontal */ - } - else - { - hintP->x = hintP->y = 0; - return; - } - - /* Compute currRef and currWidth with a unit of 1 pel */ - if (orientation == 'v') /* vertical */ - { - currRef = hP->ref.x + currX; - currWidth = ABS(hP->width.x); - } - else if (orientation == 'h') /* horizontal */ - { - currRef = hP->ref.y + currY; - currWidth = ABS(hP->width.y); - } - else /* error */ - { - Abort("ComputeHint: invalid orientation"); - } - - if ((hP->hinttype == 'b') /* Bar or stem */ - || (hP->hinttype == 's')) /* Serif */ - { - idealWidth = NEARESTPEL(currWidth); - if (idealWidth == 0) idealWidth = 1; - if (ODD(idealWidth)) /* Is ideal width odd? */ - { - /* center "ref" over pel */ - hintValue = FPFLOOR(currRef) + FPHALF - currRef; - } - else - { - /* align "ref" on pel boundary */ - hintValue = FPROUND(currRef) - currRef; - } - } - else if (hP->hinttype == 'c') /* Curve extrema */ - { - /* align "ref" on pel boundary */ - hintValue = FPROUND(currRef) - currRef; - } - else /* error */ - { - Abort("ComputeHint: invalid hinttype"); - } - - if (orientation == 'v') /* vertical */ - { - hintP->x = hintValue; - hintP->y = 0; - } - else if (orientation == 'h') /* horizontal */ - { - hintP->x = 0; - hintP->y = hintValue; - } - else /* error */ - { - Abort("ComputeHint: invalid orientation"); - } -} - -/* -:h3.ProcessHint(hP, currX, currY, hintP) - Process a rasterization hint -*/ - -void -ProcessHint(struct hintsegment *hP, - fractpel currX, fractpel currY, - struct fractpoint *hintP) -{ - struct fractpoint thisHint; - - if ((hP->adjusttype == 'm') /* Move */ - || (hP->adjusttype == 'a')) /* Adjust */ - { - /* Look up hint in oldHint table */ - if ((hP->label >= 0) && (hP->label < MAXLABEL)) - { - if (oldHint[hP->label].computed) - /* Use old hint value if already computed */ - { - thisHint.x = oldHint[hP->label].hint.x; - thisHint.y = oldHint[hP->label].hint.y; - oldHint[hP->label].inuse = TRUE; - } - else - /* Compute new value for hint and store it for future use */ - { - ComputeHint(hP, currX, currY, &thisHint); - - oldHint[hP->label].hint.x = thisHint.x; - oldHint[hP->label].hint.y = thisHint.y; - oldHint[hP->label].inuse = TRUE; - oldHint[hP->label].computed = TRUE; - } - } - else /* error */ - { - Abort("ProcessHint: invalid label"); - } - } - else if (hP->adjusttype == 'r') /* Reverse */ - { - /* Use the inverse of the existing hint value to reverse hint */ - if ((hP->label >= 0) && (hP->label < MAXLABEL)) - { - if (oldHint[hP->label].inuse) - { - thisHint.x = -oldHint[hP->label].hint.x; - thisHint.y = -oldHint[hP->label].hint.y; - oldHint[hP->label].inuse = FALSE; - } - else /* error */ - { - Abort("ProcessHint: label is not in use"); - } - } - else /* error */ - { - Abort("ProcessHint: invalid label"); - } - - } - else /* error */ - { - Abort("ProcessHint: invalid adjusttype"); - } - - hintP->x += thisHint.x; - hintP->y += thisHint.y; -} - -/* -:h2 id=subpath.Navigation Through Edge Lists - -For continuity checking purposes, we need to navigate through edge -lists by the "subpath" chains and answer questions about edges. The -subpath chain links together edges that were part of the same subpath -(no intervening move segments) when the interior of the path was -calculated. Here we use the term "edge" to mean every edge list -that was created in between changes of direction. - -The subpath chains are singly-linked circular chains. For the convenience -of building them, they direction of the list (from edge to edge) is the -reverse of the order in which they were built. Within any single edge, -the subpath chain goes from top-to-bottom. (There might be a violation -of this because of the way the user started the first chain; see -:hdref refid=fixsubp..). - -:h3.ISTOP() and ISBOTTOM() - Flag Bits for Edge Lists at the Top and -Bottom of Their SubPaths -*/ - -#define ISTOP(flag) ((flag)&0x20) -#define ISBOTTOM(flag) ((flag)&0x10) -/* -:h3.ISLEFT() - Flag Bit for Left Edges -*/ - -#define ISLEFT(flag) ((flag)&0x08) - -/* -:h3.XofY() - Macro to Find X Value at Given Y - -This macro can only be used if it is known that the Y is within the -given edgelist's ymin and ymax. -*/ - -#define XofY(edge, y) edge->xvalues[y - edge->ymin] - -/* -:h3.findXofY() - Like XofY(), Except not Restricted - -If the Y is out of bounds of the given edgelist, this macro will -call SearchXofY to search the edge's subpath chain for the correct -Y range. If the Y value is off the edge, MINPEL is returned. -*/ -#define findXofY(edge, y) ((y < edge->ymin || y >= edge->ymax) ? SearchXofY(edge, y) : XofY(edge, y)) - -/* -:h4.SearchXofY() - Routine Called by FindXofY() for Difficult Cases - -The concept of this routine is to follow the subpath chain to find the -edge just below (i.e., next in chain) or just above (i.e., immediately -before in chain. It is assumed that the Y value is no more than one -off of the edge's range; XofY() could be replace by FindXofY() to -call ourselves recursively if this were not true. -*/ - -static pel -SearchXofY(register struct edgelist *edge, /* represents edge */ - register pel y) /* 'y' value to find edge for */ -{ - register struct edgelist *e; /* loop variable */ - - if (y < edge->ymin) { - if (ISTOP(edge->flag)) - return(MINPEL); - for (e = edge->subpath; e->subpath != edge; e = e->subpath) { ; } - if (e->ymax == edge->ymin) - return(XofY(e, y)); - } - else if (y >= edge->ymax) { - if (ISBOTTOM(edge->flag)) - return(MINPEL); - e = edge->subpath; - if (e->ymin == edge->ymax) - return(XofY(e, y)); - } - else - return(XofY(edge, y)); - - Abort("bad subpath chain"); - /*NOTREACHED*/ -} -/* -:h3.ISBREAK() Macro - Tests if an Edge List is at a "Break" - -The subpath chains are organized top to bottom. When the bottom of -a given edge is reached, the subpath chain points to the top of the -next edge. We call this a "break" in the chain. The following macro -is the simple test for the break condition: -*/ - -#define ISBREAK(top,bot) (top->ymax != bot->ymin) - - -/* -:h3.ImpliedHorizontalLine() - Tests for Horizontal Connectivity - -This function returns true if two edges are connected horizontally. -They are connected horizontally if they are consecutive in the subpath, -and either we are at the bottom and the first edge is going down or we -are at the top and the first edge is going up. -*/ - -#define BLACKABOVE -1 -#define BLACKBELOW +1 -#define NONE 0 - -static int -ImpliedHorizontalLine(struct edgelist *e1, /* two edges to check */ - struct edgelist *e2, - int y) /* y where they might be connected */ -{ - register struct edgelist *e3,*e4; - - if (ISDOWN(e1->flag) == ISDOWN(e2->flag)) - return(NONE); /* can't be consecutive unless different directions */ -/* -Now we check for consecutiveness: Can we get from 'e1' to 'e2' with -only one intervening break? Can we get from 'e2' to 'e1' with only one -intervening break? 'e3' will be as far as we can get after 'e1'; 'e4' -will be has far as we can get after 'e2': -*/ - for (e3 = e1; !ISBREAK(e3, e3->subpath); e3 = e3->subpath) { ; } - for (e3 = e3->subpath; e3 != e2; e3 = e3->subpath) - if (ISBREAK(e3, e3->subpath)) - break; - - for (e4 = e2; !ISBREAK(e4, e4->subpath); e4 = e4->subpath) { ; } - for (e4 = e4->subpath; e4 != e1; e4 = e4->subpath) - if (ISBREAK(e4, e4->subpath)) - break; -/* -If the edges are mutually consecutive, we must have horizontal lines -both top and bottom: -*/ - if (e3 == e2 && e4 == e1) - return(TRUE); -/* -If the edges are not consecutive either way, no horizontal lines are -possible: -*/ - if (e3 != e2 && e4 != e1) - return(NONE); -/* -Now let's swap 'e1' and 'e2' if necessary to enforce the rule that 'e2' -follows 'e1'. Remember that subpath chains go in the opposite direction -from the way the subpaths were built; this led to the simplest way -do build them. -*/ - if (e4 != e1) { - e2 = e1; - e1 = e3; /* remember e3 == e2, this just swaps 'e1' and 'e2' */ - } -/* -Now we have everything to return the answer: -*/ - if (ISTOP(e1->flag) && y == e1->ymin) - return(ISDOWN(e2->flag)); - else if (ISBOTTOM(e1->flag) && y == e1->ymax) - return(!ISDOWN(e2->flag)); - else - Abort("ImpliedHorizontalLine: why ask?"); - /*NOTREACHED*/ -} - -/* -:h3 id=fixsubp.FixSubPaths() - Must be Called to Organize Subpath Chains - -The region-building code in Interior(), in particular splitedge(), -maintains the rule that sub-paths are linked top-to-bottom except -at breaks. However, it is possible that there may be a "false break" -because the user started the subpath in the middle of an edge (and -went in the "wrong" direction from there, up instead of down). This -routine finds and fixes false breaks. - -Also, this routine sets the ISTOP and ISBOTTOM flags in the edge lists. -*/ - -static void -FixSubPaths(struct region *R) /* anchor of region */ -{ - register struct edgelist *e; /* fast loop variable */ - register struct edgelist *edge; /* current edge in region */ - register struct edgelist *next; /* next in subpath after 'edge' */ - register struct edgelist *break1; /* first break after 'next' */ - register struct edgelist *break2 = NULL; /* last break before 'edge' */ - register struct edgelist *prev; /* previous edge for fixing links */ - int left = TRUE; - - for (edge = R->anchor; edge != NULL; edge = edge->link) { - - if (left) - edge->flag |= ISLEFT(ON); - left = !left; - - next = edge->subpath; - - if (!ISBREAK(edge, next)) - continue; - if (edge->ymax < next->ymin) - Abort("disjoint subpath?"); -/* -'edge' now contains an edgelist at the bottom of an edge, and 'next' -contains the next subsequent edgelist in the subpath, which must be at -the top. We refer to this a "break" in the subpath. -*/ - next->flag |= ISTOP(ON); - edge->flag |= ISBOTTOM(ON); - - if (ISDOWN(edge->flag) != ISDOWN(next->flag)) - continue; -/* -We are now in the unusual case; both edges are going in the same -direction so this must be a "false break" due to the way that the user -created the path. We'll have to fix it. -*/ - for (break1 = next; !ISBREAK(break1, break1->subpath); break1 = break1->subpath) { ; } - - for (e = break1->subpath; e != edge; e = e->subpath) - if (ISBREAK(e, e->subpath)) - break2 = e; -/* -Now we've set up 'break1' and 'break2'. I've found the following -diagram invaluable. 'break1' is the first break after 'next'. 'break2' -is the LAST break before 'edge'. -&drawing. - next - +------+ +---->+------+ - +--->| >-----+ | | >-----+ - | | | | | | | | - | +-------------+ | +-------------+ - | | |break1| | | | | - | +->| >-------+ +->| >-----+ - | | | | | | - | | | +-------------+ - | +------+ | | | - | +----------------+ | | | - | | +------+ | +->| >-----+ - | +->| >-----+ | | | | - | | | | | +-------------+ - | +-------------+ | | | | - | | |edge | | | |break2| - | +->| >-----+ | +->| >-----+ - | | | | | | | | - | | | | | | | | - | | | | | | | | - | +------+ | | +------+ | - | | | | - +---------------+ +---------------+ - -&edrawing. -We want to fix this situation by having 'edge' point to where 'break1' -now points, and having 'break1' point to where 'break2' now points. -Finally, 'break2' should point to 'next'. Also, we observe that -'break1' can't be a bottom, and is also not a top unless it is the same -as 'next': -*/ - edge->subpath = break1->subpath; - - break1->subpath = break2->subpath; - if (ISBREAK(break1, break1->subpath)) - Abort("unable to fix subpath break?"); - - break2->subpath = next; - - break1->flag &= ~ISBOTTOM(ON); - if (break1 != next) - break1->flag &= ~ISTOP(ON); - } -/* -This region might contain "ambiguous" edges; edges exactly equal to -edge->link. Due to the random dynamics of where they get sorted into -the list, they can yield false crossings, where the edges appear -to cross. This confuses our continuity logic no end. Since we can -swap them without changing the region, we do. -*/ - for (edge = R->anchor, prev = NULL; VALIDEDGE(edge); prev = edge, edge = prev->link) { - - if (! ISAMBIGUOUS(edge->flag)) - continue; - - next = edge->subpath; - - while (ISAMBIGUOUS(next->flag) && next != edge) - next = next->subpath; -/* -We've finally found a non-ambiguous edge; we make sure it is left/right -compatible with 'edge': -*/ - if ( (ISLEFT(edge->flag) == ISLEFT(next->flag) && ISDOWN(edge->flag) == ISDOWN(next->flag) ) - || (ISLEFT(edge->flag) != ISLEFT(next->flag) && ISDOWN(edge->flag) != ISDOWN(next->flag) ) ) - continue; - -/* -Incompatible, we will swap 'edge' and the following edge in the list. -You may think that there must be a next edge in this swath. So did I. -No! If there is a totally ambiguous inner loop, for example, we could -get all the way to the outside without resolving ambiguity. -*/ - next = edge->link; /* note new meaning of 'next' */ - if (next == NULL || edge->ymin != next->ymin) - continue; - if (prev == NULL) - R->anchor = next; - else - prev->link = next; - edge->link = next->link; - next->link = edge; - edge->flag ^= ISLEFT(ON); - edge->flag &= ~ISAMBIGUOUS(ON); - next->flag ^= ISLEFT(ON); - next->flag &= ~ISAMBIGUOUS(ON); - edge = next; - } -} -/* -:h3.DumpSubPaths() - -A debug tool. -*/ - -static struct edgelist *before(struct edgelist *e); /* subroutine of DumpSubPaths */ - -static void -DumpSubPaths(struct edgelist *anchor) -{ - - register struct edgelist *edge,*e,*e2; - pel y; - - for (edge = anchor; VALIDEDGE(edge); edge = edge->link) { - if (ISPERMANENT(edge->flag)) - continue; - for (e2 = edge; !ISPERMANENT(e2->flag);) { - if (ISDOWN(e2->flag)) { - for (e = e2;; e = e->subpath) { - for (y=e->ymin+1; y < e->ymax; y++) - e->flag |= ISPERMANENT(ON); - if (ISBREAK(e, e->subpath)) - break; - } - } - else { - for (e = e2; !ISBREAK(e, e->subpath); e = e->subpath) { ; } - for (;; e=before(e)) { - for (y=e->ymax-2; y >= e->ymin; y--) - e->flag |= ISPERMANENT(ON); - if (e == e2) - break; - } - } - do { - e2 = before(e2); - } while (!ISBREAK(before(e2), e2)); - } - } -} - -static struct edgelist * -before(struct edgelist *e) -{ - struct edgelist *r; - for (r = e->subpath; r->subpath != e; r = r->subpath) { ; } - return(r); -} - -/* -:h2.Fixing Region Continuity Problems - -Small regions may become disconnected when their connecting segments are -less than a pel wide. This may be correct in some applications, but in -many (especially small font characters), it is more pleasing to keep -connectivity. ApplyContinuity() (invoked by +CONTINUITY on the -Interior() fill rule) fixes connection breaks. The resulting region -is geometrically less accurate, but may be more pleasing to the eye. -*/ -/* -Here are some macros which we will need: -*/ - -#define IsValidPel(j) (j!=MINPEL) - -/* -:h3.writeXofY() - Stuffs an X Value Into an "edgelist" - -writeXofY writes an x value into an edge at position 'y'. It must -update the edge's xmin and xmax. If there is a possibility that this -new x might exceed the region's bounds, updating those are the -responsibility of the caller. -*/ - -static void -writeXofY(struct edgelist *e,/* relevant edgelist */ - int y, /* y value */ - int x) /* new x value */ -{ - if (e->xmin > x) e->xmin = x; - if (e->xmax < x) e->xmax = x; - e->xvalues[y - e->ymin] = x; -} - -/*-------------------------------------------------------------------------*/ -/* the following three macros tell us whether we are at a birth point, a */ -/* death point, or simply in the middle of the character */ -/*-------------------------------------------------------------------------*/ -#define WeAreAtTop(e,i) (ISTOP(e->flag) && e->ymin == i) -#define WeAreAtBottom(e,i) (ISBOTTOM(e->flag) && e->ymax-1 == i) -#define WeAreInMiddle(e,i) \ - ((!ISTOP(e->flag) && !ISBOTTOM(e->flag))||(i < e->ymax-1 && i > e->ymin)) -/* -The following macro tests if two "edgelist" structures are in the same -swath: -*/ -#define SAMESWATH(e1,e2) (e1->ymin == e2->ymin) - -/* -:h3.CollapseWhiteRun() - Subroutine of ApplyContinuity() - -When we have a white run with an implied horizontal line above or -below it, we better have black on the other side of this line. This -function both tests to see if black is there, and adjusts the end -points (collapses) the white run as necessary if it is not. The -goal is to collapse the white run as little as possible. -*/ - -static void -CollapseWhiteRun(struct edgelist *anchor, /* anchor of edge list */ - pel yblack, /* y of (hopefully) black run above or below */ - struct edgelist *left, /* edgelist at left of WHITE run */ - struct edgelist *right, /* edgelist at right of WHITE run */ - pel ywhite) /* y location of white run */ -{ - struct edgelist *edge; - struct edgelist *swathstart = anchor; - register pel x; - - if (XofY(left, ywhite) >= XofY(right, ywhite)) - return; -/* -Find the swath with 'yblack'. If we don't find it, completely collapse -the white run and return: -*/ - while (VALIDEDGE(swathstart)) { - if (yblack < swathstart->ymin) { - writeXofY(left, ywhite, XofY(right, ywhite)); - return; - } - if (yblack < swathstart->ymax) break; - swathstart = swathstart->link->link; - } - if(!VALIDEDGE(swathstart)) { - writeXofY(left, ywhite, XofY(right, ywhite)); - return; - } -/* -Now we are in the swath that contains 'y', the reference line above -or below that we are trying to maintain continuity with. If black -in this line begins in the middle of our white run, we must collapse -the white run from the left to that point. If black ends in the -middle of our white run, we must collapse the white run from the right -to that point. -*/ - for (edge = swathstart; VALIDEDGE(edge); edge = edge->link) { - - if (!SAMESWATH(swathstart,edge)) - break; - if( XofY(edge, yblack) > XofY(left, ywhite)) { - if (ISLEFT(edge->flag)) { - x = XofY(edge, yblack); - if (XofY(right, ywhite) < x) - x = XofY(right, ywhite); - writeXofY(left, ywhite, x); - } - else { - x = XofY(edge, yblack); - while (edge->link != NULL && SAMESWATH(edge, edge->link) - && x >= XofY(edge->link, yblack) ) { - edge = edge->link->link; - x = XofY(edge, yblack); - } - if (x < XofY(right, ywhite)) - writeXofY(right, ywhite, x); - return; - } - } - } - writeXofY(left, ywhite, XofY(right, ywhite)); -} - -/* -:h3.ApplyContinuity() - Fix False Breaks in a Region - -This is the externally visible routine called from the REGIONS module -when the +CONTINUITY flag is on the Interior() fill rule. -*/ - -void -ApplyContinuity(struct region *R) -{ - struct edgelist *left; - struct edgelist *right; - struct edgelist *edge,*e2; - pel rightXabove,rightXbelow,leftXabove,leftXbelow; - pel leftX,rightX; - int i; - long newcenter,abovecenter,belowcenter; - - FixSubPaths(R); - if (RegionDebug >= 3) - DumpSubPaths(R->anchor); - left = R->anchor; -/* loop through and do all of the easy checking. ( no tops or bottoms) */ - while(VALIDEDGE(left)) - { - right = left->link; - for(i=left->ymin;i<left->ymax;++i) - { - leftX = findXofY(left,i); - rightX = findXofY(right,i); - leftXbelow = findXofY(left,i+1); - rightXbelow = findXofY(right,i+1); - if(rightX <= leftX) - { -/* then, we have a break in a near vertical line */ - leftXabove = findXofY(left,i-1); - rightXabove = findXofY(right,i-1); - if( IsValidPel(leftXabove) && IsValidPel(rightXabove) ) - { - abovecenter = leftXabove + rightXabove; - } - else - { - abovecenter = leftX + rightX; - } - if( IsValidPel(leftXbelow) && IsValidPel(rightXbelow) ) - { - belowcenter = leftXbelow + rightXbelow; - } - else - { - belowcenter = leftX + rightX; - } - newcenter = abovecenter + belowcenter; - if( newcenter > 4*leftX ) - { - rightX = rightX + 1; - } - else if( newcenter < 4*leftX) - { - leftX = leftX - 1; - } - else - { - rightX = rightX + 1; - } - writeXofY(right,i,rightX); - writeXofY(left,i,leftX); - if(rightX > R->xmax) {R->xmax = rightX;} - if(leftX < R->xmin) {R->xmin = leftX;} - } - if( !WeAreAtBottom(left,i) && (leftXbelow>=rightX)) - { -/* then we have a break in a near horizontal line in the middle */ - writeXofY(right,i,leftXbelow); - } - if( !WeAreAtBottom(right,i) && (leftX >=rightXbelow)) - { -/* then we have a break in a near horizontal line in the middle */ - writeXofY(left,i,rightXbelow); - } - } - left = right->link; - } -/* -There may be "implied horizontal lines" between edges that have -implications for continuity. This loop looks for white runs that -have implied horizontal lines on the top or bottom, and calls -CollapseWhiteRuns to check and fix any continuity problems from -them. -*/ - for (edge = R->anchor; VALIDEDGE(edge); edge = edge->link) { - if ((!ISTOP(edge->flag) && !ISBOTTOM(edge->flag)) || ISLEFT(edge->flag)) - continue; /* at some future date we may want left edge logic here too */ - for (e2 = edge->link; VALIDEDGE(e2) && SAMESWATH(edge,e2); e2 = e2->link) { - if (ISTOP(e2->flag) && ISTOP(edge->flag) - && NONE != ImpliedHorizontalLine(edge,e2,edge->ymin)) { - if (ISLEFT(e2->flag)) - CollapseWhiteRun(R->anchor, edge->ymin-1, - edge, e2, edge->ymin); - } - if (ISBOTTOM(e2->flag) && ISBOTTOM(edge->flag) - && NONE != ImpliedHorizontalLine(edge,e2, edge->ymax)) { - if (ISLEFT(e2->flag)) - CollapseWhiteRun(R->anchor, edge->ymax, - edge, e2, edge->ymax-1); - } - } - } -} - - - - diff --git a/libXfont/src/Type1/hints.h b/libXfont/src/Type1/hints.h deleted file mode 100644 index 8e2ae2ade..000000000 --- a/libXfont/src/Type1/hints.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $Xorg: hints.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/hints.h,v 1.3 1999/08/22 08:58:51 dawes Exp $ */ - -/*SHARED*/ - -#define InitHints t1_InitHints -extern void t1_InitHints ( void ); /* Initialize hint data structure */ - -#define CloseHints(hintP) t1_CloseHints(hintP) -/* Reverse hints that are still open */ -extern void t1_CloseHints ( struct fractpoint *hintP ); - -#define ProcessHint(hP, currX, currY, hintP) t1_ProcessHint(hP, currX, currY, hintP) -/* Process a rasterization hint */ -extern void t1_ProcessHint ( struct hintsegment *hP, fractpel currX, fractpel currY, struct fractpoint *hintP ); - -#define ApplyContinuity(R) t1_ApplyContinuity(R) -/* fix false connection breaks in a region */ -extern void t1_ApplyContinuity ( struct region *R ); - -/*END SHARED*/ diff --git a/libXfont/src/Type1/lines.c b/libXfont/src/Type1/lines.c deleted file mode 100644 index 72fb79f97..000000000 --- a/libXfont/src/Type1/lines.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $Xorg: lines.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/lines.c,v 1.4tsi Exp $ */ - - /* LINES CWEB V0003 ******** */ -/* -:h1.LINES Module - Rasterizing Lines - -&author. Duaine W. Pryor, Jr. and Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "lines.h" - -/* -:h3.Functions Provided to the TYPE1IMAGER User - -None. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry point to other modules: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Macros Provided to Other Modules - -None. -*/ - -/* -:h3.Bresenham() - Actually Produces Run Ends - -This routine runs a Bresenham line-stepping -algorithm. See, for example, Newman and Sproul, :hp1/Principles -of Interactive Computer Graphics/, pp. 25-27. -When we enter this, we -are guaranteed that dy is positive. -We'd like to work in 8 bit precision, so we'll define some macros and -constants to let us do that: -*/ - -#define PREC 8 /* we'll keep fraction pels in 8 bit precision */ -/* -RoundFP() rounds down by 'b' bits: -*/ -#define RoundFP(xy,b) (((xy)+(1<<((b)-1)))>>(b)) - -/* -TruncFP() truncates down by 'b' bits: -*/ -#define TruncFP(xy,b) ((xy)>>(b)) - - -static void -Bresenham(pel *edgeP, fractpel x1, fractpel y1, fractpel x2, fractpel y2) -{ - register long dx,dy; /* change in x and y, in my own precision */ - register long x,y; /* integer pel starting point */ - register int count; /* integer pel delta y */ - register long d; /* the Bresenham algorithm error term */ - - x1 = TruncFP(x1, FRACTBITS-PREC); - y1 = TruncFP(y1, FRACTBITS-PREC); - x2 = TruncFP(x2, FRACTBITS-PREC); - y2 = TruncFP(y2, FRACTBITS-PREC); - - dx = x2 - x1; - dy = y2 - y1; -/* -Find the starting x and y integer pel coordinates: -*/ - - x = RoundFP(x1,PREC); - y = RoundFP(y1,PREC); - edgeP += y; - count = RoundFP(y2,PREC) - y; -/*------------------------------------------------------------------*/ -/* Force dx to be positive so that dfy will be negative */ -/* this means that vertical moves will decrease d */ -/*------------------------------------------------------------------*/ - if (dx<0) - { - dx = -dx; -#define P PREC - d=(dy*(x1-(x<<P)+(1<<(P-1)))-dx*((y<<P)-y1+(1<<(P-1))))>>P; -#undef P - while(--count >= 0 ) - { - while(d<0) - { - --x; - d += dy; - } - *(edgeP++) = x; - d -= dx; - } - } - else /* positive dx */ - { -#define P PREC - d = (dy*((x<<P)-x1+(1<<(P-1)))-dx*((y<<P)-y1+(1<<(P-1))))>>P; -#undef P - while(--count >= 0 ) - { - while(d<0) - { - ++x; - d += dy; - } - *(edgeP++) = x; - d -= dx; - } - } -} - -/* -:h2.StepLine() - Produces Run Ends for a Line After Checks - -The main work is done by Bresenham(); here we just perform checks and -get the line so that its Y direction is always increasing: -*/ - -void StepLine(R, x1, y1, x2, y2) - register struct region *R; /* region being built */ - register fractpel x1,y1; /* starting point */ - register fractpel x2,y2; /* ending point */ -{ - register fractpel dy; - - dy = y2 - y1; - -/* -We execute the "GOING_TO" macro to call back the REGIONS module, if -necessary (like if the Y direction of the edge has changed): -*/ - GOING_TO(R, x1, y1, x2, y2, dy); - - if (dy == 0) - return; - - if (dy < 0) - Bresenham(R->edge, x2, y2, x1, y1); - else - Bresenham(R->edge, x1, y1, x2, y2); - return; -} diff --git a/libXfont/src/Type1/lines.h b/libXfont/src/Type1/lines.h deleted file mode 100644 index 4efe5a689..000000000 --- a/libXfont/src/Type1/lines.h +++ /dev/null @@ -1,37 +0,0 @@ -/* $Xorg: lines.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/lines.h,v 1.3 1999/08/22 08:58:52 dawes Exp $ */ - -/*SHARED*/ - -#define StepLine(R,x1,y1,x2,y2) t1_StepLine(R,x1,y1,x2,y2) - -extern void t1_StepLine ( struct region *R, fractpel x1, fractpel y1, fractpel x2, fractpel y2 ); - -/*END SHARED*/ diff --git a/libXfont/src/Type1/objects.c b/libXfont/src/Type1/objects.c deleted file mode 100644 index 7a49bcbba..000000000 --- a/libXfont/src/Type1/objects.c +++ /dev/null @@ -1,944 +0,0 @@ -/* $Xorg: objects.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/objects.c,v 1.10tsi Exp $ */ - /* OBJECTS CWEB V0025 ******** */ -/* -:h1.OBJECTS Module - TYPE1IMAGER Objects Common Routines - -This module defines and implements the C structures that represent -objects in the TYPE1IMAGER. All common routines for manipulating these -objects are defined in this module. Specific routines for -specific objects are defined in the modules that deal with that -object type. - - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#define GLOBALS 1 /* see :hdref refid=debugvar. */ -/* -The following two includes are C standards; we include them because we -use 'toupper' and the 'str'-type functions in this module. Potentially -these may be defined as macros; if these ".h" files do not exist on your -system it is a pretty safe bet that these are external entry points and -you do do not need to include these header files. -*/ - -#ifndef FONTMODULE -#include <string.h> -#include <ctype.h> -#include <stdarg.h> -#include <stdio.h> -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "os.h" -#include "xf86_ansic.h" -#endif - -/* -override incorrect system functions; for example you might define -a macro for "strcpy" that diverts it to "my_strcpy". -*/ - - /* moved these includes from above the */ - /* was included first (it contains com- */ - /* piler defines). dsr 081291 */ -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "fonts.h" -#include "pictures.h" -#include "strokes.h" -#include "cluts.h" - -static char LineIOTrace INITIALIZED(TRUE); -static char MustCrash INITIALIZED(TRUE); -static char *TypeFmt(int type); - -/* -:h3.The "pointer" Macro - Define a Generic Pointer - -Sadly, many compilers will give a warning message when a pointer to -one structure is assigned to a pointer to another. We've even seen -some that give severe errors (when the wrong pointer type is used as -an initializer or returned from a function). TYPE1IMAGER has routines -like Dup and Allocate that are perfectly willing to duplicate or -allocate any of a number of different types of structures. How to -declare them in a truely portable way? - -Well, there is no single good answer that I've found. You can always -beg the question and "cast" everything. I find this distracting and the -resulting code ugly. On the other hand, we have found at least one -compiler that will accept "void *" as a generic pointer that can -assigned to any other pointer type without error or warning (apparently -this is also the ANSI standard). So, we define "void *" to be a generic -pointer. (You might have to change this for your compiler; the "ifndef" -allows the change to be made on the command line if you want.) -:i1/portability assumptions/ -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to the TYPE1IMAGER User - -This module provides the following TYPE1IMAGER entry points: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Note that entry points that are intended for use external to TYPE1IMAGER -begin with the characters :q/xi/. Macros are used to make the names -more mnemonic. -*/ - -/* -:h3.Functions Provided to Other Modules - -This module provides the following functions for other modules: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Note that entry points that intended for use within TYPE1IMAGER, but -which must be global because they are used across module boundaries, -begin with the characters :q/I_/. Macros are used to make the names -more mnemonic. - -Entry points totally within a module use mnemonic names and are -declared :hp2/static/. One of the compilers I used had a bug when -static functions were passed as addresses. Thus, some functions -which are logically "static" are not so declared. - -Note also the trick of declaring routines, like Consume(), with a -variable number of arguments. To avoid the restrictions on variable -numbers of arguments in the macro processor, we just replace the -text 'Consume' with 'I_Consume'. -*/ -/* -:h3.Macros Provided to Other Modules - -This is the module where we define all the useful constants like -TRUE, FALSE, and NULL, and simple expressions like MIN(), MAX(), and ABS(). -We might as well get to it right here: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Notice that upper case is used for constant values and macro -definitions. I generally follow that convention. - -Many more global macros are defined later in this module. -*/ -/* -:h2.Basic TYPE1IMAGER Object Structure - -All TYPE1IMAGER objects which are available to the user have a common -header. This header is defined below: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -The following define is an attempt to centralize the definition of the -common xobject data shared by structures that are derived from the -generic xobject structure. For example, the structure font, defined in -fonts.shr : -&code. - struct font { - char type; - char flag; - int references; - ... other data types & structs ... - } -&ecode. -would now be defined as: -&code. - struct font { - XOBJ_COMMON - ... other data types & structs ... - } -&ecode. -Thus we have a better-structured inheritance mechanism. 3-26-91 PNM -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Object Type Definitions - -These constants define the values which go in the 'type' field of -an TYPE1IMAGER object structure: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Flag Byte Definitions - -Many programmers define flag bits as a mask (for example, 0x04), and -test, set, and reset them as follows: - -&code. - if ((flag & PERMANENT) != 0) - - flag |= PERMANENT; - flag &= &inv.PERMANENT; -:exmp. - -I favor a style where the 'if' statement can ask a question: - -&code. - if (ISPERMANENT(flag)) - - flag |= ISPERMANENT(ON); - flag &= &inv.ISPERMANENT(ON); - -:exmp. -This said, we now define two bit settings of the flag byte of the -object. "ISPERMANENT" will be set by the user, when he calls -Permanent(). "ISIMMORTAL" will be used for compiled-in objects -that we don't want the user to ever destroy. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -Flag bit definitions that apply to all objects are assigned -starting with the least significant (0x01) bit. Flag bit definitions -specific to a certain object type are assigned starting with the -most significant (0x80) bit. We hope they never meet. -*/ -/* -:h3 id=preserve.PRESERVE() Macro - -Occasionally an TYPE1IMAGER operator is implemented by calling other -TYPE1IMAGER operators. For example, Arc2() calls Conic(). When we -call more than one operator as a subroutine, we have to be careful -of temporary objects. A temporary object will be consumed by the -subroutine operator and then is no longer available for the caller. -This can be prevented simply by bumping a temporary object's reference -count. -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.RefRoll() Macro to Detect References Count Rollover - -The following macro is designed to check for reference count rollover. -A return value of TRUE means rollover has not occurred; a return value -of FALSE means we cannot increment the reference count. Note also that -those functions that use this macro must decrement the reference count -afterwards. 3-26-91 PNM -*/ - -#define RefRoll(obj) (++(obj)->references > 0) - -/* -:h2.TYPE1IMAGER Object Functions - -:h3.LONGCOPY() - Macro to Copy "long" Aligned Data - -Copying arbitrary bytes in C is a bit of a problem. "strcpy" can't be -used, because 0 bytes are special-cased. Most environments have a -routine "memcopy" or "bcopy" or "bytecopy" that copies memory containing -zero bytes. Sadly, there is no standard on the name of such a routine, -which makes it impossible to write truely portable code to use it. - -It turns out that TYPE1IMAGER, when it wants to copy data, frequently -knows that both the source and destination are aligned on "long" -boundaries. This allows us to copy by using "long *" pointers. This -is usually very efficient on almost all processors. Frequently, it -is more efficient than using general-purpose assembly language routines. -So, we define a macro to do this in a portable way. "dest" and "source" -must be long-aligned, and "bytes" must be a multiple of "sizeof(long)": -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Allocate() - Allocating a Memory Block - -Allocate returns a pointer to memory object that is a copy of -the template passed (if any). In addition, extra bytes may be -allocated contiguously with the object. (This may be useful for -variable size objects such as edge lists. See :hdref refid=regions..) - -Allocate() always returns a non-immortal object, even if the template is -immortal. Therefore a non-NULL template must have a "flag" byte. - -If the template is NULL, then 'size' bytes are cleared to all NULLs. - -If the template is non-NULL, a new object is allocated in memory. -It therefore seems logical that its reference count field should be -set to 1. So, a nun-NULL template must also have a "references" field. -PNM 3-26-91 -*/ - -struct xobject * -t1_Allocate(int size, /* number of bytes to allocate & initialize */ - pointer ptr, /* example structure to allocate */ - int extra) /* any extra uninitialized bytes needed contiguously */ -{ - register struct xobject *template = (struct xobject *)ptr; - register struct xobject *r; - - /* - * round up 'size' and 'extra' to be an integer number of 'long's: - */ - size = (size + sizeof(long) - 1) & -(int)sizeof(long); - extra = (extra + sizeof(long) - 1) & -(int)sizeof(long); - if (size + extra <= 0) - Abort("Non-positive allocate?"); - r = (struct xobject *) xiMalloc(size + extra); - - while (r == NULL) { - if (!GimeSpace()) { - Abort("We have REALLY run out of memory"); - } - r = (struct xobject *) xiMalloc(size + extra); - } - - /* - * copy the template into the new memory: - */ - if (template != NULL) { - /* Added references count decrement if template is not permanent. - This is for the case where Allocate is called by a Dupxxxx - function, which was in turn called by Unique(). (PNM) */ - if (!ISPERMANENT(template->flag)) - --template->references; - LONGCOPY(r, template, size); - r->flag &= ~(ISPERMANENT(ON) | ISIMMORTAL(ON)); - /* added reference field 3-2-6-91 PNM */ - r->references = 1; - } - else { - register char **p1; - - for (p1=(char **)r; size > 0; size -= sizeof(char *)) - *p1++ = NULL; - } - - return(r); -} - -/* -:h3.Free() - Frees an Allocated Object - -This routine makes a sanity check to make sure the "type" field of the -standard object structure has not been cleared. If the object is -not a standard structure, then the macro "NonObjectFree" is available -that does not perform this check. - -In either case, the object must not be the NULL pointer. This preserves -portability, as the C system xiFree() will not always accept NULL. -*/ - -void -Free(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; /* structure to free */ - - if (obj->type == INVALIDTYPE) - Abort("Free of already freed object?"); - obj->type = INVALIDTYPE; - - xiFree((long *)obj); -} - -/* -:h3.Copy() - Make a New Copy of an Object - -This is the generic Copy() where the object type is unknown. There -are specific Copyxxx functions for known object types. - -Copy will create a NEW temporary object, and WILL NOT simply bump the -reference count. - -Sometimes duplicating an object is just as simple as Allocating with it -as a template. But other objects are complicated linked lists. So, we -let each module provide us a routine (or macro) that duplicates the -objects it knows about. -*/ - -static struct xobject * -t1_Copy(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be Copy'ed */ - if (obj == NULL) - return(NULL); - - if (ISPATHTYPE(obj->type)) - obj = (struct xobject *) CopyPath((struct segment *)obj); - else - switch (obj->type) { - case SPACETYPE: - obj = (struct xobject *) - CopySpace((struct XYspace *)obj); - break; - case FONTTYPE: - obj = (struct xobject *) CopyFont(obj); break; - case REGIONTYPE: - obj = (struct xobject *) - CopyRegion((struct region *)obj); - break; - case PICTURETYPE: - obj = (struct xobject *) CopyPicture(obj); break; - case LINESTYLETYPE: - obj = (struct xobject *) CopyLineStyle(obj); break; - case STROKEPATHTYPE: - obj = (struct xobject *) CopyStrokePath(obj); break; - case CLUTTYPE: - obj = (struct xobject *) CopyCLUT(obj); break; - default: - return(ArgErr("Copy: invalid object", obj, NULL)); - } - - return(obj); -} - - -/* -:h3.Permanent() - Makes an Object Permanent - -Real simple--just set a flag. Every routine that consumes its objects -(which is almost every user entry) must check this flag, and not consume -the object if it is set. - -If a temporary object is made permanent, and there is more than one -reference to it, we must first Copy() it, then set the ISPERMANENT -flag. Note also that the reference count must be incremented when an -object is changed from temporary to permanent (see the ISUNIQUE macro). - -Note that the purpose of this function is to convert an object into a -permanent object: - If it was permanent to begin with, we do nothing; - If it was temporary and unique, we set the PERMANENT flag and increment -the reference count; - If it was temporary and nonunique, we must make a unique Copy(), set -the PERMANENT flag, and set the reference count to 2. We must also -decrement the original object's reference count, because what we have -done is to change one of the old temporary handles to a permanent one. -3-26-91 PNM -*/ - -struct xobject * -t1_Permanent(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; /* object to be made permanent */ - - if ( (obj != NULL) && ( !(ISPERMANENT(obj->flag)) ) ) - { - /* there is a non-NULL, temporary object to be made permanent. - If there are multiple references to this object, first get - a new COPY(). - Note also that we have to decrement the reference count if - we do a Copy() here, because we are consuming the temporary - argument passed, and returning a unique, permanent one. - */ - if ( obj->references > 1) - { - obj = Copy(obj); - } - /* now set the permanent flag, and increment the reference - count, since a temporary object has now become permanent. */ - obj->references++; - obj->flag |= ISPERMANENT(ON); - } - return(obj); -} - -#ifdef notused -/* -:h3.Temporary() - Undoes the Effect of "Permanent()" - -This simply resets the "ISPERMANENT" flag. - -If a permanent object is made temporary, and there is more than one reference -to it, we must first Copy() it, then reset the ISPERMANENT flag. However, -if the permanent object has obly one reference, we need only decrement the -reference count ( and reset the flag). - -Note that this function, in the case of a PERMANENT argument, basically -converts the PERMANENT handle to a TEMPORARY one. Thus, in the case of -a nonunique, permanent argument passed, we not only make a Copy(), -we also decrement the reference count, to reflect the fact that we have -lost a permanent handle and gained a temporary one. -PNM 3-2-6-91 -*/ - -struct xobject * -xiTemporary(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be made permanent */ - if (obj != NULL) { - /* if it's already temporary, there's nothing to do. */ - if ISPERMANENT(obj->flag) - { - /* if there are multiple references to this object, get a - Copy we can safely alter. Recall that the reference count - is incremented for permanent objects. - Recall further that Copy returns an object with the - same flag state and a reference count of 2 (for PERMANENT - objects). - Thus, regardless of whether or not we need to copy a - permanent object, we still decrement its reference - count and reset the flag. - */ - if (obj->references != 2 || ISIMMORTAL(obj->flag)) - { - /* not unique; consume handle, get a temporary Copy! */ - obj = Copy(obj); - } - /* else decrement the reference count (since it's going from - permanent to temporary) and clear the flag. */ - else { - obj->references--; - obj->flag &= ~ISPERMANENT(ON); - } - } - } - return(obj); -} -#endif /* notused */ - -/* -:h3.Dup() - Duplicate an Object - -Dup will increment the reference count of an object, only making a -Copy() if needed. -Note that Dup() retains the state of the permanent flag. -3-26-91 PNM -*/ - - -struct xobject * -t1_Dup(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be duplicated */ - register char oldflag; /* copy of original object's flag byte */ - - if (obj == NULL) - return(NULL); - /* An immortal object must be Copy'ed, so that we get a mortal - copy of it, since we try not to destroy immortal objects. */ - if (ISIMMORTAL(obj->flag)) - return(Copy(obj)); - - /* if incrementing the reference count doesn't cause the count - to wrap, simply return the object with the count bumped. Note - that the RefRoll macro increments the count to perform the - rollover check, so we must decrement the count. */ - if (RefRoll(obj)) - return(obj); - - /* that didn't work out, so put the count back and call Copy(). */ - --obj->references; - oldflag = obj->flag; - obj = Copy(obj); - if (ISPERMANENT(oldflag)) - obj = Permanent(obj); - return(obj); -} - -/* -:h3.Destroy() - Destroys an Object - -This can get complicated. Just like with Copy(), we let the experts -handle it. -*/ -struct xobject * -Destroy(pointer objPtr) -{ - register struct xobject *obj - = (struct xobject *)objPtr; /* object to be destroyed */ - if (obj == NULL) - return(NULL); - if (ISIMMORTAL(obj->flag)) { - return(NULL); - } - if (ISPATHTYPE(obj->type)) - KillPath((struct segment *)obj); - else { - switch (obj->type) { - case REGIONTYPE: - KillRegion((struct region *)obj); - break; - case SPACETYPE: - KillSpace(obj); - break; - case LINESTYLETYPE: - KillLineStyle(obj); - break; - case FONTTYPE: - KillFont(obj); - break; - case PICTURETYPE: - KillPicture(obj); - break; - case STROKEPATHTYPE: - KillStrokePath(obj); - break; - case CLUTTYPE: - KillCLUT(obj); - break; - default: - return(ArgErr("Destroy: invalid object", obj, NULL)); - } - } - return(NULL); -} -/* -:h2.Generally Useful Macros - -:h3.FOLLOWING() - Macro to Point to the Data Following a Structure - -There are several places in TYPE1IMAGER where we will allocate variable -data that belongs to a structure immediately after that structure. -This is a performance technique, because it reduces the number of -trips we have to take through xiMalloc() and xiFree(). It turns out C has -a very convenient way to point past a structure--if 'p' is a pointer -to a structure, 'p+1' is a pointer to the data after it. This -behavior of C is somewhat startling and somewhat hard to follow, if -you are not used to it, so we define a macro to point to the data -following a structure: -*/ -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.TYPECHECK() - Verify the Type of an Argument - -This macro tests the type of an argument. If the test fails, it consumes -any other arguments as necessary and causes the imbedding routine to -return the value 'whenBAD'. - -Note that the consumeables list should be an argument list itself, for -example (0) or (2,A,B). See :hdref refid=consume. below. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.ARGCHECK() - Perform an Arbitrary Check on an Argument - -This macro is a generalization of TYPECHECK to take an arbitrary -predicate. If the error occurs (i.e., the predicate is true), the -arbitrary message 'msg' is returned. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.TYPENULLCHECK() - Extension of TYPECHECK() for NULL arguments - -Many routines allow NULLs to be passed as arguments. 'whenBAD' will -be returned in this case, too. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.MAKECONSUME() - Create a "Consume"-type Macro - -Consuming an object means destroying it if it is not permanent. This -logic is so common to all the routines, that it is immortalized in this -macro. For example, ConsumePath(p) can be simply defined as -MAKECONSUME(p,KillPath(p)). In effect, this macro operates on a -meta-level. -:i1/consuming objects/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.MAKEUNIQUE() - Create a "Unique"-type Macro - -Many routines are written to modify their arguments in place. Thus, -they want to insure that they duplicate an object if it is permanent. -This is called making an object "unique". For example, UniquePath(p) -can be simply defined as MAKEUNIQUE(p,DupPath(p)). -:i1/unique objects/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -An object is unique (and directly alterable) if there is only one -reference to it, and it is not permanent (in which case we increment -the reference count, so we don't have to check the permanent bit). -3-26-91 PNM - -Note the rules for making a unique object: -&drawing. - IF (obj->references = 1) return(obj); - ELSE (references > 1) - IF (ISPERMANENT(obj->flag)) return(Dupxxx(obj)); - ELSE (nonunique, temporary object!) - obj->references--; return(Dupxxx(obj)); -&edrawing. -If we must make a Copy of a nonunique, temporary object, we decrement -reference count of the original object! -*/ - -/* -:h3.Unique() - Make a Unique Object - -Here is a generic 'Unique' function if the object type is not known. -Why didn't we build it with the MAKEUNIQUE macro, you ask? Well, we -used to, but there is at least one damn compiler in the world that -raises errors if the types of an "(a) ? b : c" expression do not match. -Also, when we changed Dup() to retain the permanent/temporary flag, we -wanted to make sure "Unique" always returned a temporary object. - -Note that we cannot use Dup() to create a copy of the object in question, -because Dup() may simply bump the reference count, and not return a -unique copy to us. That is why we use t1_Copy(). - -The purpose of this function is to make sure we have a copy of an object -that we can safely alter: -:ol. -:li.If we have a unique, temporary object, we simply return the argument. -:li.If we have a nonunique, temporary object, we have to make a new copy -of it, and decrement the reference count of the original object, to reflect -the fact that we traded temporary handles. -:li.If we have a permanent object, we make a temporary copy of it, but -we do not decrement the reference count of the original permanent object, -because permanent objects, by definition, are persistent. 3-2-6-91 PNM -:eol. -*/ - -struct xobject * -t1_Unique(pointer objPtr) -{ - struct xobject *obj = (struct xobject *)objPtr; - - /* if the original object is not already unique, make a unique - copy...Note also that if the object was not permanent, we must - consume the old handle! 3-26-91 PNM - NOTE : consumption of the old handle moved to Allocate. 4-18-91 */ - if (!obj || obj->references == 1) - return(obj); - - obj = Copy(obj); - /* and make sure we return a temporary object ! */ - if (ISPERMANENT(obj->flag)) - { - obj->flag &= ~ISPERMANENT(ON); - obj->references--; - } - return(obj); -} - - -/* -:h2.Initialization, Error, and Debug Routines - -:h3 id=debugvar.Declarations for Debug Purposes - -We declare all the debug flags here. Some link editors make the not -unreasonable restriction that only one module may declare and -initialize global variables; all the rest must declare the variable -'extern'. This is logical, but is somewhat awkward to implement with -C include files. We solve the problem by temporarily making the name -'extern' a null name if GLOBALS is defined. (GLOBALS is only defined -in this OBJECTS module.) Since 'externs' can't be initialized, we -have to handle that with #defines too. -:i1/GLOBALS (&#define.)/ -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -static char *ErrorMessage = NULL; - -/* -:h3.Consume() - Consume a List of Arguments - -This general purpose routine is provided in the case where the object -type(s) to be consumed are unknown or not yet verified, and/or it is -not known whether the object is permanent. - -If the type of the argument is known, it is faster to directly consume -that type, for example, ConsumeRegion() or ConsumePath(). Furthermore, -if it is already known that the object is temporary, it is faster to -just kill it rather than consume it, for example, KillSpace(). -*/ - -void -Consume(int n, ...) -{ - struct xobject *obj; - va_list ap; - - va_start(ap, n); - - while (n-- > 0) { - obj = va_arg(ap, struct xobject *); - if (obj != NULL && !ISPERMANENT(obj->flag)) - Destroy(obj); - } -} - -/* -:h3.TypeErr() - Handles "Invalid Object Type" Errors -*/ - -struct xobject * -TypeErr(char *name, /* Name of routine (for error message) */ - pointer objPtr, /* Object in error */ - int expect, /* type expected */ - pointer retPtr) /* object to return to caller */ -{ - struct xobject *obj = (struct xobject *)objPtr; - struct xobject *ret = (struct xobject *)retPtr; - /* - * This buffer must be large enough to hold 'name' plus - * two of the largest strings that can be returned by TypeFmt. - * The largest value of 'name' is currently 9 ("ClosePath") - * and the longest strings in TypeFmt are 30 characters. - */ - static char typemsg[115]; - - if (MustCrash) - LineIOTrace = TRUE; - - sprintf(typemsg, "Wrong object type in %s. Expected %s; was %s.\n", - name, TypeFmt(expect), TypeFmt(obj->type)); - - if (MustCrash) - Abort("Terminating because of CrashOnUserError..."); - else - ErrorMessage = typemsg; - -/* changed ISPERMANENT to ret->references > 1 3-26-91 PNM */ - if (ret != NULL && (ret->references > 1)) - ret = Dup(ret); - return(ret); -} - -/* -:h4.TypeFmt() - Returns Pointer to English Name of Object Type - -This is a subroutine of TypeErr(). -*/ - -static char * -TypeFmt(int type) /* type field */ -{ - char *r; - - if (ISPATHTYPE(type)) - if (type == TEXTTYPE) - r = "path or region (from TextPath)"; - else - r = "path"; - else { - switch (type) { - case INVALIDTYPE: - r = "INVALID (previously consumed?)"; - break; - case REGIONTYPE: - r = "region"; - break; - case SPACETYPE: - r = "XYspace"; - break; - case LINESTYLETYPE: - r = "linestyle"; - break; - case FONTTYPE: - r = "font"; - break; - case PICTURETYPE: - r = "picture"; - break; - case STROKEPATHTYPE: - r = "path (from StrokePath)"; - break; - default: - r = "UNKNOWN"; - break; - } - } - return(r); -} -/* -:h3.ArgErr() - Invalid Argument Passed to a Routine - -A common routine to report argument errors. It is usually called -is returned to the caller in case MustCrash is FALSE and ArgErr -returns to its caller. -*/ - -struct xobject * -ArgErr(char *string, /* description of error */ - pointer objPtr, /* object, if any, that was in error */ - pointer retPtr) /* object returned to caller or NULL */ -{ - struct xobject *ret = (struct xobject *)retPtr; - - if (MustCrash) - LineIOTrace = TRUE; - - if (MustCrash) - Abort("Terminating because of CrashOnUserError..."); - else - ErrorMessage = string; - return(ret); -} - -/* -:h3.Abort() - Crash Due to Error - -Defined in objects.h to be FatalError(), the server's abort routine. -*/ - -/* -:h4.InitImager() - Initialize TYPE1IMAGER - -We check that a short is 16 bits and a long 32 bits; we have made -those assumptions elsewhere in the code. (This is almost a C standard, -anyway.) Note that TYPE1IMAGER makes no assumptions about the size of an -'int'! -:i1/portability assumptions/ -*/ - -void -InitImager(void) -{ - -/* Check to see if we have been using our own malloc. If so,*/ -/* Undef malloc so that we can get to the system call. */ -/* All other calls to malloc are defined to xiMalloc. */ - - -/* if (sizeof(short) != 2 || sizeof(INT32) != 4) - Abort("Fundamental TYPE1IMAGER assumptions invalid in this port"); -*/ - InitSpaces(); - InitFonts(); - InitFiles(); -/* -In some environments, constants and/or exception handling need to be -*/ - LibInit(); -} diff --git a/libXfont/src/Type1/objects.h b/libXfont/src/Type1/objects.h deleted file mode 100644 index ea481480e..000000000 --- a/libXfont/src/Type1/objects.h +++ /dev/null @@ -1,293 +0,0 @@ -/* $Xorg: objects.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/objects.h,v 1.14tsi Exp $ */ -/*SHARED*/ - -/*END SHARED*/ - -#include <X11/Xdefs.h> -#include <X11/Xfuncproto.h> -#ifndef FONTMODULE -#include <stdlib.h> -#endif -/*SHARED*/ - -#define Permanent(obj) t1_Permanent(obj) -#ifdef notused -#define Temporary(obj) t1_Temporary(obj) -#endif -#define Destroy(obj) t1_Destroy(obj) -#define Dup(obj) t1_Dup(obj) -#define InitImager t1_InitImager -#define TermImager t1_TermImager -#define Pragmatics(f,v) t1_Pragmatics(f,v) -#define ErrorMsg t1_ErrorMsg - -/* make an object permanent */ -extern struct xobject *t1_Permanent ( pointer obj ); - -#ifdef notused -/* make an object temporary */ -extern struct xobject *t1_Temporary( pointer obj ); -#endif - -/* destroy an object */ -extern struct xobject *t1_Destroy ( pointer obj ); - -/* duplicate an object */ -extern struct xobject *t1_Dup ( pointer obj ); - - -extern void t1_InitImager ( void ); /* initialize TYPE1IMAGER */ - -/*END SHARED*/ -/*SHARED*/ -extern void xiFree ( long *addr ); -extern char *xiMalloc ( unsigned Size ); -extern void addmemory ( long *addr, long size ); -extern void delmemory ( void ); - -#ifndef OS_H -extern void FatalError(const char *f, ...) -#if defined(__GNUC__) && \ - ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) -__attribute((noreturn)) -#endif -; - -extern void ErrorF(const char *f, ...); -#endif - -#define Abort(line) FatalError(line) -#define Allocate(n,t,s) t1_Allocate(n,t,s) -#define Free(obj) t1_Free(obj) -#define NonObjectFree(a) xiFree((long *)(a)) -#define Consume t1_Consume -#define ArgErr(s,o,r) t1_ArgErr(s,o,r) -#define TypeErr(n,o,e,r) t1_TypeErr(n,o,e,r) -#define Copy(obj) t1_Copy(obj) -#define Unique(obj) t1_Unique(obj) - -/* allocate memory */ -extern struct xobject *t1_Allocate( int size, pointer template, - int extra ); - -/* free memory */ -extern void t1_Free ( pointer obj ); - -/* make a unique temporary copy of an object */ -extern struct xobject *t1_Unique ( pointer obj ); - -/* handle argument errors */ -extern struct xobject *t1_ArgErr ( char *string, pointer obj, pointer ret ); - -/* handle 'bad type' argument errors */ -extern struct xobject *t1_TypeErr ( char *name, pointer obj, - int expect, pointer ret ); - -/* consume a variable number of arguments */ -extern void t1_Consume ( int n, ... ); - -/*END SHARED*/ -/*SHARED*/ - -#define ON (~0) /* all bits on */ -#ifndef FALSE -#define FALSE 0 /* handy zero value */ -#endif -#ifndef TRUE -#define TRUE 1 /* handy non-zero value */ -#endif - -#ifndef NULL -#include <stddef.h> -/* -The NULL pointer is system specific. (Most systems, however, use 0.) -TYPE1IMAGER could have its own NULL, independent of the rest of the system, -were it not for malloc(). The system call malloc() returns NULL when -out of memory. -:i1/portibility assumptions/ -*/ -#endif - -#ifndef MIN -#define MIN(a,b) (((a)<(b)) ? a : b) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b)) ? a : b) -#endif -#ifndef ABS -#define ABS(a) (((a)>=0)?(a):-(a)) -#endif - -/*END SHARED*/ -/*SHARED*/ - -struct xobject { - char type; /* encoded type of object */ - unsigned char flag; /* flag byte for temporary object characteristics*/ - short references; /* count of pointers to this object - (plus 1 for permanent objects) PNM */ -} ; - -/*END SHARED*/ -/*SHARED*/ - -#define XOBJ_COMMON char type; unsigned char flag; short references; - -/*END SHARED*/ -/*SHARED*/ - - -#define INVALIDTYPE 0 -#define FONTTYPE 1 -#define REGIONTYPE 3 -#define PICTURETYPE 4 -#define SPACETYPE 5 -#define LINESTYLETYPE 6 -#define EDGETYPE 7 -#define STROKEPATHTYPE 8 -#define CLUTTYPE 9 - -#define ISPATHTYPE(type) ((type)&0x10) /* all path segments have this bit on */ -#define LINETYPE (0+ISPATHTYPE(ON)) -#define CONICTYPE (1+ISPATHTYPE(ON)) -#define BEZIERTYPE (2+ISPATHTYPE(ON)) -#define HINTTYPE (3+ISPATHTYPE(ON)) - -#define MOVETYPE (5+ISPATHTYPE(ON)) -#define TEXTTYPE (6+ISPATHTYPE(ON)) - -/*END SHARED*/ -/*SHARED*/ - -#define ISPERMANENT(flag) ((flag)&0x01) -#define ISIMMORTAL(flag) ((flag)&0x02) - -/*END SHARED*/ -/*SHARED*/ - -#define PRESERVE(obj) if (!ISPERMANENT((obj)->flag)) \ - (obj)->references++; - -/*END SHARED*/ -/*SHARED*/ - -#define LONGCOPY(dest,source,bytes) { \ - register long *p1 = (long *)dest; register long *p2 = (long *)source; \ - register int count = (bytes) / sizeof(long); \ - while (--count >= 0) *p1++ = *p2++; } - - -/*END SHARED*/ -/*SHARED*/ - -#define FOLLOWING(p) ((p)+1) - -/*END SHARED*/ -/*SHARED*/ - -#define TYPECHECK(name, obj, expect, whenBAD, consumables, rettype) { \ - if (obj->type != expect) { \ - (Consume)consumables; \ - return((rettype)TypeErr(name, obj, expect, whenBAD)); \ - } \ -} - -/*END SHARED*/ -/*SHARED*/ - -#define ARGCHECK(test,msg,obj,whenBAD,consumables,rettype) { \ - if (test) { \ - (Consume)consumables; \ - return((rettype)ArgErr(msg, obj, whenBAD)); \ - } \ -} - -/*END SHARED*/ -/*SHARED*/ - -/* Changed use of Dup() below to Temporary(Copy()) because Dup() does not - necessarily return a Unique Copy anymore! 3-26-91 */ -#define TYPENULLCHECK(name, obj, expect, whenBAD, consumables,rettype) \ - if (obj == NULL) { \ - (Consume)consumables; \ - if (whenBAD != NULL && ISPERMANENT(whenBAD->flag)) \ - return((rettype)Temporary(Copy(whenBAD))); \ - else return((rettype)whenBAD); \ - } else { \ - if (obj->type != expect) { \ - (Consume)consumables; \ - return((rettype)TypeErr(name, obj, expect, whenBAD)); \ - } \ - } -/*END SHARED*/ -/*SHARED*/ - -#define MAKECONSUME(obj,stmt) { if (!ISPERMANENT(obj->flag)) stmt; } - -/*END SHARED*/ -/*SHARED*/ - -#define MAKEUNIQUE(obj,stmt) ( ( (obj)->references > 1 ) ? stmt : obj ) - -/*END SHARED*/ -/*SHARED*/ - -#ifdef GLOBALS - -#define extern -#define INITIALIZED(value) = value - -#else - -#define INITIALIZED(value) - -#endif - -extern char ProcessHints INITIALIZED(TRUE); - -extern char RegionDebug INITIALIZED(0); - -extern char Continuity INITIALIZED(2); - -#ifdef extern -#undef extern -#endif - -/* -We define other routines formatting parameters -*/ -#define DumpArea(area) t1_DumpArea(area) -#define DumpPath(path) t1_DumpPath(path) -#define DumpSpace(space) t1_DumpSpace(space) -#define DumpEdges(e) t1_DumpEdges(e) -#define FormatFP(s,p) t1_FormatFP(s,p) - -/*END SHARED*/ diff --git a/libXfont/src/Type1/paths.c b/libXfont/src/Type1/paths.c deleted file mode 100644 index b8b13646e..000000000 --- a/libXfont/src/Type1/paths.c +++ /dev/null @@ -1,748 +0,0 @@ -/* $Xorg: paths.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/paths.c,v 1.7tsi Exp $ */ - - /* PATHS CWEB V0021 ******** */ -/* -:h1 id=paths.PATHS Module - Path Operator Handler - -This is the module that is responsible for building and transforming -path lists. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - - /* after the system includes (dsr) */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" /* understands about Union */ -#include "fonts.h" /* understands about TEXTTYPEs */ -#include "pictures.h" /* understands about handles */ -#include "strokes.h" /* understands how to coerce stroke paths */ -#include "trig.h" - - -/* -:h3.Routines Available to the TYPE1IMAGER User - -The PATHS routines that are made available to the outside user are: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to Other Modules - -The path routines that are made available to other TYPE1IMAGER modules -are defined here: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -NOTE: because of the casts put in the macros for Loc, ArcCA, Conic, -RoundConic, PathSegment, and JoinSegment, we cannot use the macro names -when the functions are actually defined. We have to use the unique -names with their unique first two characters. Thus, if anyone in the -future ever decided to change the first two characters, it would not be -enough just to change the macro (as it would for most other functions). -He would have to also change the function definition. -*/ -/* -:h3.Macros Provided to Other Modules - -The CONCAT macro is defined here and used in the STROKES module. See -:hdref refid=pathmac.. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h2.Path Segment Structures - -A path is represented as a linked list of the following structure: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -When 'link' is NULL, we are at the last segment in the path (surprise!). - -'last' is only non-NULL on the first segment of a path, -for all the other segments 'last' == NULL. We test for a non-NULL -'last' (ISPATHANCHOR predicate) when we are given an alleged path -to make sure the user is not trying to pull a fast one on us. - -A path may be a collection of disjoint paths. Every break in the -disjoint path is represented by a MOVETYPE segment. - -Closed paths are discussed in :hdref refid=close.. - -:h3.CopyPath() - Physically Duplicating a Path - -This simple function illustrates moving through the path linked list. -Duplicating a segment just involves making a copy of it, except for -text, which has some auxilliary things involved. We don't feel -competent to duplicate text in this module, so we call someone who -knows how (in the FONTS module). -*/ -struct segment * -CopyPath(struct segment *p0) /* path to duplicate */ -{ - register struct segment *p,*n = NULL,*last = NULL,*anchor; - - for (p = p0, anchor = NULL; p != NULL; p = p->link) { - - ARGCHECK((!ISPATHTYPE(p->type) || (p != p0 && p->last != NULL)), - "CopyPath: invalid segment", p, NULL, (0), struct segment *); - - if (p->type == TEXTTYPE) - n = (struct segment *) CopyText(p); - else - n = (struct segment *)Allocate(p->size, p, 0); - n->last = NULL; - if (anchor == NULL) - anchor = n; - else - last->link = n; - last = n; - } -/* -At this point we have a chain of newly allocated segments hanging off -'anchor'. We need to make sure the first segment points to the last: -*/ - if (anchor != NULL) { - n->link = NULL; - anchor->last = n; - } - - return(anchor); -} -/* -:h3.KillPath() - Destroying a Path - -Destroying a path is simply a matter of freeing each segment in the -linked list. Again, we let the experts handle text. -*/ -void -KillPath(struct segment *p) /* path to destroy */ -{ - register struct segment *linkp; /* temp register holding next segment*/ - - /* return conditional based on reference count 3-26-91 PNM */ - if ( (--(p->references) > 1) || - ( (p->references == 1) && !ISPERMANENT(p->flag) ) ) - return; - - while (p != NULL) { - if (!ISPATHTYPE(p->type)) { - ArgErr("KillPath: bad segment", p, NULL); - return; - } - linkp = p->link; - if (p->type == TEXTTYPE) - KillText(p); - else - Free(p); - p = linkp; - } -} - -/* -:h2 id=location."location" Objects - -The TYPE1IMAGER user creates and destroys objects of type "location". These -objects locate points for the primitive path operators. We play a trick -here and store these objects in the same "segment" structure used for -paths, with a type field == MOVETYPE. - -This allows the Line() operator, for example, to be very trivial: -It merely stamps its input structure as a LINETYPE and returns it to the -caller--assuming, of course, the input structure was not permanent (as -it usually isn't). - -:h3.The "movesegment" Template Structure - -This template is used as a generic segment structure for Allocate: -*/ - -/* added reference field 1 to temporary template below 3-26-91 PNM */ -static struct segment movetemplate = { MOVETYPE, 0, 1, sizeof(struct segment), 0, - NULL, NULL, {0, 0} }; -/* -:h3.Loc() - Create an "Invisible Line" Between (0,0) and a Point - -*/ - -struct segment * -t1_Loc(struct XYspace *S, /* coordinate space to interpret X,Y */ - double x, double y) /* destination point */ -{ - register struct segment *r; - - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *); - - r->last = r; - r->context = S->context; - (*S->convert)(&r->dest, S, x, y); - ConsumeSpace(S); - return(r); -} -/* -:h3.ILoc() - Loc() With Integer Arguments - -*/ -struct segment * -ILoc(struct XYspace *S, /* coordinate space to interpret X,Y */ - int x, int y) /* destination point */ -{ - register struct segment *r; - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *); - - r->last = r; - r->context = S->context; - (*S->iconvert)(&r->dest, S, (long) x, (long) y); - ConsumeSpace(S); - return(r); -} - -/* -:h2.Straight Line Segments - -:h3.PathSegment() - Create a Generic Path Segment - -Many routines need a LINETYPE or MOVETYPE path segment, but do not -want to go through the external user's interface, because, for example, -they already know the "fractpel" destination of the segment and the -conversion is unnecessary. PathSegment() is an internal routine -provided to the rest of TYPE1IMAGER for handling these cases. -*/ - -struct segment * -t1_PathSegment(int type, /* LINETYPE or MOVETYPE */ - fractpel x, fractpel y) /* where to go to, if known */ -{ - register struct segment *r; /* newly created segment */ - - r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0); - r->type = type; - r->last = r; /* last points to itself for singleton */ - r->dest.x = x; - r->dest.y = y; - return(r); -} -/* -:h3.Line() - Create a Line Segment Between (0,0) and a Point P - -This involves just creating and filling out a segment structure: -*/ -struct segment * -Line(struct segment *P) /* relevant coordinate space */ -{ - ARGCHECK(!ISLOCATION(P), "Line: arg not a location", P, NULL, (0), struct segment *); - - P = UniquePath(P); - P->type = LINETYPE; - return(P); -} -/* -:h2.Curved Path Segments - -We need more points to describe curves. So, the structures for curved -path segments are slightly different. The first part is identical; -the curved structures are larger with the extra points on the end. - -:h3.Bezier Segment Structure - -We support third order Bezier curves. They are specified with four -control points A, B, C, and D. The curve starts at A with slope AB -and ends at D with slope CD. The curvature at the point A is inversely -related to the length |AB|, and the curvature at the point D is -inversely related to the length |CD|. Point A is always point (0,0). - -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Bezier() - Generate a Bezier Segment - -This is just a simple matter of filling out a 'beziersegment' structure: -*/ - -struct beziersegment * -Bezier(struct segment *B, /* second control point */ - struct segment *C, /* third control point */ - struct segment *D) /* fourth control point (ending point) */ -{ -/* added reference field of 1 to temporary template below 3-26-91 PNM */ - static struct beziersegment template = - { BEZIERTYPE, 0, 1, sizeof(struct beziersegment), 0, - NULL, NULL, { 0, 0 }, { 0, 0 }, { 0, 0 } }; - - register struct beziersegment *r; /* output segment */ - - ARGCHECK(!ISLOCATION(B), "Bezier: bad B", B, NULL, (2,C,D), struct beziersegment *); - ARGCHECK(!ISLOCATION(C), "Bezier: bad C", C, NULL, (2,B,D), struct beziersegment *); - ARGCHECK(!ISLOCATION(D), "Bezier: bad D", D, NULL, (2,B,C), struct beziersegment *); - - r = (struct beziersegment *)Allocate(sizeof(struct beziersegment), &template, 0); - r->last = (struct segment *) r; - r->dest.x = D->dest.x; - r->dest.y = D->dest.y; - r->B.x = B->dest.x; - r->B.y = B->dest.y; - r->C.x = C->dest.x; - r->C.y = C->dest.y; - - ConsumePath(B); - ConsumePath(C); - ConsumePath(D); - return(r); -} - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -POP removes the first segment in a path 'p' and Frees it. 'p' is left -pointing to the end of the path: -*/ -#define POP(p) \ - { register struct segment *linkp; \ - linkp = p->link; \ - if (linkp != NULL) \ - linkp->last = p->last; \ - Free(p); \ - p = linkp; } -/* -INSERT inserts a single segment in the middle of a chain. 'b' is -the segment before, 'p' the segment to be inserted, and 'a' the -segment after. -*/ -#define INSERT(b,p,a) b->link=p; p->link=a; p->last=NULL - -/* -:h3.Join() - Join Two Objects Together - -If these are paths, this operator simply invokes the CONCAT macro. -Why so much code then, you ask? Well we have to check for object -types other than paths, and also check for certain path consistency -rules. -*/ - -struct segment * -Join(struct segment *p1, struct segment *p2) -{ -/* -We start with a whole bunch of very straightforward argument tests: -*/ - if (p2 != NULL) { - if (!ISPATHTYPE(p2->type)) { - - if (p1 == NULL) - return((struct segment *)Unique(p2)); - - switch (p1->type) { - - case REGIONTYPE: - - case STROKEPATHTYPE: - p1 = CoercePath(p1); - break; - - default: - return((struct segment *)BegHandle(p1, p2)); - } - } - - ARGCHECK((p2->last == NULL), "Join: right arg not anchor", p2, NULL, (1,p1), struct segment *); - p2 = UniquePath(p2); - -/* -In certain circumstances, we don't have to duplicate a permanent -location. (We would just end up destroying it anyway). These cases -are when 'p2' begins with a move-type segment: -*/ - if (p2->type == TEXTTYPE || p2->type == MOVETYPE) { - if (p1 == NULL) - return(p2); - if (ISLOCATION(p1)) { - p2->dest.x += p1->dest.x; - p2->dest.y += p1->dest.y; - ConsumePath(p1); - return(p2); - } - } - } - else - return((struct segment *)Unique(p1)); - - if (p1 != NULL) { - if (!ISPATHTYPE(p1->type)) - - switch (p2->type) { - - case REGIONTYPE: - - case STROKEPATHTYPE: - p2 = CoercePath(p2); - break; - - default: - return((struct segment *)EndHandle(p1, p2)); - } - - ARGCHECK((p1->last == NULL), "Join: left arg not anchor", p1, NULL, (1,p2), struct segment *); - p1 = UniquePath(p1); - } - else - return(p2); - -/* -At this point all the checking is done. We have two temporary non-null -path types in 'p1' and 'p2'. If p1 ends with a MOVE, and p2 begins with -a MOVE, we collapse the two MOVEs into one. We enforce the rule that -there may not be two MOVEs in a row: -*/ - - if (p1->last->type == MOVETYPE && p2->type == MOVETYPE) { - p1->last->flag |= p2->flag; - p1->last->dest.x += p2->dest.x; - p1->last->dest.y += p2->dest.y; - POP(p2); - if (p2 == NULL) - return(p1); - } -/* -Now we check for another silly rule. If a path has any TEXTTYPEs, -then it must have only TEXTTYPEs and MOVETYPEs, and furthermore, -it must begin with a TEXTTYPE. This rule makes it easy to check -for the special case of text. If necessary, we will coerce -TEXTTYPEs into paths so we don't mix TEXTTYPEs with normal paths. -*/ - if (p1->type == TEXTTYPE) { - if (p2->type != TEXTTYPE && !ISLOCATION(p2)) - p1 = CoerceText(p1); - } - else { - if (p2->type == TEXTTYPE) { - if (ISLOCATION(p1)) { - p2->dest.x += p1->dest.x; - p2->dest.y += p1->dest.y; - Free(p1); - return(p2); - } - else - p2 = CoerceText(p2); - } - } -/* -Thank God! Finally! It's hard to believe, but we are now able to -actually do the join. This is just invoking the CONCAT macro: -*/ - CONCAT(p1, p2); - - return(p1); -} - -/* -:h3.JoinSegment() - Create a Path Segment and Join It to a Known Path - -This internal function is quicker than a full-fledged join because -it can do much less checking. -*/ - -struct segment * -t1_JoinSegment(struct segment *before, /* path to join before new segment */ - int type, /* type of new segment (MOVETYPE or LINETYPE) */ - fractpel x, fractpel y, /* x,y of new segment */ - struct segment *after) /* path to join after new segment */ -{ - register struct segment *r; /* returned path built here */ - - r = PathSegment(type, x, y); - if (before != NULL) { - CONCAT(before, r); - r = before; - } - else - r->context = after->context; - if (after != NULL) - CONCAT(r, after); - return(r); -} - -/* -:h2.Other Path Functions - -*/ - - -struct segment * -t1_ClosePath(struct segment *p0, /* path to close */ - int lastonly) /* flag deciding to close all subpaths or... */ -{ - register struct segment *p,*last = NULL,*start; /* used in looping through path */ - register fractpel x,y; /* current position in path */ - register fractpel firstx = 0,firsty = 0; /* start position of sub path */ - register struct segment *lastnonhint = NULL; /* last non-hint segment in path */ - - if (p0 != NULL && p0->type == TEXTTYPE) - return(UniquePath(p0)); - if (p0->type == STROKEPATHTYPE) - return((struct segment *)Unique(p0)); - /* - * NOTE: a null closed path is different from a null open path - * and is denoted by a closed (0,0) move segment. We make - * sure this path begins and ends with a MOVETYPE: - */ - if (p0 == NULL || p0->type != MOVETYPE) - p0 = JoinSegment(NULL, MOVETYPE, 0, 0, p0); - TYPECHECK("ClosePath", p0, MOVETYPE, NULL, (0), struct segment *); - if (p0->last->type != MOVETYPE) - p0 = JoinSegment(p0, MOVETYPE, 0, 0, NULL); - - p0 = UniquePath(p0); - -/* -We now begin a loop through the path, -incrementing current 'x' and 'y'. We are searching -for MOVETYPE segments (breaks in the path) that are not already closed. -At each break, we insert a close segment. -*/ - for (p = p0, x = y = 0, start = NULL; - p != NULL; - x += p->dest.x, y += p->dest.y, last = p, p = p->link) - { - - if (p->type == MOVETYPE) { - if (start != NULL && (lastonly?p->link==NULL:TRUE) && - !(ISCLOSED(start->flag) && LASTCLOSED(last->flag))) { - register struct segment *r; /* newly created */ - - start->flag |= ISCLOSED(ON); - r = PathSegment(LINETYPE, firstx - x, - firsty - y); - INSERT(last, r, p); - r->flag |= LASTCLOSED(ON); - /*< adjust 'last' if possible for a 0,0 close >*/ -{ - -#define CLOSEFUDGE 3 /* if we are this close, let's change last segment */ - - if (r->dest.x != 0 || r->dest.y != 0) { - if (r->dest.x <= CLOSEFUDGE && r->dest.x >= -CLOSEFUDGE - && r->dest.y <= CLOSEFUDGE && r->dest.y >= -CLOSEFUDGE) { - lastnonhint->dest.x += r->dest.x; - lastnonhint->dest.y += r->dest.y; - r->dest.x = r->dest.y = 0; - } - } -} - if (p->link != NULL) { - p->dest.x += x - firstx; - p->dest.y += y - firsty; - x = firstx; - y = firsty; - } - } - start = p; - firstx = x + p->dest.x; - firsty = y + p->dest.y; - } - else if (p->type != HINTTYPE) - lastnonhint = p; - } - return(p0); -} - -/* -:h2.Transforming and Putting Handles on Paths - -:h3.PathTransform() - Transform a Path - -Transforming a path involves transforming all the points. In order -that closed paths do not become "unclosed" when their relative -positions are slightly changed due to loss of arithmetic precision, -all point transformations are in absolute coordinates. - -(It might be better to reset the "absolute" coordinates every time a -move segment is encountered. This would mean that we could accumulate -error from subpath to subpath, but we would be less likely to make -the "big error" where our fixed point arithmetic "wraps". However, I -think I'll keep it this way until something happens to convince me -otherwise.) - -The transform is described as a "space", that way we can use our -old friend the "iconvert" function, which should be very efficient. -*/ - -struct segment * -PathTransform(struct segment *p0, /* path to transform */ - struct XYspace *S) /* pseudo space to transform in */ -{ - register struct segment *p; /* to loop through path with */ - register fractpel newx,newy; /* current transformed position in path */ - register fractpel oldx,oldy; /* current untransformed position in path */ - register fractpel savex,savey; /* save path delta x,y */ - - p0 = UniquePath(p0); - - newx = newy = oldx = oldy = 0; - - for (p=p0; p != NULL; p=p->link) { - - savex = p->dest.x; savey = p->dest.y; - - (*S->iconvert)(&p->dest, S, p->dest.x + oldx, p->dest.y + oldy); - p->dest.x -= newx; - p->dest.y -= newy; - - switch (p->type) { - - case LINETYPE: - case MOVETYPE: - break; - - case CONICTYPE: - { - register struct conicsegment *cp = (struct conicsegment *) p; - - (*S->iconvert)(&cp->M, S, cp->M.x + oldx, cp->M.y + oldy); - cp->M.x -= newx; - cp->M.y -= newy; - /* - * Note roundness doesn't change... linear transform - */ - break; - } - - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) p; - - (*S->iconvert)(&bp->B, S, bp->B.x + oldx, bp->B.y + oldy); - bp->B.x -= newx; - bp->B.y -= newy; - (*S->iconvert)(&bp->C, S, bp->C.x + oldx, bp->C.y + oldy); - bp->C.x -= newx; - bp->C.y -= newy; - break; - } - - case HINTTYPE: - { - register struct hintsegment *hp = (struct hintsegment *) p; - - (*S->iconvert)(&hp->ref, S, hp->ref.x + oldx, hp->ref.y + oldy); - hp->ref.x -= newx; - hp->ref.y -= newy; - (*S->iconvert)(&hp->width, S, hp->width.x, hp->width.y); - /* Note: width is not relative to origin */ - break; - } - - case TEXTTYPE: - { - XformText(p,S); - break; - } - - default: - Abort("PathTransform: invalid segment"); - } - oldx += savex; - oldy += savey; - newx += p->dest.x; - newy += p->dest.y; - } - return(p0); -} - -/* -:h3.PathDelta() - Return a Path's Ending Point -*/ - -void -PathDelta(struct segment *p, /* input path */ - struct fractpoint *pt) /* pointer to x,y to set */ -{ - struct fractpoint mypoint; /* I pass this to TextDelta */ - register fractpel x,y; /* working variables for path current point */ - - mypoint.x = mypoint.y = 0; - - for (x=y=0; p != NULL; p=p->link) { - x += p->dest.x; - y += p->dest.y; - if (p->type == TEXTTYPE) { - TextDelta(p, &mypoint); - x += mypoint.x; - y += mypoint.y; - } - } - - pt->x = x; - pt->y = y; -} - -/* -:h2.Querying Locations and Paths - -:h3.QueryLoc() - Return the X,Y of a Locition -*/ - -void -QueryLoc(struct segment *P, /* location to query, not consumed */ - struct XYspace *S, /* XY space to return coordinates in */ - double *xP, double *yP) /* coordinates returned here */ -{ - if (!ISLOCATION(P)) { - ArgErr("QueryLoc: first arg not a location", P, NULL); - return; - } - if (S->type != SPACETYPE) { - ArgErr("QueryLoc: second arg not a space", S, NULL); - return; - } - UnConvert(S, &P->dest, xP, yP); -} diff --git a/libXfont/src/Type1/paths.h b/libXfont/src/Type1/paths.h deleted file mode 100644 index 3803c530c..000000000 --- a/libXfont/src/Type1/paths.h +++ /dev/null @@ -1,205 +0,0 @@ -/* $Xorg: paths.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/paths.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ - -/*SHARED*/ - -#define Loc(S,x,y) t1_Loc(S,(double)x,(double)y) -#define ILoc(S,x,y) t1_ILoc(S,x,y) -#define Line(P) t1_Line(P) -#define Join(p1,p2) t1_Join(p1,p2) -#define ClosePath(p) t1_ClosePath(p,0) -#define CloseLastSubPath(p) t1_ClosePath(p,1) -#define Conic(B,C,s) t1_Conic(B,C,(double)s) -#define RoundConic(M,C,r) t1_RoundConic(M,C,(double)r) -#define ArcP3(S,P2,P3) t1_ArcP3(S,P2,P3) -#define ArcCA(S,C,d) t1_ArcCA(S,C,(double)d) -#define Bezier(B,C,D) t1_Bezier(B,C,D) -#define Hint(S,r,w,o,h,a,d,l) t1_Hint(S,r,w,o,h,a,d,l) -#define Reverse(p) t1_Reverse(p) -#define ReverseSubPaths(p) t1_ReverseSubPaths(p) -#define AddLoc(p1,p2) t1_Join(p1,p2) -#define SubLoc(p1,p2) t1_SubLoc(p1,p2) -#define DropSegment(p) t1_DropSegment(p) -#define HeadSegment(p) t1_HeadSegment(p) -#define QueryLoc(P,S,x,y) t1_QueryLoc(P,S,x,y) -#define QueryPath(p,t,B,C,D,r) t1_QueryPath(p,t,B,C,D,r) -#define QueryBounds(p,S,x1,y1,x2,y2) t1_QueryBounds(p,S,x1,y1,x2,y2) - - -/* create a location object (or "move" segment) */ -extern struct segment *t1_Loc ( struct XYspace *S, double x, double y ); -/* integer argument version of same */ -extern struct segment *t1_ILoc ( struct XYspace *S, int x, int y ); -/* straight line path segment */ -extern struct segment *t1_Line ( struct segment *P ); -/* join two paths or regions together */ -extern struct segment *t1_Join ( struct segment *p1, struct segment *p2 ); -/* close a path or path set */ -extern struct segment *t1_ClosePath ( struct segment *p0, int lastonly ); -#if 0 -struct conicsegment *t1_Conic(); /* conic curve path segment */ - -struct conicsegment *t1_RoundConic(); /* ditto, specified another way */ -struct conicsegment *t1_ArcP3(); /* circular path segment with three points */ -struct conicsegment *t1_ArcCA(); /* ditto, with center point and angle */ -#endif -/* Bezier third order curve path segment */ -extern struct beziersegment *t1_Bezier ( struct segment *B, struct segment *C, - struct segment *D ); -/* Query location; return its (x,y) */ -extern void t1_QueryLoc ( struct segment *P, struct XYspace *S, double *xP, - double *yP ); -/*END SHARED*/ -/*SHARED*/ - -#define CopyPath(p) t1_CopyPath(p) -#define KillPath(p) t1_KillPath(p) -#define PathTransform(p,m) t1_PathXform(p,m) -#define PathDelta(p,pt) t1_PathDelta(p,pt) -#define BoundingBox(h,w) t1_BoundingBox(h,w) -#define PathSegment(t,x,y) t1_PathSegment(t,(fractpel)x,(fractpel)y) -#define JoinSegment(b,t,x,y,a) t1_JoinSegment(b,t,(fractpel)x,(fractpel)y,a) -#define Hypoteneuse(dx,dy) t1_Hypoteneuse(dx,dy) - -/* duplicate a path */ -extern struct segment *t1_CopyPath ( struct segment *p0 ); -/* destroy a path */ -extern void t1_KillPath ( struct segment *p ); -/* transform a path arbitrarily */ -extern struct segment *t1_PathXform ( struct segment *p0, struct XYspace *S ); -/* calculate the ending point of a path */ -extern void t1_PathDelta ( struct segment *p, struct fractpoint *pt ); -/* produce a MOVE or LINE segment */ -extern struct segment *t1_PathSegment ( int type, fractpel x, fractpel y ); -/* join a MOVE or LINE segment to a path */ -extern struct segment *t1_JoinSegment ( struct segment *before, int type, fractpel x, fractpel y, struct segment *after ); - -/*END SHARED*/ -/*SHARED*/ - -#define ConsumePath(p) MAKECONSUME(p,KillPath(p)) -#define UniquePath(p) MAKEUNIQUE(p,CopyPath(p)) - -/*END SHARED*/ -/*SHARED*/ - -struct segment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - unsigned char size; /* size of the structure */ - unsigned char context; /* index to device context */ - struct segment *link; /* pointer to next structure in linked list */ - struct segment *last; /* pointer to last structure in list */ - struct fractpoint dest; /* relative ending location of path segment */ -} ; - -#define ISCLOSED(flag) ((flag)&0x80) /* subpath is closed */ -#define LASTCLOSED(flag) ((flag)&0x40) /* last segment in closed subpath */ - -/* -NOTE: The ISCLOSED flag is set on the MOVETYPE segment before the -subpath proper; the LASTCLOSED flag is set on the last segment (LINETYPE) -in the subpath - -We define the ISPATHANCHOR predicate to test that a path handle -passed by the user is valid: -*/ - -#define ISPATHANCHOR(p) (ISPATHTYPE(p->type)&&p->last!=NULL) - -/* -For performance reasons, a user's "location" object is identical to -a path whose only segment is a move segment. We define a predicate -to test for this case. See also :hdref refid=location.. -*/ - -#define ISLOCATION(p) ((p)->type == MOVETYPE && (p)->link == NULL) - -/*END SHARED*/ -/*SHARED*/ - -struct conicsegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = CONICTYPE */ - unsigned char size; /* as with any 'segment' type */ - unsigned char context; /* as with any 'segment' type */ - struct segment *link; /* as with any 'segment' type */ - struct segment *last; /* as with any 'segment' type */ - struct fractpoint dest; /* Ending point (C point) */ - struct fractpoint M; /* "midpoint" of conic explained above */ - float roundness; /* explained above */ -} ; -/*END SHARED*/ -/*SHARED*/ - -struct beziersegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = BEZIERTYPE */ - unsigned char size; /* as with any 'segment' type */ - unsigned char context; /* as with any 'segment' type */ - struct segment *link; /* as with any 'segment' type */ - struct segment *last; /* as with any 'segment' type */ - struct fractpoint dest; /* ending point (D) */ - struct fractpoint B; /* control point B */ - struct fractpoint C; /* control point C */ -} ; - -/*END SHARED*/ -/*SHARED*/ - -struct hintsegment { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = HINTTYPE */ - unsigned char size; /* size of the structure */ - unsigned char context; /* device context */ - struct segment *link; /* pointer to next structure in linked list */ - struct segment *last; /* pointer to last structure in list */ - struct fractpoint dest; /* ALWAYS 0,0 */ - struct fractpoint ref; - struct fractpoint width; - char orientation; - char hinttype; - char adjusttype; - char direction; - int label; -} ; - -/*END SHARED*/ -/*SHARED*/ - -/* -CONCAT links the 'p2' path chain on the end of the 'p1' chain. (This macro -is also used by the STROKES module.) -*/ -#define CONCAT(p1, p2) { \ - p1->last->link = p2; /* link p2 on end of p1 */ \ - p1->last = p2->last; /* last of new is last of p2 */ \ - p2->last = NULL; } /* only first segment has non-NULL "last" */ - -/*END SHARED*/ diff --git a/libXfont/src/Type1/pictures.h b/libXfont/src/Type1/pictures.h deleted file mode 100644 index 0abc715ce..000000000 --- a/libXfont/src/Type1/pictures.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Xorg: pictures.h,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/pictures.h,v 1.3 1999/08/22 08:58:53 dawes Exp $ */ - -/* STUB */ - -#define CopyPicture(p) p -#define UniquePicture(p) p -#define KillPicture(p) -#define BegHandle(o,m) o -#define EndHandle(o,m) o -#define PictureBounds(P) P - -struct picture { - struct fractpoint origin; - struct fractpoint ending; -}; - -#define Phantom(o) t1_Phantom(o) -#define Snap(o) t1_Snap(o) - -extern struct segment *t1_Phantom ( struct segment *p ); -extern struct segment *t1_Snap ( struct segment *p ); diff --git a/libXfont/src/Type1/regions.c b/libXfont/src/Type1/regions.c deleted file mode 100644 index a08682174..000000000 --- a/libXfont/src/Type1/regions.c +++ /dev/null @@ -1,1328 +0,0 @@ -/* $Xorg: regions.c,v 1.3 2000/08/17 19:46:31 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/regions.c,v 3.8tsi Exp $ */ - /* REGIONS CWEB V0023 LOTS */ -/* -:h1 id=regions.REGIONS Module - Regions Operator Handler - -This module is responsible for creating and manipulating regions. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files - -The included files are: -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -# include "os.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "curves.h" -#include "lines.h" -#include "pictures.h" -#include "fonts.h" -#include "hints.h" -#include "strokes.h" /* to pick up 'DoStroke' */ - - -static void newfilledge ( struct region *R, fractpel xmin, fractpel xmax, - fractpel ymin, fractpel ymax, int isdown ); -static struct edgelist *splitedge ( struct edgelist *list, pel y ); -static void vertjoin ( struct edgelist *top, struct edgelist *bottom ); -static int touches ( int h, pel *left, pel *right ); -static int crosses ( int h, pel *left, pel *right ); -static void edgemin ( int h, pel *e1, pel *e2 ); -static void edgemax ( int h, pel *e1, pel *e2 ); -static struct edgelist *NewEdge ( pel xmin, pel xmax, pel ymin, pel ymax, - pel *xvalues, int isdown ); -static struct edgelist *swathxsort ( struct edgelist *before0, - struct edgelist *edge ); -/* -:h3.Functions Provided to the TYPE1IMAGER User - -This module provides the following TYPE1IMAGER entry points: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Functions Provided to Other Modules - -This module provides the following entry points to other modules: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Macros Provided to Other Modules - -:h4.GOING_TO() - Macro Predicate Needed for Changing Direction, Etc. - -The actual generation of run end lists (edge boundaries) is left -to the low level rasterizing modules, LINES and CURVES. There -are some global region-type -questions that occur when doing a low-level -rasterization: -:ol. -:li.Did we just change direction in Y and therefore need to start -a new edge? -:li.Did we run out of allocated edge space? -:li.Do the minimum or maximum X values for the current edge need -updating? -:eol. -In general the REGIONS is not smart enough to answer those questions -itself. (For example, determining if and when a curve changes direction -may need detailed curve knowledge.) Yet, this must be done efficiently. -We provide a macro "GOING_TO" where the invoker tells us where it is -heading for (x2,y2), plus where it is now (x1,y1), plus the current -region under construction, and the macro answers the questions above. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h2.Data Structures Used to Represent Regions - -:h3.The "region" Structure - -The region structure is an anchor for a linked list of "edgelist" -structures (see :hdref refid=edgelist..). It also summarizes the -information in the edgelist structures (for example, the bounding -box of the region). And, it contains scratch areas used during -the creation of a region. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -The ISOPTIMIZED flag tells us if we've put a permanent region in -'optimal' form. -*/ -#define ISOPTIMIZED(flag) ((flag)&0x10) - -/* -The ISRECTANGULAR flag tells us if a region is a rectangle. We don't -always notice rectangles--if this flag is set, the region definitely -is a rectangle, but some rectangular regions will not have the flag -set. The flag is used to optimize some paths. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h4."EmptyRegion" - A Region Structure with Zero Area - -This structure is used to initialize the region to be built in -Interior(): -Note - replaced refcount = 1 init with references = 2 3-26-91 PNM -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -static struct region EmptyRegion = { REGIONTYPE, - ISPERMANENT(ON)+ISIMMORTAL(ON), 2, - {0, 0}, {0, 0}, - MAXPEL, MAXPEL, MINPEL, MINPEL, - NULL, NULL, - 0, 0, 0, 0, 0, NULL, NULL, - NULL, 0, NULL, NULL }; - -/* -:h3 id=edgelist.The "edgelist" Structure - -Regions are represented by a linked list of 'edgelist' structures. -When a region is complete, the structures are paired, one for the -left and one for the right edge. While a region is being built, -this rule may be violated temporarily. - -An 'edgelist' structure contains the X values for a given span -of Y values. The (X,Y) pairs define an edge. We use the crack -and edge coordinate system, so that integer values of X and Y -go between pels. The edge is defined between the minimum Y and -maximum Y. - -The linked list is kept sorted from top to bottom, that is, in -increasing y. Also, if 'e1' is an edgelist structure and 'e2' is the -next one in the list, they must have exactly the same ymin,ymax values -or be totally disjoint. These two requirements mean that if e2's ymin -is less than e1's ymax, it must be exactly equal to e1's ymin. A -sublist of structures with identical ymin and ymax values is called a -'swath'. - -In addition, edgelist structures are separately linked together based -on what subpath originally created them; each subpath is kept as a -separate circular linked list. This information is ignored unless -continuity checking is invoked. See :hdref refid=subpath. for a -complete description of this. -*/ - - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -The "edgelist" structure follows the convention of TYPE1IMAGER user -objects, having a type field and a flag field as the first two -elements. However, the user never sees "edgelist" structures -directly; he is given handles to "region" structures only. - -By having a type field, we can use the "copy" feature of Allocate() -to duplicate edge lists quickly. - -We also define two flag bits for this structure. The ISDOWN bit is set -if the edge is going in the direction of increasing Y. The ISAMBIGUOUS -bit is set if the edge is identical to its neighbor (edge->link); such -edges may be "left" when they should be "right", or vice versa, -unnecessarily confusing the continuity checking logic. The FixSubPaths() -routine in HINTS will swap ambiguous edges if that avoids crossing edges; -see :hdref refid=fixsubp.. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.KillRegion() - Destroys a Region - -KillRegion nominally just decrements the reference count to that region. -If the reference count becomes 0, all memory associated with it is -freed. We just follow the linked list, freeing as we go, then kill any -associated (thresholded) picture. -Note - added conditional return based on references 3-26-91 PNM -*/ - -void -KillRegion(struct region *area) /* area to free */ -{ - register struct edgelist *p; /* loop variable */ - register struct edgelist *next; /* loop variable */ - - if (area->references < 0) - Abort("KillRegion: negative reference count"); - if ( (--(area->references) > 1) || - ( (area->references == 1) && !ISPERMANENT(area->flag) ) ) - return; - - for (p=area->anchor; p != NULL; p=next) { - next = p->link; - Free(p); - } - if (area->thresholded != NULL) - KillPicture(area->thresholded); - Free(area); -} -/* -:h3.CopyRegion() - Makes a Copy of a Region -*/ -struct region * -CopyRegion(struct region *area) /* region to duplicate */ -{ - register struct region *r; /* output region built here */ - register struct edgelist *last = NULL; /* loop variable */ - register struct edgelist *p,*newp; /* loop variables */ - - r = (struct region *)Allocate(sizeof(struct region), area, 0); - r->anchor = NULL; - - for (p=area->anchor; VALIDEDGE(p); p=p->link) { - - newp = NewEdge(p->xmin, p->xmax, p->ymin, p->ymax, p->xvalues, ISDOWN(p->flag)); - if (r->anchor == NULL) - r->anchor = last = newp; - else - last->link = newp; - - last = newp; - } - if (area->thresholded != NULL) - /* replaced DupPicture with Dup() 3-26-91 PNM */ - r->thresholded = (struct picture *)Dup(area->thresholded); - return(r); -} -/* -:h4.NewEdge() - Allocates and Returns a New "edgelist" Structure - -We allocate space for the X values contiguously with the 'edgelist' -structure that locates them. That way, we only have to free the -edgelist structure to free all memory associated with it. Damn -clever, huh? -*/ - -static struct edgelist * -NewEdge(pel xmin, pel xmax, /* X extent of edge */ - pel ymin, pel ymax, /* Y extent of edge */ - pel *xvalues, /* list of X values for entire edge */ - int isdown) /* flag: TRUE means edge progresses downward */ -{ - static struct edgelist template = { - EDGETYPE, 0, 1, NULL, NULL, - 0, 0, 0, 0, NULL }; - - register struct edgelist *r; /* returned structure */ - register int iy; /* ymin adjusted for 'long' alignment purposes */ - - if (ymin >= ymax) - Abort("newedge: height not positive"); -/* -We are going to copy the xvalues into a newly allocated area. It -helps performance if the values are all "long" aligned. We can test -if the xvalues are long aligned by ANDing the address with the -(sizeof(long) - 1)--if non zero, the xvalues are not aligned well. We -set 'iy' to the ymin value that would give us good alignment: -*/ - iy = ymin - (((unsigned long)xvalues) & (sizeof(long)-1)) / sizeof(pel); - - r = (struct edgelist *)Allocate(sizeof(struct edgelist), &template, - (ymax - iy) * sizeof(pel)); - - if (isdown) r->flag = ISDOWN(ON); - r->xmin = xmin; - r->xmax = xmax; - r->ymin = ymin; - r->ymax = ymax; - - r->xvalues = (pel *) FOLLOWING(r); - if (ymin != iy) { - r->xvalues += ymin - iy; - xvalues -= ymin - iy; - } - -/* -We must round up (ymax - iy) so we get the ceiling of the number of -longs. The destination must be able to hold these extra bytes because -Allocate() makes everything it allocates be in multiples of longs. -*/ - LONGCOPY(&r[1], xvalues, (ymax - iy) * sizeof(pel) + sizeof(long) - 1); - - return(r); -} - -/* -:h3 id=discard.discard() - Discard All Edges Between Two Edges - -At first glance it would seem that we could discard an edgelist -structure merely by unlinking it from the list and freeing it. You are -wrong, region-breath! For performance, the X values associated with an -edge are allocated contiguously with it. So, we free the X values when -we free a structure. However, once an edge has been split, we are no -longer sure which control block actually is part of the memory block -that contains the edges. Rather than trying to decide, we play it safe -and never free part of a region. - -So, to mark a 'edgelist' structure as discarded, we move it to the end -of the list and set ymin=ymax. -*/ - -static void -discard(struct edgelist *left, /* all edges between here exclusive */ - struct edgelist *right) /* should be discarded */ -{ - register struct edgelist *beg,*end,*p; - - beg = left->link; - if (beg == right) - return; - - for (p = beg; p != right; p = p->link) { - if (p->link == NULL && right != NULL) - Abort("discard(): ran off end"); - p->ymin = p->ymax = 32767; - end = p; - } - /* - * now put the chain beg/end at the end of right, if it is not - * already there: - */ - if (right != NULL) { - left->link = right; - while (right->link != NULL) - right = right->link; - right->link = beg; - } - end->link = NULL; -} - -/* -:h4.Unwind() - Discards Edges That Fail the Winding Rule Test - -The winding rule says that upward going edges should be paired with -downward going edges only, and vice versa. So, if two upward edges -or two downward edges are nominally left/right pairs, Unwind() should -discard the second one. Everything should balance; we should discard -an even number of edges; of course, we abort if we don't. -*/ -static void -Unwind(struct edgelist *area) /* input area modified in place */ -{ - register struct edgelist *last = NULL,*next; /* struct before and after current one */ - register int y; /* ymin of current swath */ - register int count,newcount; /* winding count registers */ - - while (VALIDEDGE(area)) { - - count = 0; - y = area->ymin; - - do { - next = area->link; - - if (ISDOWN(area->flag)) - newcount = count + 1; - else - newcount = count - 1; - - if (count == 0 || newcount == 0) - last = area; - else - discard(last, next); - - count = newcount; - area = next; - - } while (area != NULL && area->ymin == y); - - if (count != 0) - Abort("Unwind: uneven edges"); - } -} -/* -:h2.Building Regions - -:h3.Interior() - Iterate Through a Path, Building a Region - -This routine is the workhorse driver routine that iterates through a -path, calling the appropriate stepping routines to actually produce the -run end "edgelist" structures. - -:ol. -:li."Interior" calls StepLine or StepConic or StepBezier as appropriate -to produce run ends. -:li.Occasionally these routines will notice a change in Y direction -and will call ChangeDirection (through the GOING_TO macro); this is -a call back to the REGIONS module. -:li.ChangeDirection will call whatever function is in the region -structure; for Interior, this function is 'newfilledge'. -:li.Newfilledge will call NewEdge to create a new edgelist structure, -then, call SortSwath to sort it onto the linked list being built at -the region "anchor". -:eol. - -By making the function called by ChangeDirection be a parameter of the -region, we allow the same ChangeDirection logic to be used by stroking. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -struct region * -Interior(struct segment *p, /* take interior of this path */ - int fillrule) /* rule to follow if path crosses itself */ -{ - register fractpel x,y; /* keeps ending point of path segment */ - fractpel lastx,lasty; /* previous x,y from path segment before */ - register struct region *R; /* region I will build */ - register struct segment *nextP; /* next segment of path */ - struct fractpoint hint; /* accumulated hint value */ - char tempflag; /* flag; is path temporary? */ - char Cflag; /* flag; should we apply continuity? */ - - if (p == NULL) - return(NULL); -/* -Establish the 'Cflag' continuity flag based on user's fill rule and -our own 'Continuity' pragmatic (0: never do continuity, 1: do what -user asked, >1: do it regardless). -*/ - if (fillrule > 0) { - Cflag = Continuity > 0; - fillrule -= CONTINUITY; - } - else - Cflag = Continuity > 1; - - ARGCHECK((fillrule != WINDINGRULE && fillrule != EVENODDRULE), - "Interior: bad fill rule", NULL, NULL, (1,p), struct region *); - - if (p->type == TEXTTYPE) -/* if (fillrule != EVENODDRULE) - else */ - return((struct region *)UniquePath(p)); - if (p->type == STROKEPATHTYPE) { - if (fillrule == WINDINGRULE) - return((struct region *)DoStroke(p)); - else - p = CoercePath(p); - } - - R = (struct region *)Allocate(sizeof(struct region), &EmptyRegion, 0); - - ARGCHECK(!ISPATHANCHOR(p), "Interior: bad path", p, R, (0), struct region *); - ARGCHECK((p->type != MOVETYPE), "Interior: path not closed", p, R, (0), struct region *); - - -/* changed definition from !ISPERMANENT to references <= 1 3-26-91 PNM */ - tempflag = (p->references <= 1); /* only first segment in path is so marked */ - if (!ISPERMANENT(p->flag)) p->references -= 1; - - R->newedgefcn = newfilledge; -/* -Believe it or not, "R" is now completely initialized. We are counting -on the copy of template to get other fields the way we want them, -namely -:ol. -:li.anchor = NULL -:li.xmin, ymin, xmax, ymax, to minimum and maximum values respectively. -:eol. -Anchor = NULL is very -important to ChangeDirection. -See :hdref refid=CD.. - -To minimize problems of "wrapping" in our pel arithmetic, we keep an -origin of the region which is the first move. Hopefully, that keeps -numbers within plus or minus 32K pels. -*/ - R->origin.x = 0/*TOFRACTPEL(NEARESTPEL(p->dest.x))*/; - R->origin.y = 0/*TOFRACTPEL(NEARESTPEL(p->dest.y))*/; - lastx = - R->origin.x; - lasty = - R->origin.y; -/* -ChangeDirection initializes other important fields in R, such as -lastdy, edge, edgeYstop, edgexmin, and edgexmax. The first segment -is a MOVETYPE, so it will be called first. -*/ -/* -The hints data structure must be initialized once for each path. -*/ - - if (ProcessHints) - InitHints(); /* initialize hint data structure */ - - while (p != NULL) { - - x = lastx + p->dest.x; - y = lasty + p->dest.y; - - nextP = p->link; - -/* -Here we start the hints processing by initializing the hint value to -zero. If ProcessHints is FALSE, the value will remain zero. -Otherwise, hint accumulates the computed hint values. -*/ - - hint.x = hint.y = 0; - -/* -If we are processing hints, and this is a MOVE segment (other than -the first on the path), we need to close (reverse) any open hints. -*/ - - if (ProcessHints) - if ((p->type == MOVETYPE) && (p->last == NULL)) { - CloseHints(&hint); - } - -/* -Next we run through all the hint segments (if any) attached to this -segment. If ProcessHints is TRUE, we will accumulate computed hint -values. In either case, nextP will be advanced to the first non-HINT -segment (or NULL), and each hint segment will be freed if necessary. -*/ - - while ((nextP != NULL) && (nextP->type == HINTTYPE)) { - if (ProcessHints) - ProcessHint((struct hintsegment *)nextP, - x + hint.x, y + hint.y, &hint); - - { - register struct segment *saveP = nextP; - - nextP = nextP->link; - if (tempflag) - Free(saveP); - } - } - -/* -We now apply the full hint value to the ending point of the path segment. -*/ - - x += hint.x; - y += hint.y; - - switch(p->type) { - - case LINETYPE: - StepLine(R, lastx, lasty, x, y); - break; - - case CONICTYPE: - { - -/* -For a conic curve, we apply half the hint value to the conic midpoint. -*/ - - } - break; - - case BEZIERTYPE: - { - register struct beziersegment *bp = (struct beziersegment *) p; - -/* -For a Bezier curve, we apply the full hint value to the Bezier C point. -*/ - - StepBezier(R, lastx, lasty, - lastx + bp->B.x, lasty + bp->B.y, - lastx + bp->C.x + hint.x, - lasty + bp->C.y + hint.y, - x, y); - } - break; - - case MOVETYPE: -/* -At this point we have encountered a MOVE segment. This breaks the -path, making it disjoint. -*/ - if (p->last == NULL) /* i.e., not first in path */ - ChangeDirection(CD_LAST, R, lastx, lasty, (fractpel) 0); - - ChangeDirection(CD_FIRST, R, x, y, (fractpel) 0); -/* -We'll just double check for closure here. We forgive an appended -MOVETYPE at the end of the path, if it isn't closed: -*/ - if (!ISCLOSED(p->flag) && p->link != NULL) - return((struct region *)ArgErr("Fill: sub-path not closed", p, NULL)); - break; - - default: - Abort("Interior: path type error"); - } -/* -We're done with this segment. Advance to the next path segment in -the list, freeing this one if necessary: -*/ - lastx = x; lasty = y; - - if (tempflag) - Free(p); - p = nextP; - } - ChangeDirection(CD_LAST, R, lastx, lasty, (fractpel) 0); - R->ending.x = lastx; - R->ending.y = lasty; -/* -Finally, clean up the region's based on the user's 'fillrule' request: -*/ - if (Cflag) - ApplyContinuity(R); - if (fillrule == WINDINGRULE) - Unwind(R->anchor); - return(R); -} -/* -:h3."workedge" Array - -This is a statically allocated array where edges are built -before being copied into more permanent storage by NewEdge(). -*/ - -#ifndef MAXEDGE -#define MAXEDGE 1000 -#endif - -static pel workedge[MAXEDGE]; -static pel *currentworkarea = workedge; -static pel currentsize = MAXEDGE; - -/* -:h3 id=cd.ChangeDirection() - Called When Y Direction Changes - -The rasterizing routines call this entry point when they detect -a change in Y. We then build the current edge and sort it into -emerging edgelist at 'anchor' by calling whatever "newedgefcn" -is appropriate. -*/ - -void -ChangeDirection(int type, /* CD_FIRST, CD_CONTINUE, or CD_LAST */ - struct region *R, /* region in which we are changing direction */ - fractpel x, fractpel y, /* current beginning x,y */ - fractpel dy) /* direction and magnitude of change in y */ -{ - register fractpel ymin,ymax; /* minimum and maximum Y since last call */ - register pel iy; /* nearest integer pel to 'y' */ - register pel idy; /* nearest integer pel to 'dy' */ - register int ydiff; /* allowed Y difference in 'currentworkarea' */ - - if (type != CD_FIRST) { - - if (R->lastdy > 0) { - ymin = R->firsty; - ymax = y; - } - else { - ymin = y; - ymax = R->firsty; - } - - if (ymax < ymin) - Abort("negative sized edge?"); - - - (*R->newedgefcn)(R, R->edgexmin, R->edgexmax, ymin, ymax, - R->lastdy > 0); - - } - - R->firsty = y; - R->firstx = x; - R->lastdy = dy; - - iy = NEARESTPEL(y); - idy = NEARESTPEL(dy); - if (currentworkarea != workedge && idy < MAXEDGE && idy > -MAXEDGE) { - NonObjectFree(currentworkarea); - currentworkarea = workedge; - currentsize = MAXEDGE; - } - ydiff = currentsize - 1; - if (dy > 0) { - R->edge = ¤tworkarea[-iy]; - R->edgeYstop = TOFRACTPEL(ydiff + iy) + FPHALF; - } - else { - R->edge = ¤tworkarea[ydiff - iy]; - R->edgeYstop = TOFRACTPEL(iy - ydiff) - FPHALF; - } - R->edgexmax = R->edgexmin = x; -/* -If this is the end of a subpath, we complete the subpath circular -chain: -*/ - if (type == CD_LAST && R->lastedge != NULL) { - register struct edgelist *e = R->firstedge; - - while (e->subpath != NULL) - e = e->subpath; - e->subpath = R->lastedge; - R->lastedge = R->firstedge = NULL; - } -} - -/* -:h2.Sorting Edges - -:h3.SortSwath() - Vertically Sort an Edge into a Region - -This routine sorts an edge or a pair of edges into a growing region, -so that the region maintains its top-to-bottom, left-to-right form. -The rules for sorting horizontally may vary depending on what you -are doing, but the rules for vertical sorting are always the same. -This routine is passed an argument that is a function that will -perform the horizontal sort on demand (for example, swathxsort() or -SwathUnion()). - -This is a recursive routine. A new edge (or edge pair) may overlap -the list I am building in strange and wonderful ways. Edges may -cross. When this happens, my strategy is to split the incoming edge -(or the growing list) in two at that point, execute the actual sort on -the top part of the split, and recursively call myself to figure out -exactly where the bottom part belongs. -*/ - -#define TOP(e) ((e)->ymin) /* the top of an edge (for readability */ -#define BOTTOM(e) ((e)->ymax) /* the bottom of an edge (for readability */ - -static struct edgelist * -SortSwath(struct edgelist *anchor, /* list being built */ - struct edgelist *edge, /* incoming edge or pair of edges */ - SwathFunc swathfcn) /* horizontal sorter */ -{ - register struct edgelist *before,*after; - struct edgelist base; - - if (anchor == NULL) - return(edge); - - before = &base; - before->ymin = before->ymax = MINPEL; - before->link = after = anchor; - -/* -If the incoming edge is above the current list, we connect the current -list to the bottom of the incoming edge. One slight complication is -if the incoming edge overlaps into the current list. Then, we -first split the incoming edge in two at the point of overlap and recursively -call ourselves to sort the bottom of the split into the current list: -*/ - if (TOP(edge) < TOP(after)) { - if (BOTTOM(edge) > TOP(after)) { - - after = SortSwath(after, splitedge(edge, TOP(after)), swathfcn); - } - vertjoin(edge, after); - return(edge); - } -/* -At this point the top of edge is not higher than the top of the list, -which we keep in 'after'. We move the 'after' point down the list, -until the top of the edge occurs in the swath beginning with 'after'. - -If the bottom of 'after' is below the bottom of the edge, we have to -split the 'after' swath into two parts, at the bottom of the edge. -If the bottom of 'after' is above the bottom of the swath, -*/ - - while (VALIDEDGE(after)) { - - if (TOP(after) == TOP(edge)) { - if (BOTTOM(after) > BOTTOM(edge)) - vertjoin(after, splitedge(after, BOTTOM(edge))); - else if (BOTTOM(after) < BOTTOM(edge)) { - after = SortSwath(after, - splitedge(edge, BOTTOM(after)), swathfcn); - } - break; - } - else if (TOP(after) > TOP(edge)) { - if (BOTTOM(edge) > TOP(after)) { - after = SortSwath(after, - splitedge(edge, TOP(after)), swathfcn); - } - break; - } - else if (BOTTOM(after) > TOP(edge)) - vertjoin(after, splitedge(after, TOP(edge))); - - before = after; - after = after->link; - } - -/* -At this point 'edge' exactly corresponds in height to the current -swath pointed to by 'after'. -*/ - if (after != NULL && TOP(after) == TOP(edge)) { - before = (*swathfcn)(before, edge); - after = before->link; - } -/* -At this point 'after' contains all the edges after 'edge', and 'before' -contains all the edges before. Whew! A simple matter now of adding -'edge' to the linked list in its rightful place: -*/ - before->link = edge; - if (RegionDebug > 1) { - while (edge->link != NULL) { - edge = edge->link; - } - } - else - for (; edge->link != NULL; edge = edge->link) { ; } - - edge->link = after; - return(base.link); -} - -/* -:h3 id=newfill.newfilledge() - Called When We Have a New Edge While Filling - -This is the prototypical "newedge" function passed to "Rasterize" and -stored in "newedgefcn" in the region being built. - -If the edge is non-null, we sort it onto the list of edges we are -building at "anchor". - -This function also has to keep the bounding box of the region -up to date. -*/ - -static void -newfilledge(struct region *R, /* region being built */ - fractpel xmin, fractpel xmax, /* X range of this edge */ - fractpel ymin, fractpel ymax, /* Y range of this edge */ - int isdown) /* flag: TRUE means edge goes down, else up */ -{ - - register pel pelxmin,pelymin,pelxmax,pelymax; /* pel versions of bounds */ - register struct edgelist *edge; /* newly created edge */ - - pelymin = NEARESTPEL(ymin); - pelymax = NEARESTPEL(ymax); - if (pelymin == pelymax) - return; - - pelxmin = NEARESTPEL(xmin); - pelxmax = NEARESTPEL(xmax); - - if (pelxmin < R->xmin) R->xmin = pelxmin; - if (pelxmax > R->xmax) R->xmax = pelxmax; - if (pelymin < R->ymin) R->ymin = pelymin; - if (pelymax > R->ymax) R->ymax = pelymax; - - edge = NewEdge(pelxmin, pelxmax, pelymin, pelymax, &R->edge[pelymin], isdown); - edge->subpath = R->lastedge; - R->lastedge = edge; - if (R->firstedge == NULL) - R->firstedge = edge; - - R->anchor = SortSwath(R->anchor, edge, swathxsort); - -} - -/* -:h3.splitedge() - Split an Edge or Swath in Two at a Given Y Value - -This function returns the edge or swath beginning at the Y value, and -is guaranteed not to change the address of the old swath while splitting -it. -*/ - -static struct edgelist * -splitedge(struct edgelist *list, /* area to split */ - pel y) /* Y value to split list at */ -{ - register struct edgelist *new; /* anchor for newly built list */ - register struct edgelist *last = NULL; /* end of newly built list */ - register struct edgelist *r; /* temp pointer to new structure */ - register struct edgelist *lastlist; /* temp pointer to last 'list' value */ - - lastlist = new = NULL; - - while (list != NULL) { - if (y < list->ymin) - break; - if (y >= list->ymax) - Abort("splitedge: above top of list"); - if (y == list->ymin) - Abort("splitedge: would be null"); - - r = (struct edgelist *)Allocate(sizeof(struct edgelist), list, 0); -/* -At this point 'r' points to a copy of the single structure at 'list'. -We will make 'r' be the new split 'edgelist'--the lower half. -We don't bother to correct 'xmin' and 'xmax', we'll take the -the pessimistic answer that results from using the old values. -*/ - r->ymin = y; - r->xvalues = list->xvalues + (y - list->ymin); -/* -Note that we do not need to allocate new memory for the X values, -they can remain with the old "edgelist" structure. We do have to -update that old structure so it is not as high: -*/ - list->ymax = y; -/* -Insert 'r' in the subpath chain: -*/ - r->subpath = list->subpath; - list->subpath = r; -/* -Now attach 'r' to the list we are building at 'new', and advance -'list' to point to the next element in the old list: -*/ - if (new == NULL) - new = r; - else - last->link = r; - last = r; - lastlist = list; - list = list->link; - } -/* -At this point we have a new list built at 'new'. We break the old -list at 'lastlist', and add the broken off part to the end of 'new'. -Then, we return the caller a pointer to 'new': -*/ - if (new == NULL) - Abort("null splitedge"); - lastlist->link = NULL; - last->link = list; - return(new); -} - -/* -:h3.vertjoin() - Join Two Disjoint Edge Lists Vertically - -The two edges must be disjoint vertically. -*/ -static void vertjoin(top, bottom) - register struct edgelist *top; /* uppermost region */ - register struct edgelist *bottom; /* bottommost region */ -{ - if (BOTTOM(top) > TOP(bottom)) - Abort("vertjoin not disjoint"); - - for (; top->link != NULL; top=top->link) { ; } - - top->link = bottom; - return; -} - -/* -:h3.swathxsort() - Sorting by X Values - -We need to sort 'edge' into its rightful -place in the swath by X value, taking care that we do not accidentally -advance to the next swath while searching for the correct X value. Like -all swath functions, this function returns a pointer to the edge -BEFORE the given edge in the sort. -*/ - -static struct edgelist * -swathxsort(struct edgelist *before0, /* edge before this swath */ - struct edgelist *edge) /* input edge */ -{ - register struct edgelist *before; - register struct edgelist *after; - register pel y = 0; - - before = before0; - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - - register pel *x1,*x2; - - y = TOP(edge); - x1 = after->xvalues; - x2 = edge->xvalues; - - while (y < BOTTOM(edge) && *x1 == *x2) { - x1++; x2++; y++; - } - if (y >= BOTTOM(edge)) { - edge->flag |= ISAMBIGUOUS(ON); - after->flag |= ISAMBIGUOUS(ON); - break; - } - - if (*x1 >= *x2) - break; - - before = after; - after = after->link; - } - -/* -At this point, 'edge' is between 'before' and 'after'. If 'edge' didn't -cross either of those other edges, we would be done. We check for -crossing. If it does cross, we split the problem up by calling SortSwath -recursively with the part of the edge that is below the crossing point: -*/ -{ - register int h0,h; /* height of edge--number of scans */ - - h0 = h = BOTTOM(edge) - y; - y -= TOP(edge); - - if (h0 <= 0) { - return(before); - } - - if (TOP(before) == TOP(edge)) - h -= crosses(h, &before->xvalues[y], &edge->xvalues[y]); - if (after != NULL && TOP(after) == TOP(edge)) - h -= crosses(h, &edge->xvalues[y], &after->xvalues[y]); - - if (h < h0) { - SortSwath(before0->link, - splitedge(edge, TOP(edge) + y + h), - swathxsort); - - } -} - - return(before); -} -/* -:h3.SwathUnion() - Union Two Edges by X Value - -We have a left and right edge that must be unioned into a growing -swath. If they are totally disjoint, they are just added in. The -fun comes in they overlap the existing edges. Then some edges -will disappear. -*/ - -static struct edgelist * -SwathUnion(struct edgelist *before0, /* edge before the swath */ - struct edgelist *edge) /* list of two edges to be unioned */ -{ - register int h; /* saves height of edge */ - register struct edgelist *rightedge; /* saves right edge of 'edge' */ - register struct edgelist *before,*after; /* edge before and after */ - int h0; /* saves initial height */ - - h0 = h = edge->ymax - edge->ymin; - if (h <= 0) - Abort("SwathUnion: 0 height swath?"); - - before = before0; - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - register struct edgelist *right; - - right = after->link; - if (right->xvalues[0] >= edge->xvalues[0]) - break; - before = right; - after = before->link; - } -/* -This is the picture at this point. 'L' indicates a left hand edge, -'R' indicates the right hand edge. -'<--->' indicates the degree of uncertainty as to its placement -relative to other edges: -:xmp atomic. - before after - R <---L----> R L R L R - <---L---> <------R--------------------------> - edge -:exmp. -In case the left of 'edge' touches 'before', we need to reduce -the height by that amount. -*/ - if (TOP(before) == TOP(edge)) - h -= touches(h, before->xvalues, edge->xvalues); - - rightedge = edge->link; - - if (after == NULL || TOP(after) != TOP(edge) || - after->xvalues[0] > rightedge->xvalues[0]) { -/* -On this side of the the above 'if', the new edge is disjoint from the -existing edges in the swath. This is the picture: -:xmp atomic. - before after - R L R L R L R - L R - edge -:exmp. -We will verify it remains disjoint for the entire height. If the -situation changes somewhere down the edge, we split the edge at that -point and recursively call ourselves (through 'SortSwath') to figure -out the new situation: -*/ - if (after != NULL && TOP(after) == TOP(edge)) - h -= touches(h, rightedge->xvalues, after->xvalues); - if (h < h0) - SortSwath(before0->link, splitedge(edge, edge->ymin + h), t1_SwathUnion); - /* go to "return" this edge pair; it is totally disjoint */ - } - else { -/* -At this point, at the 'else', we know that the -new edge overlaps one or more pairs in the existing swath. Here is -a picture of our knowledge and uncertainties: -:xmp atomic. - before after - R L R L R L R - <---L---> <---R-------------------> - edge -:exmp. -We need to move 'after' along until it is to the right of the -right of 'edge'. ('After' should always point to a left edge of a pair:) -*/ - register struct edgelist *left; /* variable to keep left edge in */ - - do { - left = after; - after = (after->link)->link; - - } while (after != NULL && TOP(after) == TOP(edge) - && after->xvalues[0] <= rightedge->xvalues[0]); -/* -At this point this is the picture: -:xmp atomic. - before left after - R L R L R L R - <---L---> <---R---> - edge -:exmp. -We need to verify that the situation stays like this all the way -down the edge. Again, if the -situation changes somewhere down the edge, we split the edge at that -point and recursively call ourselves (through 'SortSwath') to figure -out the new situation: -*/ - - h -= crosses(h, left->xvalues, rightedge->xvalues); - h -= crosses(h, edge->xvalues, ((before->link)->link)->xvalues); - - if (after != NULL && TOP(after) == TOP(edge)) - - h -= touches(h, rightedge->xvalues, after->xvalues); - -/* -OK, if we touched either of our neighbors we need to split at that point -and recursively sort the split edge onto the list. One tricky part -is that when we recursively sort, 'after' will change if it was not -in our current swath: -*/ - if (h < h0) { - SortSwath(before0->link, - splitedge(edge, edge->ymin + h), - t1_SwathUnion); - - if (after == NULL || TOP(after) != TOP(edge)) - for (after = before0->link; - TOP(after) == TOP(edge); - after = after->link) { ; } - } -/* -Now we need to augment 'edge' by the left and right of the overlapped -swath, and to discard all edges between before and after, because they -were overlapped and have been combined with the new incoming 'edge': -*/ - edge->xmin = MIN(edge->xmin, (before->link)->xmin); - edge->xmax = MIN(edge->xmax, (before->link)->xmax); - edgemin(h, edge->xvalues, (before->link)->xvalues); - rightedge->xmin = MAX(rightedge->xmin, (left->link)->xmin); - rightedge->xmax = MAX(rightedge->xmax, (left->link)->xmax); - edgemax(h, rightedge->xvalues, (left->link)->xvalues); - discard(before, after); - } - return(before); -} -#ifdef notused -/* -:h3.swathrightmost() - Simply Sorts New Edge to Rightmost of Swath - -Like all swath functions, this function returns a pointer to the edge -BEFORE the given edge in the sort. -*/ - -static struct edgelist * -swathrightmost(struct edgelist *before, /* edge before this swath */ - struct edgelist *edge) /* input edge */ -{ - register struct edgelist *after; - - after = before->link; - - while (after != NULL && TOP(after) == TOP(edge)) { - before = after; - after = after->link; - } - - return(before); - -} -#endif -/* -:h3.touches() - Returns the Remaining Height When Two Edges Touch - -So, it will return 0 if they never touch. Allows incredibly(?) mnemonic -if (touches(...)) construct. -*/ - -static int -touches(int h, pel *left, pel *right) -{ - for (; h > 0; h--) - if (*left++ >= *right++) - break; - return(h); -} -/* -:h3.crosses() - Returns the Remaining Height When Two Edges Cross - -So, it will return 0 if they never cross. -*/ - -static int -crosses(int h, pel *left, pel *right) -{ - for (; h > 0; h--) - if (*left++ > *right++) - break; - return(h); -} -/* -:h3.edgemin() - Stores the Mininum of Two Edges in First Edge -*/ - -static void -edgemin(int h, pel *e1, pel *e2) -{ - for (; --h >= 0; e1++,e2++) - if (*e1 > *e2) - *e1 = *e2; -} -/* -:h3.edgemax() - Stores the Maximum of Two Edges in First Edge -*/ - -static void -edgemax(int h, pel *e1, pel *e2) -{ - for (; --h >= 0; e1++,e2++) - if (*e1 < *e2) - *e1 = *e2; -} - -/* -:h2.Miscelaneous Routines - -:h3.MoreWorkArea() - Allocate New Space for "edge" - -Our strategy is to temporarily allocate an array to hold this -unexpectedly large edge. ChangeDirection frees this array any time -it gets a shorter 'dy'. -*/ - -/*ARGSUSED*/ -void -MoreWorkArea(struct region *R, /* region we are generating */ - fractpel x1, fractpel y1, /* starting point of line */ - fractpel x2, fractpel y2) /* ending point of line */ -{ - register int idy; /* integer dy of line */ - - idy = NEARESTPEL(y1) - NEARESTPEL(y2); - if (idy < 0) idy = - idy; - - /* - * we must add one to the delta for the number of run ends we - * need to store: - */ - if (++idy > currentsize) { - if (currentworkarea != workedge) - NonObjectFree(currentworkarea); - currentworkarea = (pel *)Allocate(0, NULL, idy * sizeof(pel)); - currentsize = idy; - } - ChangeDirection(CD_CONTINUE, R, x1, y1, y2 - y1); -} diff --git a/libXfont/src/Type1/regions.h b/libXfont/src/Type1/regions.h deleted file mode 100644 index d869cf7e1..000000000 --- a/libXfont/src/Type1/regions.h +++ /dev/null @@ -1,224 +0,0 @@ -/* $Xorg: regions.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/regions.h,v 1.7 2001/01/17 19:43:23 dawes Exp $ */ -/*SHARED*/ - -#define Interior(p,rule) t1_Interior(p,rule) -#define Union(a1,a2) t1_Union(a1,a2) -#define Intersect(a1,a2) t1_Intersect(a1,a2) -#define Complement(area) t1_Complement(area) -#define Overlap(a1,a2) t1_OverLap(a1,a2) - - -/* returns the interior of a closed path */ -extern struct region *t1_Interior ( struct segment *p, int fillrule ); -#if 0 -struct region *t1_Union(); /* set union of paths or regions */ -struct region *t1_Intersect(); /* set intersection of regions */ -struct region *t1_Complement(); /* complement of a region */ -int t1_Overlap(); /* returns a Boolean; TRUE if regions overlap */ -#endif - -#define TT_INFINITY t1_Infinity - -/*END SHARED*/ -/*SHARED*/ - -#define ChangeDirection(type,R,x,y,dy) t1_ChangeDirection(type,R,x,y,dy) - -/* called when we change direction in Y */ -extern void t1_ChangeDirection ( int type, struct region *R, fractpel x, - fractpel y, fractpel dy ); -#define CD_FIRST -1 /* enumeration of ChangeDirection type */ -#define CD_CONTINUE 0 /* enumeration of ChangeDirection type */ -#define CD_LAST 1 /* enumeration of ChangeDirection type */ - -#define MoreWorkArea(R,x1,y1,x2,y2) t1_MoreWorkArea(R,x1,y1,x2,y2) -#define KillRegion(area) t1_KillRegion(area) -#define CopyRegion(area) t1_CopyRegion(area) -#define BoxClip(R,xmin,ymin,xmax,ymax) t1_BoxClip(R,xmin,ymin,xmax,ymax) -#define SortSwath(a,p,f) t1_SortSwath(a,p,f) -#define SwathUnion(b,e) t1_SwathUnion(b,e) -#define RegionBounds(r) t1_RegionBounds(r) -#define CoerceRegion(p) t1_CoerceRegion(p) -#define MoveEdges(R,dx,dy) t1_MoveEdges(R,dx,dy) -#define UnJumble(R) t1_UnJumble(R) - -typedef struct edgelist *(*SwathFunc)(struct edgelist *, struct edgelist *); - -/* get longer edge list for stepping */ -extern void t1_MoreWorkArea ( struct region *R, fractpel x1, fractpel y1, - fractpel x2, fractpel y2 ); -/* duplicate a region */ -extern struct region *t1_CopyRegion ( struct region *area ); -/* destroy a region */ -extern void t1_KillRegion ( struct region *area ); - -/*END SHARED*/ -/*SHARED*/ - -#define GOING_TO(R, x1, y1, x2, y2, dy) { \ - if (dy < 0) { \ - if (R->lastdy >= 0) \ - ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (y2 < R->edgeYstop) \ - MoreWorkArea(R, x1, y1, x2, y2); \ - } \ - else if (dy > 0) { \ - if (R->lastdy <= 0) \ - ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (y2 > R->edgeYstop) \ - MoreWorkArea(R, x1, y1, x2, y2); \ - } \ - else /* dy == 0 */ ChangeDirection(CD_CONTINUE, R, x1, y1, dy); \ - if (x2 < R->edgexmin) R->edgexmin = x2; \ - else if (x2 > R->edgexmax) R->edgexmax = x2; \ -} - -#ifndef FONTMODULE -#ifndef __sxg__ -#include <limits.h> -#endif -#endif -#ifdef SHRT_MIN -#define MINPEL SHRT_MIN -#else -#define MINPEL ((pel)(-1<<(8*sizeof(pel)-1))) /* smallest value fitting in a pel */ -#endif -#ifdef SHRT_MAX -#define MAXPEL SHRT_MAX -#else -#define MAXPEL ((pel)((1<<(8*sizeof(pel)-1))-1))/* largest value fitting in a pel */ -#endif - -/* -The "Unique"-type macro is different (unique?) for regions, because some -regions structures are shared among several objects, and might have -to be made unique for that reason (i.e., references > 1). -*/ - -#define ConsumeRegion(R) MAKECONSUME(R,KillRegion(R)) -#define UniqueRegion(R) MAKEUNIQUE(R,CopyRegion(R)) - - -/*END SHARED*/ -/*SHARED*/ - -typedef void (*NewEdgeFunc)(struct region *, - fractpel, fractpel, fractpel, fractpel, int); - -struct region { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = REGIONTYPE */ - struct fractpoint origin; /* beginning handle: X,Y origin of region */ - struct fractpoint ending; /* ending handle: X,Y change after painting region */ - pel xmin,ymin; /* minimum X,Y of region */ - pel xmax,ymax; /* mat1_mum X,Y of region */ - struct edgelist *anchor; /* list of edges that bound the region */ - struct picture *thresholded; /* region defined by thresholded picture*/ -/* -Note that the ending handle and the bounding box values are stored -relative to 'origin'. - -The above elements describe a region. The following elements are -scratchpad areas used while the region is being built: -*/ - fractpel lastdy; /* direction of last segment */ - fractpel firstx,firsty; /* starting point of current edge */ - fractpel edgexmin,edgexmax; /* x extent of current edge */ - struct edgelist *lastedge,*firstedge; /* last and first edges in subpath */ - pel *edge; /* pointer to array of X values for edge */ - fractpel edgeYstop; /* Y value where 'edges' array ends */ - NewEdgeFunc newedgefcn; /* function to use when building a new edge */ - struct strokeinfo *strokeinfo; /* scratchpad info during stroking only */ -} ; -/* -The ISCOMPLEMENT flag indicates the region is reversed--it is the -"outside" of the nominal region. -*/ -#define ISCOMPLEMENT(flag) ((flag)&0x80) -/* -The ISJUMBLED flag indicates the region is not sorted top-to-bottom. -*/ -#define ISJUMBLED(flag) ((flag)&0x40) -/* -The ISINFINITE flag allows a quick check for an INFINITE region, which -is frequently intersected. -*/ -#define ISINFINITE(flag) ((flag)&0x20) - -/*END SHARED*/ -/*SHARED*/ - -#define ISRECTANGULAR(flag) ((flag)&0x08) - -/*END SHARED*/ -/*SHARED*/ - -#define EmptyRegion t1_EmptyRegion - -/*END SHARED*/ -/*SHARED*/ - -struct edgelist { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = EDGETYPE */ - struct edgelist *link; /* pointer to next in linked list */ - struct edgelist *subpath; /* informational link for "same subpath" */ - pel xmin,xmax; /* range of edge in X */ - pel ymin,ymax; /* range of edge in Y */ - pel *xvalues; /* pointer to ymax-ymin X values */ -} ; -/* -The end of the list is marked by either "link" being NULL, or by -ymin == ymax. See :hdref refid=discard.. We define the VALIDEDGE -predicate to test for the opposite of these conditions: -*/ - -#define VALIDEDGE(p) ((p)!=NULL&&(p)->ymin<(p)->ymax) - -/*END SHARED*/ -/*SHARED*/ - -#define ISDOWN(f) ((f)&0x80) - -#define ISAMBIGUOUS(f) ((f)&0x40) - -/*END SHARED*/ -/*SHARED*/ - -/* -Interior() rule enumerations: -*/ -#define WINDINGRULE -2 -#define EVENODDRULE -3 - -#define CONTINUITY 0x80 /* can be added to above rules; e.g. WINDINGRULE+CONTINUITY */ - -/*END SHARED*/ diff --git a/libXfont/src/Type1/scanfont.c b/libXfont/src/Type1/scanfont.c deleted file mode 100644 index 8cad57fcf..000000000 --- a/libXfont/src/Type1/scanfont.c +++ /dev/null @@ -1,1526 +0,0 @@ -/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.5 2005/07/09 23:18:27 keithp Exp $ */ -/* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ -/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.16 2003/05/27 22:26:46 tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef FONTMODULE -#include <string.h> -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "xf86_ansic.h" -#endif -#include "t1stdio.h" -#include "util.h" -#include "token.h" -#include "objects.h" -#include "spaces.h" -#include "fontfcn.h" -#include "blues.h" - -#include <limits.h> - -static int rc; -static boolean InPrivateDict; -static boolean WantFontInfo; -static boolean TwoSubrs; -static psobj inputFile; -static psobj filterFile; -static psobj *inputP; - - -/**********************************************************************/ -/* Init_BuiltInEncoding() */ -/* */ -/* Initializes the StandardEncoding and ISOLatin1Encoding vector. */ -/* */ -/**********************************************************************/ -typedef struct /* Builtin Standard Encoding */ -{ - int index; - char *name; -} EncodingTable; - -static EncodingTable StdEnc[] = { - { 040 , "space" }, - { 041 , "exclam" }, - { 042 , "quotedbl" }, - { 043 , "numbersign" }, - { 044 , "dollar" }, - { 045 , "percent" }, - { 046 , "ampersand" }, - { 047 , "quoteright" }, - { 050 , "parenleft" }, - { 051 , "parenright" }, - { 052 , "asterisk" }, - { 053 , "plus" }, - { 054 , "comma" }, - { 055 , "hyphen" }, - { 056 , "period" }, - { 057 , "slash" }, - { 060 , "zero" }, - { 061 , "one" }, - { 062 , "two" }, - { 063 , "three" }, - { 064 , "four" }, - { 065 , "five" }, - { 066 , "six" }, - { 067 , "seven" }, - { 070 , "eight" }, - { 071 , "nine" }, - { 072 , "colon" }, - { 073 , "semicolon" }, - { 074 , "less" }, - { 075 , "equal" }, - { 076 , "greater" }, - { 077 , "question" }, - { 0100 , "at" }, - { 0101 , "A" }, - { 0102 , "B" }, - { 0103 , "C" }, - { 0104 , "D" }, - { 0105 , "E" }, - { 0106 , "F" }, - { 0107 , "G" }, - { 0110 , "H" }, - { 0111 , "I" }, - { 0112 , "J" }, - { 0113 , "K" }, - { 0114 , "L" }, - { 0115 , "M" }, - { 0116 , "N" }, - { 0117 , "O" }, - { 0120 , "P" }, - { 0121 , "Q" }, - { 0122 , "R" }, - { 0123 , "S" }, - { 0124 , "T" }, - { 0125 , "U" }, - { 0126 , "V" }, - { 0127 , "W" }, - { 0130 , "X" }, - { 0131 , "Y" }, - { 0132 , "Z" }, - { 0133 , "bracketleft" }, - { 0134 , "backslash" }, - { 0135 , "bracketright" }, - { 0136 , "asciicircum" }, - { 0137 , "underscore" }, - { 0140 , "quoteleft" }, - { 0141 , "a" }, - { 0142 , "b" }, - { 0143 , "c" }, - { 0144 , "d" }, - { 0145 , "e" }, - { 0146 , "f" }, - { 0147 , "g" }, - { 0150 , "h" }, - { 0151 , "i" }, - { 0152 , "j" }, - { 0153 , "k" }, - { 0154 , "l" }, - { 0155 , "m" }, - { 0156 , "n" }, - { 0157 , "o" }, - { 0160 , "p" }, - { 0161 , "q" }, - { 0162 , "r" }, - { 0163 , "s" }, - { 0164 , "t" }, - { 0165 , "u" }, - { 0166 , "v" }, - { 0167 , "w" }, - { 0170 , "x" }, - { 0171 , "y" }, - { 0172 , "z" }, - { 0173 , "braceleft" }, - { 0174 , "bar" }, - { 0175 , "braceright" }, - { 0176 , "asciitilde" }, - { 0241 , "exclamdown" }, - { 0242 , "cent" }, - { 0243 , "sterling" }, - { 0244 , "fraction" }, - { 0245 , "yen" }, - { 0246 , "florin" }, - { 0247 , "section" }, - { 0250 , "currency" }, - { 0251 , "quotesingle" }, - { 0252 , "quotedblleft" }, - { 0253 , "guillemotleft" }, - { 0254 , "guilsinglleft" }, - { 0255 , "guilsinglright" }, - { 0256 , "fi" }, - { 0257 , "fl" }, - { 0261 , "endash" }, - { 0262 , "dagger" }, - { 0263 , "daggerdbl" }, - { 0264 , "periodcentered" }, - { 0266 , "paragraph" }, - { 0267 , "bullet" }, - { 0270 , "quotesinglbase" }, - { 0271 , "quotedblbase" }, - { 0272 , "quotedblright" }, - { 0273 , "guillemotright" }, - { 0274 , "ellipsis" }, - { 0275 , "perthousand" }, - { 0277 , "questiondown" }, - { 0301 , "grave" }, - { 0302 , "acute" }, - { 0303 , "circumflex" }, - { 0304 , "tilde" }, - { 0305 , "macron" }, - { 0306 , "breve" }, - { 0307 , "dotaccent" }, - { 0310 , "dieresis" }, - { 0312 , "ring" }, - { 0313 , "cedilla" }, - { 0315 , "hungarumlaut" }, - { 0316 , "ogonek" }, - { 0317 , "caron" }, - { 0320 , "emdash" }, - { 0341 , "AE" }, - { 0343 , "ordfeminine" }, - { 0350 , "Lslash" }, - { 0351 , "Oslash" }, - { 0352 , "OE" }, - { 0353 , "ordmasculine" }, - { 0361 , "ae" }, - { 0365 , "dotlessi" }, - { 0370 , "lslash" }, - { 0371 , "oslash" }, - { 0372 , "oe" }, - { 0373 , "germandbls" }, - { 0, 0 } -}; - -static EncodingTable ISO8859Enc[] = { - { 32, "space" }, - { 33, "exclam" }, - { 34, "quotedbl" }, - { 35, "numbersign" }, - { 36, "dollar" }, - { 37, "percent" }, - { 38, "ampersand" }, - { 39, "quoteright" }, - { 40, "parenleft" }, - { 41, "parenright" }, - { 42, "asterisk" }, - { 43, "plus" }, - { 44, "comma" }, - { 45, "minus" }, - { 46, "period" }, - { 47, "slash" }, - { 48, "zero" }, - { 49, "one" }, - { 50, "two" }, - { 51, "three" }, - { 52, "four" }, - { 53, "five" }, - { 54, "six" }, - { 55, "seven" }, - { 56, "eight" }, - { 57, "nine" }, - { 58, "colon" }, - { 59, "semicolon" }, - { 60, "less" }, - { 61, "equal" }, - { 62, "greater" }, - { 63, "question" }, - { 64, "at" }, - { 65, "A" }, - { 66, "B" }, - { 67, "C" }, - { 68, "D" }, - { 69, "E" }, - { 70, "F" }, - { 71, "G" }, - { 72, "H" }, - { 73, "I" }, - { 74, "J" }, - { 75, "K" }, - { 76, "L" }, - { 77, "M" }, - { 78, "N" }, - { 79, "O" }, - { 80, "P" }, - { 81, "Q" }, - { 82, "R" }, - { 83, "S" }, - { 84, "T" }, - { 85, "U" }, - { 86, "V" }, - { 87, "W" }, - { 88, "X" }, - { 89, "Y" }, - { 90, "Z" }, - { 91, "bracketleft" }, - { 92, "backslash" }, - { 93, "bracketright" }, - { 94, "asciicircum" }, - { 95, "underscore" }, - { 96, "quoteleft" }, - { 97, "a" }, - { 98, "b" }, - { 99, "c" }, - { 100, "d" }, - { 101, "e" }, - { 102, "f" }, - { 103, "g" }, - { 104, "h" }, - { 105, "i" }, - { 106, "j" }, - { 107, "k" }, - { 108, "l" }, - { 109, "m" }, - { 110, "n" }, - { 111, "o" }, - { 112, "p" }, - { 113, "q" }, - { 114, "r" }, - { 115, "s" }, - { 116, "t" }, - { 117, "u" }, - { 118, "v" }, - { 119, "w" }, - { 120, "x" }, - { 121, "y" }, - { 122, "z" }, - { 123, "braceleft" }, - { 124, "bar" }, - { 125, "braceright" }, - { 126, "asciitilde" }, - { 160, "space" }, - { 161, "exclamdown" }, - { 162, "cent" }, - { 163, "sterling" }, - { 164, "currency" }, - { 165, "yen" }, - { 166, "brokenbar" }, - { 167, "section" }, - { 168, "dieresis" }, - { 169, "copyright" }, - { 170, "ordfeminine" }, - { 171, "guillemotleft" }, - { 172, "logicalnot" }, - { 173, "hyphen" }, - { 174, "registered" }, - { 175, "macron" }, - { 176, "degree" }, - { 177, "plusminus" }, - { 178, "twosuperior" }, - { 179, "threesuperior" }, - { 180, "acute" }, - { 181, "mu" }, - { 182, "paragraph" }, - { 183, "periodcentered" }, - { 184, "cedilla" }, - { 185, "onesuperior" }, - { 186, "ordmasculine" }, - { 187, "guillemotright" }, - { 188, "onequarter" }, - { 189, "onehalf" }, - { 190, "threequarters" }, - { 191, "questiondown" }, - { 192, "Agrave" }, - { 193, "Aacute" }, - { 194, "Acircumflex" }, - { 195, "Atilde" }, - { 196, "Adieresis" }, - { 197, "Aring" }, - { 198, "AE" }, - { 199, "Ccedilla" }, - { 200, "Egrave" }, - { 201, "Eacute" }, - { 202, "Ecircumflex" }, - { 203, "Edieresis" }, - { 204, "Igrave" }, - { 205, "Iacute" }, - { 206, "Icircumflex" }, - { 207, "Idieresis" }, - { 208, "Eth" }, - { 209, "Ntilde" }, - { 210, "Ograve" }, - { 211, "Oacute" }, - { 212, "Ocircumflex" }, - { 213, "Otilde" }, - { 214, "Odieresis" }, - { 215, "multiply" }, - { 216, "Oslash" }, - { 217, "Ugrave" }, - { 218, "Uacute" }, - { 219, "Ucircumflex" }, - { 220, "Udieresis" }, - { 221, "Yacute" }, - { 222, "Thorn" }, - { 223, "germandbls" }, - { 224, "agrave" }, - { 225, "aacute" }, - { 226, "acircumflex" }, - { 227, "atilde" }, - { 228, "adieresis" }, - { 229, "aring" }, - { 230, "ae" }, - { 231, "ccedilla" }, - { 232, "egrave" }, - { 233, "eacute" }, - { 234, "ecircumflex" }, - { 235, "edieresis" }, - { 236, "igrave" }, - { 237, "iacute" }, - { 238, "icircumflex" }, - { 239, "idieresis" }, - { 240, "eth" }, - { 241, "ntilde" }, - { 242, "ograve" }, - { 243, "oacute" }, - { 244, "ocircumflex" }, - { 245, "otilde" }, - { 246, "odieresis" }, - { 247, "divide" }, - { 248, "oslash" }, - { 249, "ugrave" }, - { 250, "uacute" }, - { 251, "ucircumflex" }, - { 252, "udieresis" }, - { 253, "yacute" }, - { 254, "thorn" }, - { 255, "ydieresis" }, - { 0, 0 } -}; - -static psobj *StdEncArrayP = NULL; -static psobj *ISOLatin1EncArrayP = NULL; - -static psobj * -MakeEncodingArrayP(EncodingTable *encodingTable) -{ - int i; - psobj *encodingArrayP; - - encodingArrayP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!encodingArrayP) - return NULL; - - /* initialize everything to .notdef */ - for (i=0; i<256;i++) - objFormatName(&(encodingArrayP[i]),7, ".notdef"); - - for (i=0; encodingTable[i].name; i++) - { - objFormatName(&(encodingArrayP[encodingTable[i].index]), - strlen(encodingTable[i].name), - encodingTable[i].name); - } - - return(encodingArrayP); -} - -boolean -Init_BuiltInEncoding(void) -{ - StdEncArrayP = MakeEncodingArrayP(StdEnc); - ISOLatin1EncArrayP = MakeEncodingArrayP(ISO8859Enc); - return (StdEncArrayP && ISOLatin1EncArrayP); -} - -/********************************************************************/ -/***================================================================***/ -static int -getNextValue(int valueType) -{ - scan_token(inputP); - if (tokenType != valueType) { - return(SCAN_ERROR); - } - return(SCAN_OK); - -} -/***================================================================***/ -/* This routine will set the global rc if there is an error */ -/***================================================================***/ -static int -getInt(void) -{ - scan_token(inputP); - if (tokenType != TOKEN_INTEGER) { - rc = SCAN_ERROR; - return(0); - } - else { - return( tokenValue.integer); - } - -} -/***================================================================***/ -/* - * See Sec 10.3 of ``Adobe Type 1 Font Format'' v1.1, - * for parsing Encoding. - */ -static int -getEncoding(psobj *arrayP) -{ - scan_token(inputP); - if ((tokenType == TOKEN_NAME && (tokenLength==16 || tokenLength==17))) - { - if((tokenLength==16) && (!strncmp(tokenStartP,"StandardEncoding",16))) - arrayP->data.valueP = (char *) StdEncArrayP; - else - arrayP->data.valueP = (char *) ISOLatin1EncArrayP; - arrayP->len = 256; - return(SCAN_OK); - } - else if ( (tokenType == TOKEN_LEFT_BRACE) || - (tokenType == TOKEN_LEFT_BRACKET) ) - { - /* Array of literal names */ - - psobj *objP; - int i; - - objP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - arrayP->data.valueP = (char *) objP; - arrayP->len = 256; - - for (i=0; i<256; i++, objP++) - { - scan_token(inputP); - - if (tokenType != TOKEN_LITERAL_NAME) - return(SCAN_ERROR); - - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatName(objP,tokenLength,tokenStartP); - } - - scan_token(inputP); - if ( (tokenType == TOKEN_RIGHT_BRACE) || - (tokenType == TOKEN_RIGHT_BRACKET) ) - return(SCAN_OK); - } - else - { - /* Must be sequences of ``dup <index> <charactername> put" */ - - psobj *objP; - int i; - - objP = (psobj *)vm_alloc(256*(sizeof(psobj))); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - arrayP->data.valueP = (char *) objP; - arrayP->len = 256; - - for (i=0; i<256; i++) - objFormatName(objP + i, 7, ".notdef"); - - while (TRUE) - { - scan_token(inputP); - - switch (tokenType) - { - case TOKEN_NAME: - if (tokenLength == 3) - { - if (strncmp(tokenStartP,"dup",3) == 0) - { - /* get <index> */ - scan_token(inputP); - if (tokenType != TOKEN_INTEGER || - tokenValue.integer < 0 || - tokenValue.integer > 255) - return (SCAN_ERROR); - i = tokenValue.integer; - - /* get <characer_name> */ - scan_token(inputP); - if (tokenType != TOKEN_LITERAL_NAME) - return(SCAN_ERROR); - - if (!(vm_alloc(tokenLength)) ) - return(SCAN_OUT_OF_MEMORY); - objFormatName(objP + i,tokenLength,tokenStartP); - - /* get "put" */ - scan_token(inputP); - if (tokenType != TOKEN_NAME) - return(SCAN_ERROR); - } - else if (strncmp(tokenStartP,"def",3) == 0) - return (SCAN_OK); - } - break; - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - return (SCAN_ERROR); - } - } - } - - return (SCAN_ERROR); -} -/***================================================================***/ -static int -getArray(psobj *arrayP) -{ - int N; /* count the items in the array */ - psobj *objP; - - /* That is totally a kludge. If some stupid font file has - * /foo/foo # ftp://ftp.cdrom.com/pub/os2/fonts/future.zip - * we will treat it as /foo. - * H.J. */ - char tmp [1024]; - - strncpy (tmp, tokenStartP, sizeof (tmp)); - tmp [sizeof (tmp) - 1] = '\0'; - -restart: - scan_token(inputP); - switch (tokenType) - { - case TOKEN_LEFT_BRACE: - case TOKEN_LEFT_BRACKET: - break; - - case TOKEN_LITERAL_NAME: - tokenStartP[tokenLength] = '\0'; - if (strcmp (tokenStartP, tmp) == 0) - { - /* Ok, We see /foo/foo. Let's restart. */ - goto restart; - } - - default: - return(SCAN_ERROR); - } - /* format the array in memory, save pointer to the beginning */ - arrayP->data.valueP = tokenStartP; - /* loop, picking up next object, until right BRACE or BRACKET */ - N = 0; - do { - scan_token(inputP); - if ( (tokenType == TOKEN_RIGHT_BRACE) || - (tokenType == TOKEN_RIGHT_BRACKET) ) { - /* save then number of items in the array */ - arrayP->len = N; - return(SCAN_OK); - } - /* allocate the space for the object */ - objP = (psobj *)vm_alloc(sizeof(psobj)); - if (!(objP)) return(SCAN_OUT_OF_MEMORY); - - /* array is an array of numbers, (real or integer) */ - if (tokenType == TOKEN_REAL) { - objFormatReal(objP, tokenValue.real); - } - else - if (tokenType == TOKEN_INTEGER) { - objFormatInteger(objP, tokenValue.integer); - } - else return(SCAN_ERROR); - N++; - } while ( 1>0 ); - /* NOTREACHED*/ -} -/***================================================================***/ -static int -getName(char *nameP) -{ - do { - scan_token(inputP); - if (tokenType <= TOKEN_NONE) { - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(SCAN_ERROR); - } - } while ((tokenType != TOKEN_NAME) || - (0 != strncmp(tokenStartP,nameP,strlen(nameP))) ); - /* found */ - return(SCAN_OK); -} -/***================================================================***/ -static int -getNbytes(int N) -{ - int I; - - - tokenStartP = vm_next_byte(); - tokenMaxP = tokenStartP + MIN(vm_free_bytes(), MAX_STRING_LEN); - if (N > vm_free_bytes()) { - return(SCAN_OUT_OF_MEMORY); - } - I = T1Read(tokenStartP,1,N,inputP->data.fileP); - if ( I != N ) return(SCAN_FILE_EOF); - return(SCAN_OK); -} - -/***================================================================***/ -/* getLiteralName(nameObjP) */ -/* scan for next literal. */ -/* if we encounter the name 'end' then terminate and say ok. */ -/* It means that the CharStrings does not have as many characters */ -/* as the dictionary said it would and that is ok. */ -/***================================================================***/ -static int -getLiteralName(psobj *nameObjP) -{ - do { - scan_token(inputP); - if (tokenType <= TOKEN_NONE) { - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(SCAN_ERROR); - } - if (tokenType == TOKEN_NAME) { - if (0 == strncmp(tokenStartP,"end",3) ) { - return(SCAN_END); - } - } - } while (tokenType != TOKEN_LITERAL_NAME) ; - nameObjP->len = tokenLength; - /* allocate all the names in the CharStrings Structure */ - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - nameObjP->data.valueP = tokenStartP; - /* found */ - return(SCAN_OK); -} - -/***================================================================***/ -/* - * BuildSubrs routine - */ -/***================================================================***/ - -static int -BuildSubrs(psfont *FontP) -{ - int N; /* number of values in Subrs */ - int I; /* index into Subrs */ - int i; /* loop thru Subrs */ - int J; /* length of Subrs entry */ - psobj *arrayP; - - /* next token should be a positive int */ - /* note: rc is set by getInt. */ - N = getInt(); - if (rc) return(rc); - if (N < 0 ) return(SCAN_ERROR); - /* if we already have a Subrs, then skip the second one */ - /* The second one is for hiresolution devices. */ - if (FontP->Subrs.data.arrayP != NULL) { - TwoSubrs = TRUE; - /* process all the Subrs, but do not update anything */ - /* can not just skip them because of the binary data */ - for (i=0;i<N;i++) { - /* look for dup */ - rc = getName("dup"); - if (rc) return(rc); - /* get 2 integers */ - I = getInt(); - if (rc) return(rc); - J = getInt(); - if (rc) return(rc); - if ( (I < 0) || (J < 0 ) ) return (SCAN_ERROR); - /* get the next token, it should be RD or -|, either is ok */ - rc = getNextValue(TOKEN_NAME); - if ( rc != SCAN_OK ) return(rc); - rc = getNbytes(J); - if (rc) return(rc); - } - return(SCAN_OK); - } - if (N > INT_MAX / sizeof(psobj)) - return (SCAN_ERROR); - arrayP = (psobj *)vm_alloc(N*sizeof(psobj)); - if (!(arrayP) ) return(SCAN_OUT_OF_MEMORY); - FontP->Subrs.len = N; - FontP->Subrs.data.arrayP = arrayP; - /* get N values for Subrs */ - for (i=0;i<N;i++) { - /* look for dup */ - rc = getName("dup"); - if (rc) return(rc); - /* get 2 integers */ - I = getInt(); - if (rc) return(rc); - J = getInt(); - if (rc) return(rc); - if ( (I < 0) || (J < 0 ) ) return (SCAN_ERROR); - arrayP[I].len = J; - /* get the next token, it should be RD or -|, either is ok */ - rc = getNextValue(TOKEN_NAME); - if ( rc != SCAN_OK ) return(rc); - rc = getNbytes(J); - if (rc == SCAN_OK) { - arrayP[I].data.valueP = tokenStartP; - if ( !(vm_alloc(J)) ) return(SCAN_OUT_OF_MEMORY); - } - else return(rc); - } - return(SCAN_OK); - -} -/***================================================================***/ -/***================================================================***/ -/* - * BuildCharStrings routine - */ -/***================================================================***/ - -static int -BuildCharStrings(psfont *FontP) -{ - int N; /* number of values in CharStrings */ - int i; /* loop thru Subrs */ - int J; /* length of Subrs entry */ - psdict *dictP; - - /* next token should be a positive int */ - N = getInt(); - if (rc) { - /* check if file had TwoSubrs, hi resolution stuff is in file*/ - if (TwoSubrs) { - do { - scan_token(inputP); - if (tokenType <= TOKEN_NONE) { - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(SCAN_ERROR); - } - } while (tokenType != TOKEN_INTEGER); - N = tokenValue.integer; - } - else return(rc); /* if next token was not an Int */ - } - if (N<=0 || N > INT_MAX / sizeof(psdict)) return(SCAN_ERROR); - /* save number of entries in the dictionary */ - - dictP = (psdict *)vm_alloc((N+1)*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - FontP->CharStringsP = dictP; - dictP[0].key.len = N; - /* get N values for CharStrings */ - for (i=1;i<=N;i++) { - /* look for next literal name */ - rc = getLiteralName(&(dictP[i].key)); - if (rc) return(rc); - /* get 1 integer */ - J = getInt(); - if (rc) return(rc); /* if next token was not an Int */ - if (J<0) return (SCAN_ERROR); - dictP[i].value.len = J; - /* get the next token, it should be RD or -|, either is ok */ - rc = getNextValue(TOKEN_NAME); - if ( rc != SCAN_OK ) return(rc); - rc = getNbytes(J); - if (rc == SCAN_OK) { - dictP[i].value.data.valueP = tokenStartP; - if ( !(vm_alloc(J)) ) return(SCAN_OUT_OF_MEMORY); - } - else return(rc); - } - return(SCAN_OK); - -} -/***================================================================***/ -/* - * BuildFontInfo Dictionary - */ -/***================================================================***/ -static int -BuildFontInfo(psfont *fontP) -{ - psdict *dictP; - - /* allocate the private dictionary */ - dictP = (psdict *)vm_alloc(20*sizeof(psdict)); - if (!(dictP)) return(SCAN_OUT_OF_MEMORY); - - fontP->fontInfoP = dictP; - fontP->fontInfoP[0].key.len = 17; /* number of actual entries */ - objFormatName(&(dictP[FONTNAME].key),8,"FontName"); - objFormatName(&(dictP[FONTNAME].value),0,NULL); - objFormatName(&(dictP[PAINTTYPE].key),9,"PaintType"); - objFormatInteger(&(dictP[PAINTTYPE].value),0); - objFormatName(&(dictP[FONTTYPENUM].key),8,"FontType"); - objFormatInteger(&(dictP[FONTTYPENUM].value),0); - objFormatName(&(dictP[FONTMATRIX].key),10,"FontMatrix"); - objFormatArray(&(dictP[FONTMATRIX].value),0,NULL); - objFormatName(&(dictP[FONTBBOX].key),8,"FontBBox"); - objFormatArray(&(dictP[FONTBBOX].value),0,NULL); - objFormatName(&(dictP[ENCODING].key),8,"Encoding"); - objFormatEncoding(&(dictP[ENCODING].value),0,NULL); - objFormatName(&(dictP[UNIQUEID].key),8,"UniqueID"); - objFormatInteger(&(dictP[UNIQUEID].value),0); - objFormatName(&(dictP[STROKEWIDTH].key),11,"StrokeWidth"); - objFormatReal(&(dictP[STROKEWIDTH].value),0.0); - objFormatName(&(dictP[VERSION].key),7,"version"); - objFormatString(&(dictP[VERSION].value),0,NULL); - objFormatName(&(dictP[NOTICE].key),6,"Notice"); - objFormatString(&(dictP[NOTICE].value),0,NULL); - objFormatName(&(dictP[FULLNAME].key),8,"FullName"); - objFormatString(&(dictP[FULLNAME].value),0,NULL); - objFormatName(&(dictP[FAMILYNAME].key),10,"FamilyName"); - objFormatString(&(dictP[FAMILYNAME].value),0,NULL); - objFormatName(&(dictP[WEIGHT].key),6,"Weight"); - objFormatString(&(dictP[WEIGHT].value),0,NULL); - objFormatName(&(dictP[ITALICANGLE].key),11,"ItalicAngle"); - objFormatReal(&(dictP[ITALICANGLE].value),0.0); - objFormatName(&(dictP[ISFIXEDPITCH].key),12,"isFixedPitch"); - objFormatBoolean(&(dictP[ISFIXEDPITCH].value),FALSE); - objFormatName(&(dictP[UNDERLINEPOSITION].key),17,"UnderlinePosition"); - objFormatReal(&(dictP[UNDERLINEPOSITION].value),0.0); - objFormatName(&(dictP[UNDERLINETHICKNESS].key),18,"UnderlineThickness"); - objFormatReal(&(dictP[UNDERLINETHICKNESS].value),0.0); - return(SCAN_OK); -} -/***================================================================***/ -/* - * BuildPrivate Dictionary - */ -/***================================================================***/ -static int -BuildPrivate(psfont *fontP) -{ - psdict *Private; - - /* allocate the private dictionary */ - Private = (psdict *)vm_alloc(20*sizeof(psdict)); - - if (!(Private)) return(SCAN_OUT_OF_MEMORY); - - fontP->Private = Private; - fontP->Private[0].key.len = 16; /* number of actual entries */ - - objFormatName(&(Private[BLUEVALUES].key),10,"BlueValues"); - objFormatArray(&(Private[BLUEVALUES].value),0,NULL); - objFormatName(&(Private[OTHERBLUES].key),10,"OtherBlues"); - objFormatArray(&(Private[OTHERBLUES].value),0,NULL); - objFormatName(&(Private[FAMILYBLUES].key),11,"FamilyBlues"); - objFormatArray(&(Private[FAMILYBLUES].value),0,NULL); - objFormatName(&(Private[FAMILYOTHERBLUES].key),16,"FamilyOtherBlues"); - objFormatArray(&(Private[FAMILYOTHERBLUES].value),0,NULL); - objFormatName(&(Private[BLUESCALE].key),9,"BlueScale"); - objFormatReal(&(Private[BLUESCALE].value),DEFAULTBLUESCALE); - objFormatName(&(Private[BLUESHIFT].key),9,"BlueShift"); - objFormatInteger(&(Private[BLUESHIFT].value),DEFAULTBLUESHIFT); - objFormatName(&(Private[BLUEFUZZ].key),8,"BlueFuzz"); - objFormatInteger(&(Private[BLUEFUZZ].value),DEFAULTBLUEFUZZ); - objFormatName(&(Private[STDHW].key),5,"StdHW"); - objFormatArray(&(Private[STDHW].value),0,NULL); - objFormatName(&(Private[STDVW].key),5,"StdVW"); - objFormatArray(&(Private[STDVW].value),0,NULL); - objFormatName(&(Private[STEMSNAPH].key),9,"StemSnapH"); - objFormatArray(&(Private[STEMSNAPH].value),0,NULL); - objFormatName(&(Private[STEMSNAPV].key),9,"StemSnapV"); - objFormatArray(&(Private[STEMSNAPV].value),0,NULL); - objFormatName(&(Private[FORCEBOLD].key),9,"ForceBold"); - objFormatBoolean(&(Private[FORCEBOLD].value),DEFAULTFORCEBOLD); - objFormatName(&(Private[LANGUAGEGROUP].key),13,"LanguageGroup"); - objFormatInteger(&(Private[LANGUAGEGROUP].value),DEFAULTLANGUAGEGROUP); - objFormatName(&(Private[LENIV].key),5,"lenIV"); - objFormatInteger(&(Private[LENIV].value),DEFAULTLENIV); - objFormatName(&(Private[RNDSTEMUP].key),9,"RndStemUp"); - objFormatBoolean(&(Private[RNDSTEMUP].value),DEFAULTRNDSTEMUP); - objFormatName(&(Private[EXPANSIONFACTOR].key),9,"ExpansionFactor"); - objFormatReal(&(Private[EXPANSIONFACTOR].value), - DEFAULTEXPANSIONFACTOR); - return(SCAN_OK); -} -/***================================================================***/ -/**********************************************************************/ -/* GetType1Blues(fontP) */ -/* */ -/* Routine to support font-level hints. */ -/* */ -/* Gets all the Blues information from the Private dictionary */ -/* for the font. */ -/* */ -/* */ -/**********************************************************************/ -static int -GetType1Blues(psfont *fontP) -{ - psdict *PrivateDictP; /* the Private dict relating to hints */ - struct blues_struct *blues; /* ptr for the blues struct we will allocate */ - int i; - psobj *HintEntryP; - - - - /* get the Private dictionary pointer */ - PrivateDictP = fontP->Private; - - /* allocate the memory for the blues structure */ - blues = (struct blues_struct *) vm_alloc(sizeof(struct blues_struct)); - - if (!blues) return(SCAN_OUT_OF_MEMORY); - - /* Make fontP's blues ptr point to this newly allocated structure. */ - fontP->BluesP = blues; - - /* fill in the BlueValues array */ - HintEntryP = &(PrivateDictP[BLUEVALUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numBlueValues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMBLUEVALUES) { - blues->numBlueValues = NUMBLUEVALUES; - } else - blues->numBlueValues = HintEntryP->len; - for (i = 0; i<= blues->numBlueValues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->BlueValues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->BlueValues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->BlueValues[i] = 0; - } - } - - /* fill in the OtherBlues array */ - HintEntryP = &(PrivateDictP[OTHERBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numOtherBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMOTHERBLUES) { - blues->numOtherBlues = NUMOTHERBLUES; - } else - blues->numOtherBlues = HintEntryP->len; - for (i = 0; i<= blues->numOtherBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->OtherBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->OtherBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->OtherBlues[i] = 0; - } - } - - /* fill in the FamilyBlues array */ - HintEntryP = &(PrivateDictP[FAMILYBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numFamilyBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMFAMILYBLUES) { - blues->numFamilyBlues = NUMFAMILYBLUES; - } else - blues->numFamilyBlues = HintEntryP->len; - for (i = 0; i<= blues->numFamilyBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->FamilyBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->FamilyBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->FamilyBlues[i] = 0; - } - } - - /* fill in the FamilyOtherBlues array */ - HintEntryP = &(PrivateDictP[FAMILYOTHERBLUES].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numFamilyOtherBlues = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMFAMILYOTHERBLUES) { - blues->numFamilyOtherBlues = NUMFAMILYOTHERBLUES; - } else - blues->numFamilyOtherBlues = HintEntryP->len; - for (i = 0; i<= blues->numFamilyOtherBlues-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->FamilyOtherBlues[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->FamilyOtherBlues[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->FamilyOtherBlues[i] = 0; - } - } - - /* fill in the StemSnapH array */ - HintEntryP = &(PrivateDictP[STEMSNAPH].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numStemSnapH = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMSTEMSNAPH) { - blues->numStemSnapH = NUMSTEMSNAPH; - } else - blues->numStemSnapH = HintEntryP->len; - for (i = 0; i<= blues->numStemSnapH-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->StemSnapH[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->StemSnapH[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->StemSnapH[i] = 0; - } - } - - /* fill in the StemSnapV array */ - HintEntryP = &(PrivateDictP[STEMSNAPV].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - blues->numStemSnapV = 0; - else { - /* get the number of values in the array */ - if (HintEntryP->len > NUMSTEMSNAPV) { - blues->numStemSnapV = NUMSTEMSNAPV; - } else - blues->numStemSnapV = HintEntryP->len; - for (i = 0; i<= blues->numStemSnapV-1; ++i) { - if (objPIsInteger(&HintEntryP->data.arrayP[i])) - blues->StemSnapV[i] = - HintEntryP->data.arrayP[i].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[i])) - blues->StemSnapV[i] = - HintEntryP->data.arrayP[i].data.real; - else - blues->StemSnapV[i] = 0; - } - } - - /* fill in the StdVW array */ - HintEntryP = &(PrivateDictP[STDVW].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - /* a value of zero signifies no entry */ - blues->StdVW = 0; - else { - if (HintEntryP->len > NUMSTDVW) { - } - if (objPIsInteger(&HintEntryP->data.arrayP[0])) - blues->StdVW = HintEntryP->data.arrayP[0].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[0])) - blues->StdVW = HintEntryP->data.arrayP[0].data.real; - else - blues->StdVW = 0; - } - - /* fill in the StdHW array */ - HintEntryP = &(PrivateDictP[STDHW].value); - /* check to see if the entry exists and if it's an array */ - if ( !objPIsArray(HintEntryP) || (HintEntryP->len == 0 )) - /* a value of zero signifies no entry */ - blues->StdHW = 0; - else { - if (HintEntryP->len > NUMSTDHW) { - } - if (objPIsInteger(&HintEntryP->data.arrayP[0])) - blues->StdHW = HintEntryP->data.arrayP[0].data.integer; - else if (objPIsReal(&HintEntryP->data.arrayP[0])) - blues->StdHW = HintEntryP->data.arrayP[0].data.real; - else - blues->StdHW = 0; - } - - - /* get the ptr to the BlueScale entry */ - HintEntryP = &(PrivateDictP[BLUESCALE].value); - /* put the BlueScale in the blues structure */ - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueScale = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueScale = HintEntryP->data.real; - else - blues->BlueScale = DEFAULTBLUESCALE; - - /* get the ptr to the BlueShift entry */ - HintEntryP = &(PrivateDictP[BLUESHIFT].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueShift = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueShift = HintEntryP->data.real; - else - blues->BlueShift = DEFAULTBLUESHIFT; - - /* get the ptr to the BlueFuzz entry */ - HintEntryP = &(PrivateDictP[BLUEFUZZ].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->BlueFuzz = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) /* Error? */ - blues->BlueFuzz = HintEntryP->data.real; - else - blues->BlueFuzz = DEFAULTBLUEFUZZ; - - /* get the ptr to the ForceBold entry */ - HintEntryP = &(PrivateDictP[FORCEBOLD].value); - if (objPIsBoolean(HintEntryP)) /* Must be integer! */ - blues->ForceBold = HintEntryP->data.boolean; - else - blues->ForceBold = DEFAULTFORCEBOLD; - - /* get the ptr to the LanguageGroup entry */ - HintEntryP = &(PrivateDictP[LANGUAGEGROUP].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->LanguageGroup = HintEntryP->data.integer; - else - blues->LanguageGroup = DEFAULTLANGUAGEGROUP; - - /* get the ptr to the RndStemUp entry */ - HintEntryP = &(PrivateDictP[RNDSTEMUP].value); - if (objPIsBoolean(HintEntryP)) /* Must be integer! */ - blues->RndStemUp = HintEntryP->data.boolean; - else - blues->RndStemUp = DEFAULTRNDSTEMUP; - - /* get the ptr to the lenIV entry */ - HintEntryP = &(PrivateDictP[LENIV].value); - if (objPIsInteger(HintEntryP)) /* Must be integer! */ - blues->lenIV = HintEntryP->data.integer; - else - blues->lenIV = DEFAULTLENIV; - - /* get the ptr to the ExpansionFactor entry */ - HintEntryP = &(PrivateDictP[EXPANSIONFACTOR].value); - if (objPIsInteger(HintEntryP)) - blues->ExpansionFactor = HintEntryP->data.integer; - else if (objPIsReal(HintEntryP)) - blues->ExpansionFactor = HintEntryP->data.real; - else - blues->ExpansionFactor = DEFAULTEXPANSIONFACTOR; - return(SCAN_OK); -} -/**********************************************************************/ -/* GetType1CharString(fontP,code) */ -/* */ -/* Look up code in the standard encoding vector and return */ -/* the charstring associated with the character name. */ -/* */ -/* fontP is the psfont structure. */ -/* */ -/* Returns a psobj (string) */ -/**********************************************************************/ -psobj * -GetType1CharString(psfont *fontP, unsigned char code) -{ - int N; /* the 'Nth' entry in the CharStrings */ - psobj *charnameP; /* points to psobj that is name of character*/ - - psdict *CharStringsDictP; /* dictionary with char strings */ - psobj *theStringP; /* the definition for the code */ - - - - if (StdEncArrayP == NULL) { - return(NULL); - } - /* use the code to index into the standard encoding vector */ - charnameP = &(StdEncArrayP[code]); - - /* test if the encoding array points to a name */ - if (!(objPIsName(charnameP)) ) { - return(NULL); - } - - /* Now that we have the character name out of the standardencoding */ - /* get the character definition out of the current font */ - CharStringsDictP = fontP->CharStringsP; - - /* search the chars string for this charname as key */ - N = SearchDictName(CharStringsDictP,charnameP); - if (N<=0) { - return(NULL); - } - /* OK, the nth item is the psobj that is the string for this char */ - theStringP = &(CharStringsDictP[N].value); - - return(theStringP); -} - -/***================================================================***/ -/* - * FindDictValue - */ -/***================================================================***/ - -static int -FindDictValue(psdict *dictP) -{ - psobj LitName; - int N; - int V; - - /* we have just scanned a token and it is a literal name */ - /* need to check if that name is in Private dictionary */ - objFormatName(&LitName,tokenLength,tokenStartP); - /* is it in the dictP */ - N = SearchDictName(dictP,&LitName); - /* if found */ - if ( N > 0 ) { - /* what type */ - switch (dictP[N].value.type) { - case OBJ_ENCODING: - V = getEncoding(&(dictP[N].value)); - if ( V != SCAN_OK ) return(V); - break; - case OBJ_ARRAY: - V = getArray(&(dictP[N].value)); - if ( V != SCAN_OK ) return(V); - break; - case OBJ_INTEGER: - /* next value in integer */ - dictP[N].value.data.integer = getInt(); - if (rc) return(rc); /* if next token was not an Int */ - break; - case OBJ_REAL: - /* next value must be real or int, store as a real */ - scan_token(inputP); - if (tokenType == TOKEN_REAL) { - dictP[N].value.data.real = tokenValue.real; - } - else - if (tokenType == TOKEN_INTEGER) { - dictP[N].value.data.real = tokenValue.integer; - } - else return(SCAN_ERROR); - break; - case OBJ_NAME: - V = getNextValue(TOKEN_LITERAL_NAME); - if ( V != SCAN_OK ) return(V); - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatName(&(dictP[N].value),tokenLength,tokenStartP); - break; - case OBJ_STRING: - V = getNextValue(TOKEN_STRING); - if ( V != SCAN_OK ) return(V); - if (!(vm_alloc(tokenLength)) ) return(SCAN_OUT_OF_MEMORY); - objFormatString(&(dictP[N].value),tokenLength,tokenStartP); - break; - case OBJ_BOOLEAN: - scan_token(inputP); - if (tokenType != TOKEN_NAME) { - return(SCAN_ERROR); - } - if (0 == strncmp(tokenStartP,"true",4) ) { - dictP[N].value.data.boolean =TRUE; - } - else - if (0 == strncmp(tokenStartP,"false",5) ) { - dictP[N].value.data.boolean =FALSE; - } - else return(SCAN_ERROR); - break; - - default: - return(SCAN_ERROR); - } - } - /* Name is not in dictionary. That is ok. */ - return(SCAN_OK); - -} -/***================================================================***/ - -/* - * ------------------------------------------------------------------- - * Scan the next token and convert it into an object - * Result is placed on the Operand Stack as next object - * ------------------------------------------------------------------- - */ -int -scan_font(psfont *FontP) -{ - - - char filename[128]; - char filetype[3]; - FILE *fileP; - char *nameP; - int namelen; - int V; - int i; - boolean starthex80; - - starthex80 = FALSE; - filetype[0] = 'r'; - filetype[1] = 'b'; - filetype[2] = '\0'; - /* copy the filename and remove leading or trailing blanks */ - /* point to name and search for leading blanks */ - nameP= FontP->FontFileName.data.nameP; - namelen = FontP->FontFileName.len; - while (nameP[0] == ' ') { - nameP++; - namelen--; - } - /* now remove any trailing blanks */ - while ((namelen>0) && ( nameP[namelen-1] == ' ')) { - namelen--; - } - strncpy(filename,nameP,namelen); - filename[namelen] = '\0'; - /* file name is now constructed */ - inputFile.data.fileP = NULL; - filterFile.data.fileP = NULL; - - inputP = &inputFile; - if ((fileP = T1Open(filename,filetype))) { - /* get the first byte of file */ - V = _XT1getc(fileP); - /* if file starts with x'80' then skip next 5 bytes */ - if ( V == 0X80 ) { - for (i=0;i<5;i++) V = _XT1getc(fileP); - starthex80 = TRUE; - } - else T1Ungetc(V,fileP); - objFormatFile(inputP,fileP); - } - else { - return(SCAN_FILE_OPEN_ERROR); - }; - - WantFontInfo = TRUE; - InPrivateDict = FALSE; - TwoSubrs = FALSE; - rc = BuildFontInfo(FontP); - if (rc != 0) return(rc); - - /* Assume everything will be OK */ - rc = 0; - - /* Loop until complete font is read */ - do { - /* Scan the next token */ - scan_token(inputP); - - /* ==> tokenLength, tokenTooLong, tokenType, and tokenValue are */ - /* now set */ - - switch (tokenType) { - case TOKEN_EOF: - case TOKEN_NONE: - case TOKEN_INVALID: - /* in this case we are done */ - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - rc = SCAN_ERROR; - break; - case TOKEN_LITERAL_NAME: - /* Look up the name */ - tokenStartP[tokenLength] = '\0'; - if (InPrivateDict ) { - if (0== strncmp(tokenStartP,"Subrs",5) ) { - rc = BuildSubrs(FontP); - break; - } - if (0== strncmp(tokenStartP,"CharStrings",11) ) { - rc = BuildCharStrings(FontP); - if ( (rc == SCAN_OK) ||(rc == SCAN_END) ) { - T1Close(inputP->data.fileP); - /* Build the Blues Structure */ - rc = GetType1Blues(FontP); - /* whatever the return code, return it */ - /* all the work is done. This is the normal exit.*/ - return(rc); - } - break; - } - rc = FindDictValue(FontP->Private); - /* we are not going to report errors */ - /* Sometimes the font file may test a value such as */ - /* testing to see if the font is alreadly loaded with */ - /* same UniqueID. We would faile on /UniqueID get */ - /* because we are expecting a int to follow UniqueID*/ - /* If the correct object type does not follow a Name*/ - /* then we will skip over it without reporting error except */ - /* when out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } /* end of reading Private dictionary */ - else - if (0== strncmp(tokenStartP,"Private",7) ) { - InPrivateDict = TRUE; - rc = BuildPrivate(FontP); - break; - } - else - if (WantFontInfo) { - rc = FindDictValue(FontP->fontInfoP); - /* we are not going to report errors except out of memory */ - if (rc != SCAN_OUT_OF_MEMORY) - rc = SCAN_OK; - break; - } - break; - case TOKEN_NAME: - if (0 == strncmp(tokenStartP,"eexec",5) ) { - /* if file started with x'80', check next 5 bytes */ - if (starthex80) { - V = _XT1getc(fileP); - if ( V == 0X80 ) { - for (i=0;i<5;i++) V = _XT1getc(fileP); - } - else T1Ungetc(V,fileP); - } - filterFile.data.fileP = T1eexec(inputP->data.fileP); - if (filterFile.data.fileP == NULL) { - T1Close(inputFile.data.fileP); - return(SCAN_FILE_OPEN_ERROR); - } - inputP = &filterFile; - - WantFontInfo = FALSE; - } - break; - } - - } - while (rc ==0); - T1Close(inputP->data.fileP); - if (tokenTooLong) return(SCAN_OUT_OF_MEMORY); - return(rc); -} - diff --git a/libXfont/src/Type1/spaces.c b/libXfont/src/Type1/spaces.c deleted file mode 100644 index 1f5a321c1..000000000 --- a/libXfont/src/Type1/spaces.c +++ /dev/null @@ -1,941 +0,0 @@ -/* $Xorg: spaces.c,v 1.4 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.10tsi Exp $ */ - /* SPACES CWEB V0021 ******** */ -/* -:h1 id=spaces.SPACES Module - Handles Coordinate Spaces - -This module is responsible for handling the TYPE1IMAGER "XYspace" object. - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - - -:h3.Include Files -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef FONTMODULE -#include "Xdefs.h" /* Bool declaration ??? */ -#include "Xmd.h" /* INT32 declaration ??? */ -#include "os.h" -#include "xf86_ansic.h" -#else -#include "X11/Xos.h" -#include <stdio.h> -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "pictures.h" -#include "fonts.h" -#include "arith.h" -#include "trig.h" - -static void FindFfcn ( double cx, double cy, - convertFunc *fcnP ); -static void FindIfcn ( double cx, double cy, - fractpel *icxP, fractpel *icyP, - iconvertFunc *fcnP ); - -/* -:h3.MatrixMultiply() - Implements Multiplication of Two Matrices - -Implements matrix multiplication, A * B = C. - -To remind myself, matrix multiplication goes rows of A times columns -of B. -The output matrix may be the same as one of the input matrices. -*/ -static void -MatrixMultiply(double A[2][2], double B[2][2], /* input matrices */ - double C[2][2]) /* output matrix */ -{ - register double txx,txy,tyx,tyy; - - txx = A[0][0] * B[0][0] + A[0][1] * B[1][0]; - txy = A[1][0] * B[0][0] + A[1][1] * B[1][0]; - tyx = A[0][0] * B[0][1] + A[0][1] * B[1][1]; - tyy = A[1][0] * B[0][1] + A[1][1] * B[1][1]; - - C[0][0] = txx; - C[1][0] = txy; - C[0][1] = tyx; - C[1][1] = tyy; -} - -/* -:h3.MatrixInvert() - Invert a Matrix - -My reference for matrix inversion was :hp1/Elementary Linear Algebra/ -by Paul C. Shields, Worth Publishers, Inc., 1968. -*/ -static void -MatrixInvert(double M[2][2], /* input matrix */ - double Mprime[2][2]) /* output inverted matrix */ -{ - register double D; /* determinant of matrix M */ - register double txx,txy,tyx,tyy; - - txx = M[0][0]; - txy = M[1][0]; - tyx = M[0][1]; - tyy = M[1][1]; - - D = M[1][1] * M[0][0] - M[1][0] * M[0][1]; - if (D == 0.0) - Abort("MatrixInvert: can't"); - - Mprime[0][0] = tyy / D; - Mprime[1][0] = -txy / D; - Mprime[0][1] = -tyx / D; - Mprime[1][1] = txx / D; -} - -/* -:h3.Entry Points Provided to the TYPE1IMAGER User -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Entry Points Provided to Other Modules -*/ - -/* -In addition, other modules call the SPACES module through function -vectors in the "XYspace" structure. The entry points accessed that -way are "FConvert()", "IConvert()", and "ForceFloat()". -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h3.Macros and Typedefs Provided to Other Modules - -:h4.Duplicating and Killing Spaces - -Destroying XYspaces is so simple we can do it with a -macro: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -On the other hand, duplicating XYspaces is slightly more difficult -because of the need to keep a unique ID in the space, see -:hdref refid=dupspace.. - -:h4.Fixed Point Pel Representation - -We represent pel positions with fixed point numbers. This does NOT -mean integer, but truly means fixed point, with a certain number -of binary digits (FRACTBITS) representing the fractional part of the -pel. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -/* -:h2.Data Structures for Coordinate Spaces and Points -*/ -/* -:h3 id=matrix.Matrices - -TYPE1IMAGER uses 2x2 transformation matrices. We'll use C notation for -such a matrix (M[2][2]), the first index being rows, the second columns. -*/ - -/* -:h3.The "doublematrix" Structure - -We frequently find it desirable to store both a matrix and its -inverse. We store these in a "doublematrix" structure. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.The "XYspace" Structure - -The XYspace structure represents the XYspace object. -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ -#define RESERVED 10 /* 'n' IDs are reserved for invalid & immortal spaces */ -/* -*/ -#define NEXTID ((SpaceID < RESERVED) ? (SpaceID = RESERVED) : ++SpaceID) - -static unsigned int SpaceID = 1; - -struct XYspace * -CopySpace(struct XYspace *S) -{ - S = (struct XYspace *)Allocate(sizeof(struct XYspace), S, 0); - S->ID = NEXTID; - return(S); -} -/* -:h3.The "fractpoint" Structure - -A fractional point is just a "fractpel" x and y: -*/ - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.Lazy Evaluation of Matrix Inverses - -Calculating the inverse of a matrix is somewhat involved, and we usually -do not need them. So, we flag whether or not the space has the inverse -already calculated: -*/ - -#define HASINVERSE(flag) ((flag)&0x80) - -/* -The following macro forces a space to have an inverse: -*/ - -#define CoerceInverse(S) if (!HASINVERSE((S)->flag)) { \ - MatrixInvert((S)->tofract.normal, (S)->tofract.inverse); (S)->flag |= HASINVERSE(ON); } -/* -:h3.IDENTITY Space - -IDENTITY space is (logically) the space corresponding to the identity -transformation matrix. However, since all our transformation matrices -have a common FRACTFLOAT scale factor to convert to 'fractpel's, that -is actually what we store in 'tofract' matrix of IDENTITY: -*/ - -static struct XYspace identity = { SPACETYPE, ISPERMANENT(ON) + ISIMMORTAL(ON) - + HASINVERSE(ON), 2, /* added 3-26-91 PNM */ - NULL, NULL, - NULL, NULL, NULL, NULL, - INVALIDID + 1, 0, - {{{FRACTFLOAT, 0.0}, {0.0, FRACTFLOAT}}, - {{1.0/FRACTFLOAT, 0.0}, {0.0, 1.0/FRACTFLOAT}}}, - {{0, 0}, {0, 0}}}; -struct XYspace *IDENTITY = &identity; - -/* -*/ -#define MAXCONTEXTS 16 - -static struct doublematrix contexts[MAXCONTEXTS]; - -#ifdef notdef - -static int nextcontext = 1; - -/*SHARED LINE(S) ORIGINATED HERE*/ - -/* -:h3.FindDeviceContext() - Find the Context Given a Device - -This routine, given a device, returns the index of the device's -transformation matrix in the context array. If it cannot find it, -it will allocate a new array entry and fill it out. -*/ - -static int -FindDeviceContext(pointer device) /* device token */ -{ - double M[2][2]; /* temporary matrix */ - float Xres,Yres; /* device resolution */ - int orient = -1; /* device orientation */ - int rc = -1; /* return code for QueryDeviceState */ - - if (rc != 0) /* we only bother with this check once */ - Abort("Context: QueryDeviceState didn't work"); - - M[0][0] = M[1][0] = M[0][1] = M[1][1] = 0.0; - - switch (orient) { - case 0: - M[0][0] = Xres; M[1][1] = -Yres; - break; - case 1: - M[1][0] = Yres; M[0][1] = Xres; - break; - case 2: - M[0][0] = -Xres; M[1][1] = Yres; - break; - case 3: - M[1][0] = -Yres; M[0][1] = -Xres; - break; - default: - Abort("QueryDeviceState returned invalid orientation"); - } - return(FindContext(M)); -} - -/* -:h3.FindContext() - Find the Context Given a Matrix - -This routine, given a matrix, returns the index of that matrix matrix in -the context array. If it cannot find it, it will allocate a new array -entry and fill it out. -*/ - -int -FindContext(double M[2][2]) /* array to search for */ -{ - register int i; /* loop variable for search */ - for (i=0; i < nextcontext; i++) - if (M[0][0] == contexts[i].normal[0][0] && M[1][0] == contexts[i].normal[1][0] - && M[0][1] == contexts[i].normal[0][1] && M[1][1] == contexts[i].normal[1][1]) - break; - - if (i >= nextcontext) { - if (i >= MAXCONTEXTS) - Abort("Context: out of them"); - LONGCOPY(contexts[i].normal, M, sizeof(contexts[i].normal)); - MatrixInvert(M, contexts[i].inverse); - nextcontext++; - } - - return(i); -} - -/* -:h3.Context() - Create a Coordinate Space for a Device - -This user operator is implemented by first finding the device context -array index, then transforming IDENTITY space to create an appropriate -cooridnate space. -*/ - -struct XYspace * -Context(pointer device, /* device token */ - double units) /* multiples of one inch */ -{ - double M[2][2]; /* device transformation matrix */ - register int n; /* will hold device context number */ - register struct XYspace *S; /* XYspace constructed */ - - ARGCHECK((device == NULL), "Context of NULLDEVICE not allowed", - NULL, IDENTITY, (0), struct XYspace *); - ARGCHECK((units == 0.0), "Context: bad units", NULL, IDENTITY, (0), struct XYspace *); - - n = FindDeviceContext(device); - - LONGCOPY(M, contexts[n].normal, sizeof(M)); - - M[0][0] *= units; - M[0][1] *= units; - M[1][0] *= units; - M[1][1] *= units; - - S = (struct XYspace *)Xform(IDENTITY, M); - - S->context = n; - return(S); -} -#endif - -/* -:h3.ConsiderContext() - Adjust a Matrix to Take Out Device Transform - -Remember, we have :f/x times U times D/ and :f/M/ and and we want :f/x -times U times M times D/. An easy way to do this is to calculate -:f/D sup <-1> times M times D/, because: -:formula. -x times U times D times D sup <-1> times M times D = x times U times M times D -:formula. -So this subroutine, given an :f/M/and an object, finds the :f/D/ for that -object and modifies :f/M/ so it is :f/D sup <-1> times M times D/. -*/ - -static void -ConsiderContext(struct xobject *obj, /* object to be transformed */ - double M[2][2]) /* matrix (may be changed) */ -{ - register int context = 0; /* index in contexts array */ - - if (obj == NULL) return; - - if (ISPATHTYPE(obj->type)) { - struct segment *path = (struct segment *) obj; - - context = path->context; - } - else if (obj->type == SPACETYPE) { - struct XYspace *S = (struct XYspace *) obj; - - context = S->context; - } - else if (obj->type == PICTURETYPE) { - - } - else - context = NULLCONTEXT; - - if (context != NULLCONTEXT) { - MatrixMultiply(contexts[context].inverse, M, M); - MatrixMultiply(M, contexts[context].normal, M); - } -} - -/* -:h2.Conversion from User's X,Y to "fractpel" X,Y - -When the user is building paths (lines, moves, curves, etc.) he passes -the control points (x,y) for the paths together with an XYspace. We -must convert from the user's (x,y) to our internal representation -which is in pels (fractpels, actually). This involves transforming -the user's (x,y) under the coordinate space transformation. It is -important that we do this quickly. So, we store pointers to different -conversion functions right in the XYspace structure. This allows us -to have simpler special case functions for the more commonly -encountered types of transformations. - -:h3.Convert(), IConvert(), and ForceFloat() - Called Through "XYspace" Structure - -These are functions that fit in the "convert" and "iconvert" function -pointers in the XYspace structure. They call the "xconvert", "yconvert", -"ixconvert", and "iyconvert" as appropriate to actually do the work. -These secondary routines come in many flavors to handle different -special cases as quickly as possible. -*/ - -static void -FXYConvert(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - double x, double y) /* user's coordinates of point */ -{ - pt->x = (*S->xconvert)(S->tofract.normal[0][0], S->tofract.normal[1][0], x, y); - pt->y = (*S->yconvert)(S->tofract.normal[0][1], S->tofract.normal[1][1], x, y); -} - -static void -IXYConvert(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - long x, long y) /* user's coordinates of point */ -{ - pt->x = (*S->ixconvert)(S->itofract[0][0], S->itofract[1][0], x, y); - pt->y = (*S->iyconvert)(S->itofract[0][1], S->itofract[1][1], x, y); -} - -/* -ForceFloat is a substitute for IConvert(), when we just do not have -enough significant digits in the coefficients to get high enough -precision in the answer with fixed point arithmetic. So, we force the -integers to floats, and do the arithmetic all with floats: -*/ - -static void -ForceFloat(struct fractpoint *pt, /* point to set */ - struct XYspace *S, /* relevant coordinate space */ - long x, long y) /* user's coordinates of point */ -{ - (*S->convert)(pt, S, (double) x, (double) y); -} - -/* -:h3.FXYboth(), FXonly(), FYonly() - Floating Point Conversion - -These are the routines we use when the user has given us floating -point numbers for x and y. FXYboth() is the general purpose routine; -FXonly() and FYonly() are special cases when one of the coefficients -is 0.0. -*/ - -static fractpel -FXYboth(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = x * cx + y * cy; - return((fractpel) r); -} - -/*ARGSUSED*/ -static fractpel -FXonly(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = x * cx; - return((fractpel) r); -} - -/*ARGSUSED*/ -static fractpel -FYonly(double cx, double cy, /* x and y coefficients */ - double x, double y) /* user x,y */ -{ - register double r; /* temporary float */ - - r = y * cy; - return((fractpel) r); -} - -/* -:h3.IXYboth(), IXonly(), IYonly() - Simple Integer Conversion - -These are the routines we use when the user has given us integers for -x and y, and the coefficients have enough significant digits to -provide precise answers with only "long" (32 bit?) multiplication. -IXYboth() is the general purpose routine; IXonly() and IYonly() are -special cases when one of the coefficients is 0. -*/ - -static fractpel -IXYboth(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(x * cx + y * cy); -} - -/*ARGSUSED*/ -static fractpel -IXonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(x * cx); -} - -/*ARGSUSED*/ -static fractpel -IYonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return(y * cy); -} - - -/* -:h3.FPXYboth(), FPXonly(), FPYonly() - More Involved Integer Conversion - -These are the routines we use when the user has given us integers for -x and y, but the coefficients do not have enough significant digits to -provide precise answers with only "long" (32 bit?) multiplication. -We have increased the number of significant bits in the coefficients -by FRACTBITS; therefore we must use "double long" (64 bit?) -multiplication by calling FPmult(). FPXYboth() is the general purpose -routine; FPXonly() and FPYonly() are special cases when one of the -coefficients is 0. - -Note that it is perfectly possible for us to calculate X with the -"FP" method and Y with the "I" method, or vice versa. It all depends -on how the functions in the XYspace structure are filled out. -*/ - -static fractpel -FPXYboth(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(x, cx) + FPmult(y, cy) ); -} - -/*ARGSUSED*/ -static fractpel -FPXonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(x, cx) ); -} - -/*ARGSUSED*/ -static fractpel -FPYonly(fractpel cx, fractpel cy, /* x and y coefficients */ - long x, long y) /* user x,y */ -{ - return( FPmult(y, cy) ); -} - - - -/* -:h3.FillOutFcns() - Determine the Appropriate Functions to Use for Conversion - -This function fills out the "convert" and "iconvert" function pointers -in an XYspace structure, and also fills the "helper" -functions that actually do the work. -*/ - -static void -FillOutFcns(struct XYspace *S) /* functions will be set in this structure */ -{ - S->convert = FXYConvert; - S->iconvert = IXYConvert; - - FindFfcn(S->tofract.normal[0][0], S->tofract.normal[1][0], &S->xconvert); - FindFfcn(S->tofract.normal[0][1], S->tofract.normal[1][1], &S->yconvert); - FindIfcn(S->tofract.normal[0][0], S->tofract.normal[1][0], - &S->itofract[0][0], &S->itofract[1][0], &S->ixconvert); - FindIfcn(S->tofract.normal[0][1], S->tofract.normal[1][1], - &S->itofract[0][1], &S->itofract[1][1], &S->iyconvert); - - if (S->ixconvert == NULL || S->iyconvert == NULL) - S->iconvert = ForceFloat; -} - -/* -:h3.PseudoSpace() - Build a Coordinate Space from a Matrix - -Since we have built all this optimized code that, given an (x,y) and -a coordinate space, yield transformed (x,y), it seems a shame not to -use the same logic when we need to multiply an (x,y) by an arbitrary -matrix that is not (initially) part of a coordinate space. This -subroutine takes the arbitrary matrix and builds a coordinate -space, with all its nifty function pointers. -*/ - -static void -PseudoSpace(struct XYspace *S, /* coordinate space structure to fill out */ - double M[2][2]) /* matrix that will become 'tofract.normal' */ -{ - S->type = SPACETYPE; - S->flag = ISPERMANENT(ON) + ISIMMORTAL(ON); - S->references = 2; /* 3-26-91 added PNM */ - S->tofract.normal[0][0] = M[0][0]; - S->tofract.normal[1][0] = M[1][0]; - S->tofract.normal[0][1] = M[0][1]; - S->tofract.normal[1][1] = M[1][1]; - - FillOutFcns(S); -} - -/* -:h4.FindFfcn() - Subroutine of FillOutFcns() to Fill Out Floating Functions - -This function tests for the special case of one of the coefficients -being zero: -*/ - -static void -FindFfcn(double cx, double cy, /* x and y coefficients */ - convertFunc *fcnP) /* pointer to function to set */ -{ - if (cx == 0.0) - *fcnP = FYonly; - else if (cy == 0.0) - *fcnP = FXonly; - else - *fcnP = FXYboth; -} - -/* -:h4.FindIfcn() - Subroutine of FillOutFcns() to Fill Out Integer Functions - -There are two types of integer functions, the 'I' type and the 'FP' type. -We use the I type functions when we are satisfied with simple integer -arithmetic. We used the FP functions when we feel we need higher -precision (but still fixed point) arithmetic. If all else fails, -we store a NULL indicating that this we should do the conversion in -floating point. -*/ - -static void -FindIfcn(double cx, double cy, /* x and y coefficients */ - fractpel *icxP, fractpel *icyP, /* fixed point coefficients to set */ - iconvertFunc *fcnP) /* pointer to function to set */ -{ - register fractpel imax; /* maximum of cx and cy */ - - *icxP = cx; - *icyP = cy; - - if (cx != (float) (*icxP) || cy != (float) (*icyP)) { -/* -At this point we know our integer approximations of the coefficients -are not exact. However, we will still use them if the maximum -coefficient will not fit in a 'fractpel'. Of course, we have little -choice at that point, but we haven't lost that much precision by -staying with integer arithmetic. We have enough significant digits -so that -any error we introduce is less than one part in 2:sup/16/. -*/ - - imax = MAX(ABS(*icxP), ABS(*icyP)); - if (imax < (fractpel) (1<<(FRACTBITS-1)) ) { -/* -At this point we know our integer approximations just do not have -enough significant digits for accuracy. We will add FRACTBITS -significant digits to the coefficients (by multiplying them by -1<<FRACTBITS) and go to the "FP" form of the functions. First, we -check to see if we have ANY significant digits at all (that is, if -imax == 0). If we don't, we suspect that adding FRACTBITS digits -won't help, so we punt the whole thing. -*/ - if (imax == 0) { - *fcnP = NULL; - return; - } - cx *= FRACTFLOAT; - cy *= FRACTFLOAT; - *icxP = cx; - *icyP = cy; - *fcnP = FPXYboth; - } - else - *fcnP = IXYboth; - } - else - *fcnP = IXYboth; -/* -Now we check for special cases where one coefficient is zero (after -integer conversion): -*/ - if (*icxP == 0) - *fcnP = (*fcnP == FPXYboth) ? FPYonly : IYonly; - else if (*icyP == 0) - *fcnP = (*fcnP == FPXYboth) ? FPXonly : IXonly; -} -/* -:h3.UnConvert() - Find User Coordinates From FractPoints - -The interesting thing with this routine is that we avoid calculating -the matrix inverse of the device transformation until we really need -it, which is to say, until this routine is called for the first time -with a given coordinate space. - -We also only calculate it only once. If the inverted matrix is valid, -we don't calculate it; if not, we do. We never expect matrices with -zero determinants, so by convention, we mark the matrix is invalid by -marking both X terms zero. -*/ - -void -UnConvert(struct XYspace *S, /* relevant coordinate space */ - struct fractpoint *pt, /* device coordinates */ - double *xp, double *yp) /* where to store resulting x,y */ -{ - double x,y; - - CoerceInverse(S); - x = pt->x; - y = pt->y; - *xp = S->tofract.inverse[0][0] * x + S->tofract.inverse[1][0] * y; - *yp = S->tofract.inverse[0][1] * x + S->tofract.inverse[1][1] * y; -} - -/* -:h2.Transformations -*/ -/* -:h3 id=xform.Xform() - Transform Object in X and Y - -TYPE1IMAGER wants transformations of objects like paths to be identical -to transformations of spaces. For example, if you scale a line(1,1) -by 10 it should yield the same result as generating the line(1,1) in -a coordinate space that has been scaled by 10. - -We handle fonts by storing the accumulated transform, for example, SR -(accumulating on the right). Then when we map the font through space TD, -for example, we multiply the accumulated font transform on the left by -the space transform on the right, yielding SRTD in this case. We will -get the same result if we did S, then R, then T on the space and mapping -an unmodified font through that space. -*/ - -static struct xobject * -t1_Xform(struct xobject *obj, /* object to transform */ - double M[2][2]) /* transformation matrix */ -{ - if (obj == NULL) - return(NULL); - - if (obj->type == FONTTYPE) { - register struct font *F = (struct font *) obj; - - F = UniqueFont(F); - return((struct xobject*)F); - } - if (obj->type == PICTURETYPE) { -/* -In the case of a picture, we choose both to update the picture's -transformation matrix and keep the handles up to date. -*/ - register struct picture *P = (struct picture *) obj; - register struct segment *handles; /* temporary path to transform handles */ - - P = UniquePicture(P); - handles = PathSegment(LINETYPE, P->origin.x, P->origin.y); - handles = Join(handles, - PathSegment(LINETYPE, P->ending.x, P->ending.y) ); - handles = (struct segment *)Xform((struct xobject *) handles, M); - P->origin = handles->dest; - P->ending = handles->link->dest; - KillPath(handles); - return((struct xobject *)P); - } - - if (ISPATHTYPE(obj->type)) { - struct XYspace pseudo; /* local temporary space */ - PseudoSpace(&pseudo, M); - return((struct xobject *) PathTransform((struct segment *)obj, - &pseudo)); - } - - - if (obj->type == SPACETYPE) { - register struct XYspace *S = (struct XYspace *) obj; - -/* replaced ISPERMANENT(S->flag) with S->references > 1 3-26-91 PNM */ - if (S->references > 1) - S = CopySpace(S); - else - S->ID = NEXTID; - - MatrixMultiply(S->tofract.normal, M, S->tofract.normal); - /* - * mark inverted matrix invalid: - */ - S->flag &= ~HASINVERSE(ON); - - FillOutFcns(S); - return((struct xobject *) S); - } - - return(ArgErr("Untransformable object", obj, obj)); -} - -/* -:h3.Transform() - Transform an Object - -This is the external user's entry point. -*/ -struct xobject * -t1_Transform(struct xobject *obj, - double cxx, double cyx, /* 2x2 transform matrix elements */ - double cxy, double cyy) /* in row order */ -{ - double M[2][2]; - - M[0][0] = cxx; - M[0][1] = cyx; - M[1][0] = cxy; - M[1][1] = cyy; - ConsiderContext(obj, M); - return(Xform(obj, M)); -} - -/* -:h3 id=rotate.Rotate() - Special Case of Transform() - -We special-case different settings of 'degrees' for performance -and accuracy within the DegreeSin() and DegreeCos() routines themselves. -*/ - -#ifdef notdef -struct xobject * -xiRotate(struct xobject *obj, /* object to be transformed */ - double degrees) /* degrees of COUNTER-clockwise rotation */ -{ - double M[2][2]; - - M[0][0] = M[1][1] = DegreeCos(degrees); - M[1][0] = - (M[0][1] = DegreeSin(degrees)); - ConsiderContext(obj, M); - return(Xform(obj, M)); -} -#endif - - -/* -:h2 id=matrixa.Matrix Arithmetic - -Following the convention in Newman and Sproull, :hp1/Interactive -Computer Graphics/, -matrices are organized: -:xmp. - | cxx cyx | - | cxy cyy | -:exmp. -A point is horizontal, for example: -:xmp. - [ x y ] -:exmp. -This means that: -:formula/x prime = cxx times x + cxy times y/ -:formula/y prime = cyx times x + cyy times y/ -I've seen the other convention, where transform matrices are -transposed, equally often in the literature. -*/ - -/* -:h2.Initialization, Queries, and Debug -*/ -/* -:h3.InitSpaces() - Initialize Constant Spaces - -For compatibility, we initialize a coordinate space called USER which -maps 72nds of an inch to pels on the default device. -*/ - -static struct XYspace *USER = &identity; - -void -InitSpaces(void) -{ - IDENTITY->type = SPACETYPE; - FillOutFcns(IDENTITY); - - contexts[NULLCONTEXT].normal[1][0] - = contexts[NULLCONTEXT].normal[0][1] - = contexts[NULLCONTEXT].inverse[1][0] - = contexts[NULLCONTEXT].inverse[0][1] = 0.0; - contexts[NULLCONTEXT].normal[0][0] - = contexts[NULLCONTEXT].normal[1][1] - = contexts[NULLCONTEXT].inverse[0][0] - = contexts[NULLCONTEXT].inverse[1][1] = 1.0; - - USER->flag |= ISIMMORTAL(ON); - CoerceInverse(USER); -} -/* -:h3.QuerySpace() - Returns the Transformation Matrix of a Space - -Since the tofract matrix of an XYspace includes the scale factor -necessary to produce fractpel results (i.e., FRACTFLOAT), this -must be taken out before we return the matrix to the user. Fortunately, -this is simple: just multiply by the inverse of IDENTITY! -*/ - -void -QuerySpace(struct XYspace *S, /* space asked about */ - double *cxxP, double *cyxP, /* where to put answer */ - double *cxyP, double *cyyP) -{ - double M[2][2]; /* temp matrix to build user's answer */ - - if (S->type != SPACETYPE) { - ArgErr("QuerySpace: not a space", S, NULL); - return; - } - MatrixMultiply(S->tofract.normal, IDENTITY->tofract.inverse, M); - *cxxP = M[0][0]; - *cxyP = M[1][0]; - *cyxP = M[0][1]; - *cyyP = M[1][1]; -} diff --git a/libXfont/src/Type1/spaces.h b/libXfont/src/Type1/spaces.h deleted file mode 100644 index 88d1b1524..000000000 --- a/libXfont/src/Type1/spaces.h +++ /dev/null @@ -1,151 +0,0 @@ -/* $Xorg: spaces.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/spaces.h,v 3.3 1999/08/22 08:58:53 dawes Exp $ */ - -/*SHARED*/ - -#define USER t1_User -#define IDENTITY t1_Identity - -#define Context(d,u) t1_Context(d,u) -#define Transform(o,f1,f2,f3,f4) t1_Transform(o,f1,f2,f3,f4) -#define Rotate(o,d) t1_Rotate(o,d) -#define Scale(o,sx,sy) t1_Scale(o,sx,sy) -#define QuerySpace(S,f1,f2,f3,f4) t1_QuerySpace(S,f1,f2,f3,f4) -#define Warp(s1,o,s2) t1_Warp(s1,o,s2) - -/* IDENTITY space */ -extern struct XYspace *IDENTITY; - -/* creates a coordinate space for a device */ -extern struct XYspace *Context(pointer device, double units); -/* transform an object */ -extern struct xobject *t1_Transform ( struct xobject *obj, double cxx, - double cyx, double cxy, double cyy ); -/* returns coordinate space matrix */ -extern void t1_QuerySpace ( struct XYspace *S, double *cxxP, double *cyxP, - double *cxyP, double *cyyP ); - -/*END SHARED*/ -/*SHARED*/ - -/* #define KillSpace(s) Free(s) -Note - redefined KillSpace() to check references ! -3-26-91 PNM */ - -#define KillSpace(s) if ( (--(s->references) == 0) ||\ - ( (s->references == 1) && ISPERMANENT(s->flag) ) )\ - Free(s) - -#define ConsumeSpace(s) MAKECONSUME(s,KillSpace(s)) -#define UniqueSpace(s) MAKEUNIQUE(s,CopySpace(s)) - -/*END SHARED*/ -/*SHARED*/ - -typedef short pel; /* integer pel locations */ -typedef long fractpel; /* fractional pel locations */ - -#define FRACTBITS 16 /* number of fractional bits in 'fractpel' */ -/* -We define the following macros to convert from 'fractpel' to 'pel' and -vice versa: -*/ -#define TOFRACTPEL(p) (((fractpel)p)<<FRACTBITS) -#define FPHALF (1<<(FRACTBITS-1)) -#define NEARESTPEL(fp) (((fp)+FPHALF)>>FRACTBITS) -#define FRACTFLOAT (double)(1L<<FRACTBITS) - -/*END SHARED*/ -/*SHARED*/ - -struct doublematrix { - double normal[2][2]; - double inverse[2][2]; -} ; - -/*END SHARED*/ -/*SHARED*/ - -struct fractpoint { - fractpel x,y; -} ; - -/*SHARED*/ - -typedef fractpel (*convertFunc)(double, double, double, double); -typedef fractpel (*iconvertFunc)(fractpel, fractpel, long, long); - -struct XYspace { - XOBJ_COMMON /* xobject common data define 3-26-91 PNM */ - /* type = SPACETYPE */ - void (*convert)(struct fractpoint *, struct XYspace *, double, double); /* calculate "fractpoint" X,Y from float X,Y */ - void (*iconvert)(struct fractpoint *, struct XYspace *, long, long); /* calculate "fractpoint" X,Y from int X,Y */ - convertFunc xconvert; /* subroutine of convert */ - convertFunc yconvert; /* subroutine of convert */ - iconvertFunc ixconvert; /* subroutine of iconvert */ - iconvertFunc iyconvert; /* subroutine of iconvert */ - int ID; /* unique identifier (used in font caching) */ - unsigned char context; /* device context of coordinate space */ - struct doublematrix tofract; /* xform to get to fractional pels */ - fractpel itofract[2][2]; /* integer version of "tofract.normal" */ -} ; - -#define INVALIDID 0 /* no valid space will have this ID */ - -/*END SHARED*/ -/*END SHARED*/ -/*SHARED*/ - -#define DeviceResolution t1_DeviceResolution -#define InitSpaces t1_InitSpaces -#define CopySpace(s) t1_CopySpace(s) -#define Xform(o,M) t1_Xform(o,M) -#define UnConvert(S,pt,xp,yp) t1_UnConvert(S,pt,xp,yp) -#define MatrixMultiply(A,B,C) t1_MMultiply(A,B,C) -#define MatrixInvert(A,B) t1_MInvert(A,B) -#define PseudoSpace(S,M) t1_PseudoSpace(S,M) -#define FindContext(M) t1_FindContext(M) - -/* initialize pre-defined coordinate spaces */ -extern void t1_InitSpaces ( void ); -/* duplicate a coordinate space */ -extern struct XYspace *t1_CopySpace ( struct XYspace *S ); -/* return user coordinates from device coordinates */ -extern void t1_UnConvert ( struct XYspace *S, struct fractpoint *pt, - double *xp, double *yp ); -/* return the "context" represented by a matrix */ -int t1_FindContext(double M[2][2]); - -/*END SHARED*/ -/*SHARED*/ - -#define NULLCONTEXT 0 - -/*END SHARED*/ diff --git a/libXfont/src/Type1/strokes.h b/libXfont/src/Type1/strokes.h deleted file mode 100644 index c374e16db..000000000 --- a/libXfont/src/Type1/strokes.h +++ /dev/null @@ -1,38 +0,0 @@ -/* $Xorg: strokes.h,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/*STUB*/ - -#define CopyLineStyle(s) s -#define CopyStrokePath(p) p -#define KillStrokePath(p) -#define KillLineStyle(s) -#define CoercePath(sp) sp -#define DoStroke(sp) sp - diff --git a/libXfont/src/Type1/t1funcs.c b/libXfont/src/Type1/t1funcs.c deleted file mode 100644 index e4b2209b0..000000000 --- a/libXfont/src/Type1/t1funcs.c +++ /dev/null @@ -1,754 +0,0 @@ -/* $Xorg: t1funcs.c,v 1.5 2001/02/09 02:04:01 xorgcvs Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License, subject to the license given below, to use, - * copy, modify, and distribute this software * and its - * documentation for any purpose and without fee is hereby - * granted, provided that the above copyright notice appear - * in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software - * without specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Author: Jeffrey B. Lotspiech, IBM Almaden Research Center - * Modeled on spfuncs.c by Dave Lemke, Network Computing Devices, Inc - * which contains the following copyright and permission notices: - * - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices - * or Digital not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * Network Computing Devices or Digital make no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.33 2003/07/19 13:16:40 tsi Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef FONTMODULE -#include <string.h> -#ifdef _XOPEN_SOURCE -#include <math.h> -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include <math.h> -#undef _XOPEN_SOURCE -#endif -#include "X11/Xfuncs.h" -#ifdef USE_MMAP -#include <sys/types.h> -#include <sys/mman.h> -#endif -#else -#include "Xmd.h" -#include "Xdefs.h" -#endif - -#ifdef FONTMODULE -#include "os.h" -#include "xf86_ansic.h" -#endif - -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontutil.h> -#include <X11/fonts/FSproto.h> -#include <X11/fonts/fontenc.h> -#include "t1unicode.h" - -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" -#include "t1stdio.h" -#include "util.h" -#include "fontfcn.h" -#include "t1intf.h" - - -static int Type1GetGlyphs ( FontPtr pFont, unsigned long count, - unsigned char *chars, FontEncoding charEncoding, - unsigned long *glyphCount, CharInfoPtr *glyphs ); - -static int Type1GetMetrics ( FontPtr pFont, unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, - xCharInfo **glyphs ); - - -#define minchar(p) ((p).min_char_low + ((p).min_char_high << 8)) -#define maxchar(p) ((p).max_char_low + ((p).max_char_high << 8)) - -static void fillrun ( char *p, pel x0, pel x1, int bit ); - -extern psfont *FontP; -extern psobj *ISOLatin1EncArrayP; - -static void fill ( char *dest, int h, int w, struct region *area, int byte, - int bit, int wordsize ); - -static int -Type1ReturnCodeToXReturnCode(int rc) -{ - switch(rc) { - case SCAN_OK: - return Successful; - case SCAN_FILE_EOF: - /* fall through to BadFontFormat */ - case SCAN_ERROR: - return BadFontFormat; - case SCAN_OUT_OF_MEMORY: - return AllocError; - case SCAN_FILE_OPEN_ERROR: - return BadFontName; - case SCAN_TRUE: - case SCAN_FALSE: - case SCAN_END: - /* fall through */ - default: - /* this should not happen */ - ErrorF("Type1 return code not convertable to X return code: %d\n", rc); - return rc; - } -} - -/*ARGSUSED*/ -int -Type1OpenScalable (FontPathElementPtr fpe, - FontPtr *ppFont, - int flags, - FontEntryPtr entry, - char *fileName, - FontScalablePtr vals, - fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font) /* We don't do licensing */ -{ - FontPtr pFont; - int bit, - byte, - glyph, - scan, - image; - int pad,wordsize; /* scan & image in bits */ - long *pool; /* memory pool for ximager objects */ - int size; /* for memory size calculations */ - struct XYspace *S; /* coordinate space for character */ - struct region *area; - CharInfoRec *glyphs; - int len, rc, count = 0, i = 0; - struct type1font *type1; - char *p; - FontMapPtr mapping = NULL; - int no_mapping; - psobj *fontmatrix; - long x0, total_width = 0, total_raw_width = 0; - double x1, y1, t1 = .001, t2 = 0.0, t3 = 0.0, t4 = .001; - double sxmult; - - /* Reject ridiculously small font sizes that will blow up the math */ - if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) - return BadFontName; - - /* set up default values */ - FontDefaultFormat(&bit, &byte, &glyph, &scan); - /* get any changes made from above */ - rc = CheckFSFormat(format, fmask, &bit, &byte, &scan, &glyph, &image); - if (rc != Successful) - return rc; - - pad = glyph * 8; - wordsize = scan * 8; - -#define PAD(bits, pad) (((bits)+(pad)-1)&-(pad)) - - pFont = CreateFontRec(); - if (pFont == NULL) - return AllocError; - - type1 = (struct type1font *)xalloc(sizeof(struct type1font)); - if (type1 == NULL) { - DestroyFontRec(pFont); - return AllocError; - } - bzero(type1, sizeof(struct type1font)); - - /* heuristic for "maximum" size of pool we'll need: */ - size = 200000 + 600 * - (int)hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) - * sizeof(short); - if (size < 0 || NULL == (pool = (long *) xalloc(size))) { - xfree(type1); - DestroyFontRec(pFont); - return AllocError; - } - - addmemory(pool, size); - - - glyphs = type1->glyphs; - - /* load font if not already loaded */ - if (!fontfcnA(fileName, &rc)) { - delmemory(); - xfree(type1); - DestroyFontRec(pFont); - xfree(pool); - return Type1ReturnCodeToXReturnCode(rc); - } - - fontmatrix = &FontP->fontInfoP[FONTMATRIX].value; - if (objPIsArray(fontmatrix) && fontmatrix->len == 6) - { -#define assign(n,d,f) if (objPIsInteger(fontmatrix->data.arrayP + n)) \ - d = fontmatrix->data.arrayP[n].data.integer; \ - else if (objPIsReal(fontmatrix->data.arrayP + n)) \ - d = fontmatrix->data.arrayP[n].data.real; \ - else d = f; - - assign(0, t1, .001); - assign(1, t2, 0.0); - assign(2, t3, 0.0); - assign(3, t4, .001); - } - - S = (struct XYspace *) t1_Transform((struct xobject *)IDENTITY, - t1, t2, t3, t4); - - S = (struct XYspace *) Permanent(t1_Transform((struct xobject *)S, - vals->pixel_matrix[0], - -vals->pixel_matrix[1], - vals->pixel_matrix[2], - -vals->pixel_matrix[3])); - - - /* multiplier for computation of raw values */ - sxmult = hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - - no_mapping=0; - p = FontEncFromXLFD(entry->name.name, entry->name.length); - - if(p==0) { /* XLFD does not specify an encoding */ - mapping=0; - no_mapping=2; /* ISO 8859-1 */ - } - - if(!strcmp(p, "adobe-fontspecific")) { - mapping=0; - no_mapping=1; /* font's native encoding vector */ - } - - pFont->info.firstCol = 255; - pFont->info.lastCol = 0; - - if(!no_mapping) { - mapping = FontEncMapFind(p, - FONT_ENCODING_POSTSCRIPT, -1, -1, - fileName); - if(!mapping) - mapping = FontEncMapFind(p, - FONT_ENCODING_UNICODE, -1, -1, - fileName); - if(!mapping) - goto NoEncoding; - else - no_mapping=0; - } - - for (i=0; i < 256; i++) { - long h,w; - long paddedW; - int j; - char *codename; - - if(no_mapping == 1) { - codename = FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].data.valueP; - len = FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].len; - } else if(no_mapping) { - codename = unicodetoPSname(i); - len = codename ? strlen(codename) : 0; - } else { - if(mapping->type == FONT_ENCODING_UNICODE) { - codename = unicodetoPSname(FontEncRecode(i, mapping)); - } else - codename = FontEncName(i, mapping); - len=codename?strlen(codename):0; - } - - /* Avoid multiply rasterising the undefined glyph */ - if(len==7 && !strncmp(codename, ".notdef", 7)) { - len=0; - codename=0; - } - - /* But do rasterise it at least once */ - if(len==0) { - if(i==0) { - codename=".notdef"; - len=7; - } else - continue; - } - - /* See if this character is in the list of ranges specified - in the XLFD name */ - if(i!=0) { - for (j = 0; j < vals->nranges; j++) - if (i >= minchar(vals->ranges[j]) && - i <= maxchar(vals->ranges[j])) - break; - - /* If not, don't realize it. */ - if (vals->nranges && j == vals->nranges) - continue; - } - - rc = 0; - area = (struct region *)fontfcnB(S, (unsigned char *)codename, - &len, &rc); - if (rc < 0) { - rc = Type1ReturnCodeToXReturnCode(rc); - break; - } - else if (rc > 0) - continue; - - if (area == NULL) - continue; - - if (pFont->info.firstCol > i) - pFont->info.firstCol = i; - if (pFont->info.lastCol < i) - pFont->info.lastCol = i; - - h = area->ymax - area->ymin; - w = area->xmax - area->xmin; - paddedW = PAD(w, pad); - - if (h > 0 && w > 0) { - size = h * paddedW / 8; - glyphs[i].bits = (char *)xalloc(size); - if (glyphs[i].bits == NULL) { - rc = AllocError; - break; - } - } - else { - size = 0; - h = w = 0; - area->xmin = area->xmax = 0; - area->ymax = area->ymax = 0; - } - - glyphs[i].metrics.leftSideBearing = area->xmin; - x1 = (double)(x0 = area->ending.x - area->origin.x); - y1 = (double)(area->ending.y - area->origin.y); - glyphs[i].metrics.characterWidth = - (x0 + (x0 > 0 ? FPHALF : -FPHALF)) / (1 << FRACTBITS); - if (!glyphs[i].metrics.characterWidth && size == 0) - { - /* Zero size and zero extents: presumably caused by - the choice of transformation. Let's create a - small bitmap so we're not mistaken for an undefined - character. */ - h = w = 1; - size = paddedW = PAD(w, pad); - glyphs[i].bits = (char *)xalloc(size); - if (glyphs[i].bits == NULL) { - rc = AllocError; - break; - } - } - glyphs[i].metrics.attributes = - NEARESTPEL((long)(hypot(x1, y1) * sxmult)); - total_width += glyphs[i].metrics.attributes; - total_raw_width += abs((int)(INT16)glyphs[i].metrics.attributes); - count++; - glyphs[i].metrics.rightSideBearing = w + area->xmin; - glyphs[i].metrics.descent = area->ymax - NEARESTPEL(area->origin.y); - glyphs[i].metrics.ascent = h - glyphs[i].metrics.descent; - - - bzero(glyphs[i].bits, size); - if (h > 0 && w > 0) { - fill(glyphs[i].bits, h, paddedW, area, byte, bit, wordsize ); - } - - Destroy(area); - } - NoEncoding: - - delmemory(); - xfree(pool); - - if (pFont->info.firstCol > pFont->info.lastCol) - { - xfree(type1); - DestroyFontRec(pFont); - return BadFontName; - } - - if (i != 256) { - for (i--; i >= 0; i--) - if (glyphs[i].bits != NULL) - xfree(glyphs[i].bits); - xfree(type1); - DestroyFontRec(pFont); - return rc; - } - type1->pDefault = NULL; - - pFont->format = format; - - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - - pFont->info.firstRow = 0; - pFont->info.lastRow = 0; - - pFont->get_metrics = Type1GetMetrics; - pFont->get_glyphs = Type1GetGlyphs; - pFont->unload_font = Type1CloseFont; - pFont->unload_glyphs = NULL; - pFont->refcnt = 0; - - pFont->fontPrivate = (unsigned char *) type1; - - if (count) - { - total_raw_width = (total_raw_width * 10 + count / 2) / count; - if (total_width < 0) - { - /* Predominant direction is R->L */ - total_raw_width = -total_raw_width; - } - vals->width = (int)((double)total_raw_width * - vals->pixel_matrix[0] / 1000.0 + - (vals->pixel_matrix[0] > 0 ? .5 : -.5)); - } - - T1FillFontInfo(pFont, vals, fileName, entry->name.name, total_raw_width); - - *ppFont = pFont; - return Successful; -} - -static int -Type1GetGlyphs(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - CharInfoPtr *glyphs) /* RETURN */ -{ - unsigned int firstRow; - unsigned int numRows; - CharInfoPtr *glyphsBase; - register unsigned int c; - register CharInfoPtr pci; - unsigned int r; - CharInfoPtr pDefault; - register struct type1font *type1Font; - register int firstCol; - - type1Font = (struct type1font *) pFont->fontPrivate; - firstCol = pFont->info.firstCol; - pDefault = type1Font->pDefault; - glyphsBase = glyphs; - - switch (charEncoding) { - -#define EXIST(pci) \ - ((pci)->metrics.attributes || \ - (pci)->metrics.ascent != -(pci)->metrics.descent || \ - (pci)->metrics.leftSideBearing != (pci)->metrics.rightSideBearing) - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - while (count--) { - c = (*chars++); - if (c >= firstCol && - (pci = &type1Font->glyphs[c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - case Linear16Bit: - while (count--) { - c = *chars++ << 8; - c = (c | *chars++); - if (c < 256 && c >= firstCol && - (pci = &type1Font->glyphs[c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - - case TwoD16Bit: - firstRow = pFont->info.firstRow; - numRows = pFont->info.lastRow - firstRow + 1; - while (count--) { - r = (*chars++) - firstRow; - c = (*chars++); - if (r < numRows && c < 256 && c >= firstCol && - (pci = &type1Font->glyphs[(r << 8) + c]) && - EXIST(pci)) - *glyphs++ = pci; - else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - return Successful; - -#undef EXIST -} - -static int -Type1GetMetrics(FontPtr pFont, - unsigned long count, - unsigned char *chars, - FontEncoding charEncoding, - unsigned long *glyphCount, /* RETURN */ - xCharInfo **glyphs) /* RETURN */ -{ - static CharInfoRec nonExistantChar; - - int ret; - struct type1font *type1Font; - CharInfoPtr oldDefault; - - type1Font = (struct type1font *) pFont->fontPrivate; - oldDefault = type1Font->pDefault; - type1Font->pDefault = &nonExistantChar; - ret = Type1GetGlyphs(pFont, count, chars, charEncoding, glyphCount, (CharInfoPtr *) glyphs); - type1Font->pDefault = oldDefault; - return ret; -} - -void -Type1CloseFont(FontPtr pFont) -{ - register int i; - struct type1font *type1; - - type1 = (struct type1font *) pFont->fontPrivate; - for (i=0; i < 256; i++) - if (type1->glyphs[i].bits != NULL) - xfree(type1->glyphs[i].bits); - xfree(type1); - - if (pFont->info.props) - xfree(pFont->info.props); - - if (pFont->info.isStringProp) - xfree(pFont->info.isStringProp); - - DestroyFontRec(pFont); -} - -static void -fill(char *dest, /* destination bitmap */ - int h, int w, /* dimensions of 'dest', w padded */ - struct region *area, /* region to write to 'dest' */ - int byte, int bit, /* flags; LSBFirst or MSBFirst */ - int wordsize) /* number of bits per word for LSB/MSB purposes */ -{ - register struct edgelist *edge; /* for looping through edges */ - register char *p; /* current scan line in 'dest' */ - register int y; /* for looping through scans */ - register int wbytes = w / 8; /* number of bytes in width */ - register pel *leftP,*rightP; /* pointers to X values, left and right */ - int xmin = area->xmin; /* upper left X */ - int ymin = area->ymin; /* upper left Y */ - - for (edge = area->anchor; VALIDEDGE(edge); edge = edge->link->link) { - - p = dest + (edge->ymin - ymin) * wbytes; - leftP = edge->xvalues; - rightP = edge->link->xvalues; - - for (y = edge->ymin; y < edge->ymax; y++) { - fillrun(p, *leftP++ - xmin, *rightP++ - xmin, bit); - p += wbytes; - } - } -/* -Now, as an afterthought, we'll go reorganize if odd byte order requires -it: -*/ - if (byte == LSBFirst && wordsize != 8) { - register int i; - - switch (wordsize) { - case 16: - { - register unsigned short data,*p; - - p = (unsigned short *) dest; - - for (i = h * w /16; --i >= 0;) { - data = *p; - *p++ = (data << 8) + (data >> 8); - } - break; - } - case 64: - case 32: - { - register unsigned long data,*p; - - p = (unsigned long *) dest; - - for (i = h * w / 32; --i >= 0;) { - data = *p; - *p++ = (data << 24) + (data >> 24) - + (0xFF00 & (data >> 8)) - + (0xFF0000 & (data << 8)); - } - if (wordsize == 64) { - - p = (unsigned long *) dest; - - for (i = h * w / 64; --i >= 0;) { - data = *p++; - p[-1] = p[0]; - *p++ = data; - } - } - break; - } - default: - Abort("xiFill: unknown format"); - } - } - -} - -#define ALLONES 0xFF - -static void -fillrun(char *p, /* address of this scan line */ - pel x0, pel x1, /* left and right X */ - int bit) /* format: LSBFirst or MSBFirst */ -{ - register int startmask,endmask; /* bits to set in first and last char*/ - register int middle; /* number of chars between start and end + 1 */ - - if (x1 <= x0) - return; - middle = x1/8 - x0/8; - p += x0/8; - x0 &= 7; x1 &= 7; - if (bit == LSBFirst) { - startmask = ALLONES << x0; - endmask = ~(ALLONES << x1); - } - else { - startmask = ALLONES >> x0; - endmask = ~(ALLONES >> x1); - } - if (middle == 0) - *p++ |= startmask & endmask; - else { - *p++ |= startmask; - while (--middle > 0) - *p++ = (char)ALLONES; - *p |= endmask; - } -} - -#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING) - -static FontRendererRec renderers[] = { - { ".pfa", 4, NULL, Type1OpenScalable, - NULL, Type1GetInfoScalable, 0, CAPABILITIES }, - { ".pfb", 4, NULL, Type1OpenScalable, - NULL, Type1GetInfoScalable, 0, CAPABILITIES } -}; - -void -Type1RegisterFontFileFunctions(void) -{ - int i; - - T1InitStdProps(); - for (i=0; i < sizeof(renderers) / sizeof(FontRendererRec); i++) - FontFilePriorityRegisterRenderer(&renderers[i], -10); -} diff --git a/libXfont/src/Type1/t1hdigit.h b/libXfont/src/Type1/t1hdigit.h deleted file mode 100644 index e05f0de5d..000000000 --- a/libXfont/src/Type1/t1hdigit.h +++ /dev/null @@ -1,40 +0,0 @@ -/* $Xorg: t1hdigit.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* Indicators for special characters in the p_hdigit.h tables */ -#define HERROR (0xfe) -#define HWHITE_SPACE (0xfd) -#define HRIGHT_ANGLE (0xfc) -#define LAST_HDIGIT (0xf0) - -/* Declarations for the tables */ -#define HighHexP (HighHex+1) -extern unsigned char HighHex[]; -#define LowHexP (LowHex+1) -extern unsigned char LowHex[]; diff --git a/libXfont/src/Type1/t1imager.h b/libXfont/src/Type1/t1imager.h deleted file mode 100644 index 9730f9a47..000000000 --- a/libXfont/src/Type1/t1imager.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $Xorg: t1imager.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.4 2001/01/17 19:43:23 dawes Exp $ */ - - -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "regions.h" - -typedef struct xobject *xobject; -typedef struct segment *path; -typedef struct region *region; -typedef struct XYspace *XYspace; - - -#ifndef NULL -#include <stddef.h> -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - - -#define WINDINGRULE -2 -#define EVENODDRULE -3 - -#define CONTINUITY 0x80 /* can be added to above rules; e.g. WINDINGRULE+CONTINUITY */ - - -/* -Generic null object definition: -*/ -#define NULLOBJECT ((xobject)NULL) - -/* -Null path definition: -*/ -#define NULLPATH NULLOBJECT - -/* -Full page and null region definition: -*/ -#define INFINITY t1_Infinity -#ifndef NOEXTERNS -extern region *INFINITY; -#endif -#define NULLREGION NULLOBJECT - -#define FF_PARSE_ERROR 5 -#define FF_PATH 1 - diff --git a/libXfont/src/Type1/t1info.c b/libXfont/src/Type1/t1info.c deleted file mode 100644 index eea22b307..000000000 --- a/libXfont/src/Type1/t1info.c +++ /dev/null @@ -1,496 +0,0 @@ -/* $Xorg: t1info.c,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License, subject to the license given below, to use, - * copy, modify, and distribute this software * and its - * documentation for any purpose and without fee is hereby - * granted, provided that the above copyright notice appear - * in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software - * without specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Author: Carol H. Thompson IBM Almaden Research Center - * Modeled on spinfo.c by Dave Lemke, Network Computing Devices, Inc - * which contains the following copyright and permission notices: - * - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices and Digital make no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.18tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontutil.h> -#ifndef FONTMODULE -#include <stdio.h> -#include <math.h> -#else -#include "xf86_ansic.h" -#endif -#include <X11/fonts/FSproto.h> - -#include "objects.h" -#include "spaces.h" -#include "fontfcn.h" - -#include "t1intf.h" - -#define DECIPOINTSPERINCH 722.7 -#define DEFAULTRES 75 -#define DEFAULTPOINTSIZE 120 - -enum scaleType { - atom, truncate_atom, pixel_size, point_size, resolution_x, - resolution_y, average_width -}; - -typedef struct _fontProp { - char *name; - long atom; - enum scaleType type; -} fontProp; - -static fontProp fontNamePropTable[] = { /* Example: */ - { "FOUNDRY", 0, atom }, /* adobe */ - { "FAMILY_NAME", 0, atom }, /* times roman */ - { "WEIGHT_NAME", 0, atom }, /* bold */ - { "SLANT", 0, atom }, /* i */ - { "SETWIDTH_NAME", 0, atom }, /* normal */ - { "ADD_STYLE_NAME", 0, atom }, /* */ - { "PIXEL_SIZE", 0, pixel_size }, /* 18 */ - { "POINT_SIZE", 0, point_size }, /* 180 */ - { "RESOLUTION_X", 0, resolution_x }, /* 72 */ - { "RESOLUTION_Y", 0, resolution_y }, /* 72 */ - { "SPACING", 0, atom }, /* p */ - { "AVERAGE_WIDTH", 0, average_width }, /* 0 */ - { "CHARSET_REGISTRY", 0, atom }, /* ISO8859 */ - { "CHARSET_ENCODING", 0, truncate_atom } /* 1 */ -}; - -/* NOTICE: Following array is closely related to the sequence of defines - following it. */ -static fontProp extraProps[] = { - { "FONT", 0, }, - { "COPYRIGHT", 0, }, - { "RAW_PIXEL_SIZE", 0, }, - { "RAW_POINT_SIZE", 0, }, - { "RAW_ASCENT", 0, }, - { "RAW_DESCENT", 0, }, - { "RAW_AVERAGE_WIDTH", 0, }, - { "FACE_NAME", 0, }, - { "FONT_TYPE", 0, }, - { "RASTERIZER_NAME", 0, } -}; - -/* this is a bit kludgy */ -#define FONTPROP 0 -#define COPYRIGHTPROP 1 -#define RAWPIXELPROP 2 -#define RAWPOINTPROP 3 -#define RAWASCENTPROP 4 -#define RAWDESCENTPROP 5 -#define RAWWIDTHPROP 6 -#define FACE_NAMEPROP 7 -#define FONT_TYPEPROP 8 -#define RASTERIZER_NAMEPROP 9 - -#define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) -#define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) - -#define NPROPS (NNAMEPROPS + NEXTRAPROPS) - -/*ARGSUSED*/ -static void -FillHeader(FontInfoPtr pInfo, FontScalablePtr Vals) -{ - /* OpenScalable in T1FUNCS sets the following: - pInfo->firstCol, - pInfo->firstRow, - pInfo->lastCol, and - pInfo->lastRow. */ - /* the following are ununsed - pInfo->pad. */ - - /* Items we should handle better someday +++ */ - pInfo->defaultCh = 0; - pInfo->drawDirection = LeftToRight; - if (Vals->point_matrix[0] == Vals->point_matrix[3]) - pInfo->anamorphic = 0; - else - pInfo->anamorphic = 1; - pInfo->inkMetrics = 0; /* no ink metrics here */ - pInfo->cachable = 1; /* no licensing (yet) */ -} - -static void -adjust_min_max(xCharInfo *minc, xCharInfo *maxc, xCharInfo *tmp) -{ -#define MINMAX(field,ci) \ - if (minc->field > (ci)->field) \ - minc->field = (ci)->field; \ - if (maxc->field < (ci)->field) \ - maxc->field = (ci)->field; - - MINMAX(ascent, tmp); - MINMAX(descent, tmp); - MINMAX(leftSideBearing, tmp); - MINMAX(rightSideBearing, tmp); - MINMAX(characterWidth, tmp); - - /* Do MINMAX for attributes field. Since that field is CARD16, - we'll cast to a signed integer */ - if ((INT16)minc->attributes > (INT16)tmp->attributes) - minc->attributes = tmp->attributes; - if ((INT16)maxc->attributes < (INT16)tmp->attributes) - maxc->attributes = tmp->attributes; - -#undef MINMAX -} - -static void -ComputeBounds(FontInfoPtr pInfo, CharInfoPtr pChars, FontScalablePtr Vals) -{ - int i; - xCharInfo minchar, maxchar; - int numchars = 0; - int totchars; - int overlap; - int maxlap; - - minchar.ascent = minchar.descent = - minchar.leftSideBearing = minchar.rightSideBearing = - minchar.characterWidth = minchar.attributes = 32767; - maxchar.ascent = maxchar.descent = - maxchar.leftSideBearing = maxchar.rightSideBearing = - maxchar.characterWidth = maxchar.attributes = -32767; - - maxlap = -32767; - totchars = pInfo->lastCol - pInfo->firstCol + 1; - pChars += pInfo->firstCol; - pInfo->allExist = 1; - for (i = 0; i < totchars; i++,pChars++) { - xCharInfo *pmetrics = &pChars->metrics; - - if (pmetrics->attributes || - pmetrics->ascent != -pmetrics->descent || - pmetrics->leftSideBearing != pmetrics->rightSideBearing) { - numchars++; - adjust_min_max(&minchar, &maxchar, pmetrics); - overlap = pmetrics->rightSideBearing - pmetrics->characterWidth; - if (overlap > maxlap) maxlap = overlap; - } - else pInfo->allExist = 0; - } - - /* If we're monospaced, round the average width field to the - nearest pixel */ - if (minchar.characterWidth == maxchar.characterWidth) - Vals->width = minchar.characterWidth * 10; - - pInfo->maxbounds = maxchar; - pInfo->minbounds = minchar; - pInfo->ink_maxbounds = maxchar; - pInfo->ink_minbounds = minchar; - pInfo->maxOverlap = maxlap + -(minchar.leftSideBearing); - - /* Set the pInfo flags */ - /* Properties set by FontComputeInfoAccelerators: - pInfo->noOverlap; - pInfo->terminalFont; - pInfo->constantMetrics; - pInfo->constantWidth; - pInfo->inkInside; - - */ - FontComputeInfoAccelerators (pInfo); -} - -static void -ComputeProps(FontInfoPtr pInfo, FontScalablePtr Vals, char *Filename, - long *sAscent, long *sDescent) -{ - int infoint; - int infoBBox[4]; - int rc; - - QueryFontLib(Filename, "isFixedPitch", &infoint, &rc); - if (!rc) { - pInfo->constantWidth = infoint; - } - QueryFontLib((char *)0, "FontBBox", infoBBox, &rc); - if (!rc) { - pInfo->fontAscent = - (int)((double)infoBBox[3] * Vals->pixel_matrix[3] + - (infoBBox[3] > 0 ? 500 : -500)) / 1000; - pInfo->fontDescent = - -(int)((double)infoBBox[1] * Vals->pixel_matrix[3] + - (infoBBox[1] > 0 ? 500 : -500)) / 1000; - *sAscent = infoBBox[3]; - *sDescent = -infoBBox[1]; - } -} - -static void -ComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, - char *Filename, char *Fontname, - long sAscent, long sDescent, long sWidth) -{ - FontPropPtr pp; - int i, - nprops; - fontProp *fpt; - char *is_str; - char *ptr1 = NULL, - *ptr2; - char *ptr3; - char *infostrP; - int rc; - char scaledName[MAXFONTNAMELEN]; - - strcpy (scaledName, Fontname); - /* Fill in our copy of the fontname from the Vals structure */ - FontParseXLFDName (scaledName, Vals, FONT_XLFD_REPLACE_VALUE); - - /* This form of the properties is used by the X-client; the X-server - doesn't care what they are. */ - nprops = pInfo->nprops = NPROPS; - pInfo->isStringProp = (char *) xalloc(sizeof(char) * nprops); - pInfo->props = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops); - if (!pInfo->isStringProp || !pInfo->props) { - xfree(pInfo->isStringProp); - pInfo->isStringProp = (char *) 0; - xfree(pInfo->props); - pInfo->props = (FontPropPtr) 0; - return; - } - bzero(pInfo->isStringProp, (sizeof(char) * nprops)); - - ptr2 = scaledName; - for (i = NNAMEPROPS, pp = pInfo->props, fpt = fontNamePropTable, is_str = pInfo->isStringProp; - i; - i--, pp++, fpt++, is_str++) { - - if (*ptr2) - { - ptr1 = ptr2 + 1; - if (!(ptr2 = strchr(ptr1, '-'))) ptr2 = strchr(ptr1, '\0'); - } - - pp->name = fpt->atom; - switch (fpt->type) { - case atom: /* Just copy info from scaledName */ - *is_str = TRUE; - pp->value = MakeAtom(ptr1, ptr2 - ptr1, TRUE); - break; - case truncate_atom: - *is_str = TRUE; - for (ptr3 = ptr1; *ptr3; ptr3++) - if (*ptr3 == '[') - break; - pp->value = MakeAtom(ptr1, ptr3 - ptr1, TRUE); - break; - case pixel_size: - pp->value = (int)(fabs(Vals->pixel_matrix[3]) + .5); - break; - case point_size: - pp->value = (int)(fabs(Vals->point_matrix[3]) * 10.0 + .5); - break; - case resolution_x: - pp->value = Vals->x; - break; - case resolution_y: - pp->value = Vals->y; - break; - case average_width: - pp->value = Vals->width; - break; - } - } - - for (i = 0, fpt = extraProps; - i < NEXTRAPROPS; - i++, is_str++, pp++, fpt++) { - pp->name = fpt->atom; - switch (i) { - case FONTPROP: - *is_str = TRUE; - pp->value = MakeAtom(scaledName, strlen(scaledName), TRUE); - break; - case COPYRIGHTPROP: - *is_str = TRUE; - QueryFontLib(Filename, "Notice", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "Copyright Notice not available"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FACE_NAMEPROP: - *is_str = TRUE; - QueryFontLib(Filename, "FontName", &infostrP, &rc); - if (rc || !infostrP) { - infostrP = "(unknown)"; - } - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case FONT_TYPEPROP: - *is_str = TRUE; - infostrP = "Type 1"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RASTERIZER_NAMEPROP: - *is_str = TRUE; - infostrP = "X Consortium Type 1 Rasterizer"; - pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); - break; - case RAWPIXELPROP: - *is_str = FALSE; - pp->value = 1000; - break; - case RAWPOINTPROP: - *is_str = FALSE; - pp->value = (long)(72270.0 / (double)Vals->y + .5); - break; - case RAWASCENTPROP: - *is_str = FALSE; - pp->value = sAscent; - break; - case RAWDESCENTPROP: - *is_str = FALSE; - pp->value = sDescent; - break; - case RAWWIDTHPROP: - *is_str = FALSE; - pp->value = sWidth; - break; - } - } -} - -/*ARGSUSED*/ -int -Type1GetInfoScalable(FontPathElementPtr fpe, - FontInfoPtr pInfo, - FontEntryPtr entry, - FontNamePtr fontName, - char *fileName, - FontScalablePtr Vals) -{ - FontPtr pfont; - int flags = 0; - long format = 0; /* It doesn't matter what format for just info */ - long fmask = 0; - int ret; - - ret = Type1OpenScalable(fpe, &pfont, flags, entry, fileName, Vals, - format, fmask , NULL); - if (ret != Successful) - return ret; - *pInfo = pfont->info; - - /* XXX - Set pointers in pfont->info to NULL so they are not freed. */ - pfont->info.props = NULL; - pfont->info.isStringProp = NULL; - - Type1CloseFont(pfont); - return Successful; -} - -void -T1FillFontInfo(FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, long sWidth) -{ - FontInfoPtr pInfo = &pFont->info; - struct type1font *p = (struct type1font *)pFont->fontPrivate; - long sAscent = 0, sDescent = 0; /* Scalable 1000-pixel values */ - - FillHeader(pInfo, Vals); - - ComputeBounds(pInfo, p->glyphs, Vals); - - ComputeProps(pInfo, Vals, Filename, &sAscent, &sDescent); - ComputeStdProps(pInfo, Vals, Filename, Fontname, sAscent, sDescent, sWidth); -} - -/* Called once, at renderer registration time */ -void -T1InitStdProps(void) -{ - int i; - fontProp *t; - - i = sizeof(fontNamePropTable) / sizeof(fontProp); - for (t = fontNamePropTable; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); - i = sizeof(extraProps) / sizeof(fontProp); - for (t = extraProps; i; i--, t++) - t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE); -} diff --git a/libXfont/src/Type1/t1intf.h b/libXfont/src/Type1/t1intf.h deleted file mode 100644 index 371908090..000000000 --- a/libXfont/src/Type1/t1intf.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $Xorg: t1intf.h,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.6 2001/01/17 19:43:23 dawes Exp $ */ - -struct type1font { - CharInfoPtr pDefault; - CharInfoRec glyphs[256]; -}; - -/* - * Function prototypes - */ -/* t1funcs.c */ -extern int Type1OpenScalable ( FontPathElementPtr fpe, FontPtr *ppFont, - int flags, FontEntryPtr entry, char *fileName, - FontScalablePtr vals, fsBitmapFormat format, - fsBitmapFormatMask fmask, - FontPtr non_cachable_font ); -extern void Type1CloseFont ( FontPtr pFont ); - -/* t1info.c */ -extern int Type1GetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, - FontEntryPtr entry, FontNamePtr fontName, - char *fileName, FontScalablePtr Vals ); -extern void T1FillFontInfo ( FontPtr pFont, FontScalablePtr Vals, - char *Filename, char *Fontname, long sWidth ); -extern void Type1InitStdProps ( void ); diff --git a/libXfont/src/Type1/t1io.c b/libXfont/src/Type1/t1io.c deleted file mode 100644 index ba2e580f8..000000000 --- a/libXfont/src/Type1/t1io.c +++ /dev/null @@ -1,299 +0,0 @@ -/* $Xorg: t1io.c,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * Author: Carol H. Thompson IBM Almaden Research Center - */ -/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ -/******************************************************************* -* I/O package for Type 1 font reading -********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef STATIC -#define STATIC static -#endif - -#ifndef FONTMODULE -#include <fcntl.h> -#include <unistd.h> -#else -#include "Xdefs.h" -#include "Xmd.h" /* INT32 declaration */ -#include "xf86_ansic.h" -#endif -#include "t1stdio.h" -#include "t1hdigit.h" -#ifdef WIN32 -#include <X11/Xw32defs.h> -#endif -#include <X11/Xdefs.h> - -/* Constants and variables used in the decryption */ -#define c1 ((unsigned short)52845) -#define c2 ((unsigned short)22719) -static unsigned short r; -static int asc, Decrypt; -static int extrach; -static int haveextrach; - -/* Our single FILE structure and buffer for this package */ -STATIC F_FILE TheFile; -STATIC unsigned char TheBuffer[F_BUFSIZ]; - -/* Our routines */ -static int T1Decrypt ( unsigned char *p, int len ); -static int T1Fill ( F_FILE *f ); - -/* -------------------------------------------------------------- */ -/*ARGSUSED*/ -F_FILE * -T1Open(char *fn, /* Pointer to filename */ - char *mode) /* Pointer to open mode string */ -{ - F_FILE *of = &TheFile; - int oflags = O_RDONLY; /* We know we are only reading */ - - Decrypt = 0; - -#ifdef O_BINARY /* VMS or DOS */ - oflags |= O_BINARY; -#endif - of->fd = open(fn, oflags, 0); - if (of->fd < 0) - return NULL; - - /* Initialize the buffer information of our file descriptor */ - of->b_base = TheBuffer; - of->b_size = F_BUFSIZ; - of->b_ptr = NULL; - of->b_cnt = 0; - of->flags = 0; - of->error = 0; - haveextrach = 0; - return &TheFile; -} /* end Open */ - -/* -------------------------------------------------------------- */ -int /* Read one character */ -T1Getc(F_FILE *f) /* Stream descriptor */ -{ - if (f->b_base == NULL) return EOF; /* already closed */ - - if (f->flags & UNGOTTENC) { /* there is an ungotten c */ - f->flags &= ~UNGOTTENC; - return (int) f->ungotc; - } - - if (f->b_cnt == 0) /* Buffer needs to be (re)filled */ - f->b_cnt = T1Fill(f); - if (f->b_cnt > 0) return (f->b_cnt--, (int) *(f->b_ptr++)); - else { - f->flags |= FIOEOF; - return EOF; - } -} /* end Getc */ - -/* -------------------------------------------------------------- */ -int /* Put back one character */ -T1Ungetc(int c, - F_FILE *f) /* Stream descriptor */ -{ - if (c != EOF) { - f->ungotc = c; - f->flags |= UNGOTTENC; /* set flag */ - f->flags &= ~FIOEOF; /* reset EOF */ - } - return c; -} /* end Ungetc */ - -/* -------------------------------------------------------------- */ -int /* Read n items into caller's buffer */ -T1Read(char *buffP, /* Buffer to be filled */ - int size, /* Size of each item */ - int n, /* Number of items to read */ - F_FILE *f) /* Stream descriptor */ -{ - int bytelen, cnt, i; - F_char *p = (F_char *)buffP; - int icnt; /* Number of characters to read */ - - if (f->b_base == NULL) return 0; /* closed */ - icnt = (size!=1)?n*size:n; /* Number of bytes we want */ - - if (f->flags & UNGOTTENC) { /* there is an ungotten c */ - f->flags &= ~UNGOTTENC; - *(p++) = f->ungotc; - icnt--; bytelen = 1; - } - else bytelen = 0; - - while (icnt > 0) { - /* First use any bytes we have buffered in the stream buffer */ - if ((cnt=f->b_cnt) > 0) { - if (cnt > icnt) cnt = icnt; - for (i=0; i<cnt; i++) *(p++) = *(f->b_ptr++); - f->b_cnt -= cnt; - icnt -= cnt; - bytelen += cnt; - } - - if ((icnt == 0) || (f->flags & FIOEOF)) break; - - f->b_cnt = T1Fill(f); - } - return ((size!=1)?bytelen/size:bytelen); -} /* end Read */ - -/* -------------------------------------------------------------- */ -int /* Close the file */ -T1Close(F_FILE *f) /* Stream descriptor */ -{ - if (f->b_base == NULL) return 0; /* already closed */ - f->b_base = NULL; /* no valid stream */ - return close(f->fd); -} /* end Close */ - - -/* -------------------------------------------------------------- */ -F_FILE * /* Initialization */ -T1eexec(F_FILE *f) /* Stream descriptor */ -{ - int i, c; - int H; - unsigned char *p; - unsigned char randomP[8]; - - r = 55665; /* initial key */ - asc = 1; /* indicate ASCII form */ - - /* Consume the 4 random bytes, determining if we are also to - ASCIIDecodeHex as we process our input. (See pages 63-64 - of the Adobe Type 1 Font Format book.) */ - - /* Skip over any initial white space chars */ - while (HighHexP[c=_XT1getc(f)] == HWHITE_SPACE) ; - - /* If ASCII, the next 7 chars are guaranteed consecutive */ - randomP[0] = c; /* store first non white space char */ - T1Read((pointer)(randomP+1), 1, 3, f); /* read 3 more, for a total of 4 */ - /* store first four chars */ - for (i=0,p=randomP; i<4; i++) { /* Check 4 valid ASCIIEncode chars */ - if (HighHexP[*p++] > LAST_HDIGIT) { /* non-ASCII byte */ - asc = 0; - break; - } - } - if (asc) { /* ASCII form, convert first eight bytes to binary */ - T1Read((pointer)(randomP+4), 1, 4, f); /* Need four more */ - for (i=0,p=randomP; i<4; i++) { /* Convert */ - H = HighHexP[*p++]; - randomP[i] = H | LowHexP[*p++]; - } - } - - /* Adjust our key */ - for (i=0,p=randomP; i<4; i++) { - r = (*p++ + r) * c1 + c2; - } - - /* Decrypt the remaining buffered bytes */ - f->b_cnt = T1Decrypt(f->b_ptr, f->b_cnt); - Decrypt = 1; - return (T1Feof(f))?NULL:f; -} /* end eexec */ - -/* -------------------------------------------------------------- */ -STATIC int -T1Decrypt(unsigned char *p, int len) -{ - int n; - int H = 0, L; - unsigned char *inp = p; - unsigned char *tblP; - - if (asc) { - if (haveextrach) { - H = extrach; - tblP = LowHexP; - } - else tblP = HighHexP; - for (n=0; len>0; len--) { - L = tblP[*inp++]; - if (L == HWHITE_SPACE) continue; - if (L > LAST_HDIGIT) break; - if (tblP == HighHexP) { /* Got first hexit value */ - H = L; - tblP = LowHexP; - } else { /* Got second hexit value; compute value and store it */ - n++; - tblP = HighHexP; - H |= L; - /* H is an int, 0 <= H <= 255, so all of this will work */ - *p++ = H ^ (r >> 8); - r = (H + r) * c1 + c2; - } - } - if (tblP != HighHexP) { /* We had an odd number of hexits */ - extrach = H; - haveextrach = 1; - } else haveextrach = 0; - return n; - } else { - for (n = len; n>0; n--) { - H = *inp++; - *p++ = H ^ (r >> 8); - r = (H + r) * c1 + c2; - } - return len; - } -} /* end Decrypt */ - -/* -------------------------------------------------------------- */ -STATIC int /* Refill stream buffer */ -T1Fill(F_FILE *f) /* Stream descriptor */ -{ - int rc; - - rc = read(f->fd, f->b_base, F_BUFSIZ); - /* propagate any error or eof to current file */ - if (rc <= 0) { - if (rc == 0) /* means EOF */ - f->flags |= FIOEOF; - else { - f->error = (short)-rc; - f->flags |= FIOERROR; - rc = 0; - } - } - f->b_ptr = f->b_base; - if (Decrypt) rc = T1Decrypt(f->b_base, rc); - return rc; -} /* end Fill */ diff --git a/libXfont/src/Type1/t1malloc.c b/libXfont/src/Type1/t1malloc.c deleted file mode 100644 index df863a234..000000000 --- a/libXfont/src/Type1/t1malloc.c +++ /dev/null @@ -1,759 +0,0 @@ -/* $Xorg: t1malloc.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF - * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, - * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE - * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE - * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE - * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL - * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.11 2002/02/18 20:51:57 herrb Exp $ */ - /* MALLOC CWEB V0004 LOTS */ -/* -:h1.MALLOC - Fast Memory Allocation - -This module is meant to provide portable C-style memory allocation -routines (malloc/free). - -&author. Jeffrey B. Lotspiech (lotspiech@almaden.ibm.com) - -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifndef FONTMODULE -#include <stdio.h> -#else -#include "Xdefs.h" /* Bool declaration */ -#include "Xmd.h" /* INT32 declaration */ -#include "os.h" -#include "xf86_ansic.h" -#endif -#include "objects.h" /* get #define for Abort() */ - - -/* -:h3.Define NULL - -In the beginning, C compilers made no assumptions about NULL. It was -even theoretically possible that NULL would not be 0. ANSI has tied -this down a bit. The following definition seems to be the most -popular (in terms of reducing compiler complaints), however, if your -compiler is unhappy about it, you can redefine it on the command line: -*/ -#ifndef NULL -#include <stddef.h> -#endif -/* -Of course, NULL is important because xiMalloc() is defined to return -NULL when out of memory. - -:h2.Data Structures Used to Manage Free Memory - -:h3.The "freeblock" Structure - -The list of available memory blocks is a doubly-linked list. Each -block begins with the following structure: -*/ - -struct freeblock { - long size; /* number of 'longs' in block, - including this header */ - struct freeblock *fore; /* forward in doubly-linked list */ - struct freeblock *back; /* backward in doubly-linked list */ -} ; -/* -In addition, each free block has a TRAILER that is simply the 'size' -repeated. Thus 'size' is found at the beginning of the block and at the -end of the block (size-1 longs away). 'size' includes both the header -and the trailer. - -When a block is allocated, its 'size' is turned negative (both at the -beginning and at the end). Thus, checking whether two blocks may be -combined is very simple. We merely examine both neighboring blocks' -size to see if they are positive (and hence available for combination). - -The memory address returned to the user is therefore one "long" below the -size, and one extra "long" is added to the end of the block (beyond what -the user requested) to store the trailing size. - -:h3."firstfree" and "lastfree", the Anchors to the Free List - -"firstfree" points to the first available free block; "lastfree" points -to the end of the chain of available blocks. These are linked together -by initialization code; see :hdref refid=addmem.. -*/ - -static struct freeblock firstfree = { 0L, NULL, NULL }; -static struct freeblock lastfree = { 0L, NULL, NULL }; - -/* -:h3."firstcombined" and "uncombined", Keeping Track of Uncombined Blocks - -This module is designed to make the combining of adjacent free memory -blocks be very fast. Nonetheless, combining blocks is naturally the -most expensive part of any memory system. In an X system, -it is worthwhile to defer the combination for a while, because -frequently we will end up asking for a block of exactly the same -size that we recently returned and we can save ourselves some work. - -"MAXUNCOMBINED" is the maximum number of uncombined blocks that we will -allow at any time: -*/ - -#define MAXUNCOMBINED 3 - -/* -"firstcombined" is a pointer into the free list. The uncombined blocks -are always at the front of the list. "firstcombined" points to the -first block that has been combined. -*/ -static struct freeblock *firstcombined = &lastfree; -static short uncombined = 0; /* current number of uncombined blocks */ - -/* -Uncombined blocks have a negative 'size'; in this they are like -allocated blocks. - -We store a distinctive hex pattern in 'size' when we combine a block -to help us debug: -*/ -#define COMBINED 0xBADBAD - -/* -:h3.DEBUGWORDS - Extra Memory Saved With Each Block for Debug - -We add 'DEBUGWORDS' words to each allocated block to put interesting -debug information: -*/ -#ifndef DEBUGWORDS -#define DEBUGWORDS 0 -#endif - -/* -:h3.MINEXCESS - Amount of "Excess" We Would be Willing to Ignore - -When we search the free list to find memory for a user request, we -frequently find an area that is bigger than what the user has asked for. -Normally we put the remaining words (the excess) back on the free list. -However, if the area is just slightly bigger than what the user needs, -it is counter-productive to do this, as the small amount recovered tends -to hurt by increasing memory fragmentation rather than help by providing -more available memory. "MINEXCESS" is the number of words that must be -recovered before we would bother to put the excess back on the free -list. If there is not enough excess, we just give the user more than he -asked for. -*/ - -#define MINEXCESS (7 + DEBUGWORDS) - -/* -:h3.Some Flags for Debug -*/ - -static long AvailableWords = 0; /* number of words available in memory */ -static char mallocdebug = 0; /* a flag that enables some chatty printf's */ - -/* -:h3.Prototypes of static functions -*/ - -static void combine ( void ); -static void freeuncombinable ( long *addr, long size ); -static void unhook ( struct freeblock *p ); -static void dumpchain ( void ); -#ifdef notused -static void reportarea ( long *area ); -#endif - -/* -:h3.whocalledme() - Debug for Memory Leaks - -This routine is 68000-specific; it copies the value of the application's -curOper variable (which is often a pointer to a character string), and -the first part of the stack at the time malloc was called into the -DEBUGWORDS area reserved with each block. -We use it to see who is malloc-ing memory without free-ing it. -*/ - -#if DEBUGWORDS - -static void -whocalledme(long *addr, /* address of memory block */ - long *stack) /* address of malloc's parameter on stack */ -{ - register long size; /* size of memory block */ - register int i; /* loop index */ - extern char *curOper; /* ptr to last operator (kept by appl.) */ - - stack--; - size = - *addr; - - addr += size - 1 - DEBUGWORDS; - *addr++ = (long) curOper; - for (i=0; i < DEBUGWORDS-1; i++) - *addr++ = *stack++; -} -#else - -#define whocalledme(addr, stack) - -#endif -/* -:h2.xiFree() - User-Callable "Return Memory" Routine - -The actual beginning of the block is one 'long' before the address we -gave to the user. The block begins and ends with '-size' in words. -*/ - -void -xiFree(long *addr) /* user's memory to be returned */ -{ - register long size; /* amount of memory in this block */ - register struct freeblock *p; /* identical to 'addr' */ - - if (addr == NULL) { /* common "mistake", so allow it (CHT) */ - printf("\nxiFree(NULL)?\n"); - return; - } - - size = *--addr; -/* -Make sure this address looks OK; 'size' must be less than zero (meaning -the block is allocated) and should be repeated at the end of the block. -*/ - if (size >= 0) - Abort("free: bad size"); - if (addr[-1 - size] != size) - Abort("free: mismatched size"); -/* -Now make this a 'freeblock' structure and tack it on the FRONT of the -free list (where uncombined blocks go): -*/ - AvailableWords -= size; /* actually INCREASES AvailableWords */ - p = (struct freeblock *) addr; - p->back = &firstfree; - (p->fore = firstfree.fore)->back = p; - firstfree.fore = p; -/* -If we have too many uncombined blocks, call combine() to combine one. -*/ - if (++uncombined > MAXUNCOMBINED) { - combine(); - if (mallocdebug) { - printf("xiFree(%p) with combine, ", (void *)addr); - dumpchain(); - } - } - else { - if (mallocdebug) { - printf("xiFree(%p), ", (void *)addr); - dumpchain(); - } - } - - return; -} - -/* -:h3.combine() - Subroutine of xiFree() to Combine Blocks - -This routine tries to combine the block just before 'firstcombined'. -In any event, that block will be moved to the end of the list (after -'firstcombined'). -*/ - -static void -combine(void) -{ - register struct freeblock *p; /* block we will try to combine */ - register long *addr; /* identical to 'p' for 'long' access */ - register long size; /* size of this block */ - register long size2; /* size of potential combinee */ - - p = firstcombined->back; - if (p == &firstfree) - Abort("why are we combining?"); - - addr = (long *) p; - size = - p->size; - if (--uncombined < 0) - Abort("too many combine()s"); - - if (addr[-1] < 0 && addr[size] < 0) { -/* -We special case the situation where no combining can be done. Then, we -just mark the chain "combined" (i.e., positive size), move the -'firstcombined' pointer back in the chain, and return. -*/ - addr[0] = addr[size - 1] = size; - firstcombined = (struct freeblock *) addr; - return; - } -/* -Otherwise, we unhook this pointer from the chain: -*/ - unhook(p); -/* -First we attempt to combine this with the block immediately above: -*/ - size2 = addr[-1]; - if (size2 > 0) { /* i.e., block above is free */ - *addr = COMBINED; /* might help debug */ - addr -= size2; - if (addr[0] != size2) - Abort("bad block above"); - unhook((struct freeblock *)addr); - size += size2; - } -/* -At this point 'addr' and 'size' may be the original block, or it may be -the newly combined block. Now we attempt to combine it with the block -below: -*/ - p = (struct freeblock *) (addr + size); - size2 = p->size; - - if (size2 > 0) { /* i.e., block below is free */ - p->size = COMBINED; - if (size2 != ((long *) p)[size2 - 1]) - Abort("bad block below"); - unhook(p); - size += size2; - } -/* -Finally we take the newly combined block and put it on the end of the -chain by calling the "freeuncombinable" subroutine: -*/ - freeuncombinable(addr, size); -} - -/* -:h3.freeuncombinable() - Free a Block That Need Not be Combined - -This block is "uncombinable" either because we have already combined -it with its eligible neighbors, or perhaps because we know it has -no neighbors. -*/ - -static void -freeuncombinable(long *addr, /* address of the block to be freed */ - long size) /* size of block in words */ -{ - register struct freeblock *p; /* a convenient synonym for 'addr' */ - -/* -Mark block allocated and combined by setting its 'size' positive: -*/ - addr[size - 1] = addr[0] = size; -/* -Now tack the block on the end of the doubly-linked free list: -*/ - p = (struct freeblock *) addr; - p->fore = &lastfree; - (p->back = lastfree.back)->fore = p; - lastfree.back = p; -/* -If we have previously had no combined blocks, we must update -'firstcombined' to point to this block: -*/ - if (firstcombined->fore == NULL) - firstcombined = p; -} - -/* -:h3.unhook() - Unhook a Block from the Doubly-linked List - -The only tricky thing here is to make sure that 'firstcombined' is -updated if this block happened to be the old 'firstcombined'. (We -would never be unhooking 'firstfree' or 'lastfree', so we do not -have to worry about the end cases.) -*/ - -static void -unhook(struct freeblock *p) /* block to unhook */ -{ - p->back->fore = p->fore; - p->fore->back = p->back; - - if (firstcombined == p) - firstcombined = p->fore; -} -/* -:h2.xiMalloc() - Main User Entry Point for Getting Memory - -We have two slightly different versions of xiMalloc(). In the case -where we have TYPE1IMAGER and a font cache, we are prepared, when nominally -out of memory, to loop calling TYPE1IMAGER's GimeSpace() to release font -cache. -*/ - -/* The following code put in by MDC on 11/10/90 */ - -#ifdef TYPE1IMAGER - -static char *malloc_local(unsigned size); - -char * -xiMalloc(unsigned size) -{ - char *memaddr; - - while ( (memaddr = malloc_local(size)) == NULL ) { - /* Ask TYPE1IMAGER to give us some of its cache back */ - if ( I_GimeSpace() == 0 ) break; /* We are really, really, out of memory */ - } - - return(memaddr); -} -#endif - -/* -Now begins the real workhorse xiMalloc() (called 'malloc_local' if -we are taking advantage of TYPE1IMAGER). Its argument is an unsigned; -at least that lets users with 16-bit integers get a 64K chunk of -memory, and it is also compatible with the definition of a "size_t" -in most systems. -*/ -#ifdef TYPE1IMAGER -static char * -malloc_local(unsigned Size) /* number of bytes the user requested */ -#else -char * -xiMalloc(unsigned Size) -#endif -{ - register long size = (long)Size; /* a working register for size */ - register struct freeblock *p; /* tentative block to be returned */ - register long excess; /* words in excess of user request */ - register long *area; /* a convenient synonym for 'p' */ - -/* -First, we increase 'size' to allow for the two size fields we will -save with the block, plus any information for debug purposes. -Then we ensure that the block will be large enough to hold our -'freeblock' information. Finally we convert it to be in words -(longs), not bytes, increased to span an integral number of double -words, so that all memory blocks dispensed with be properly aligned. -*/ - size += 2*sizeof(long) + DEBUGWORDS*sizeof(long); - if (size < sizeof(struct freeblock) + sizeof(long)) - size = sizeof(struct freeblock) + sizeof(long); - size = ((unsigned) (size + sizeof(double) - 1) / sizeof(double)) * (sizeof(double)/sizeof(long)); - -/* -For speed, we will try first to give the user back a very recently -returned block--one that is on the front of the chain before -'firstcombined'. These blocks still have negative sizes, and need -only to be "unhook"ed: -*/ - size = -size; - for (p=firstfree.fore; p != firstcombined; p=p->fore) { - if (p->size == size) { - unhook(p); - uncombined--; - if (mallocdebug) { - printf("fast xiMalloc(%ld) = %p, ", size, - (void *)p); - dumpchain(); - } - AvailableWords += size; /* decreases AvailableWords */ - whocalledme(p, &Size); - return((char *)&p->fore); - } - } -/* -Well, if we get here, there are no uncombined blocks matching the user's -request. So, we search the rest of the chain for a block that is big -enough. ('size' becomes positive again): -*/ - size = -size; - for (;; p = p->fore) { -/* -If we hit the end of the chain (p->size == 0), we are probably out of -memory. However, we should first try to combine any memory that has -not yet been combined before we give that pessimistic answer. If -we succeed in combining, we can call ourselves recursively to try to -allocate the requested amount: -*/ - if (p->size == 0) { - if (uncombined <= 0) - return(NULL); - while (firstfree.fore != firstcombined) - combine(); - return(xiMalloc(sizeof(long) * (size - 2 - DEBUGWORDS))); - } -/* -Otherwise, we keep searching until we find a big enough block: -*/ - if (p->size >= size) - break; - } -/* -At this point, 'p' contains a block at least as big as what the user -requested, so we take it off the free chain. If it is excessively big, -we return the excess to the free chain: -*/ - unhook(p); - excess = p->size - size; - area = (long *) p; - - if (excess > MINEXCESS) - freeuncombinable(area + size, excess); - else - size = p->size; - - AvailableWords -= size; -/* -Mark first and last word of block with the negative of the size, to -flag that this block is allocated: -*/ - area[size - 1] = area[0] = - size; - - if (mallocdebug) { - printf("slow xiMalloc(%ld) @ %p, ", size, (void *)area); - dumpchain(); - } - whocalledme(area, &Size); -/* -The address we return to the user is one 'long' BELOW the address of -the block. This protects our 'size' field, so we can tell the size -of the block when he returns it to us with xiFree(). Also, he better not -touch the 'size' field at the end of the block either. (That would be -nasty of him, as he would be touching memory outside of the bytes he -requested). -*/ - return((char *) (area + 1)); -} - -/* -:h2 id=addmem.addmemory() - Initialize Free Memory - -This routine should be called at initialization to initialize the -free chain. There is no standard way to do this in C. -We want the memory dispensed by malloc to be aligned on a double word -boundary (because some machines either require alignment, or are -more efficient if accesses are aligned). Since the total size of -any block created by malloc is an integral number of double words, -all we have to do to ensure alignment is to adjust each large block -added to the free chain to start on an odd long-word boundary. -(Malloc's size field will occupy the odd long and the user's memory -will then begin on an even boundary.) Since we fill in additional -size fields at the beginning and end of each of the large freeblocks, -we need only adjust the address passed to addmemory to a double word -boundary. -*/ - -#define MAXAREAS 10 /* there can be this many calls to addmemory() */ - -static long *freearea[MAXAREAS] = { NULL }; /* so we can report later */ - -void -addmemory(long *addr, /* beginning of free area */ - long size) /* number of bytes of free area */ -{ - register int i; /* loop index variable */ - register long *aaddr; /* aligned beginning of free area */ - -#if DEBUGWORDS - printf("malloc has DEBUGWORDS=%d\n", DEBUGWORDS); -#endif -/* -First link together firstfree and lastfree if necessary: -*/ - if (firstfree.fore == NULL) { - firstfree.fore = &lastfree; - lastfree.back = &firstfree; - } -/* -We'll record where the area was that was given to us for later reports: -*/ - for (i=0; i < MAXAREAS; i++) - if (freearea[i] == NULL) break; - if (i >= MAXAREAS) - Abort("too many addmemory()s"); - aaddr = (long *) ( ((long) addr + sizeof(double) - 1) & - (long)sizeof(double) ); - size -= (char *) aaddr - (char *) addr; - freearea[i] = aaddr; -/* -Convert 'size' to number of longs, and store '-size' guards at the -beginning and end of this area so we will not accidentally recombine the -first or last block: -*/ - size /= sizeof(long); - - AvailableWords += size - 2; - - aaddr[size - 1] = aaddr[0] = -size; -/* -Finally, call 'freeuncombinable' to put the remaining memory on the -free list: -*/ - freeuncombinable(aaddr + 1, size - 2); -} - -/* -:h3.delmemory() - Delete Memory Pool -*/ -void -delmemory(void) -{ - register int i; - - AvailableWords = 0; - firstfree.fore = &lastfree; - lastfree.back = &firstfree; - firstcombined = &lastfree; - uncombined = 0; - for (i=0; i<MAXAREAS; i++) - freearea[i] = NULL; -} - -/* -:h2.Debug Routines - -:h3.dumpchain() - Print the Chain of Free Blocks -*/ - -static void -dumpchain(void) -{ - register struct freeblock *p; /* current free block */ - register long size; /* size of block */ - register struct freeblock *back; /* block before 'p' */ - register int i; /* temp variable for counting */ - - printf("DUMPING FAST FREE LIST:\n"); - back = &firstfree; - for (p = firstfree.fore, i=uncombined; p != firstcombined; - p = p->fore) { - if (--i < 0) - Abort("too many uncombined areas"); - size = p->size; - printf(". . . area @ %p, size = %ld\n", (void *)p, -size); - if (size >= 0 || size != ((int *) p)[-1 - size]) - Abort("dumpchain: bad size"); - if (p->back != back) - Abort("dumpchain: bad back"); - back = p; - } - printf("DUMPING COMBINED FREE LIST:\n"); - for (; p != &lastfree; p = p->fore) { - size = p->size; - printf(". . . area @ %p, size = %ld\n", (void *)p, size); - if (size <= 0 || size != ((int *) p)[size - 1]) - Abort("dumpchain: bad size"); - if (p->back != back) - Abort("dumpchain: bad back"); - back = p; - } - if (back != lastfree.back) - Abort("dumpchain: bad lastfree"); -} - -#ifdef notused -/* -:h3.reportarea() - Display a Contiguous Set of Memory Blocks -*/ - -static void -reportarea(long *area) /* start of blocks (from addmemory) */ -{ - register long size; /* size of current block */ - register long wholesize; /* size of original area */ - register struct freeblock *p; /* pointer to block */ - - if (area == NULL) - return; - wholesize = - *area++; - wholesize -= 2; - - while (wholesize > 0) { - size = *area; - if (size < 0) { - register int i,j; - - size = -size; - printf("Allocated %5ld bytes at %p, first words=%08lx %08lx\n", - size * sizeof(long), area + 1, area[1], area[2]); -#if DEBUGWORDS - printf(" ...Last operator: %s\n", - (char *)area[size-DEBUGWORDS-1]); -#endif - for (i = size - DEBUGWORDS; i < size - 2; i += 8) { - printf(" ..."); - for (j=0; j<8; j++) - printf(" %08lx", area[i+j]); - printf("\n"); - } - - } - else { - printf("Free %ld bytes at %p\n", size * sizeof(long), - area); - if (size == 0) - Abort("zero sized memory block"); - - for (p = firstfree.fore; p != NULL; p = p->fore) - if ((long *) p == area) break; - if ((long *) p != area) - Abort("not found on forward chain"); - - for (p = lastfree.back; p != NULL; p = p->back) - if ((long *) p == area) break; - if ((long *) p != area) - Abort("not found on backward chain"); - } - if (area[0] != area[size - 1]) - Abort("unmatched check sizes"); - area += size; - wholesize -= size; - } -} - -/* -:h3.MemReport() - Display All of Memory -*/ - -void -MemReport(void) -{ - register int i; - - dumpchain(); - - for (i=0; i<MAXAREAS; i++) - reportarea(freearea[i]); -} - -/* -:h3.MemBytesAvail - Display Number of Bytes Now Available -*/ - -void -MemBytesAvail(void) -{ - printf("There are now %ld bytes available\n", AvailableWords * - sizeof(long) ); -} -#endif diff --git a/libXfont/src/Type1/t1snap.c b/libXfont/src/Type1/t1snap.c deleted file mode 100644 index 5618b581b..000000000 --- a/libXfont/src/Type1/t1snap.c +++ /dev/null @@ -1,85 +0,0 @@ -/* $Xorg: t1snap.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1snap.c,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "pictures.h" - -/* -:h2.Handle Functions - -:h3.Phantom() - Returns a Move Segment Equivalent to Handles - -This is a user operator. Its new name is QueryHandle. -*/ - -struct segment * -t1_Phantom(struct segment *p) /* object to take the Phantom of */ -{ - struct fractpoint pt; /* handle size will built here */ - - if (p == NULL) - pt.x = pt.y = 0; - else - PathDelta(p, &pt); - - return(PathSegment(MOVETYPE, pt.x, pt.y)); -} - -/* -:h3.Snap() - Force Ending Handle of Object to Origin - -This is a user operator. -*/ - -struct segment * -t1_Snap(struct segment *p) /* path to snap */ -{ - struct fractpoint pt; /* for finding length of path */ - - if (p == NULL) - return(NULL); - p = UniquePath(p); - - PathDelta(p, &pt); - if (p->last->type == MOVETYPE) { - p->last->dest.x -= pt.x; - p->last->dest.y -= pt.y; - } - else - p = JoinSegment(p, MOVETYPE, -pt.x, -pt.y, NULL); - return(p); -} diff --git a/libXfont/src/Type1/t1stdio.h b/libXfont/src/Type1/t1stdio.h deleted file mode 100644 index aa281c019..000000000 --- a/libXfont/src/Type1/t1stdio.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Xorg: t1stdio.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ -/* T1IO FILE structure and related stuff */ - -#ifdef XFree86LOADER -#undef FILE -#endif -#define FILE F_FILE -typedef unsigned char F_char; - -typedef struct F_FILE { - F_char *b_base; /* Pointer to beginning of buffer */ - long b_size; /* Size of the buffer */ - F_char *b_ptr; /* Pointer to next char in buffer */ - long b_cnt; /* Number of chars remaining in buffer */ - F_char flags; /* other flags; != 0 means getc must call fgetc */ - F_char ungotc; /* Place for ungotten char; flag set if present */ - short error; /* error status */ - int fd; /* underlying file descriptor */ -} F_FILE; - - -/* defines for flags */ -#define UNGOTTENC (0x01) -#define FIOEOF (0x80) -#define FIOERROR (0x40) - -#ifndef NULL -#include <stddef.h> -#endif - -#define EOF (-1) /* end of file */ -#define F_BUFSIZ (512) - -#define _XT1getc(f) \ - ( \ - ( ((f)->b_cnt > 0) && ((f)->flags == 0) ) ? \ - ( (f)->b_cnt--, (unsigned int)*( (f)->b_ptr++ ) ) : \ - T1Getc(f) \ - ) - -#define T1Feof(f) (((f)->flags & FIOEOF) && ((f)->b_cnt==0)) - -extern FILE *T1Open ( char *fn, char *mode ); -extern int T1Getc ( FILE *f ); -extern int T1Ungetc ( int c, FILE *f ); -extern int T1Read ( char *buffP, int size, int n, FILE *f ); -extern int T1Close ( FILE *f ); -extern FILE *T1eexec ( FILE *f ); -extern void resetDecrypt ( void ); - -#undef fclose -#undef fopen -#undef ungetc -#undef fgetc -#undef fread -#undef feof -#undef ferror -#define fclose(f) T1Close(f) -#define fopen(name,mode) T1Open(name,mode) -#define ungetc(c,f) T1Ungetc(c,f) -#define fgetc(f) T1Getc(f) - -#define fread(bufP,size,n,f) T1Read(bufP,size,n,f) -#define feof(f) (((f)->flags & FIOEOF) && ((f)->b_cnt==0)) -#define ferror(f) (((f)->flags & FIOERROR)?(f)->error:0) diff --git a/libXfont/src/Type1/t1unicode.c b/libXfont/src/Type1/t1unicode.c deleted file mode 100644 index 136cc4441..000000000 --- a/libXfont/src/Type1/t1unicode.c +++ /dev/null @@ -1,251 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -/* $XFree86$ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "t1unicode.h" - -static char* table_32[] = -{ "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", - "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", - "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", - "three", "four", "five", "six", "seven", "eight", "nine", "colon", - "semicolon", "less", "equal", "greater", "question", "at", "A", "B", - "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", - "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", - "backslash", "bracketright", "asciicircum", "underscore", "grave", - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", - "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", - "braceleft", "bar", "braceright", "asciitilde", 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, 0, 0, 0, 0, 0, - 0, 0, 0, "space", "exclamdown", "cent", "sterling", "currency", "yen", - "brokenbar", "section", "dieresis", "copyright", "ordfeminine", - "guillemotleft", "logicalnot", "hyphen", "registered", "macron", - "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", - "paragraph", "periodcentered", "cedilla", "onesuperior", - "ordmasculine", "guillemotright", "onequarter", "onehalf", - "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", - "Atilde", "Adieresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", - "Ecircumflex", "Edieresis", "Igrave", "Iacute", "Icircumflex", - "Idieresis", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", - "Otilde", "Odieresis", "multiply", "Oslash", "Ugrave", "Uacute", - "Ucircumflex", "Udieresis", "Yacute", "Thorn", "germandbls", "agrave", - "aacute", "acircumflex", "atilde", "adieresis", "aring", "ae", - "ccedilla", "egrave", "eacute", "ecircumflex", "edieresis", "igrave", - "iacute", "icircumflex", "idieresis", "eth", "ntilde", "ograve", - "oacute", "ocircumflex", "otilde", "odieresis", "divide", "oslash", - "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", - "ydieresis", "Amacron", "amacron", "Abreve", "abreve", "Aogonek", - "aogonek", "Cacute", "cacute", "Ccircumflex", "ccircumflex", - "Cdotaccent", "cdotaccent", "Ccaron", "ccaron", "Dcaron", "dcaron", - "Dcroat", "dcroat", "Emacron", "emacron", "Ebreve", "ebreve", - "Edotaccent", "edotaccent", "Eogonek", "eogonek", "Ecaron", "ecaron", - "Gcircumflex", "gcircumflex", "Gbreve", "gbreve", "Gdotaccent", - "gdotaccent", "Gcommaaccent", "gcommaaccent", "Hcircumflex", - "hcircumflex", "Hbar", "hbar", "Itilde", "itilde", "Imacron", - "imacron", "Ibreve", "ibreve", "Iogonek", "iogonek", "Idotaccent", - "dotlessi", "IJ", "ij", "Jcircumflex", "jcircumflex", "Kcommaaccent", - "kcommaaccent", "kgreenlandic", "Lacute", "lacute", "Lcommaaccent", - "lcommaaccent", "Lcaron", "lcaron", "Ldot", "ldot", "Lslash", - "lslash", "Nacute", "nacute", "Ncommaaccent", "ncommaaccent", - "Ncaron", "ncaron", "napostrophe", "Eng", "eng", "Omacron", "omacron", - "Obreve", "obreve", "Ohungarumlaut", "ohungarumlaut", "OE", "oe", - "Racute", "racute", "Rcommaaccent", "rcommaaccent", "Rcaron", - "rcaron", "Sacute", "sacute", "Scircumflex", "scircumflex", - "Scommaaccent", "scommaaccent", "Scaron", "scaron", "Tcommaaccent", - "tcommaaccent", "Tcaron", "tcaron", "Tbar", "tbar", "Utilde", - "utilde", "Umacron", "umacron", "Ubreve", "ubreve", "Uring", "uring", - "Uhungarumlaut", "uhungarumlaut", "Uogonek", "uogonek", "Wcircumflex", - "wcircumflex", "Ycircumflex", "ycircumflex", "Ydieresis", "Zacute", - "zacute", "Zdotaccent", "zdotaccent", "Zcaron", "zcaron", "longs", 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "florin", 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Ohorn", "ohorn", 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, "Uhorn", "uhorn", 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, 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, 0, 0, 0, "Gcaron", - "gcaron", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "Aringacute", "aringacute", "AEacute", "aeacute", "Oslashacute", - "oslashacute", 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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57929", "afii64937", 0, 0, 0, 0, 0, 0, - 0, 0, "circumflex", "caron", 0, "macron", 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, "breve", "dotaccent", "ring", "ogonek", "tilde", - "hungarumlaut", 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, "gravecomb", - "acutecomb", 0, "tildecomb", 0, 0, 0, 0, 0, "hookabovecomb", 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, - "dotbelowcomb", 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, "tonos", "dieresistonos", "Alphatonos", - "anoteleia", "Epsilontonos", "Etatonos", "Iotatonos", 0, - "Omicrontonos", 0, "Upsilontonos", "Omegatonos", "iotadieresistonos", - "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", - "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", - 0, "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega", - "Iotadieresis", "Upsilondieresis", "alphatonos", "epsilontonos", - "etatonos", "iotatonos", "upsilondieresistonos", "alpha", "beta", - "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", - "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma1", "sigma", - "tau", "upsilon", "phi", "chi", "psi", "omega", "iotadieresis", - "upsilondieresis", "omicrontonos", "upsilontonos", "omegatonos", 0, 0, - "theta1", "Upsilon1", 0, 0, "phi1", "omega1", 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, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii10023", "afii10051", - "afii10052", "afii10053", "afii10054", "afii10055", "afii10056", - "afii10057", "afii10058", "afii10059", "afii10060", "afii10061", 0, - "afii10062", "afii10145", "afii10017", "afii10018", "afii10019", - "afii10020", "afii10021", "afii10022", "afii10024", "afii10025", - "afii10026", "afii10027", "afii10028", "afii10029", "afii10030", - "afii10031", "afii10032", "afii10033", "afii10034", "afii10035", - "afii10036", "afii10037", "afii10038", "afii10039", "afii10040", - "afii10041", "afii10042", "afii10043", "afii10044", "afii10045", - "afii10046", "afii10047", "afii10048", "afii10049", "afii10065", - "afii10066", "afii10067", "afii10068", "afii10069", "afii10070", - "afii10072", "afii10073", "afii10074", "afii10075", "afii10076", - "afii10077", "afii10078", "afii10079", "afii10080", "afii10081", - "afii10082", "afii10083", "afii10084", "afii10085", "afii10086", - "afii10087", "afii10088", "afii10089", "afii10090", "afii10091", - "afii10092", "afii10093", "afii10094", "afii10095", "afii10096", - "afii10097", 0, "afii10071", "afii10099", "afii10100", "afii10101", - "afii10102", "afii10103", "afii10104", "afii10105", "afii10106", - "afii10107", "afii10108", "afii10109", 0, "afii10110", "afii10193", 0, - 0, "afii10146", "afii10194", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii10147", "afii10195", "afii10148", "afii10196", 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, 0, - "afii10050", "afii10098", 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii10846", 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, 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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii57799", "afii57801", "afii57800", "afii57802", "afii57793", - "afii57794", "afii57795", "afii57798", "afii57797", "afii57806", 0, - "afii57796", "afii57807", "afii57839", "afii57645", "afii57841", - "afii57842", "afii57804", "afii57803", "afii57658", 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, "afii57664", "afii57665", "afii57666", "afii57667", - "afii57668", "afii57669", "afii57670", "afii57671", "afii57672", - "afii57673", "afii57674", "afii57675", "afii57676", "afii57677", - "afii57678", "afii57679", "afii57680", "afii57681", "afii57682", - "afii57683", "afii57684", "afii57685", "afii57686", "afii57687", - "afii57688", "afii57689", "afii57690", 0, 0, 0, 0, 0, "afii57716", - "afii57717", "afii57718", 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, "afii57388", 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, "afii57403", 0, 0, 0, "afii57407", 0, "afii57409", - "afii57410", "afii57411", "afii57412", "afii57413", "afii57414", - "afii57415", "afii57416", "afii57417", "afii57418", "afii57419", - "afii57420", "afii57421", "afii57422", "afii57423", "afii57424", - "afii57425", "afii57426", "afii57427", "afii57428", "afii57429", - "afii57430", "afii57431", "afii57432", "afii57433", "afii57434", 0, 0, - 0, 0, 0, "afii57440", "afii57441", "afii57442", "afii57443", - "afii57444", "afii57445", "afii57446", "afii57470", "afii57448", - "afii57449", "afii57450", "afii57451", "afii57452", "afii57453", - "afii57454", "afii57455", "afii57456", "afii57457", "afii57458", 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57392", "afii57393", - "afii57394", "afii57395", "afii57396", "afii57397", "afii57398", - "afii57399", "afii57400", "afii57401", "afii57381", 0, 0, "afii63167", - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57511", 0, 0, 0, 0, "afii57506", - 0, 0, 0, 0, 0, 0, 0, "afii57507", 0, "afii57512", 0, 0, 0, 0, 0, 0, 0, - 0, "afii57513", 0, 0, 0, 0, 0, 0, "afii57508", 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, "afii57505", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57509", 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, "afii57514", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii57519", 0, 0, "afii57534", 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_2000[] = /* general punctuation, s*scripts, currency */ -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "afii61664", "afii301", "afii299", - "afii300", 0, 0, "figuredash", "endash", "emdash", "afii00208", 0, - "underscoredbl", "quoteleft", "quoteright", "quotesinglbase", - "quotereversed", "quotedblleft", "quotedblright", "quotedblbase", 0, - "dagger", "daggerdbl", "bullet", 0, "onedotenleader", - "twodotenleader", "ellipsis", 0, 0, 0, 0, 0, "afii61573", "afii61574", - "afii61575", 0, "perthousand", 0, "minute", "second", 0, 0, 0, 0, 0, - "guilsinglleft", "guilsinglright", 0, "exclamdbl", 0, 0, 0, 0, 0, 0, - 0, "fraction", 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "zerosuperior", 0, 0, 0, "foursuperior", "fivesuperior", - "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", 0, 0, - 0, "parenleftsuperior", "parenrightsuperior", "nsuperior", - "zeroinferior", "oneinferior", "twoinferior", "threeinferior", - "fourinferior", "fiveinferior", "sixinferior", "seveninferior", - "eightinferior", "nineinferior", 0, 0, 0, "parenleftinferior", - "parenrightinferior", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "colonmonetary", 0, "franc", "lira", 0, 0, "peseta", 0, 0, - "afii57636", "dong", "Euro", 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_2500[]= /* line and box drawing */ -{ "SF100000", 0, "SF110000", 0, 0, 0, 0, 0, 0, 0, 0, 0, "SF010000", 0, - 0, 0, "SF030000", 0, 0, 0, "SF020000", 0, 0, 0, "SF040000", 0, 0, 0, - "SF080000", 0, 0, 0, 0, 0, 0, 0, "SF090000", 0, 0, 0, 0, 0, 0, 0, - "SF060000", 0, 0, 0, 0, 0, 0, 0, "SF070000", 0, 0, 0, 0, 0, 0, 0, - "SF050000", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - "SF430000", "SF240000", "SF510000", "SF520000", "SF390000", - "SF220000", "SF210000", "SF250000", "SF500000", "SF490000", - "SF380000", "SF280000", "SF270000", "SF260000", "SF360000", - "SF370000", "SF420000", "SF190000", "SF200000", "SF230000", - "SF470000", "SF480000", "SF410000", "SF450000", "SF460000", - "SF400000", "SF540000", "SF530000", "SF440000", 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "upblock", 0, 0, 0, "dnblock", 0, - 0, 0, "block", 0, 0, 0, "lfblock", 0, 0, 0, "rtblock", "ltshade", - "shade", "dkshade", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static char* table_FB00[] = /* alphabetic presentation forms */ -{ "ff", "fi", "fl", "ffi", "ffl", 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, 0, "afii57705", 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, "afii57694", "afii57695", 0, 0, 0, 0, 0, 0, 0, 0, 0, - "afii57723", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, "afii57700", 0, 0, 0, 0 }; - -char* -unicodetoPSname(unsigned short code) -{ - if(code<32) return 0; - else if(code<0x6FF) return table_32[code-32]; - else if(code<0x2000) return 0; - else if(code<0x20D0) return table_2000[code-0x2000]; - else if(code==0x2116) return "afii61352"; /* numero sign, for Koi */ - else if(code==0x2122) return "trademark"; - else if(code<0x2500) return 0; - else if(code<0x25A0) return table_2500[code-0x2500]; - else if(code<0xFB00) return 0; - else if(code<0xFB50) return table_FB00[code-0xFB00]; - else return 0; -} diff --git a/libXfont/src/Type1/t1unicode.h b/libXfont/src/Type1/t1unicode.h deleted file mode 100644 index bad0274a0..000000000 --- a/libXfont/src/Type1/t1unicode.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright (c) 1998 by Juliusz Chroboczek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -/* $XFree86$ */ - -char *unicodetoPSname(unsigned short code); diff --git a/libXfont/src/Type1/token.c b/libXfont/src/Type1/token.c deleted file mode 100644 index 71a968b30..000000000 --- a/libXfont/src/Type1/token.c +++ /dev/null @@ -1,1208 +0,0 @@ -/* $Xorg: token.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/token.c,v 1.5tsi Exp $ */ -/* Authors: Sig Nin & Carol Thompson IBM Almaden Research Laboratory */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "t1stdio.h" -#include "util.h" -#include "digit.h" -#include "token.h" -#include "tokst.h" -#include "hdigit.h" - -/* - * ------------------------------------------------------------------- - * Globals - * ------------------------------------------------------------------- - */ - -/* These variables are set by the caller */ -char *tokenStartP; /* Pointer to token buffer in VM */ -char *tokenMaxP; /* Pointer to last byte in buffer + 1 */ - -/* These variables are set by TOKEN */ -int tokenLength; /* Characters in token */ -boolean tokenTooLong; /* Token too long for buffer */ -int tokenType; /* Type of token identified */ -psvalue tokenValue; /* Token value */ - -/* - * ------------------------------------------------------------------- - * Private variables - * ------------------------------------------------------------------- - */ - -static FILE *inputFileP; /* Current input file */ - - -/* Token */ -static char *tokenCharP; /* Pointer to next character in token */ - -/* - * ------------------------------------------------------------------- - * Private routines for manipulating numbers - * ------------------------------------------------------------------- - */ - -#define Exp10(e) \ -((e) == 0\ - ? (double)(1.0)\ - : (-64 <= (e) && (e) <= 63\ - ? Exp10T[(e)+64]\ - : P10(e)\ - )\ -) - -static double Exp10T[128] = { - 1e-64, 1e-63, 1e-62, 1e-61, 1e-60, 1e-59, 1e-58, 1e-57, - 1e-56, 1e-55, 1e-54, 1e-53, 1e-52, 1e-51, 1e-50, 1e-49, - 1e-48, 1e-47, 1e-46, 1e-45, 1e-44, 1e-43, 1e-42, 1e-41, - 1e-40, 1e-39, 1e-38, 1e-37, 1e-36, 1e-35, 1e-34, 1e-33, - 1e-32, 1e-31, 1e-30, 1e-29, 1e-28, 1e-27, 1e-26, 1e-25, - 1e-24, 1e-23, 1e-22, 1e-21, 1e-20, 1e-19, 1e-18, 1e-17, - 1e-16, 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, 1e-9, - 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, - 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, - 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22, 1e23, - 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, 1e30, 1e31, - 1e32, 1e33, 1e34, 1e35, 1e36, 1e37, 1e38, 1e39, - 1e40, 1e41, 1e42, 1e43, 1e44, 1e45, 1e46, 1e47, - 1e48, 1e49, 1e50, 1e51, 1e52, 1e53, 1e54, 1e55, - 1e56, 1e57, 1e58, 1e59, 1e60, 1e61, 1e62, 1e63 -}; - -static double -P10(long exponent) -{ - double value, power; - - if (exponent < 0) { - power = 0.1; - value = (exponent & 1 ? power : 1.0); - exponent++; - exponent = -(exponent >> 1); /* portable C for -(exponent/2) */ - } - else { - power = 10.0; - value = (exponent & 1 ? power : 1.0); - exponent = exponent >> 1; - } - - while(exponent > 0) { - power *= power; - if (exponent & 1) - value *= power; - exponent >>= 1; - } - - return(value); -} - -/* - * ------------------------------------------------------------------- - * Private routines and macros for manipulating the input - * ------------------------------------------------------------------- - */ - -/* Get next character from the input -- - * - */ -#define next_ch() (_XT1getc(inputFileP)) - -/* Push a character back into the input -- - * - * Ungetc of EOF will fail, but that's ok: the next getc will - * return EOF. - * - * NOTE: These macros are presently written to return the character - * pushed, or EOF if none was pushed. However, they are not - * required to return anything in particular, and callers should - * not rely on the returned value. - */ -#define back_ch(ch) (T1Ungetc(ch, inputFileP)) - -/* Push a character back into the input if it was not white space. - * If it is a carriage return (\r) then check next char for - * linefeed and consume them both, otherwise put next char back. - * - */ -#define back_ch_not_white(ch) \ -(\ -isWHITE_SPACE(ch)\ - ? ((ch == '\r')\ - ? (((ch = next_ch()) == '\n')\ - ? EOF\ - : back_ch(ch)\ - )\ - : EOF\ - )\ - : back_ch(ch)\ -) - -/* - * ------------------------------------------------------------------- - * Private routines and macros for manipulating the token buffer - * ------------------------------------------------------------------- - */ - -/* Add a character to the token - * ---- use ONLY when you KNOW that this character will - * be stored within the token buffer. - */ -#define save_unsafe_ch(ch) (*tokenCharP++ = ch) - -/* Add a character to the token, if not too long to fit */ -#define save_ch(ch) \ -((tokenCharP < tokenMaxP)\ - ? save_unsafe_ch(ch)\ - : (tokenTooLong = TRUE)\ -) - -#define save_ch_no_inc(ch) \ -if (tokenCharP < tokenMaxP) *tokenCharP = ch - -/* - * ------------------------------------------------------------------- - * Action Routines - * - * These routines all - * -- take int ch as a parameter - * -- return int ch if no token was recognized, DONE otherwise - * -- leave the next character in the input, if returning DONE - * ------------------------------------------------------------------- - */ - -#define DONE (256) - -/* Get the next input character */ -static int -next_char(int ch) -{ - return(next_ch()); -} - -/* Add character to token */ -static int -add_char(int ch) -{ - save_ch(ch); - return(next_ch()); -} - - -/* ------------------------------------------------------------------- - * Skip white space and comments - */ - -/* Skip white space */ -static int -skip_space(int ch) -{ - do { - ch = next_ch(); - } while(isWHITE_SPACE(ch)); - return(ch); -} - -/* Skip comments */ -static int -skip_comment(int ch) -{ - do { - ch = next_ch(); - } while(isCOMMENT(ch)); - return(ch); -} - -/* ------------------------------------------------------------------- - * Collect value elements for a number - */ - -/* decimal integer or real number mantissa */ -static int m_sign; -static long m_value; -static long m_scale; - -/* real number exponent */ -static int e_sign; -static long e_value; - -/* radix number */ -static long r_base; -static long r_value; -static long r_scale; - -static int -add_sign(int ch) -{ - m_sign = ch; - save_unsafe_ch(ch); - return(next_ch()); -} - -static int -add_1st_digits(int ch) -{ - m_sign = '+'; - return(add_digits(ch)); -} - -static int -add_digits(int ch) -{ - long value, p_value, scale; - int digit; - - /* On entry, expect m_sign to be set to '+' or '-'; - * ch is a decimal digit. - * Expect at most one character saved at this point, - * a sign. This routine will save up to 10 more - * characters without checking the buffer boundary. - */ - - value = ch - '0'; - save_unsafe_ch(ch); - ch = next_ch(); - - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - value = (value << 3) + (value << 1) + (ch - '0'); - save_unsafe_ch(ch); - ch = next_ch(); - } - - /* Quick exit for small integers -- - * |x| <= 10*((MAX_INTEGER/10)-1)+9 - * |x| <= 2,147,483,639 for 32 bit integers - */ - if (isNUMBER_ENDER(ch)) { - back_ch_not_white(ch); - tokenValue.integer = (m_sign == '-' ? -value : value); - tokenType = TOKEN_INTEGER; - return(DONE); - } - - /* Handle additional digits. Beyond the boundary case, - * 10*(MAX_INTEGER/10) <= |number| <= MAX_INTEGER - * just count the digits: the number is too large to - * represent as an integer and will be returned as a real. - * The mantissa of a real holds fewer bits than an integer. - */ - p_value = value; - value = (m_sign == '-' ? -value : value); - scale = 0; - - if (isDECIMAL_DIGIT(ch)) { - - /* Handle the boundary case */ - if (p_value == (MAX_INTEGER/10)) { - digit = ch - '0'; - - /* Must handle positive and negative values separately */ - /* for 2's complement arithmetic */ - if (value > 0) { - if (digit <= MAX_INTEGER%10) - value = (value << 3) + (value << 1) + digit; - else - ++scale; /* Too big, just count it */ - } - else { - /* Use positive % operands for portability */ - if (digit <= -(MIN_INTEGER+10)%10) - value = (value << 3) + (value << 1) - digit; - else - ++scale; /* Too big, just count it */ - } - } - else - ++scale; /* Not boundary case, just count digit */ - - save_unsafe_ch(ch); - ch = next_ch(); - - /* Continue scanning digits, but can't store them */ - while(isDECIMAL_DIGIT(ch)) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - - /* Continue from here scanning radix integer or real */ - m_value = value; - m_scale = scale; - - /* Initialize for possible real */ - e_sign = '+'; - e_value = 0; - - return(ch); -} - -static int -add_1st_decpt(int ch) -{ - m_sign = '+'; - return(add_decpt(ch)); -} - -static int -add_decpt(int ch) -{ - /* On entry, expect m_sign to be set to '+' or '-' */ - m_value = 0; - m_scale = 0; - save_unsafe_ch(ch); - return(next_ch()); -} - -static int -add_fraction(int ch) -{ - long value, scale; - int digit; - - /* On entry, expect m_value and m_scale to be initialized, - * and m_sign to be set to '+' or '-'. Expect m_value and m_sign - * to be consistent (this is not checked). - */ - value = m_value; - scale = m_scale; - - /* Scan leading zeroes */ - if (value == 0) { - while(ch == '0') { - --scale; - save_ch(ch); - ch = next_ch(); - } - - /* Scan first significant digit */ - if (isDECIMAL_DIGIT(ch)) { - --scale; - value = ch - '0'; - value = (m_sign == '-' ? -value : value); - save_ch(ch); - ch = next_ch(); - } - else - /* no significant digits -- number is zero */ - scale = 0; - } - /* value != 0 || value == 0 && !isDECIMAL_DIGIT(ch) */ - - /* Scan additional significant digits */ - if (isDECIMAL_DIGIT(ch)) { - if (value > 0) { - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - --scale; - value = (value << 3) + (value << 1) + (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - /* Check boundary case */ - if (isDECIMAL_DIGIT(ch) && value == (MAX_INTEGER/10)) { - digit = ch - '0'; - if (digit <= MAX_INTEGER%10) { - --scale; - value = (value << 3) + (value << 1) + digit; - save_ch(ch); - ch = next_ch(); - } - } - } - else { - /* value < 0 */ - while(isDECIMAL_DIGIT(ch) && value > -(-(MIN_INTEGER+10)/10+1)) { - /* Use positive / operands for portability */ - --scale; - value = (value << 3) + (value << 1) - (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - /* Check boundary case */ - if (isDECIMAL_DIGIT(ch) - && value == -(-(MIN_INTEGER+10)/10+1)) { - digit = ch - '0'; - if (digit <= -(MIN_INTEGER+10)%10) { - /* Use positive % operands for portability */ - --scale; - value = (value << 3) + (value << 1) - digit; - save_ch(ch); - ch = next_ch(); - } - } - } - - /* Additional digits can be discarded */ - while(isDECIMAL_DIGIT(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - - /* Store results */ - m_value = value; - m_scale = scale; - - /* Initialize for possible real */ - e_sign = '+'; - e_value = 0; - - return(ch); -} - -static int -add_e_sign(int ch) -{ - e_sign = ch; - save_ch(ch); - return(next_ch()); -} - -static int -add_exponent(int ch) -{ - long value, p_value; - long scale = 0; - int digit; - - /* On entry, expect e_sign to be set to '+' or '-' */ - - value = ch - '0'; - save_ch(ch); - ch = next_ch(); - - while(isDECIMAL_DIGIT(ch) && value < (MAX_INTEGER/10)) { - value = (value << 3) + (value << 1) + (ch - '0'); - save_ch(ch); - ch = next_ch(); - } - - p_value = value; - value = (e_sign == '-' ? -value : value); - - /* Handle additional digits. Beyond the boundary case, - * 10*(MAX_INTEGER/10) <= |number| <= MAX_INTEGER - * just count the digits: the number is too large to - * represent as an integer. - */ - if (isDECIMAL_DIGIT(ch)) { - - /* Examine boundary case */ - if (p_value == (MAX_INTEGER/10)) { - digit = ch - '0'; - - /* Must handle positive and negative values separately */ - /* for 2's complement arithmetic */ - if (value > 0) { - if (digit <= MAX_INTEGER%10) - value = (value << 3) + (value << 1) + digit; - else - ++scale; /* Too big, just count it */ - } - else { - /* Use positive % operands for portability */ - if (digit <= -(MIN_INTEGER+10)%10) - value = (value << 3) + (value << 1) - digit; - else - ++scale; /* Too big, just count it */ - } - } - else - ++scale; /* Not boundary case, just count digit */ - - save_ch(ch); - ch = next_ch(); - - /* Continue scanning digits, but can't store any more */ - while(isDECIMAL_DIGIT(ch)) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - - /* Store results */ - e_value = value; - - return(ch); -} - -static int -add_radix(int ch) -{ - if (2 <= m_value && m_value <= 36 && m_scale == 0) { - r_base = m_value; - save_ch(ch); - return(next_ch()); - } - else { - /* Radix invalid, complete a name token */ - return(AAH_NAME(ch)); - } -} - -static int -add_r_digits(int ch) -{ - unsigned long value; - long radix, scale; - int digit; - - /* NOTE: The syntax of a radix number allows only for - * values of zero or more. The value will be stored as - * a 32 bit integer, which PostScript then interprets - * as signed. This means, for example, that the numbers: - * - * 8#37777777777 - * 10#4294967295 - * 16#FFFFFFFF - * 36#1Z141Z3 - * - * are all interpreted as -1. This routine implements this - * idea explicitly: it accumulates the number's value - * as unsigned, then casts it to signed when done. - */ - - /* Expect r_base to be initialized */ - radix = r_base; - value = 0; - scale = 0; - - /* Scan leading zeroes */ - while(ch == '0') { - save_ch(ch); - ch = next_ch(); - } - - /* Handle first non-zero digit */ - if ((digit=digit_value[ch]) < radix) { - value = digit; - save_ch(ch); - ch = next_ch(); - - /* Add digits until boundary case reached */ - while((digit=digit_value[ch]) < radix - && value < (MAX_ULONG / radix)) { - value = value * radix + digit; - save_ch(ch); - ch = next_ch(); - }; - - /* Scan remaining digits */ - if ((digit=digit_value[ch]) < radix) { - - /* Examine boundary case --- - * radix*(MAX_ULONG/radix) <= number <= MAX_ULONG - */ - if (value == (MAX_ULONG/radix) && digit <= MAX_ULONG%radix) - value = value * radix + digit; - else - ++scale; - - /* Continue scanning digits, but can't store them */ - save_ch(ch); - ch = next_ch(); - while(digit_value[ch] < radix) { - ++scale; - save_ch(ch); - ch = next_ch(); - } - } - } - - /* Store result */ - r_value = (long) value; /* result is signed */ - r_scale = scale; - - return(ch); -} - -/* ------------------------------------------------------------------- - * Complete a number; set token type and done flag. - * Put current input character back, if it is not white space. - */ - -/* Done: Radix Number */ -static int -RADIX_NUMBER(int ch) -{ - back_ch_not_white(ch); - if (r_scale == 0) { - tokenValue.integer = r_value; - tokenType = TOKEN_INTEGER; - } - else { - tokenType = TOKEN_NAME; - } - return(DONE); -} - -/* Done: Integer */ -static int -INTEGER(int ch) -{ - back_ch_not_white(ch); - if (m_scale == 0) { - tokenValue.integer = m_value; - tokenType = TOKEN_INTEGER; - } - else { - tokenValue.real = (double)(m_value) * Exp10(m_scale); - tokenType = TOKEN_REAL; - } - return(DONE); -} - -/* Done: Real */ -static int -REAL(int ch) -{ - double temp; - - back_ch_not_white(ch); - - /* HAZARD: exponent overflow of intermediate result - * (e.g., in 370 floating point); this should not be a problem - * with IEEE floating point. Reduce exponent overflow hazard by - * combining m_scale and e_value first, if they have different signs, - * or multiplying m_value and one of the other factors, if both - * m_scale and e_value are negative. - */ - if ((m_scale >= 0 && e_value <= 0) - || (m_scale <= 0 && e_value >= 0)) { - tokenValue.real = (double)(m_value) * Exp10(m_scale + e_value); - } - else { - temp = (double)(m_value) * Exp10(m_scale); - tokenValue.real = temp * Exp10(e_value); - } - - tokenType = TOKEN_REAL; - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Assemble a hex string; set token type and done flag. - */ - -/* Done: Hex String */ -static int -HEX_STRING(int ch) -{ - int value; - - while(TRUE) { - - /* Process odd digit */ - ch = next_ch(); - if (!isHEX_DIGIT(ch)) { - - /* Skip white space */ - while(isWHITE_SPACE(ch)) - ch = next_ch(); - - /* Check for terminator */ - if (!isHEX_DIGIT(ch)) { - break; - } - } - value = digit_value[ch] << 4; - - /* Process even digit */ - ch = next_ch(); - if (!isHEX_DIGIT(ch)) { - - /* Skip white space */ - while(isWHITE_SPACE(ch)) - ch = next_ch(); - - /* Check for terminator */ - if (!isHEX_DIGIT(ch)) { - save_ch(value); - break; - } - } - save_ch(value + digit_value[ch]); - } - - /* Classify result, based on why loop ended */ - if (ch == '>') - tokenType = TOKEN_HEX_STRING; - else { - /* save the invalid character for error reporting */ - save_ch(ch); - tokenType = TOKEN_INVALID; - } - - return(DONE); -} - -/* ------------------------------------------------------------------- - * Assemble a string; set token type and done flag - */ - -/* Save a backslash-coded character in a string -- - * - * Store the proper character for special cases - * "\b", "\f", "\n", "\r", and "\t". - * - * Decode and store octal-coded character, up to - * three octal digits, "\o", "\oo", and "\ooo". - * - * The sequence "\<newline>" is a line continuation, - * so consume both without storing anything. - * - * The sequence "\<EOF>" is an error; exit without - * storing anything and let the caller handle it. - * - * For other characters, including the sequences - * "\\", "\(", and "\)", simply store the second - * character. - */ -static void -save_digraph(int ch) -{ - int value; - - switch (ch) { - - case 'b': /* backspace */ - ch = '\b'; - break; - - case 'f': /* formfeed */ - ch = '\f'; - break; - - case 'n': /* newline */ - ch = '\n'; - break; - - case 'r': /* carriage return */ - ch = '\r'; - break; - - case 't': /* horizontal tab */ - ch = '\t'; - break; - - case '\n': /* line continuation -- consume it */ - return; - - case '\r': /* carriage return -- consume it */ - ch = next_ch(); /* look at next character, is it \n? */ - if (ch == '\n') return; - back_ch(ch); /* if not a line feed, then return it */ - return; - - case EOF: /* end of file -- forget it */ - return; - - default: - /* scan up to three octal digits to get value */ - if (isOCTAL_DIGIT(ch)) { - value = digit_value[ch]; - ch = next_ch(); - if (isOCTAL_DIGIT(ch)) { - value = (value << 3) + digit_value[ch]; - ch = next_ch(); - if (isOCTAL_DIGIT(ch)) - value = (value << 3) + digit_value[ch]; - else - back_ch(ch); - } - else - back_ch(ch); - ch = value; - } - } - - /* Found a character to save */ - save_ch(ch); -} - -/* Done: String */ -static int -STRING(int ch) -{ - int nest_level = 1; - - tokenType = TOKEN_STRING; - - do { - - ch = next_ch(); - while(!isSTRING_SPECIAL(ch)) { - save_ch(ch); - ch = next_ch(); - }; - - switch (ch) { - - case '(': - ++nest_level; - save_ch(ch); - break; - - case ')': - if (--nest_level > 0) - save_ch(ch); - break; - - case '\\': - save_digraph(next_ch()); - break; - - case '\r': - /* All carriage returns (\r) are turned into linefeeds (\n)*/ - ch = next_ch(); /* get the next one, is it \n? */ - if (ch != '\n') { /* if not, then put it back. */ - back_ch(ch); - } - save_ch('\n'); /* in either case, save a linefeed */ - break; - - - case EOF: - tokenType = TOKEN_INVALID; /* Unterminated string */ - nest_level = 0; - break; - } - - } while(nest_level > 0); - - /* If there's room, add a 0-byte termination without increasing string - length. This fixes certain dependencies on 0-terminated strings */ - save_ch_no_inc(0); - - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Assemble a name; set token type and done flag. - * Put current input character back, if it is not white space. - */ - -/* Done: Name - * (Safe version used to complete name tokens that - * start out looking like something else). - */ - -static int -AAH_NAME(int ch) -{ - do { - save_ch(ch); - ch = next_ch(); - } while(isNAME(ch)); - - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - -/* Done: Name */ -static int -NAME(int ch) -{ - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - -/* Done: Literal Name */ -static int -LITERAL_NAME(int ch) -{ - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_LITERAL_NAME; - return(DONE); -} - -/* Done: immediate Name */ -static int -IMMED_NAME(int ch) -{ - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - if (isNAME(ch)) { - save_unsafe_ch(ch); - ch = next_ch(); - while(isNAME(ch)) { - save_ch(ch); - ch = next_ch(); - } - } - } - } - } - } - } - - back_ch_not_white(ch); - tokenType = TOKEN_IMMED_NAME; - return(DONE); -} - -/* Done: Name found while looking for something else */ -static int -OOPS_NAME(int ch) -{ - back_ch_not_white(ch); - tokenType = TOKEN_NAME; - return(DONE); -} - - -/* ------------------------------------------------------------------- - * Complete a miscellaneous token; set token type and done flag. - */ - -/* Done: Unmatched Right Angle-Bracket */ -static int -RIGHT_ANGLE(int ch) -{ - tokenType = TOKEN_RIGHT_ANGLE; - return(DONE); -} - -/* Done: Unmatched Right Parenthesis */ -static int -RIGHT_PAREN(int ch) -{ - tokenType = TOKEN_RIGHT_PAREN; - return(DONE); -} - -/* Done: Left Brace */ -static int -LEFT_BRACE(int ch) -{ - tokenType = TOKEN_LEFT_BRACE; - return(DONE); -} - -/* Done: Right Brace */ -static int -RIGHT_BRACE(int ch) -{ - tokenType = TOKEN_RIGHT_BRACE; - return(DONE); -} - -/* Done: Left Bracket */ -static int -LEFT_BRACKET(int ch) -{ - save_unsafe_ch(ch); - tokenType = TOKEN_LEFT_BRACKET; - return(DONE); -} - -/* Done: Right Bracket */ -static int -RIGHT_BRACKET(int ch) -{ - save_unsafe_ch(ch); - tokenType = TOKEN_RIGHT_BRACKET; - return(DONE); -} - -/* Done: Break */ -static int -BREAK_SIGNAL(int ch) -{ - tokenType = TOKEN_BREAK; - return(DONE); -} - -/* Done: No Token Found */ -static int -NO_TOKEN(int ch) -{ - tokenType = TOKEN_EOF; - return(DONE); -} - - -/* - * ------------------------------------------------------------------- - * scan_token -- scan one token from the input. It uses a simple - * finite state machine to recognize token classes. - * - * The input is from a file. - * - * On entry -- - * - * inputP -> input PostScript object, a file. - * tokenStartP -> buffer in VM for accumulating the token. - * tokenMaxP -> last character in the token buffer - * - * On exit -- - * - * tokenLength = number of characters in the token - * tokenTooLong = TRUE if the token did not fit in the buffer - * tokenType = code for the type of token parsed. - * tokenValue = converted value of a numeric token. - * - * - * ------------------------------------------------------------------- - */ -void -scan_token(psobj *inputP) -{ - int ch; - unsigned char *stateP = s0; - unsigned char entry; - int (*actionP)(int); - - /* Define input source */ - inputFileP = inputP->data.fileP; - if (inputFileP == NULL) { - tokenType = TOKEN_EOF; - return; - } - - /* Ensure enough space for most cases - * (so we don't have to keep checking) - * The length needs to cover the maximum number - * of save_unsafe_ch() calls that might be executed. - * That number is 11 (a sign and 10 decimal digits, e.g., - * when scanning -2147483648), but use MAX_NAME_LEN - * in case someone changes that without checking. - */ - tokenStartP = vm_next_byte(); - tokenMaxP = tokenStartP + MIN(vm_free_bytes(), MAX_STRING_LEN); - - if ((tokenMaxP-tokenStartP) < (MAX_NAME_LEN)) { - tokenLength = 0; - tokenTooLong = TRUE; - tokenType = TOKEN_NONE; - tokenValue.integer = 0; - return; - } - - /* Reset token */ - tokenCharP = tokenStartP; - tokenTooLong = FALSE; - - /* Scan one token */ - ch = next_ch(); - do { - entry = stateP[ch]; - stateP = classActionTable[entry].nextStateP; - actionP = classActionTable[entry].actionRoutineP; - ch = (*actionP)(ch); - } while(ch != DONE); - - - /* Return results */ - tokenLength = tokenCharP - tokenStartP; -} diff --git a/libXfont/src/Type1/token.h b/libXfont/src/Type1/token.h deleted file mode 100644 index 663982889..000000000 --- a/libXfont/src/Type1/token.h +++ /dev/null @@ -1,79 +0,0 @@ -/* $Xorg: token.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/token.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ - -#ifndef TOKEN_H -#define TOKEN_H - -/* Special characters */ -#define CONTROL_C (3) - -/* Token type codes */ -#define TOKEN_INVALID (-3) -#define TOKEN_BREAK (-2) -#define TOKEN_EOF (-1) -#define TOKEN_NONE (0) -#define TOKEN_LEFT_PAREN (1) -#define TOKEN_RIGHT_PAREN (2) -#define TOKEN_LEFT_ANGLE (3) -#define TOKEN_RIGHT_ANGLE (4) -#define TOKEN_LEFT_BRACE (5) -#define TOKEN_RIGHT_BRACE (6) -#define TOKEN_LEFT_BRACKET (7) -#define TOKEN_RIGHT_BRACKET (8) -#define TOKEN_NAME (9) -#define TOKEN_LITERAL_NAME (10) -#define TOKEN_INTEGER (11) -#define TOKEN_REAL (12) -#define TOKEN_RADIX_NUMBER (13) -#define TOKEN_HEX_STRING (14) -#define TOKEN_STRING (15) -#define TOKEN_IMMED_NAME (16) - -/* Token routines */ -extern void scan_token( psobj *inputP ); - -/* - * ------------------------------------------------------------------------- - * Globals shared -- (everyone else KEEP YOUR MITTS OFF THEM!) - * ------------------------------------------------------------------------- - */ - -/* These variables are set by the caller */ -extern char *tokenStartP; /* Pointer to token buffer in VM */ -extern char *tokenMaxP; /* Pointer to end of VM we may use + 1 */ - -/* These variables are set by P_TOKEN */ -extern int tokenLength; /* Characters in token */ -extern boolean tokenTooLong; /* Token too long for space available */ -extern int tokenType; /* Type of token identified */ -extern psvalue tokenValue; /* Token value */ - -#endif /* TOKEN_H */ diff --git a/libXfont/src/Type1/tokst.h b/libXfont/src/Type1/tokst.h deleted file mode 100644 index 02166afde..000000000 --- a/libXfont/src/Type1/tokst.h +++ /dev/null @@ -1,510 +0,0 @@ -/* $Xorg: tokst.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/tokst.h,v 1.3 1999/08/22 08:58:54 dawes Exp $ */ - -/* -------------------------------------- */ -/* --- MACHINE GENERATED, DO NOT EDIT --- */ -/* -------------------------------------- */ - -#ifndef TOKST -#define TOKST 1 - -/* - * State Index Tables -- - * - * These tables map the input character to the - * proper entry in the Class Action Table. - * There is one table for each state. - * - */ -#define s0 (si0+2) -static unsigned char si0[258] = { 0x10,0x11, - 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02,0x02,0x0F,0x0F,0x02,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x02,0x0F,0x0F,0x0F,0x0F,0x03,0x0F,0x0F,0x05,0x0B,0x0F,0x0D,0x0F,0x0D,0x0E,0x04, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x0F,0x0F,0x08,0x0F,0x0C,0x0F, - 0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0F,0x0A,0x0F,0x0F, - 0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x0F,0x09,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F -}; - -#define s1 (si1+2) -static unsigned char si1[258] = { 0x14,0x15, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x12, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13 -}; - -#define s2 (si2+2) -static unsigned char si2[258] = { 0x1B,0x1C, - 0x16,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x16,0x16,0x1A,0x1A,0x16,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x16,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x1A,0x17,0x17,0x1A,0x1A,0x1A,0x1A,0x19,0x17, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1A,0x1A,0x17,0x1A,0x17,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x17,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x17,0x1A,0x17,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A, - 0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A -}; - -#define s3 (si3+2) -static unsigned char si3[258] = { 0x23,0x24, - 0x1D,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1D,0x1D,0x22,0x22,0x1D,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x1D,0x22,0x22,0x20,0x22,0x1E,0x22,0x22,0x1E,0x1E,0x22,0x22,0x22,0x22,0x1F,0x1E, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22, - 0x22,0x22,0x22,0x22,0x22,0x21,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x21,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1E,0x22,0x1E,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22 -}; - -#define s4 (si4+2) -static unsigned char si4[258] = { 0x29,0x2A, - 0x25,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x25,0x25,0x28,0x28,0x25,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x25,0x28,0x28,0x28,0x28,0x26,0x28,0x28,0x26,0x26,0x28,0x28,0x28,0x28,0x28,0x26, - 0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x28,0x28,0x26,0x28,0x26,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x26,0x28,0x26,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x26,0x28,0x26,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 -}; - -#define s5 (si5+2) -static unsigned char si5[258] = { 0x30,0x31, - 0x2B,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2B,0x2B,0x2F,0x2F,0x2B,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2B,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2F,0x2C,0x2C,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C, - 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2D,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2D,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2C,0x2F,0x2C,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F, - 0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F -}; - -#define s6 (si6+2) -static unsigned char si6[258] = { 0x36,0x37, - 0x32,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x32,0x32,0x35,0x35,0x32,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x32,0x35,0x35,0x35,0x35,0x33,0x35,0x35,0x33,0x33,0x35,0x35,0x35,0x35,0x35,0x33, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35, - 0x35,0x35,0x35,0x35,0x35,0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x33,0x35,0x33,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, - 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35 -}; - -#define s7 (si7+2) -static unsigned char si7[258] = { 0x3D,0x3E, - 0x38,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x38,0x38,0x3C,0x3C,0x38,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x38,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x3C,0x39,0x39,0x3C,0x3A,0x3C,0x3A,0x3C,0x39, - 0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3C,0x3C,0x39,0x3C,0x39,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x39,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x39,0x3C,0x39,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, - 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C -}; - -#define s8 (si8+2) -static unsigned char si8[258] = { 0x43,0x44, - 0x3F,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3F,0x3F,0x42,0x42,0x3F,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x3F,0x42,0x42,0x42,0x42,0x40,0x42,0x42,0x40,0x40,0x42,0x42,0x42,0x42,0x42,0x40, - 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x42,0x40,0x42,0x40,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x40,0x42,0x40,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x40,0x42,0x40,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, - 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42 -}; - -#define s9 (si9+2) -static unsigned char si9[258] = { 0x48,0x49, - 0x45,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x45,0x45,0x47,0x47,0x45,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x45,0x47,0x47,0x47,0x47,0x46,0x47,0x47,0x46,0x46,0x47,0x47,0x47,0x47,0x47,0x46, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x46,0x47,0x46,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, - 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47 -}; - -#define s10 (si10+2) -static unsigned char si10[258] = { 0x4E,0x4F, - 0x4A,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4A,0x4A,0x4D,0x4D,0x4A,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4A,0x4D,0x4D,0x4D,0x4D,0x4B,0x4D,0x4D,0x4B,0x4B,0x4D,0x4D,0x4D,0x4D,0x4D,0x4B, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4D,0x4D,0x4B,0x4D,0x4B,0x4D, - 0x4D,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4B,0x4D,0x4B,0x4D,0x4D, - 0x4D,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C, - 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4B,0x4D,0x4B,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D, - 0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D -}; - -#define s11 (si11+2) -static unsigned char si11[258] = { 0x53,0x54, - 0x50,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x50,0x50,0x52,0x52,0x50,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x50,0x52,0x52,0x52,0x52,0x51,0x52,0x52,0x51,0x51,0x52,0x52,0x52,0x52,0x52,0x51, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x51,0x52,0x51,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, - 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52 -}; - -/* - * Class Action Table -- - * - * The entries in the Class Action Table indicate the - * action routine to be called, and the next state to - * enter, for each relevant character class in each. - * state. There are several entries for each state. - * - */ -static int AAH_NAME ( int ch ); -static int BREAK_SIGNAL ( int ch ); -static int HEX_STRING ( int ch ); -static int IMMED_NAME ( int ch ); -static int INTEGER ( int ch ); -static int LEFT_BRACE ( int ch ); -static int LEFT_BRACKET ( int ch ); -static int LITERAL_NAME ( int ch ); -static int NAME ( int ch ); -static int NO_TOKEN ( int ch ); -static int OOPS_NAME ( int ch ); -static int RADIX_NUMBER ( int ch ); -static int REAL ( int ch ); -static int RIGHT_ANGLE ( int ch ); -static int RIGHT_BRACE ( int ch ); -static int RIGHT_BRACKET ( int ch ); -static int RIGHT_PAREN ( int ch ); -static int STRING ( int ch ); -static int add_1st_decpt ( int ch ); -static int add_1st_digits ( int ch ); -static int add_char ( int ch ); -static int add_decpt ( int ch ); -static int add_digits ( int ch ); -static int add_exponent ( int ch ); -static int add_e_sign ( int ch ); -static int add_fraction ( int ch ); -static int add_radix ( int ch ); -static int add_r_digits ( int ch ); -static int add_sign ( int ch ); -static int next_char ( int ch ); -static int skip_comment ( int ch ); -static int skip_space ( int ch ); - -static struct cat { - int (*actionRoutineP)(int); - unsigned char *nextStateP; -} classActionTable[] = { - - /* s0: Classify initial character */ - /* 00 ALPHA */ {NAME, s0}, /* executable name */ - /* 01 DIGIT */ {add_1st_digits, s3}, /* number? */ - /* 02 WHITE_SPACE */ {skip_space, s0}, /* skip white space */ - /* 03 PERCENT */ {skip_comment, s0}, /* comment? */ - /* 04 SLASH */ {next_char, s1}, /* literal or imm name */ - /* 05 LEFT_PAREN */ {STRING, s0}, /* string */ - /* 06 LEFT_BRACE */ {LEFT_BRACE, s0}, /* begin procedure body */ - /* 07 LEFT_BRACKET */ {LEFT_BRACKET, s0}, /* begin array */ - /* 08 LEFT_ANGLE */ {HEX_STRING, s0}, /* hex string? */ - /* 09 RIGHT_BRACE */ {RIGHT_BRACE, s0}, /* end procedure body */ - /* 0A RIGHT_BRACKET */ {RIGHT_BRACKET, s0}, /* end array */ - /* 0B RIGHT_PAREN */ {RIGHT_PAREN, s0}, /* unmatched right paren */ - /* 0C RIGHT_ANGLE */ {RIGHT_ANGLE, s0}, /* unmatched right angle */ - /* 0D SIGN */ {add_sign, s2}, /* signed number? */ - /* 0E DECIMAL_POINT */ {add_1st_decpt, s4}, /* real number? */ - /* 0F ANY */ {NAME, s0}, /* executable name */ - /* 10 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 11 EOF */ {NO_TOKEN, s0}, /* no token found */ - - /* s1: Further classify a '/' */ - /* 12 SLASH */ {IMMED_NAME, s0}, /* immediate name */ - /* 13 ANY */ {LITERAL_NAME, s0}, /* literal name */ - /* 14 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 15 EOF */ {OOPS_NAME, s0}, /* isolated sign */ - - /* s2: sign */ - /* 16 WHITE_SPACE */ {OOPS_NAME, s0}, /* isolated sign */ - /* 17 SPECIAL */ {OOPS_NAME, s0}, /* isolated sign */ - /* 18 DIGIT */ {add_digits, s3}, /* number? */ - /* 19 DECIMAL_POINT */ {add_decpt, s4}, /* real number? */ - /* 1A ANY */ {NAME, s0}, /* executable name */ - /* 1B BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 1C EOF */ {OOPS_NAME, s0}, /* isolated sign */ - - /* s3: sign? digit+ */ - /* 1D WHITE_SPACE */ {INTEGER, s0}, /* n-digit integer */ - /* 1E SPECIAL */ {INTEGER, s0}, /* n-digit integer */ - /* 1F DECIMAL_POINT */ {add_char, s5}, /* real number? */ - /* 20 POUND */ {add_radix, s10}, /* radix number? */ - /* 21 eE */ {add_char, s7}, /* real with exponent? */ - /* 22 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 23 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 24 EOF */ {INTEGER, s0}, /* n-digit integer */ - - /* s4: sign? . */ - /* 25 WHITE_SPACE */ {OOPS_NAME, s0}, /* isolated +. or -. */ - /* 26 SPECIAL */ {OOPS_NAME, s0}, /* isolated +. or -. */ - /* 27 DIGIT */ {add_fraction, s6}, /* number? */ - /* 28 ANY */ {NAME, s0}, /* executable name */ - /* 29 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 2A EOF */ {OOPS_NAME, s0}, /* isolated +. or -. */ - - /* s5: sign? digit+ . */ - /* 2B WHITE_SPACE */ {REAL, s0}, /* real with fraction */ - /* 2C SPECIAL */ {REAL, s0}, /* real with fraction */ - /* 2D eE */ {add_char, s7}, /* real with exponent? */ - /* 2E DIGIT */ {add_fraction, s6}, /* number? */ - /* 2F ANY */ {AAH_NAME, s0}, /* executable name */ - /* 30 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 31 EOF */ {REAL, s0}, /* real with fraction */ - - /* s6: sign? (digit+ . digit+) | (. digit+) */ - /* 32 WHITE_SPACE */ {REAL, s0}, /* real with fraction */ - /* 33 SPECIAL */ {REAL, s0}, /* real with fraction */ - /* 34 eE */ {add_char, s7}, /* real with exponent? */ - /* 35 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 36 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 37 EOF */ {REAL, s0}, /* real with fraction */ - - /* s7: sign? ((digit+ (. digit*)?) | (. digit+)) Ee */ - /* 38 WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid real number */ - /* 39 SPECIAL */ {OOPS_NAME, s0}, /* invalid real number */ - /* 3A SIGN */ {add_e_sign, s8}, /* real w signed exponent? */ - /* 3B DIGIT */ {add_exponent, s9}, /* real w exponent ? */ - /* 3C ANY */ {AAH_NAME, s0}, /* executable name */ - /* 3D BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 3E EOF */ {OOPS_NAME, s0}, /* invalid real number */ - - /* s8: sign? (digit+ (. digit*)? | (digit* . digit+) Ee sign */ - /* 3F WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid real number */ - /* 40 SPECIAL */ {OOPS_NAME, s0}, /* invalid real number */ - /* 41 DIGIT */ {add_exponent, s9}, /* real w exponent? */ - /* 42 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 43 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 44 EOF */ {OOPS_NAME, s0}, /* invalid real number */ - - /* s9: sign? (digit+ (. digit*)? | (digit* . digit+) Ee sign? digit+ */ - /* 45 WHITE_SPACE */ {REAL, s0}, /* real w exponent */ - /* 46 SPECIAL */ {REAL, s0}, /* real w exponent */ - /* 47 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 48 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 49 EOF */ {REAL, s0}, /* real w exponent */ - - /* s10: digit+ # */ - /* 4A WHITE_SPACE */ {OOPS_NAME, s0}, /* invalid radix number */ - /* 4B SPECIAL */ {OOPS_NAME, s0}, /* invalid radix number */ - /* 4C R_DIGIT */ {add_r_digits, s11}, /* radix number? */ - /* 4D ANY */ {AAH_NAME, s0}, /* executable name */ - /* 4E BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 4F EOF */ {OOPS_NAME, s0}, /* invalid radix number */ - - /* s11: digit+ # r_digit+ */ - /* 50 WHITE_SPACE */ {RADIX_NUMBER, s0}, /* radix number */ - /* 51 SPECIAL */ {RADIX_NUMBER, s0}, /* radix number */ - /* 52 ANY */ {AAH_NAME, s0}, /* executable name */ - /* 53 BREAK */ {BREAK_SIGNAL, s0}, /* break signalled */ - /* 54 EOF */ {RADIX_NUMBER, s0} /* radix number */ -}; - -/* - * Character Classification Tables -- - * - * The entries in the Character Classification Tables - * map character codes to character classes. The - * tables contains one entry per code. The bits in - * each entry indicate which classes the character - * code belongs to. - * - * The macros 'isInCLASS(ch)' generate code to test - * whether 'ch' is a character in 'CLASS'. - * - */ -/* Membership macros for classes defined in table 1 ... */ -#define isRADIX_DIGIT(c) ((isInP1[c] & 0x80) != 0) -#define isHEX_DIGIT(c) ((isInP1[c] & 0x40) != 0) -#define isDECIMAL_DIGIT(c) ((isInP1[c] & 0x10) != 0) -#define isOCTAL_DIGIT(c) ((isInP1[c] & 0x20) != 0) - -/* Membership macros for classes defined in table 2 ... */ -#define isWHITE_SPACE(c) ((isInP2[c] & 0x80) != 0) -#define isCOMMENT(c) ((isInP2[c] & 0x40) != 0) -#define isNAME(c) ((isInP2[c] & 0x20) != 0) -#define isSTRING_SPECIAL(c) ((isInP2[c] & 0x10) != 0) -#define isNUMBER_ENDER(c) ((isInP2[c] & 0x08) != 0) - -#define isInP1 (isInT1+2) -static unsigned char isInT1[258] = { 0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xD0,0xD0,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00, - 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -#define isInP2 (isInT2+2) -static unsigned char isInT2[258] = { 0x18,0x18, - 0xC8,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC8,0x88,0x60,0x60,0x98,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0xC8,0x60,0x60,0x60,0x60,0x48,0x60,0x60,0x58,0x58,0x60,0x60,0x60,0x60,0x60,0x48, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x60,0x48,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x70,0x48,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x48,0x60,0x48,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60 -}; - -#endif diff --git a/libXfont/src/Type1/trig.h b/libXfont/src/Type1/trig.h deleted file mode 100644 index d569ed067..000000000 --- a/libXfont/src/Type1/trig.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Xorg: trig.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/*SHARED*/ - -/* $XFree86: xc/lib/font/Type1/trig.h,v 1.2 1998/07/25 06:57:00 dawes Exp $ */ - -#undef DegreeCos -#undef DegreeSin -#undef sqrt - -#define DegreeCos(d) xiStub() -#define DegreeSin(d) xiStub() -#define sqrt(d) xiStub() - diff --git a/libXfont/src/Type1/type1.c b/libXfont/src/Type1/type1.c deleted file mode 100644 index 5515f461c..000000000 --- a/libXfont/src/Type1/type1.c +++ /dev/null @@ -1,1797 +0,0 @@ -/* $Xorg: type1.c,v 1.4 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines, Corp. 1991 - * All Rights Reserved - * Copyright Lexmark International, Inc. 1991 - * All Rights Reserved - * Portions Copyright (c) 1990 Adobe Systems Incorporated. - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM or Lexmark or Adobe - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. - * - * IBM, LEXMARK, AND ADOBE PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY - * WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE - * ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING - * ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY - * PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM, - * LEXMARK, OR ADOBE) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND - * CORRECTION. IN NO EVENT SHALL IBM, LEXMARK, OR ADOBE BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/type1.c,v 1.9tsi Exp $ */ - -/*********************************************************************/ -/* */ -/* Type 1 module - Converting fonts in Adobe Type 1 Font Format */ -/* to scaled and hinted paths for rasterization. */ -/* Files: type1.c, type1.h, and blues.h. */ -/* */ -/* Authors: Sten F. Andler, IBM Almaden Research Center */ -/* (Type 1 interpreter, stem & flex hints) */ -/* */ -/* Patrick A. Casey, Lexmark International, Inc. */ -/* (Font level hints & stem hints) */ -/* */ -/*********************************************************************/ - -/******************/ -/* Include Files: */ -/******************/ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef FONTMODULE -#include <stdio.h> /* a system-dependent include, usually */ -#include <math.h> -#else -#include "Xdefs.h" -#include "Xmd.h" -#include "xf86_ansic.h" -#endif -#include "objects.h" -#include "spaces.h" -#include "paths.h" -#include "fonts.h" /* understands about TEXTTYPEs */ -#include "pictures.h" /* understands about handles */ - -typedef struct xobject xobject; -#include "util.h" /* PostScript objects */ -#include "fontfcn.h" -#include "blues.h" /* Blues structure for font-level hints */ - -/**********************************/ -/* Type1 Constants and Structures */ -/**********************************/ -#define MAXSTACK 24 /* Adobe Type1 limit */ -#define MAXCALLSTACK 10 /* Adobe Type1 limit */ -#define MAXPSFAKESTACK 32 /* Max depth of fake PostScript stack (local) */ -#define MAXSTRLEN 512 /* Max length of a Type 1 string (local) */ -#define MAXLABEL 256 /* Maximum number of new hints */ -#define MAXSTEMS 128 /* Maximum number of VSTEM and HSTEM hints */ -#define EPS 0.001 /* Small number for comparisons */ - -/************************************/ -/* Adobe Type 1 CharString commands */ -/************************************/ -#define HSTEM 1 -#define VSTEM 3 -#define VMOVETO 4 -#define RLINETO 5 -#define HLINETO 6 -#define VLINETO 7 -#define RRCURVETO 8 -#define CLOSEPATH 9 -#define CALLSUBR 10 -#define RETURN 11 -#define ESCAPE 12 -#define HSBW 13 -#define ENDCHAR 14 -#define RMOVETO 21 -#define HMOVETO 22 -#define VHCURVETO 30 -#define HVCURVETO 31 - -/*******************************************/ -/* Adobe Type 1 CharString Escape commands */ -/*******************************************/ -#define DOTSECTION 0 -#define VSTEM3 1 -#define HSTEM3 2 -#define SEAC 6 -#define SBW 7 -#define DIV 12 -#define CALLOTHERSUBR 16 -#define POP 17 -#define SETCURRENTPOINT 33 - -/*****************/ -/* Useful macros */ -/*****************/ - -#define FABS(x) fabs(x) - -#define CEIL(x) ceil(x) - -#define FLOOR(x) floor(x) - -#define ROUND(x) FLOOR((x) + 0.5) - -#define ODD(x) (((int)(x)) & 01) - -#define Error {errflag = TRUE; return;} -#define ErrorRet(ret) {errflag = TRUE; return (ret);} - -/********************/ -/* global variables */ -/********************/ -struct stem { /* representation of a STEM hint */ - int vertical; /* TRUE if vertical, FALSE otherwise */ - double x, dx; /* interval of vertical stem */ - double y, dy; /* interval of horizontal stem */ - struct segment *lbhint, *lbrevhint; /* left or bottom hint adjustment */ - struct segment *rthint, *rtrevhint; /* right or top hint adjustment */ -}; - -struct xobject *Type1Char(char *env, struct XYspace *S, - psobj *charstrP, psobj *subrsP, psobj *osubrsP, - struct blues_struct *bluesP, int *modeP); - -static double escapementX, escapementY; -static double sidebearingX, sidebearingY; -static double accentoffsetX, accentoffsetY; - -static struct segment *path; -static int errflag; - -/*************************************************/ -/* Global variables to hold Type1Char parameters */ -/*************************************************/ -static char *Environment; -static struct XYspace *CharSpace; -static psobj *CharStringP, *SubrsP; - -/************************/ -/* Forward declarations */ -/************************/ -static struct segment *Applyhint ( struct segment *p, int stemnumber, - int half ); -static struct segment *Applyrevhint ( struct segment *p, int stemnumber, - int half ); -static void CallOtherSubr ( int othersubrno ); -static void CallSubr ( int subrno ); -static struct segment *CenterStem ( double edge1, double edge2 ); -static void ClearCallStack ( void ); -static void ClearPSFakeStack ( void ); -static void ClearStack ( void ); -static void ComputeAlignmentZones ( void ); -static void ComputeStem ( int stemno ); -static void Decode ( int Code ); -static unsigned char Decrypt ( unsigned char cipher ); -static double Div ( double num1, double num2 ); -static void DoClosePath ( void ); -static void DoCommand ( int Code ); -static int DoRead ( int *CodeP ); -static void DotSection ( void ); -static void EndChar ( void ); -static void Escape ( int Code ); -static struct segment *FindStems ( double x, double y, double dx, double dy ); -static void FinitStems ( void ); -static void FlxProc ( double c1x2, double c1y2, double c3x0, double c3y0, - double c3x1, double c3y1, double c3x2, double c3y2, - double c4x0, double c4y0, double c4x1, double c4y1, - double c4x2, double c4y2, double epY, double epX, - int idmin ); -static void FlxProc1 ( void ); -static void FlxProc2 ( void ); -static void HintReplace ( void ); -static void HStem ( double y, double dy ); -static void InitStems ( void ); -static void PopCall ( psobj **CurrStrPP, int *CurrIndexP, - unsigned short *CurrKeyP ); -static double PSFakePop ( void ); -static void PSFakePush ( double Num ); -static void Push ( double Num ); -static void PushCall ( psobj *CurrStrP, int CurrIndex, - unsigned short CurrKey ); -static void Return ( void ); -static void RLineTo ( double dx, double dy ); -static void RMoveTo ( double dx, double dy ); -static void RRCurveTo ( double dx1, double dy1, double dx2, double dy2, - double dx3, double dy3 ); -static void Sbw ( double sbx, double sby, double wx, double wy ); -static void Seac ( double asb, double adx, double ady, unsigned char bchar, - unsigned char achar ); -static void SetCurrentPoint ( double x, double y ); -static void StartDecrypt ( void ); -static void VStem ( double x, double dx ); - -/*****************************************/ -/* statics for Flex procedures (FlxProc) */ -/*****************************************/ -static struct segment *FlxOldPath; /* save path before Flex feature */ - -/******************************************************/ -/* statics for Font level hints (Blues) (see blues.h) */ -/******************************************************/ -static struct blues_struct *blues; /* the blues structure */ -static struct alignmentzone alignmentzones[MAXALIGNMENTZONES]; -static int numalignmentzones; /* total number of alignment zones */ - -/****************************************************************/ -/* Subroutines for the Font level hints (Alignment zones, etc.) */ -/****************************************************************/ - -/******************************************/ -/* Fill in the alignment zone structures. */ -/******************************************/ -static void -ComputeAlignmentZones(void) -{ - int i; - double dummy, bluezonepixels, familyzonepixels; - struct segment *p; - - numalignmentzones = 0; /* initialize total # of zones */ - - /* do the BlueValues zones */ - for (i = 0; i < blues->numBlueValues; i +=2, ++numalignmentzones) { - /* the 0th & 1st numbers in BlueValues are for a bottom zone */ - /* the rest are topzones */ - if (i == 0) /* bottom zone */ - alignmentzones[numalignmentzones].topzone = FALSE; - else /* top zone */ - alignmentzones[numalignmentzones].topzone = TRUE; - if (i < blues->numFamilyBlues) { /* we must consider FamilyBlues */ - p = ILoc(CharSpace,0,blues->BlueValues[i] - blues->BlueValues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &bluezonepixels); - Destroy(p); - p = ILoc(CharSpace,0,blues->FamilyBlues[i]-blues->FamilyBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &familyzonepixels); - Destroy(p); - /* is the difference in size of the zones less than 1 pixel? */ - if (FABS(bluezonepixels - familyzonepixels) < 1.0) { - /* use the Family zones */ - alignmentzones[numalignmentzones].bottomy = - blues->FamilyBlues[i]; - alignmentzones[numalignmentzones].topy = - blues->FamilyBlues[i+1]; - continue; - } - } - /* use this font's Blue zones */ - alignmentzones[numalignmentzones].bottomy = blues->BlueValues[i]; - alignmentzones[numalignmentzones].topy = blues->BlueValues[i+1]; - } - - /* do the OtherBlues zones */ - for (i = 0; i < blues->numOtherBlues; i +=2, ++numalignmentzones) { - /* all of the OtherBlues zones are bottom zones */ - alignmentzones[numalignmentzones].topzone = FALSE; - if (i < blues->numFamilyOtherBlues) {/* consider FamilyOtherBlues */ - p = ILoc(CharSpace,0,blues->OtherBlues[i] - blues->OtherBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &bluezonepixels); - Destroy(p); - p = ILoc(CharSpace,0,blues->FamilyOtherBlues[i] - - blues->FamilyOtherBlues[i+1]); - QueryLoc(p, IDENTITY, &dummy, &familyzonepixels); - Destroy(p); - /* is the difference in size of the zones less than 1 pixel? */ - if (FABS(bluezonepixels - familyzonepixels) < 1.0) { - /* use the Family zones */ - alignmentzones[numalignmentzones].bottomy = - blues->FamilyOtherBlues[i]; - alignmentzones[numalignmentzones].topy = - blues->FamilyOtherBlues[i+1]; - continue; - } - } - /* use this font's Blue zones (as opposed to the Family Blues */ - alignmentzones[numalignmentzones].bottomy = blues->OtherBlues[i]; - alignmentzones[numalignmentzones].topy = blues->OtherBlues[i+1]; - } -} - -/**********************************************************************/ -/* Subroutines and statics for handling of the VSTEM and HSTEM hints. */ -/**********************************************************************/ -static int InDotSection; /* DotSection flag */ -static struct stem stems[MAXSTEMS]; /* All STEM hints */ -static int numstems; /* Number of STEM hints */ -static int currstartstem; /* The current starting stem. */ -static int oldvert, oldhor; /* Remember hint in effect */ -static int oldhorhalf, oldverthalf; /* Remember which half of the stem */ -static double wsoffsetX, wsoffsetY; /* White space offset - for VSTEM3,HSTEM3 */ -static int wsset; /* Flag for whether we've set wsoffsetX,Y */ - -static void -InitStems(void) /* Initialize the STEM hint data structures */ -{ - InDotSection = FALSE; - currstartstem = numstems = 0; - oldvert = oldhor = -1; -} - -static void -FinitStems(void) /* Terminate the STEM hint data structures */ -{ - int i; - - for (i = 0; i < numstems; i++) { - Destroy(stems[i].lbhint); - Destroy(stems[i].lbrevhint); - Destroy(stems[i].rthint); - Destroy(stems[i].rtrevhint); - } -} - -/*******************************************************************/ -/* Compute the dislocation that a stemhint should cause for points */ -/* inside the stem. */ -/*******************************************************************/ -static void -ComputeStem(int stemno) -{ - int verticalondevice, idealwidth; - double stemstart, stemwidth; - struct segment *p; - int i; - double stembottom, stemtop, flatposition; - double Xpixels, Ypixels; - double unitpixels, onepixel; - int suppressovershoot, enforceovershoot; - double stemshift, flatpospixels, overshoot; - double widthdiff; /* Number of character space units to adjust width */ - double lbhintvalue, rthintvalue; - double cxx, cyx, cxy, cyy; /* Transformation matrix */ - int rotated; /* TRUE if character is on the side, FALSE if upright */ - - /************************************************/ - /* DETERMINE ORIENTATION OF CHARACTER ON DEVICE */ - /************************************************/ - - QuerySpace(CharSpace, &cxx, &cyx, &cxy, &cyy); /* Transformation matrix */ - - if (FABS(cxx) < 0.00001 || FABS(cyy) < 0.00001) - rotated = TRUE; /* Char is on side (90 or 270 degrees), possibly oblique. */ - else if (FABS(cyx) < 0.00001 || FABS(cxy) < 0.00001) - rotated = FALSE; /* Char is upright (0 or 180 degrees), possibly oblique. */ - else { - stems[stemno].lbhint = NULL; /* Char is at non-axial angle, ignore hints. */ - stems[stemno].lbrevhint = NULL; - stems[stemno].rthint = NULL; - stems[stemno].rtrevhint = NULL; - return; - } - - /* Determine orientation of stem */ - - if (stems[stemno].vertical) { - verticalondevice = !rotated; - stemstart = stems[stemno].x; - stemwidth = stems[stemno].dx; - } else { - verticalondevice = rotated; - stemstart = stems[stemno].y; - stemwidth = stems[stemno].dy; - } - - /* Determine how many pixels (non-negative) correspond to 1 character space - unit (unitpixels), and how many character space units (non-negative) - correspond to one pixel (onepixel). */ - - if (stems[stemno].vertical) - p = ILoc(CharSpace, 1, 0); - else - p = ILoc(CharSpace, 0, 1); - QueryLoc(p, IDENTITY, &Xpixels, &Ypixels); - Destroy(p); - if (verticalondevice) - unitpixels = FABS(Xpixels); - else - unitpixels = FABS(Ypixels); - - onepixel = 1.0 / unitpixels; - - /**********************/ - /* ADJUST STEM WIDTHS */ - /**********************/ - - widthdiff = 0.0; - - /* Find standard stem with smallest width difference from this stem */ - if (stems[stemno].vertical) { /* vertical stem */ - if (blues->StdVW != 0) /* there is an entry for StdVW */ - widthdiff = blues->StdVW - stemwidth; - for (i = 0; i < blues->numStemSnapV; ++i) { /* now look at StemSnapV */ - if (blues->StemSnapV[i] - stemwidth < widthdiff) - /* this standard width is the best match so far for this stem */ - widthdiff = blues->StemSnapV[i] - stemwidth; - } - } else { /* horizontal stem */ - if (blues->StdHW != 0) /* there is an entry for StdHW */ - widthdiff = blues->StdHW - stemwidth; - for (i = 0; i < blues->numStemSnapH; ++i) { /* now look at StemSnapH */ - if (blues->StemSnapH[i] - stemwidth < widthdiff) - /* this standard width is the best match so far for this stem */ - widthdiff = blues->StemSnapH[i] - stemwidth; - } - } - - /* Only expand or contract stems if they differ by less than 1 pixel from - the closest standard width, otherwise make the width difference = 0. */ - if (FABS(widthdiff) > onepixel) - widthdiff = 0.0; - - /* Expand or contract stem to the nearest integral number of pixels. */ - idealwidth = ROUND((stemwidth + widthdiff) * unitpixels); - /* Ensure that all stems are at least one pixel wide. */ - if (idealwidth == 0) - idealwidth = 1; - /* Apply ForceBold to vertical stems. */ - if (blues->ForceBold && stems[stemno].vertical) - /* Force this vertical stem to be at least DEFAULTBOLDSTEMWIDTH wide. */ - if (idealwidth < DEFAULTBOLDSTEMWIDTH) - idealwidth = DEFAULTBOLDSTEMWIDTH; - /* Now compute the number of character space units necessary */ - widthdiff = idealwidth * onepixel - stemwidth; - - /*********************************************************************/ - /* ALIGNMENT ZONES AND OVERSHOOT SUPPRESSION - HORIZONTAL STEMS ONLY */ - /*********************************************************************/ - - stemshift = 0.0; - - if (!stems[stemno].vertical) { - - /* Get bottom and top boundaries of the stem. */ - stembottom = stemstart; - stemtop = stemstart + stemwidth; - - /* Find out if this stem intersects an alignment zone (the BlueFuzz */ - /* entry in the Private dictionary specifies the number of character */ - /* units to extend (in both directions) the effect of an alignment */ - /* zone on a horizontal stem. The default value of BlueFuzz is 1. */ - for (i = 0; i < numalignmentzones; ++i) { - if (alignmentzones[i].topzone) { - if (stemtop >= alignmentzones[i].bottomy && - stemtop <= alignmentzones[i].topy + blues->BlueFuzz) { - break; /* We found a top-zone */ - } - } else { - if (stembottom <= alignmentzones[i].topy && - stembottom >= alignmentzones[i].bottomy - blues->BlueFuzz) { - break; /* We found a bottom-zone */ - } - } - } - - if (i < numalignmentzones) { /* We found an intersecting zone (number i). */ - suppressovershoot = FALSE; - enforceovershoot = FALSE; - - /* When 1 character space unit is rendered smaller than BlueScale - device units (pixels), we must SUPPRESS overshoots. Otherwise, - if the top (or bottom) of this stem is more than BlueShift character - space units away from the flat position, we must ENFORCE overshoot. */ - - if (unitpixels < blues->BlueScale) - suppressovershoot = TRUE; - else - if (alignmentzones[i].topzone) { - if (stemtop >= alignmentzones[i].bottomy + blues->BlueShift) - enforceovershoot = TRUE; - } else - if (stembottom <= alignmentzones[i].topy - blues->BlueShift) - enforceovershoot = TRUE; - - /*************************************************/ - /* ALIGN THE FLAT POSITION OF THE ALIGNMENT ZONE */ - /*************************************************/ - - /* Compute the position of the alignment zone's flat position in - device space and the amount of shift needed to align it on a - pixel boundary. Move all stems this amount. */ - - if (alignmentzones[i].topzone) - flatposition = alignmentzones[i].bottomy; - else - flatposition = alignmentzones[i].topy; - - /* Find the flat position in pixels */ - flatpospixels = flatposition * unitpixels; - - /* Find the stem shift necessary to align the flat - position on a pixel boundary, and use this shift for all stems */ - stemshift = (ROUND(flatpospixels) - flatpospixels) * onepixel; - - /************************************************/ - /* HANDLE OVERSHOOT ENFORCEMENT AND SUPPRESSION */ - /************************************************/ - - /* Compute overshoot amount (non-negative) */ - if (alignmentzones[i].topzone) - overshoot = stemtop - flatposition; - else - overshoot = flatposition - stembottom; - - if (overshoot > 0.0) { - /* ENFORCE overshoot by shifting the entire stem (if necessary) so that - it falls at least one pixel beyond the flat position. */ - - if (enforceovershoot) - if (overshoot < onepixel) { - if (alignmentzones[i].topzone) - stemshift += onepixel - overshoot; - else - stemshift -= onepixel - overshoot; - } - /* SUPPRESS overshoot by aligning the stem to the alignment zone's - flat position. */ - - if (suppressovershoot) { - if (alignmentzones[i].topzone) - stemshift -= overshoot; - else - stemshift += overshoot; - } - } - - /************************************************************/ - /* COMPUTE HINT VALUES FOR EACH SIDE OF THE HORIZONTAL STEM */ - /************************************************************/ - - /* If the stem was aligned by a topzone, we expand or contract the stem - only at the bottom - since the stem top was aligned by the zone. - If the stem was aligned by a bottomzone, we expand or contract the stem - only at the top - since the stem bottom was aligned by the zone. */ - if (alignmentzones[i].topzone) { - lbhintvalue = stemshift - widthdiff; /* bottom */ - rthintvalue = stemshift; /* top */ - } else { - lbhintvalue = stemshift; /* bottom */ - rthintvalue = stemshift + widthdiff; /* top */ - } - - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, lbhintvalue)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -lbhintvalue)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, 0.0, rthintvalue)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -rthintvalue)); - - return; - - } /* endif (i < numalignmentzones) */ - - /* We didn't find any alignment zones intersecting this stem, so - proceed with normal stem alignment below. */ - - } /* endif (!stems[stemno].vertical) */ - - /* Align stem with pixel boundaries on device */ - stemstart = stemstart - widthdiff / 2; - stemshift = ROUND(stemstart * unitpixels) * onepixel - stemstart; - - /* Adjust the boundaries of the stem */ - lbhintvalue = stemshift - widthdiff / 2; /* left or bottom */ - rthintvalue = stemshift + widthdiff / 2; /* right or top */ - - if (stems[stemno].vertical) { - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, lbhintvalue, 0.0)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, -lbhintvalue, 0.0)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, rthintvalue, 0.0)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, -rthintvalue, 0.0)); - } else { - stems[stemno].lbhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, lbhintvalue)); - stems[stemno].lbrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -lbhintvalue)); - stems[stemno].rthint = (struct segment *)Permanent(Loc(CharSpace, 0.0, rthintvalue)); - stems[stemno].rtrevhint = (struct segment *)Permanent(Loc(CharSpace, 0.0, -rthintvalue)); - } -} - -#define LEFT 1 -#define RIGHT 2 -#define BOTTOM 3 -#define TOP 4 - -/*********************************************************************/ -/* Adjust a point using the given stem hint. Use the left/bottom */ -/* hint value or the right/top hint value depending on where the */ -/* point lies in the stem. */ -/*********************************************************************/ -static struct segment * -Applyhint(struct segment *p, int stemnumber, int half) -{ - if (half == LEFT || half == BOTTOM) - return Join(p, stems[stemnumber].lbhint); /* left or bottom hint */ - else - return Join(p, stems[stemnumber].rthint); /* right or top hint */ -} - -/*********************************************************************/ -/* Adjust a point using the given reverse hint. Use the left/bottom */ -/* hint value or the right/top hint value depending on where the */ -/* point lies in the stem. */ -/*********************************************************************/ -static struct segment * -Applyrevhint(struct segment *p, int stemnumber, int half) -{ - if (half == LEFT || half == BOTTOM) - return Join(p, stems[stemnumber].lbrevhint); /* left or bottom hint */ - else - return Join(p, stems[stemnumber].rtrevhint); /* right or top hint */ -} - -/***********************************************************************/ -/* Find the vertical and horizontal stems that the current point */ -/* (x, y) may be involved in. At most one horizontal and one vertical */ -/* stem can apply to a single point, since there are no overlaps */ -/* allowed. */ -/* The actual hintvalue is returned as a location. */ -/* Hints are ignored inside a DotSection. */ -/***********************************************************************/ -static struct segment * -FindStems(double x, double y, double dx, double dy) -{ - int i; - int newvert, newhor; - struct segment *p; - int newhorhalf, newverthalf; - - if (InDotSection) return(NULL); - - newvert = newhor = -1; - newhorhalf = newverthalf = -1; - - for (i = currstartstem; i < numstems; i++) { - if (stems[i].vertical) { /* VSTEM hint */ - if ((x >= stems[i].x - EPS) && - (x <= stems[i].x+stems[i].dx + EPS)) { - newvert = i; - if (dy != 0.0) { - if (dy < 0) newverthalf = LEFT; - else newverthalf = RIGHT; - } else { - if (x < stems[i].x+stems[i].dx / 2) newverthalf = LEFT; - else newverthalf = RIGHT; - } - } - } else { /* HSTEM hint */ - if ((y >= stems[i].y - EPS) && - (y <= stems[i].y+stems[i].dy + EPS)) { - newhor = i; - if (dx != 0.0) { - if (dx < 0) newhorhalf = TOP; - else newhorhalf = BOTTOM; - } else { - if (y < stems[i].y+stems[i].dy / 2) newhorhalf = BOTTOM; - else newhorhalf = TOP; - } - } - } - } - - p = NULL; - - if (newvert == -1 && oldvert == -1) ; /* Outside of any hints */ - else if (newvert == oldvert && - newverthalf == oldverthalf); /* No hint change */ - else if (oldvert == -1) { /* New vertical hint in effect */ - p = Applyhint(p, newvert, newverthalf); - } else if (newvert == -1) { /* Old vertical hint no longer in effect */ - p = Applyrevhint(p, oldvert, oldverthalf); - } else { /* New vertical hint in effect, old hint no longer in effect */ - p = Applyrevhint(p, oldvert, oldverthalf); - p = Applyhint(p, newvert, newverthalf); - } - - if (newhor == -1 && oldhor == -1) ; /* Outside of any hints */ - else if (newhor == oldhor && - newhorhalf == oldhorhalf) ; /* No hint change */ - else if (oldhor == -1) { /* New horizontal hint in effect */ - p = Applyhint(p, newhor, newhorhalf); - } else if (newhor == -1) { /* Old horizontal hint no longer in effect */ - p = Applyrevhint(p, oldhor, oldhorhalf); - } - else { /* New horizontal hint in effect, old hint no longer in effect */ - p = Applyrevhint(p, oldhor, oldhorhalf); - p = Applyhint(p, newhor, newhorhalf); - } - - oldvert = newvert; oldverthalf = newverthalf; - oldhor = newhor; oldhorhalf = newhorhalf; - - return p; -} - -/******************************************************/ -/* Subroutines and statics for the Type1Char routines */ -/******************************************************/ - -static int strindex; /* index into PostScript string being interpreted */ -static double currx, curry; /* accumulated x and y values for hints */ - -struct callstackentry { - psobj *currstrP; /* current CharStringP */ - int currindex; /* current strindex */ - unsigned short currkey; /* current decryption key */ - }; - -static double Stack[MAXSTACK]; -static int Top; -static struct callstackentry CallStack[MAXCALLSTACK]; -static int CallTop; -static double PSFakeStack[MAXPSFAKESTACK]; -static int PSFakeTop; - -static void -ClearStack(void) -{ - Top = -1; -} - -static void -Push(double Num) -{ - if (++Top < MAXSTACK) Stack[Top] = Num; - else Error; -} - -static void -ClearCallStack(void) -{ - CallTop = -1; -} - -static void -PushCall(psobj *CurrStrP, int CurrIndex, unsigned short CurrKey) -{ - if (++CallTop < MAXCALLSTACK) { - CallStack[CallTop].currstrP = CurrStrP; /* save CharString pointer */ - CallStack[CallTop].currindex = CurrIndex; /* save CharString index */ - CallStack[CallTop].currkey = CurrKey; /* save decryption key */ - } - else Error; -} - -static void -PopCall(psobj **CurrStrPP, int *CurrIndexP, unsigned short *CurrKeyP) -{ - if (CallTop >= 0) { - *CurrStrPP = CallStack[CallTop].currstrP; /* restore CharString pointer */ - *CurrIndexP = CallStack[CallTop].currindex; /* restore CharString index */ - *CurrKeyP = CallStack[CallTop--].currkey; /* restore decryption key */ - } - else Error; -} - -static void -ClearPSFakeStack(void) -{ - PSFakeTop = -1; -} - -/* PSFakePush: Pushes a number onto the fake PostScript stack */ -static void -PSFakePush(double Num) -{ - if (++PSFakeTop < MAXPSFAKESTACK) PSFakeStack[PSFakeTop] = Num; - else Error; -} - -/* PSFakePop: Removes a number from the top of the fake PostScript stack */ -static double -PSFakePop (void) -{ - if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]); - else ErrorRet(0.0); - /*NOTREACHED*/ -} - -/***********************************************************************/ -/* Center a stem on the pixel grid -- used by HStem3 and VStem3 */ -/***********************************************************************/ -static struct segment * -CenterStem(double edge1, double edge2) -{ - int idealwidth, verticalondevice; - double leftx, lefty, rightx, righty, center, width; - double widthx, widthy; - double shift, shiftx, shifty; - double Xpixels, Ypixels; - struct segment *p; - - p = Loc(CharSpace, edge1, 0.0); - QueryLoc(p, IDENTITY, &leftx, &lefty); - - p = Join(p, Loc(CharSpace, edge2, 0.0)); - QueryLoc(p, IDENTITY, &rightx, &righty); - Destroy(p); - - widthx = FABS(rightx - leftx); - widthy = FABS(righty - lefty); - - if (widthy <= EPS) { /* verticalondevice hint */ - verticalondevice = TRUE; - center = (rightx + leftx) / 2.0; - width = widthx; - } - else if (widthx <= EPS) { /* horizontal hint */ - verticalondevice = FALSE; - center = (righty + lefty) / 2.0; - width = widthy; - } - else { /* neither horizontal nor verticalondevice and not oblique */ - return (NULL); - } - - idealwidth = ROUND(width); - if (idealwidth == 0) idealwidth = 1; - if (ODD(idealwidth)) { /* is ideal width odd? */ - /* center stem over pixel */ - shift = FLOOR(center) + 0.5 - center; - } - else { - /* align stem on pixel boundary */ - shift = ROUND(center) - center; - } - - if (verticalondevice) { - shiftx = shift; - shifty = 0.0; - } else { - shifty = shift; - shiftx = 0.0; - } - - p = Loc(IDENTITY, shiftx, shifty); - QueryLoc(p, CharSpace, &Xpixels, &Ypixels); - wsoffsetX = Xpixels; wsoffsetY = Ypixels; - currx += wsoffsetX; curry += wsoffsetY; - - return (p); -} - -/*----------------------------------------------------------------------- - Decrypt - From Adobe Type 1 book page 63, with some modifications ------------------------------------------------------------------------*/ -#define KEY 4330 /* Initial key (seed) for CharStrings decryption */ -#define C1 52845 /* Multiplier for pseudo-random number generator */ -#define C2 22719 /* Constant for pseudo-random number generator */ - -static unsigned short r; /* Pseudo-random sequence of keys */ - -static unsigned char -Decrypt(unsigned char cipher) -{ - unsigned char plain; - - plain = cipher ^ (r >> 8); - r = (cipher + r) * C1 + C2; - return plain; -} - -/* Get the next byte from the codestring being interpreted */ -static int -DoRead(int *CodeP) -{ - if (strindex >= CharStringP->len) return(FALSE); /* end of string */ - *CodeP = Decrypt((unsigned char) CharStringP->data.stringP[strindex++]); - return(TRUE); -} - -/* Strip blues->lenIV bytes from CharString and update encryption key */ -/* (the lenIV entry in the Private dictionary specifies the number of */ -/* random bytes at the beginning of each CharString; default is 4) */ -static void -StartDecrypt(void) -{ - int Code; - - r = KEY; /* Initial key (seed) for CharStrings decryption */ - for (strindex = 0; strindex < blues->lenIV;) - if (!DoRead(&Code)) /* Read a byte and update decryption key */ - Error; -} - -static void -Decode(int Code) -{ - int Code1, Code2, Code3, Code4; - - if (Code <= 31) /* Code is [0,31] */ - DoCommand(Code); - else if (Code <= 246) /* Code is [32,246] */ - Push((double)(Code - 139)); - else if (Code <= 250) { /* Code is [247,250] */ - if (!DoRead(&Code2)) goto ended; - Push((double)(((Code - 247) << 8) + Code2 + 108)); - } - else if (Code <= 254) { /* Code is [251,254] */ - if (!DoRead(&Code2)) goto ended; - Push((double)( -((Code - 251) << 8) - Code2 - 108)); - } - else { /* Code is 255 */ - if (!DoRead(&Code1)) goto ended; - if (!DoRead(&Code2)) goto ended; - if (!DoRead(&Code3)) goto ended; - if (!DoRead(&Code4)) goto ended; - Push((double)((((((Code1<<8) + Code2)<<8) + Code3)<<8) + Code4)); - } - return; - -ended: Error; -} - -/* Interpret a command code */ -static void -DoCommand(int Code) -{ - switch(Code) { - case HSTEM: /* |- y dy HSTEM |- */ - /* Vertical range of a horizontal stem zone */ - if (Top < 1) Error; - HStem(Stack[0], Stack[1]); - ClearStack(); - break; - case VSTEM: /* |- x dx VSTEM |- */ - /* Horizontal range of a vertical stem zone */ - if (Top < 1) Error; - VStem(Stack[0], Stack[1]); - ClearStack(); - break; - case VMOVETO: /* |- dy VMOVETO |- */ - /* Vertical MOVETO, equivalent to 0 dy RMOVETO */ - if (Top < 0) Error; - RMoveTo(0.0, Stack[0]); - ClearStack(); - break; - case RLINETO: /* |- dx dy RLINETO |- */ - /* Like RLINETO in PostScript */ - if (Top < 1) Error; - RLineTo(Stack[0], Stack[1]); - ClearStack(); - break; - case HLINETO: /* |- dx HLINETO |- */ - /* Horizontal LINETO, equivalent to dx 0 RLINETO */ - if (Top < 0) Error; - RLineTo(Stack[0], 0.0); - ClearStack(); - break; - case VLINETO: /* |- dy VLINETO |- */ - /* Vertical LINETO, equivalent to 0 dy RLINETO */ - if (Top < 0) Error; - RLineTo(0.0, Stack[0]); - ClearStack(); - break; - case RRCURVETO: - /* |- dx1 dy1 dx2 dy2 dx3 dy3 RRCURVETO |- */ - /* Relative RCURVETO, equivalent to dx1 dy1 */ - /* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ - /* (dy1+dy2+dy3) RCURVETO in PostScript */ - if (Top < 5) Error; - RRCurveTo(Stack[0], Stack[1], Stack[2], Stack[3], - Stack[4], Stack[5]); - ClearStack(); - break; - case CLOSEPATH: /* - CLOSEPATH |- */ - /* Closes a subpath without repositioning the */ - /* current point */ - DoClosePath(); - ClearStack(); - break; - case CALLSUBR: /* subr# CALLSUBR - */ - /* Calls a CharString subroutine with index */ - /* subr# from the Subrs array */ - if (Top < 0) Error; - CallSubr((int)Stack[Top--]); - break; - case RETURN: /* - RETURN - */ - /* Returns from a Subrs array CharString */ - /* subroutine called with CALLSUBR */ - Return(); - break; - case ESCAPE: /* ESCAPE to two-byte command code */ - if (!DoRead(&Code)) Error; - Escape(Code); - break; - case HSBW: /* |- sbx wx HSBW |- */ - /* Set the left sidebearing point to (sbx,0), */ - /* set the character width vector to (wx,0). */ - /* Equivalent to sbx 0 wx 0 SBW. Space */ - /* character should have sbx = 0 */ - if (Top < 1) Error; - Sbw(Stack[0], 0.0, Stack[1], 0.0); - ClearStack(); - break; - case ENDCHAR: /* - ENDCHAR |- */ - /* Finishes a CharString outline */ - EndChar(); - ClearStack(); - break; - case RMOVETO: /* |- dx dy RMOVETO |- */ - /* Behaves like RMOVETO in PostScript */ - if (Top < 1) Error; - RMoveTo(Stack[0], Stack[1]); - ClearStack(); - break; - case HMOVETO: /* |- dx HMOVETO |- */ - /* Horizontal MOVETO. Equivalent to dx 0 RMOVETO */ - if (Top < 0) Error; - RMoveTo(Stack[0], 0.0); - ClearStack(); - break; - case VHCURVETO: /* |- dy1 dx2 dy2 dx3 VHCURVETO |- */ - /* Vertical-Horizontal CURVETO, equivalent to */ - /* 0 dy1 dx2 dy2 dx3 0 RRCURVETO */ - if (Top < 3) Error; - RRCurveTo(0.0, Stack[0], Stack[1], Stack[2], - Stack[3], 0.0); - ClearStack(); - break; - case HVCURVETO: /* |- dx1 dx2 dy2 dy3 HVCURVETO |- */ - /* Horizontal-Vertical CURVETO, equivalent to */ - /* dx1 0 dx2 dy2 0 dy3 RRCURVETO */ - if (Top < 3) Error; - RRCurveTo(Stack[0], 0.0, Stack[1], Stack[2], 0.0, Stack[3]); - ClearStack(); - break; - default: /* Unassigned command code */ - ClearStack(); - Error; - } -} - -static void -Escape(int Code) -{ - int i, Num; - struct segment *p; - - switch(Code) { - case DOTSECTION: /* - DOTSECTION |- */ - /* Brackets an outline section for the dots in */ - /* letters such as "i", "j", and "!". */ - DotSection(); - ClearStack(); - break; - case VSTEM3: /* |- x0 dx0 x1 dx1 x2 dx2 VSTEM3 |- */ - /* Declares the horizontal ranges of three */ - /* vertical stem zones between x0 and x0+dx0, */ - /* x1 and x1+dx1, and x2 and x2+dx2. */ - if (Top < 5) Error; - if (!wsset && ProcessHints) { - /* Shift the whole character so that the middle stem is centered. */ - p = CenterStem(Stack[2] + sidebearingX, Stack[3]); - path = Join(path, p); - wsset = 1; - } - - VStem(Stack[0], Stack[1]); - VStem(Stack[2], Stack[3]); - VStem(Stack[4], Stack[5]); - ClearStack(); - break; - case HSTEM3: /* |- y0 dy0 y1 dy1 y2 dy2 HSTEM3 |- */ - /* Declares the vertical ranges of three hori- */ - /* zontal stem zones between y0 and y0+dy0, */ - /* y1 and y1+dy1, and y2 and y2+dy2. */ - if (Top < 5) Error; - HStem(Stack[0], Stack[1]); - HStem(Stack[2], Stack[3]); - HStem(Stack[4], Stack[5]); - ClearStack(); - break; - case SEAC: /* |- asb adx ady bchar achar SEAC |- */ - /* Standard Encoding Accented Character. */ - if (Top < 4) Error; - Seac(Stack[0], Stack[1], Stack[2], - (unsigned char) Stack[3], - (unsigned char) Stack[4]); - ClearStack(); - break; - case SBW: /* |- sbx sby wx wy SBW |- */ - /* Set the left sidebearing point to (sbx,sby), */ - /* set the character width vector to (wx,wy). */ - if (Top < 3) Error; - Sbw(Stack[0], Stack[1], Stack[2], Stack[3]); - ClearStack(); - break; - case DIV: /* num1 num2 DIV quotient */ - /* Behaves like DIV in the PostScript language */ - if (Top < 1) Error; - Stack[Top-1] = Div(Stack[Top-1], Stack[Top]); - Top--; - break; - case CALLOTHERSUBR: - /* arg1 ... argn n othersubr# CALLOTHERSUBR - */ - /* Make calls on the PostScript interpreter */ - if (Top < 1) Error; - Num = Stack[Top-1]; - if (Top < Num+1) Error; - for (i = 0; i < Num; i++) PSFakePush(Stack[Top - i - 2]); - Top -= Num + 2; - CallOtherSubr((int)Stack[Top + Num + 2]); - break; - case POP: /* - POP number */ - /* Removes a number from the top of the */ - /* PostScript interpreter stack and pushes it */ - /* onto the Type 1 BuildChar operand stack */ - Push(PSFakePop()); - break; - case SETCURRENTPOINT: /* |- x y SETCURRENTPOINT |- */ - /* Sets the current point to (x,y) in absolute */ - /* character space coordinates without per- */ - /* forming a CharString MOVETO command */ - if (Top < 1) Error; - SetCurrentPoint(Stack[0], Stack[1]); - ClearStack(); - break; - default: /* Unassigned escape code command */ - ClearStack(); - Error; - } -} - -/* |- y dy HSTEM |- */ -/* Declares the vertical range of a horizontal stem zone */ -/* between coordinates y and y + dy */ -/* y is relative to the left sidebearing point */ -static void -HStem(double y, double dy) -{ - if (ProcessHints) { - if (numstems >= MAXSTEMS) Error; - if (dy < 0.0) {y += dy; dy = -dy;} - stems[numstems].vertical = FALSE; - stems[numstems].x = 0.0; - stems[numstems].y = sidebearingY + y + wsoffsetY; - stems[numstems].dx = 0.0; - stems[numstems].dy = dy; - ComputeStem(numstems); - numstems++; - } -} - -/* |- x dx VSTEM |- */ -/* Declares the horizontal range of a vertical stem zone */ -/* between coordinates x and x + dx */ -/* x is relative to the left sidebearing point */ - -static void -VStem(double x, double dx) -{ - if (ProcessHints) { - if (numstems >= MAXSTEMS) Error; - if (dx < 0.0) {x += dx; dx = -dx;} - stems[numstems].vertical = TRUE; - stems[numstems].x = sidebearingX + x + wsoffsetX; - stems[numstems].y = 0.0; - stems[numstems].dx = dx; - stems[numstems].dy = 0.0; - ComputeStem(numstems); - numstems++; - } -} - -/* |- dx dy RLINETO |- */ -/* Behaves like RLINETO in PostScript */ -static void -RLineTo(double dx, double dy) -{ - struct segment *B; - - B = Loc(CharSpace, dx, dy); - - if (ProcessHints) { - currx += dx; - curry += dy; - /* B = Join(B, FindStems(currx, curry)); */ - B = Join(B, FindStems(currx, curry, dx, dy)); - } - - path = Join(path, Line(B)); -} - -/* |- dx1 dy1 dx2 dy2 dx3 dy3 RRCURVETO |- */ -/* Relative RCURVETO, equivalent to dx1 dy1 */ -/* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ -/* (dy1+dy2+dy3) RCURVETO in PostScript */ -static void -RRCurveTo(double dx1, double dy1, double dx2, double dy2, - double dx3, double dy3) -{ - struct segment *B, *C, *D; - - B = Loc(CharSpace, dx1, dy1); - C = Loc(CharSpace, dx2, dy2); - D = Loc(CharSpace, dx3, dy3); - - if (ProcessHints) { - /* For a Bezier curve, we apply the full hint value to - the Bezier C point (and thereby D point). */ - currx += dx1 + dx2 + dx3; - curry += dy1 + dy2 + dy3; - /* C = Join(C, FindStems(currx, curry)); */ - C = Join(C, FindStems(currx, curry, dx3, dy3)); - } - - /* Since XIMAGER is not completely relative, */ - /* we need to add up the delta values */ - - C = Join(C, (struct segment *)Dup(B)); - D = Join(D, (struct segment *)Dup(C)); - - path = Join(path, (struct segment *)Bezier(B, C, D)); -} - -/* - CLOSEPATH |- */ -/* Closes a subpath WITHOUT repositioning the */ -/* current point */ -static void -DoClosePath(void) -{ - struct segment *CurrentPoint; - - CurrentPoint = Phantom(path); - path = ClosePath(path); - path = Join(Snap(path), CurrentPoint); -} - -/* subr# CALLSUBR - */ -/* Calls a CharString subroutine with index */ -/* subr# from the Subrs array */ -static void -CallSubr(int subrno) -{ - if ((subrno < 0) || (subrno >= SubrsP->len)) - Error; - PushCall(CharStringP, strindex, r); - CharStringP = &SubrsP->data.arrayP[subrno]; - StartDecrypt(); -} - -/* - RETURN - */ -/* Returns from a Subrs array CharString */ -/* subroutine called with CALLSUBR */ -static void -Return(void) -{ - PopCall(&CharStringP, &strindex, &r); -} - -/* - ENDCHAR |- */ -/* Finishes a CharString outline */ -/* Executes SETCHACHEDEVICE using a bounding box */ -/* it computes directly from the character outline */ -/* and using the width information acquired from a previous */ -/* HSBW or SBW. It then calls a special version of FILL */ -/* or STROKE depending on the value of PaintType in the */ -/* font dictionary */ -static void -EndChar(void) -{ - /* There is no need to compute and set bounding box for - the cache, since XIMAGER does that on the fly. */ - - /* Perform a Closepath just in case the command was left out */ - path = ClosePath(path); - - /* Set character width */ - path = Join(Snap(path), Loc(CharSpace, escapementX, escapementY)); - -} - -/* |- dx dy RMOVETO |- */ -/* Behaves like RMOVETO in PostScript */ -static void -RMoveTo(double dx, double dy) -{ - struct segment *B; - - B = Loc(CharSpace, dx, dy); - - if (ProcessHints) { - currx += dx; - curry += dy; - /* B = Join(B, FindStems(currx, curry)); */ - B = Join(B, FindStems(currx, curry, 0.0, 0.0)); - } - - path = Join(path, B); -} - -/* - DOTSECTION |- */ -/* Brackets an outline section for the dots in */ -/* letters such as "i", "j", and "!". */ -static void -DotSection(void) -{ - InDotSection = !InDotSection; -} - -/* |- asb adx ady bchar achar SEAC |- */ -/* Standard Encoding Accented Character. */ -static void -Seac(double asb, double adx, double ady, - unsigned char bchar, unsigned char achar) -{ - int Code; - struct segment *mypath; - - /* Move adx - asb, ady over and up from base char's sbpoint. */ - /* (We use adx - asb to counteract the accents sb shift.) */ - /* The variables accentoffsetX/Y modify sidebearingX/Y in Sbw(). */ - /* Note that these incorporate the base character's sidebearing shift by */ - /* using the current sidebearingX, Y values. */ - accentoffsetX = sidebearingX + adx - asb; - accentoffsetY = sidebearingY + ady; - - /* Set path = NULL to avoid complaints from Sbw(). */ - path = NULL; - - /* Go find the CharString for the accent's code via an upcall */ - CharStringP = GetType1CharString((psfont *)Environment, achar); - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) return; - } - /* Copy snapped path to mypath and set path to NULL as above. */ - mypath = Snap(path); - path = NULL; - - /* We must reset these to null now. */ - accentoffsetX = accentoffsetY = 0; - - /* go find the CharString for the base char's code via an upcall */ - CharStringP = GetType1CharString((psfont *)Environment, bchar); - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - FinitStems(); - InitStems(); - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) return; - } - path = Join(mypath, path); -} - - -/* |- sbx sby wx wy SBW |- */ -/* Set the left sidebearing point to (sbx,sby), */ -/* set the character width vector to (wx,wy). */ -static void -Sbw(double sbx, double sby, double wx, double wy) -{ - escapementX = wx; /* Character width vector */ - escapementY = wy; - - /* Sidebearing values are sbx, sby args, plus accent offset from Seac(). */ - sidebearingX = sbx + accentoffsetX; - sidebearingY = sby + accentoffsetY; - - path = Join(path, Loc(CharSpace, sidebearingX, sidebearingY)); - if (ProcessHints) {currx = sidebearingX; curry = sidebearingY;} -} - - /* num1 num2 DIV quotient */ -/* Behaves like DIV in the PostScript language */ -static double -Div(double num1, double num2) -{ - return(num1 / num2); -} - -/* - The following four subroutines (FlxProc, FlxProc1, FlxProc2, and - HintReplace) are C versions of the OtherSubrs Programs, which were - were published in the Adobe Type 1 Font Format book. - - The Flex outline fragment is described by - c1: (x0, y0) = c3: (x0, yshrink(y0)) or (xshrink(x0), y0) - " (x1, y1) = " (x1, yshrink(y1)) or (xshrink(x1), y1) - " (x2, y2) - reference point - c2: (x0, y0) = c4: (x0, yshrink(y0)) or (xshrink(x0), y0) - " (x1, y1) = " (x1, yshrink(y1)) or (xshrink(x1), y1) - " (x2, y2) = " (x2, y2), rightmost endpoint - c3: (x0, y0) - control point, 1st Bezier curve - " (x1, y1) - control point, -"- - " (x2, y2) - end point, -"- - c4: (x0, y0) - control point, 2nd Bezier curve - " (x1, y1) - control point, -"- - " (x2, y2) - end point, -"- - ep: (epY, epX) - final endpoint (should be same as c4: (x2, y2)) - idmin - minimum Flex height (1/100 pixel) at which to render curves -*/ - -#define dtransform(dxusr,dyusr,dxdev,dydev) { \ - register struct segment *point = Loc(CharSpace, dxusr, dyusr); \ - QueryLoc(point, IDENTITY, dxdev, dydev); \ - Destroy(point); \ -} - -#define itransform(xdev,ydev,xusr,yusr) { \ - register struct segment *point = Loc(IDENTITY, xdev, ydev); \ - QueryLoc(point, CharSpace, xusr, yusr); \ - Destroy(point); \ -} - -#define transform(xusr,yusr,xdev,ydev) dtransform(xusr,yusr,xdev,ydev) - -#define PaintType (0) - -#define lineto(x,y) { \ - struct segment *CurrentPoint; \ - double CurrentX, CurrentY; \ - CurrentPoint = Phantom(path); \ - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); \ - Destroy(CurrentPoint); \ - RLineTo(x - CurrentX, y - CurrentY); \ -} - -#define curveto(x0,y0,x1,y1,x2,y2) { \ - struct segment *CurrentPoint; \ - double CurrentX, CurrentY; \ - CurrentPoint = Phantom(path); \ - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); \ - Destroy(CurrentPoint); \ - RRCurveTo(x0 - CurrentX, y0 - CurrentY, x1 - x0, y1 - y0, x2 - x1, y2 - y1); \ -} - -#define xshrink(x) ((x - c4x2) * shrink +c4x2) -#define yshrink(y) ((y - c4y2) * shrink +c4y2) - -#define PickCoords(flag) \ - if (flag) { /* Pick "shrunk" coordinates */ \ - x0 = c1x0; y0 = c1y0; \ - x1 = c1x1; y1 = c1y1; \ - x2 = c1x2; y2 = c1y2; \ - x3 = c2x0; y3 = c2y0; \ - x4 = c2x1; y4 = c2y1; \ - x5 = c2x2; y5 = c2y2; \ - } else { /* Pick original coordinates */ \ - x0 = c3x0; y0 = c3y0; \ - x1 = c3x1; y1 = c3y1; \ - x2 = c3x2; y2 = c3y2; \ - x3 = c4x0; y3 = c4y0; \ - x4 = c4x1; y4 = c4y1; \ - x5 = c4x2; y5 = c4y2; \ - } - -/* FlxProc() = OtherSubrs[0]; Main part of Flex */ -/* Calling sequence: 'idmin epX epY 3 0 callothersubr' */ -/* Computes Flex values, and renders the Flex path, */ -/* and returns (leaves) ending coordinates on stack */ -static void -FlxProc(double c1x2, double c1y2, double c3x0, double c3y0, - double c3x1, double c3y1, double c3x2, double c3y2, - double c4x0, double c4y0, double c4x1, double c4y1, - double c4x2, double c4y2, double epY, double epX, int idmin) -{ - double dmin; - double c1x0, c1y0, c1x1, c1y1; - double c2x0, c2y0, c2x1, c2y1, c2x2, c2y2; - char yflag; - double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; - double cxx, cyx, cxy, cyy; /* Transformation matrix */ - int flipXY; - double x, y; - double erosion = 1; /* Device parameter */ - /* Erosion may have different value specified in 'internaldict' */ - double shrink; - double dX, dY; - char erode; - double eShift; - double cx, cy; - double ex, ey; - - c1x0 = c1y0 = c1x1 = c1y1 = c2x0 = c2y0 = c2x1 = c2y1 = c2x2 = c2y2 = 0.0; - - Destroy(path); - path = FlxOldPath; /* Restore previous path (stored in FlxProc1) */ - - if (ProcessHints) { - dmin = ABS(idmin) / 100.0; /* Minimum Flex height in pixels */ - - c2x2 = c4x2; c2y2 = c4y2; /* Point c2 = c4 */ - - yflag = FABS(c1y2 - c3y2) > FABS(c1x2 - c3x2); /* Flex horizontal? */ - - QuerySpace(CharSpace, &cxx, &cyx, &cxy, &cyy); /* Transformation matrix */ - - if (FABS(cxx) < 0.00001 || FABS(cyy) < 0.00001) - flipXY = -1; /* Char on side */ - else if (FABS(cyx) < 0.00001 || FABS(cxy) < 0.00001) - flipXY = 1; /* Char upright */ - else - flipXY = 0; /* Char at angle */ - - if (yflag) { /* Flex horizontal */ - if (flipXY == 0 || c3y2 == c4y2) { /* Char at angle or Flex height = 0 */ - PickCoords(FALSE); /* Pick original control points */ - } else { - shrink = FABS((c1y2 - c4y2) / (c3y2 - c4y2)); /* Slope */ - - c1x0 = c3x0; c1y0 = yshrink(c3y0); - c1x1 = c3x1; c1y1 = yshrink(c3y1); - c2x0 = c4x0; c2y0 = yshrink(c4y0); - c2x1 = c4x1; c2y1 = yshrink(c4y1); - - dtransform(0.0, ROUND(c3y2-c1y2), &x, &y); /* Flex height in pixels */ - dY = FABS((flipXY == 1) ? y : x); - PickCoords(dY < dmin); /* If Flex small, pick 'shrunk' control points */ - - if (FABS(y2 - c1y2) > 0.001) { /* Flex 'non-zero'? */ - transform(c1x2, c1y2, &x, &y); - - if (flipXY == 1) { - cx = x; cy = y; - } else { - cx = y; cy = x; - } - - dtransform(0.0, ROUND(y2-c1y2), &x, &y); - dY = (flipXY == 1) ? y : x; - if (ROUND(dY) != 0) - dY = ROUND(dY); - else - dY = (dY < 0) ? -1 : 1; - - erode = PaintType != 2 && erosion >= 0.5; - if (erode) - cy -= 0.5; - ey = cy + dY; - ey = CEIL(ey) - ey; - ey = ey + FLOOR(cy + dY); - if (erode) - ey += 0.5; - - if (flipXY == 1) { - itransform(cx, ey, &x, &y); - } else { - itransform(ey, cx, &x, &y); - } - - eShift = y - y2; - y1 += eShift; - y2 += eShift; - y3 += eShift; - } - } - } else { /* Flex vertical */ - if (flipXY == 0 || c3x2 == c4x2) { /* Char at angle or Flex height = 0 */ - PickCoords(FALSE); /* Pick original control points */ - } else { - shrink = FABS((c1x2 - c4x2) / (c3x2 - c4x2)); /* Slope */ - - c1x0 = xshrink(c3x0); c1y0 = c3y0; - c1x1 = xshrink(c3x1); c1y1 = c3y1; - c2x0 = xshrink(c4x0); c2y0 = c4y0; - c2x1 = xshrink(c4x1); c2y1 = c4y1; - - dtransform(ROUND(c3x2 - c1x2), 0.0, &x, &y); /* Flex height in pixels */ - dX = FABS((flipXY == -1) ? y : x); - PickCoords(dX < dmin); /* If Flex small, pick 'shrunk' control points */ - - if (FABS(x2 - c1x2) > 0.001) { - transform(c1x2, c1y2, &x, &y); - if (flipXY == -1) { - cx = y; cy = x; - } else { - cx = x; cy = y; - } - - dtransform(ROUND(x2-c1x2), 0.0, &x, &y); - dX = (flipXY == -1) ? y : x; - if (ROUND(dX) != 0) - dX = ROUND(dX); - else - dX = (dX < 0) ? -1 : 1; - - erode = PaintType != 2 && erosion >= 0.5; - if (erode) - cx -= 0.5; - ex = cx + dX; - ex = CEIL(ex) - ex; - ex = ex + FLOOR(cx + dX); - if (erode) - ex += 0.5; - - if (flipXY == -1) { - itransform(cy, ex, &x, &y); - } else { - itransform(ex, cy, &x, &y); - } - - eShift = x - x2; - x1 += eShift; - x2 += eShift; - x3 += eShift; - } - } - } - - if (x2 == x5 || y2 == y5) { - lineto(x5, y5); - } else { - curveto(x0, y0, x1, y1, x2, y2); - curveto(x3, y3, x4, y4, x5, y5); - } - } else { /* ProcessHints is off */ - PickCoords(FALSE); /* Pick original control points */ - curveto(x0, y0, x1, y1, x2, y2); - curveto(x3, y3, x4, y4, x5, y5); - } - - PSFakePush(epY); - PSFakePush(epX); -} - -/* FlxProc1() = OtherSubrs[1]; Part of Flex */ -/* Calling sequence: '0 1 callothersubr' */ -/* Saves and clears path, then restores currentpoint */ -static void -FlxProc1(void) -{ - struct segment *CurrentPoint; - - CurrentPoint = Phantom(path); - - FlxOldPath = path; - path = CurrentPoint; -} - -/* FlxProc2() = OtherSubrs[2]; Part of Flex */ -/* Calling sequence: '0 2 callothersubr' */ -/* Returns currentpoint on stack */ -static void -FlxProc2(void) -{ - struct segment *CurrentPoint; - double CurrentX, CurrentY; - - CurrentPoint = Phantom(path); - QueryLoc(CurrentPoint, CharSpace, &CurrentX, &CurrentY); - Destroy(CurrentPoint); - - /* Push CurrentPoint on fake PostScript stack */ - PSFakePush(CurrentX); - PSFakePush(CurrentY); -} - -/* HintReplace() = OtherSubrs[3]; Hint Replacement */ -/* Calling sequence: 'subr# 1 3 callothersubr pop callsubr' */ -/* Reinitializes stem hint structure */ -static void -HintReplace(void) -{ - /* Effectively retire the current stems, but keep them around for */ - /* revhint use in case we are in a stem when we replace hints. */ - currstartstem = numstems; - - /* 'subr#' is left on PostScript stack (for 'pop callsubr') */ -} - -/* arg1 ... argn n othersubr# CALLOTHERSUBR - */ -/* Make calls on the PostScript interpreter (or call equivalent C code) */ -/* NOTE: The n arguments have been pushed on the fake PostScript stack */ -static void -CallOtherSubr(int othersubrno) -{ - switch(othersubrno) { - case 0: /* OtherSubrs[0]; Main part of Flex */ - if (PSFakeTop < 16) Error; - ClearPSFakeStack(); - FlxProc( - PSFakeStack[0], PSFakeStack[1], PSFakeStack[2], PSFakeStack[3], - PSFakeStack[4], PSFakeStack[5], PSFakeStack[6], PSFakeStack[7], - PSFakeStack[8], PSFakeStack[9], PSFakeStack[10], PSFakeStack[11], - PSFakeStack[12], PSFakeStack[13], PSFakeStack[14], PSFakeStack[15], - (int) PSFakeStack[16] - ); - break; - case 1: /* OtherSubrs[1]; Part of Flex */ - FlxProc1(); - break; - case 2: /* OtherSubrs[2]; Part of Flex */ - FlxProc2(); - break; - case 3: /* OtherSubrs[3]; Hint Replacement */ - HintReplace(); - break; - default: { /* call OtherSubrs[4] or higher if PostScript is present */ - } - } -} - -/* |- x y SETCURRENTPOINT |- */ -/* Sets the current point to (x,y) in absolute */ -/* character space coordinates without per- */ -/* forming a CharString MOVETO command */ -static void -SetCurrentPoint(double x, double y) -{ - currx = x; - curry = y; -} - -/* The Type1Char routine for use by PostScript. */ -/************************************************/ -struct xobject * -Type1Char(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, - psobj *osubrsP, - struct blues_struct *bluesP, /* FontID's ptr to the blues struct */ - int *modeP) -{ - int Code; - - path = NULL; - errflag = FALSE; - - /* Make parameters available to all Type1 routines */ - Environment = env; - CharSpace = S; /* used when creating path elements */ - CharStringP = charstrP; - SubrsP = subrsP; - - blues = bluesP; - - /* compute the alignment zones */ - ComputeAlignmentZones(); - - StartDecrypt(); - - ClearStack(); - ClearPSFakeStack(); - ClearCallStack(); - - InitStems(); - - currx = curry = 0; - escapementX = escapementY = 0; - sidebearingX = sidebearingY = 0; - accentoffsetX = accentoffsetY = 0; - wsoffsetX = wsoffsetY = 0; /* No shift to preserve whitspace. */ - wsset = 0; /* wsoffsetX,Y haven't been set yet. */ - - for (;;) { - if (!DoRead(&Code)) break; - Decode(Code); - if (errflag) break; - } - - FinitStems(); - - - /* Clean up if an error has occurred */ - if (errflag) { - if (path != NULL) { - Destroy(path); /* Reclaim storage */ - path = NULL; /* Indicate that character could not be built */ - } - } - - return((struct xobject *) path); -} diff --git a/libXfont/src/Type1/util.c b/libXfont/src/Type1/util.c deleted file mode 100644 index 2eefc11df..000000000 --- a/libXfont/src/Type1/util.c +++ /dev/null @@ -1,194 +0,0 @@ -/* $Xorg: util.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/util.c,v 1.5 1999/08/21 13:47:53 dawes Exp $ */ -/* Author: Katherine A. Hitchcock IBM Almaden Research Laboratory */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef FONTMODULE -#include <stdio.h> -#else -#include "Xdefs.h" -#include "Xmd.h" -#include "xf86_ansic.h" -#endif -#include "util.h" -#include <X11/fonts/fontmisc.h> /* for xalloc/xfree */ - -static char *vm_base = NULL; /* Start of virtual memory area */ - char *vm_next = NULL; /* Pointer to first free byte */ - long vm_free = 0; /* Count of free bytes */ - long vm_size = 0; /* Total size of memory */ - -/* - * Initialize memory. - */ -boolean -vm_init(int cnt) -{ - vm_next = vm_base = (char *)xalloc (cnt); - - if (vm_base != NULL) { - vm_free = cnt; - vm_size = cnt; - return(TRUE); - } - else - return(FALSE); - -} - -char * -vm_alloc(int bytes) -{ - char *answer; - - /* Round to next word multiple */ - bytes = (bytes + 7) & ~7; - - /* Allocate the space, if it is available */ - if (bytes > 0 && bytes <= vm_free) { - answer = vm_next; - vm_free -= bytes; - vm_next += bytes; - } - else - answer = NULL; - - return(answer); -} - -/* - * Format an Integer object - */ -void -objFormatInteger(psobj *objP, int value) -{ - if (objP != NULL) { - objP->type = OBJ_INTEGER; - objP->len = 0; - objP->data.integer = value; - } -} - -/* - * Format a Real object - */ -void -objFormatReal(psobj *objP, float value) -{ - if (objP != NULL) { - objP->type = OBJ_REAL; - objP->len = 0; - objP->data.real = value; - } -} - -/* - * Format a Boolean object - */ -void -objFormatBoolean(psobj *objP, boolean value) -{ - if (objP != NULL) { - objP->type = OBJ_BOOLEAN; - objP->len = 0; - objP->data.boolean = value; - } -} - -/* - * Format an Encoding object - */ -void -objFormatEncoding(psobj *objP, int length, psobj *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_ENCODING; - objP->len = length; - objP->data.arrayP = valueP; - } -} - -/* - * Format an Array object - */ -void -objFormatArray(psobj *objP, int length, psobj *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_ARRAY; - objP->len = length; - objP->data.arrayP = valueP; - } -} - - -/* - * Format a String object - */ -void -objFormatString(psobj *objP, int length, char *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_STRING; - objP->len = length; - objP->data.valueP = valueP; - } -} - -/* - * Format a Name object - */ -void -objFormatName(psobj *objP, int length, char *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_NAME; - objP->len = length; - objP->data.nameP = valueP; - } -} - -/* - * Format a File object - */ -void -objFormatFile(psobj *objP, FILE *valueP) -{ - if (objP != NULL) { - objP->type = OBJ_FILE; - objP->len = 0; - objP->data.fileP = valueP; - } -} - diff --git a/libXfont/src/Type1/util.h b/libXfont/src/Type1/util.h deleted file mode 100644 index 25ba5720c..000000000 --- a/libXfont/src/Type1/util.h +++ /dev/null @@ -1,190 +0,0 @@ -/* $Xorg: util.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ -/* Copyright International Business Machines,Corp. 1991 - * All Rights Reserved - * - * License to use, copy, modify, and distribute this software - * and its documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice - * appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, - * and that the name of IBM not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES - * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND - * PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT - * OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF - * THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES - * THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN - * NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/font/Type1/util.h,v 1.4 1999/08/22 08:58:55 dawes Exp $ */ - -#ifndef UTIL_H -#define UTIL_H - -#ifndef boolean -typedef int boolean; -#endif - -#ifndef TRUE -#define TRUE (1) -#endif - -#ifndef FALSE -#define FALSE (0) -#endif - -/***================================================================***/ -/* Portable definitions for 2's complement machines. - * NOTE: These really should be based on PostScript types, - * for example, sizeof(ps_integer), or sizeof(ps_unsigned) - */ -#define MAX_ULONG (~(unsigned long)(0)) -/* This code is portable, assuming K&R C and 2's complement arithmetic */ -#define MAX_INTEGER \ - ((long)((((unsigned long) 1)<<(sizeof(unsigned long)*8-1))-1)) -#define MIN_INTEGER ((-MAX_INTEGER)-1) - -#define MAX_ARRAY_CNT (65535) -#define MAX_DICT_CNT (65535) -#define MAX_STRING_LEN (65535) -#define MAX_NAME_LEN (128) - -#ifndef MIN -#define MIN(a,b) (((a)<(b)) ? a : b ) -#endif - -/***================================================================***/ -/* Routines for managing virtual memory */ -/***================================================================***/ - -#define VM_SIZE (50 * 1024) - -extern boolean vm_init ( int cnt ); -extern long vm_free; -extern long vm_size; -extern char *vm_next; -extern char *vm_alloc ( int bytes ); - -/***================================================================***/ -/* Macros for managing virtual memory */ -/***================================================================***/ -#define vm_next_byte() (vm_next) -#define vm_free_bytes() (vm_free) -#define vm_avail(B) (B <= vm_free) - - - -/***================================================================***/ -/* Types of PostScript objects */ -/***================================================================***/ -#define OBJ_INTEGER (0) -#define OBJ_REAL (1) -#define OBJ_BOOLEAN (2) -#define OBJ_ARRAY (3) -#define OBJ_STRING (4) -#define OBJ_NAME (5) -#define OBJ_FILE (6) -#define OBJ_ENCODING (7) - -/***================================================================***/ -/* Value of PostScript objects */ -/***================================================================***/ -typedef union ps_value { - char *valueP; /* value pointer for unspecified type */ - int value; /* value for unspecified type */ - int integer; /* when type is OBJ_INTEGER */ - float real; /* when type is OBJ_REAL */ - int boolean; /* when type is OBJ_BOOLEAN */ - struct ps_obj *arrayP; /* when type is OBJ_ARRAY */ - unsigned char *stringP; /* when type is OBJ_STRING */ - char *nameP; /* when type is OBJ_NAME */ - FILE *fileP; /* when type is OBJ_FILE */ -} psvalue; - -/***================================================================***/ -/* Definition of a PostScript object */ -/***================================================================***/ -typedef struct ps_obj { - char type; - char unused; - unsigned short len; - union ps_value data; -} psobj; - -/***================================================================***/ -/* Definition of a PostScript Dictionary Entry */ -/***================================================================***/ -typedef struct ps_dict { - psobj key; - psobj value; -} psdict; - -/***================================================================***/ -/* Macros for testing type of PostScript objects */ -/***================================================================***/ -#define objIsInteger(o) ((o).type == OBJ_INTEGER) -#define objIsReal(o) ((o).type == OBJ_REAL) -#define objIsBoolean(o) ((o).type == OBJ_BOOLEAN) -#define objIsArray(o) ((o).type == OBJ_ARRAY) -#define objIsString(o) ((o).type == OBJ_STRING) -#define objIsName(o) ((o).type == OBJ_NAME) -#define objIsFile(o) ((o).type == OBJ_FILE) - -/***================================================================***/ -/* Macros for setting type of PostScript objects */ -/***================================================================***/ -#define objSetInteger(o) ((o).type = OBJ_INTEGER) -#define objSetReal(o) ((o).type = OBJ_REAL) -#define objSetBoolean(o) ((o).type = OBJ_BOOLEAN) -#define objSetArray(o) ((o).type = OBJ_ARRAY) -#define objSetString(o) ((o).type = OBJ_STRING) -#define objSetName(o) ((o).type = OBJ_NAME) -#define objSetFile(o) ((o).type = OBJ_FILE) - -/***================================================================***/ -/* Macros for testing type of PostScript objects (pointer access) */ -/***================================================================***/ -#define objPIsInteger(o) ((o)->type == OBJ_INTEGER) -#define objPIsReal(o) ((o)->type == OBJ_REAL) -#define objPIsBoolean(o) ((o)->type == OBJ_BOOLEAN) -#define objPIsArray(o) ((o)->type == OBJ_ARRAY) -#define objPIsString(o) ((o)->type == OBJ_STRING) -#define objPIsName(o) ((o)->type == OBJ_NAME) -#define objPIsFile(o) ((o)->type == OBJ_FILE) - -/***================================================================***/ -/* Macros for setting type of PostScript objects (pointer access) */ -/***================================================================***/ -#define objPSetInteger(o) ((o)->type = OBJ_INTEGER) -#define objPSetReal(o) ((o)->type = OBJ_REAL) -#define objPSetBoolean(o) ((o)->type = OBJ_BOOLEAN) -#define objPSetArray(o) ((o)->type = OBJ_ARRAY) -#define objPSetString(o) ((o)->type = OBJ_STRING) -#define objPSetName(o) ((o)->type = OBJ_NAME) -#define objPSetFile(o) ((o)->type = OBJ_FILE) - -/***================================================================***/ -/* Prototypes of object formatting functions */ -/***================================================================***/ -extern void objFormatInteger ( psobj *objP, int value ); -extern void objFormatReal ( psobj *objP, float value ); -extern void objFormatBoolean ( psobj *objP, boolean value ); -extern void objFormatEncoding ( psobj *objP, int length, psobj *valueP ); -extern void objFormatArray ( psobj *objP, int length, psobj *valueP ); -extern void objFormatString ( psobj *objP, int length, char *valueP ); -extern void objFormatName ( psobj *objP, int length, char *valueP ); -extern void objFormatFile ( psobj *objP, FILE *valueP ); - -extern void T1InitStdProps(void); -#endif diff --git a/libXfont/src/bitmap/Makefile.in b/libXfont/src/bitmap/Makefile.in index 7bd5fe3ad..7ccd5819d 100644 --- a/libXfont/src/bitmap/Makefile.in +++ b/libXfont/src/bitmap/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -48,7 +48,7 @@ am_libbitmap_la_OBJECTS = bdfread.lo bdfutils.lo bitmap.lo \ bitmapfunc.lo bitmaputil.lo bitscale.lo fontink.lo pcfread.lo \ pcfwrite.lo snfread.lo libbitmap_la_OBJECTS = $(am_libbitmap_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -79,22 +79,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -104,17 +100,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -124,6 +127,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -137,8 +141,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -171,6 +174,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -183,6 +187,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -211,8 +216,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -297,8 +302,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -310,8 +315,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -321,13 +326,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/bitmap/bdfread.c b/libXfont/src/bitmap/bdfread.c index a6f0c1e7e..083565358 100644 --- a/libXfont/src/bitmap/bdfread.c +++ b/libXfont/src/bitmap/bdfread.c @@ -56,9 +56,7 @@ from The Open Group. #include <config.h> #endif -#ifndef FONTMODULE #include <ctype.h> -#endif #include <X11/fonts/fntfilst.h> #include <X11/fonts/fontutil.h> /* use bitmap structure */ @@ -102,7 +100,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, widthBytes = BYTES_PER_ROW(widthBits, glyph); if (widthBytes * height > 0) { - picture = (unsigned char *) xalloc(widthBytes * height); + picture = malloc(widthBytes * height); if (!picture) { bdfError("Couldn't allocate picture (%d*%d)\n", widthBytes, height); goto BAILOUT; @@ -192,7 +190,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, return (TRUE); BAILOUT: if (picture) - xfree(picture); + free(picture); pCI->bits = NULL; return (FALSE); } @@ -229,25 +227,25 @@ bdfFreeFontBits(FontPtr pFont) bitmapFont = (BitmapFontPtr) pFont->fontPrivate; bitmapExtra = (BitmapExtraPtr) bitmapFont->bitmapExtra; - xfree(bitmapFont->ink_metrics); + free(bitmapFont->ink_metrics); if(bitmapFont->encoding) { nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * (pFont->info.lastRow - pFont->info.firstRow + 1); for(i=0; i<NUM_SEGMENTS(nencoding); i++) - xfree(bitmapFont->encoding[i]); + free(bitmapFont->encoding[i]); } - xfree(bitmapFont->encoding); + free(bitmapFont->encoding); for (i = 0; i < bitmapFont->num_chars; i++) - xfree(bitmapFont->metrics[i].bits); - xfree(bitmapFont->metrics); + free(bitmapFont->metrics[i].bits); + free(bitmapFont->metrics); if (bitmapExtra) { - xfree (bitmapExtra->glyphNames); - xfree (bitmapExtra->sWidths); - xfree (bitmapExtra); + free (bitmapExtra->glyphNames); + free (bitmapExtra->sWidths); + free (bitmapExtra); } - xfree(pFont->info.props); - xfree(bitmapFont); + free(pFont->info.props); + free(bitmapFont); } @@ -299,17 +297,16 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, sizeof(CharInfoRec)); goto BAILOUT; } - ci = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); + ci = calloc(nchars, sizeof(CharInfoRec)); if (!ci) { bdfError("Couldn't allocate pCI (%d*%d)\n", nchars, sizeof(CharInfoRec)); goto BAILOUT; } - bzero((char *)ci, nchars * sizeof(CharInfoRec)); bitmapFont->metrics = ci; if (bitmapExtra) { - bitmapExtra->glyphNames = (Atom *) xalloc(nchars * sizeof(Atom)); + bitmapExtra->glyphNames = malloc(nchars * sizeof(Atom)); if (!bitmapExtra->glyphNames) { bdfError("Couldn't allocate glyphNames (%d*%d)\n", nchars, sizeof(Atom)); @@ -317,7 +314,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, } } if (bitmapExtra) { - bitmapExtra->sWidths = (int *) xalloc(nchars * sizeof(int)); + bitmapExtra->sWidths = malloc(nchars * sizeof(int)); if (!bitmapExtra->sWidths) { bdfError("Couldn't allocate sWidth (%d *%d)\n", nchars, sizeof(int)); @@ -383,8 +380,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, if (char_col > pFont->info.lastCol) pFont->info.lastCol = char_col; if (bdfEncoding[char_row] == (CharInfoPtr *) NULL) { - bdfEncoding[char_row] = - (CharInfoPtr *) xalloc(256 * sizeof(CharInfoPtr)); + bdfEncoding[char_row] = malloc(256 * sizeof(CharInfoPtr)); if (!bdfEncoding[char_row]) { bdfError("Couldn't allocate row %d of encoding (%d*%d)\n", char_row, INDICES, sizeof(CharInfoPtr)); @@ -493,9 +489,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, nencoding = (pFont->info.lastRow - pFont->info.firstRow + 1) * (pFont->info.lastCol - pFont->info.firstCol + 1); - bitmapFont->encoding = - (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); + bitmapFont->encoding = calloc(NUM_SEGMENTS(nencoding),sizeof(CharInfoPtr*)); if (!bitmapFont->encoding) { bdfError("Couldn't allocate ppCI (%d,%d)\n", NUM_SEGMENTS(nencoding), @@ -519,8 +513,8 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, else { if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); + calloc(BITMAP_FONT_SEGMENT_SIZE, + sizeof(CharInfoPtr)); if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) goto BAILOUT; } @@ -533,12 +527,12 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, } for (i = 0; i < 256; i++) if (bdfEncoding[i]) - xfree(bdfEncoding[i]); + free(bdfEncoding[i]); return (TRUE); BAILOUT: for (i = 0; i < 256; i++) if (bdfEncoding[i]) - xfree(bdfEncoding[i]); + free(bdfEncoding[i]); /* bdfFreeFontBits will clean up the rest */ return (FALSE); } @@ -615,21 +609,20 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) pFont->info.props = NULL; pFont->info.nprops = 0; - stringProps = (char *) xalloc((nProps + BDF_GENPROPS) * sizeof(char)); + stringProps = malloc((nProps + BDF_GENPROPS) * sizeof(char)); pFont->info.isStringProp = stringProps; if (stringProps == NULL) { bdfError("Couldn't allocate stringProps (%d*%d)\n", (nProps + BDF_GENPROPS), sizeof(Bool)); goto BAILOUT; } - pFont->info.props = props = (FontPropPtr) xalloc((nProps + BDF_GENPROPS) * - sizeof(FontPropRec)); + pFont->info.props = props = calloc(nProps + BDF_GENPROPS, + sizeof(FontPropRec)); if (props == NULL) { bdfError("Couldn't allocate props (%d*%d)\n", nProps + BDF_GENPROPS, sizeof(FontPropRec)); goto BAILOUT; } - bzero((char *)props, (nProps + BDF_GENPROPS) * sizeof(FontPropRec)); nextProp = 0; props_left = nProps; @@ -770,11 +763,11 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) return (TRUE); BAILOUT: if (pFont->info.isStringProp) { - xfree(pFont->info.isStringProp); + free(pFont->info.isStringProp); pFont->info.isStringProp = NULL; } if (pFont->info.props) { - xfree(pFont->info.props); + free(pFont->info.props); pFont->info.props = NULL; } while (line && bdfIsPrefix(line, "ENDPROPERTIES")) @@ -808,12 +801,11 @@ bdfReadFont(FontPtr pFont, FontFilePtr file, if (!bdfReadHeader(file, &state)) goto BAILOUT; - bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); + bitmapFont = calloc(1, sizeof(BitmapFontRec)); if (!bitmapFont) { bdfError("Couldn't allocate bitmapFontRec (%d)\n", sizeof(BitmapFontRec)); goto BAILOUT; } - bzero((char *)bitmapFont, sizeof(BitmapFontRec)); pFont->fontPrivate = (pointer) bitmapFont; bitmapFont->metrics = 0; @@ -822,12 +814,11 @@ bdfReadFont(FontPtr pFont, FontFilePtr file, bitmapFont->encoding = 0; bitmapFont->pDefault = NULL; - bitmapFont->bitmapExtra = (BitmapExtraPtr) xalloc(sizeof(BitmapExtraRec)); + bitmapFont->bitmapExtra = calloc(1, sizeof(BitmapExtraRec)); if (!bitmapFont->bitmapExtra) { bdfError("Couldn't allocate bitmapExtra (%d)\n", sizeof(BitmapExtraRec)); goto BAILOUT; } - bzero((char *)bitmapFont->bitmapExtra, sizeof(BitmapExtraRec)); bitmapFont->bitmapExtra->glyphNames = 0; bitmapFont->bitmapExtra->sWidths = 0; @@ -945,14 +936,14 @@ bdfPadToTerminal(FontPtr pFont) new_size = BYTES_FOR_GLYPH(&new, pFont->glyph); for (i = 0; i < bitmapFont->num_chars; i++) { - new.bits = (char *) xalloc(new_size); + new.bits = malloc(new_size); if (!new.bits) { bdfError("Couldn't allocate bits (%d)\n", new_size); return FALSE; - } + } FontCharReshape(pFont, &bitmapFont->metrics[i], &new); new.metrics.attributes = bitmapFont->metrics[i].metrics.attributes; - xfree(bitmapFont->metrics[i].bits); + free(bitmapFont->metrics[i].bits); bitmapFont->metrics[i] = new; } bitmapExtra = bitmapFont->bitmapExtra; diff --git a/libXfont/src/bitmap/bdfutils.c b/libXfont/src/bitmap/bdfutils.c index a0c5ae949..17596c323 100644 --- a/libXfont/src/bitmap/bdfutils.c +++ b/libXfont/src/bitmap/bdfutils.c @@ -55,11 +55,9 @@ from The Open Group. #include <config.h> #endif -#ifndef FONTMODULE #include <ctype.h> #include <stdio.h> #include <stdarg.h> -#endif #include <X11/fonts/fntfilst.h> #include <X11/fonts/fontstruct.h> @@ -176,7 +174,7 @@ bdfGetPropertyValue(char *s) } /* quoted string: strip outer quotes and undouble inner quotes */ s++; - pp = p = (char *) xalloc((unsigned) strlen(s) + 1); + pp = p = malloc((unsigned) strlen(s) + 1); if (pp == NULL) { bdfError("Couldn't allocate property value string (%d)\n", strlen(s) + 1); return None; @@ -186,7 +184,7 @@ bdfGetPropertyValue(char *s) if (*(s + 1) != '"') { *p++ = 0; atom = bdfForceMakeAtom(pp, NULL); - xfree(pp); + free(pp); return atom; } else { s++; @@ -194,7 +192,7 @@ bdfGetPropertyValue(char *s) } *p++ = *s++; } - xfree (pp); + free (pp); bdfError("unterminated quoted string property: %s\n", (pointer) orig_s); return None; } diff --git a/libXfont/src/bitmap/bitmapfunc.c b/libXfont/src/bitmap/bitmapfunc.c index e980dfbcc..80d7da19d 100644 --- a/libXfont/src/bitmap/bitmapfunc.c +++ b/libXfont/src/bitmap/bitmapfunc.c @@ -67,6 +67,7 @@ typedef struct _BitmapFileFunctions { FontFilePtr /* file */ ); } BitmapFileFunctionsRec, *BitmapFileFunctionsPtr; +static int BitmapGetRenderIndex(FontRendererPtr renderer); /* * the readers[] and renderers[] arrays must be in the same order, @@ -104,9 +105,6 @@ static BitmapFileFunctionsRec readers[] = { { bdfReadFont, bdfReadFontInfo} , # endif #endif -#if XFONT_PCFFORMAT - { pmfReadFont, pcfReadFontInfo} , -#endif }; @@ -150,7 +148,7 @@ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, FontFileClose (file); if (ret != Successful) { - xfree(pFont); + free(pFont); } else { *ppFont = pFont; } @@ -235,11 +233,6 @@ static FontRendererRec renderers[] = { CAPABILITIES }, # endif #endif -#if XFONT_PCFFORMAT - { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES } -#endif }; #define numRenderers (sizeof renderers / sizeof renderers[0]) @@ -258,7 +251,7 @@ BitmapRegisterFontFileFunctions (void) * the font info reader, and the bitmap scaling routine. All users * of this routine must be kept in step with the renderer array. */ -int +static int BitmapGetRenderIndex(FontRendererPtr renderer) { return renderer - renderers; diff --git a/libXfont/src/bitmap/bitmaputil.c b/libXfont/src/bitmap/bitmaputil.c index 3487f7f92..3a7bbc7a0 100644 --- a/libXfont/src/bitmap/bitmaputil.c +++ b/libXfont/src/bitmap/bitmaputil.c @@ -212,7 +212,7 @@ bitmapAddInkMetrics(FontPtr pFont) int i; bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - bitmapFont->ink_metrics = (xCharInfo *) xalloc(bitmapFont->num_chars * sizeof(xCharInfo)); + bitmapFont->ink_metrics = malloc(bitmapFont->num_chars * sizeof(xCharInfo)); if (!bitmapFont->ink_metrics) { fprintf(stderr, "Error: Couldn't allocate ink_metrics (%d*%ld)\n", bitmapFont->num_chars, (unsigned long)sizeof(xCharInfo)); diff --git a/libXfont/src/bitmap/bitscale.c b/libXfont/src/bitmap/bitscale.c index ffdbe1d3c..a4d991d3b 100644 --- a/libXfont/src/bitmap/bitscale.c +++ b/libXfont/src/bitmap/bitscale.c @@ -1,4 +1,3 @@ -/* $Xorg: bitscale.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group @@ -55,15 +54,7 @@ from The Open Group. #include <X11/fonts/fntfilst.h> #include <X11/fonts/bitmap.h> #include <X11/fonts/fontutil.h> -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE #include <math.h> -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include <math.h> -#undef _XOPEN_SOURCE -#endif -#endif #ifndef MAX #define MAX(a,b) (((a)>(b)) ? a : b) @@ -79,9 +70,6 @@ static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci, static FontPtr BitmapScaleBitmaps(FontPtr pf, FontPtr opf, double widthMult, double heightMult, FontScalablePtr vals); -static FontPtr PrinterScaleBitmaps(FontPtr pf, FontPtr opf, - double widthMult, double heightMult, - FontScalablePtr vals); enum scaleType { atom, truncate_atom, pixel_size, point_size, resolution_x, @@ -96,50 +84,6 @@ typedef struct _fontProp { enum scaleType type; } fontProp; -typedef FontPtr (*ScaleFunc) ( FontPtr /* pf */, - FontPtr /* opf */, - double /* widthMult */, - double /* heightMult */, - FontScalablePtr /* vals */); - -/* These next two arrays must be kept in step with the renderer array */ -static const ScaleFunc scale[] = -{ -#if XFONT_PCFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -# ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -# ifdef X_BZIP2_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -#endif -#if XFONT_SNFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -# ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -# ifdef X_BZIP2_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -#endif -#if XFONT_BDFFORMAT - BitmapScaleBitmaps, - BitmapScaleBitmaps, -# ifdef X_GZIP_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -# ifdef X_BZIP2_FONT_COMPRESSION - BitmapScaleBitmaps, -# endif -#endif -#if XFONT_PCFFORMAT - PrinterScaleBitmaps, -#endif -}; - static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, FontEntryPtr entry, FontScalablePtr vals, @@ -147,48 +91,6 @@ static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, double *dxp, double *dyp, double *sdxp, double *sdyp, FontPathElementPtr *fpep ); -static FontEntryPtr FindPmfToScale ( FontPathElementPtr fpe, - FontEntryPtr entry, - FontScalablePtr vals, - FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep ); - -typedef FontEntryPtr (*FindToScale) (FontPathElementPtr fpe, - FontEntryPtr entry, - FontScalablePtr vals, - FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep); -static const FindToScale find_scale[] = -{ -#if XFONT_PCFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_SNFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_BDFFORMAT - FindBestToScale, - FindBestToScale, -#ifdef X_GZIP_FONT_COMPRESSION - FindBestToScale, -#endif -#endif -#if XFONT_PCFFORMAT - FindPmfToScale, -#endif -}; static unsigned long bitscaleGeneration = 0; /* initialization flag */ @@ -262,9 +164,6 @@ static fontProp fontPropTable[] = { { "_ADOBE_POSTSCRIPT_FONTNAME", 0, unscaled } }; -/* sleazy way to shut up the compiler */ -#define zerohack (enum scaleType)0 - static fontProp rawFontPropTable[] = { { "RAW_MIN_SPACE", 0, }, { "RAW_NORM_SPACE", 0, }, @@ -611,17 +510,7 @@ FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry, the matrix appropriately */ vals->pixel_matrix[0] *= rescale_x; vals->pixel_matrix[1] *= rescale_x; -#ifdef NOTDEF - /* This would force the pointsize and pixelsize fields in the - FONT property to display as matrices to more accurately - report the font being supplied. It might also break existing - applications that expect a single number in that field. */ - vals->values_supplied = - vals->values_supplied & ~(PIXELSIZE_MASK | POINTSIZE_MASK) | - PIXELSIZE_ARRAY; -#else /* NOTDEF */ vals->values_supplied = vals->values_supplied & ~POINTSIZE_MASK; -#endif /* NOTDEF */ /* Recompute and reround the FontScalablePtr values after rescaling for the new width. */ FontFileCompleteXLFD(vals, vals); @@ -630,58 +519,6 @@ FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry, return result; } -static FontEntryPtr -FindPmfToScale(FontPathElementPtr fpe, FontEntryPtr entry, - FontScalablePtr vals, FontScalablePtr best, - double *dxp, double *dyp, - double *sdxp, double *sdyp, - FontPathElementPtr *fpep) -{ - FontEntryPtr result = NULL; - FontScaledPtr scaled; - FontScalableExtraPtr extra; - int i; - - extra = entry->u.scalable.extra; - for (i = 0; i < extra->numScaled; i++) - { - double rescale_x; - - scaled = &extra->scaled[i]; - if (!scaled->bitmap) - continue; - if (!ComputeScaleFactors(&scaled->vals, vals, dxp, dyp, sdxp, sdyp, - &rescale_x)) - continue; - *best = scaled->vals; - *fpep = fpe; - result = scaled->bitmap; - if (rescale_x != 1.0) - { - /* We have rescaled horizontally due to an XLFD width field. Change - the matrix appropriately */ - vals->pixel_matrix[0] *= rescale_x; - vals->pixel_matrix[1] *= rescale_x; -#ifdef NOTDEF - /* This would force the pointsize and pixelsize fields in the - FONT property to display as matrices to more accurately - report the font being supplied. It might also break existing - applications that expect a single number in that field. */ - vals->values_supplied = - vals->values_supplied & ~(PIXELSIZE_MASK | POINTSIZE_MASK) | - PIXELSIZE_ARRAY; -#else /* NOTDEF */ - vals->values_supplied = vals->values_supplied & ~POINTSIZE_MASK; -#endif /* NOTDEF */ - /* Recompute and reround the FontScalablePtr values after - rescaling for the new width. */ - FontFileCompleteXLFD(vals, vals); - } - break; - } - return result; -} - static long doround(double x) { @@ -767,19 +604,19 @@ ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */ } nProps = NPROPS + 1 + sizeof(fontPropTable) / sizeof(fontProp) + sizeof(rawFontPropTable) / sizeof(fontProp); - fp = (FontPropPtr) xalloc(sizeof(FontPropRec) * nProps); + fp = malloc(sizeof(FontPropRec) * nProps); *pProps = fp; if (!fp) { fprintf(stderr, "Error: Couldn't allocate font properties (%ld*%d)\n", (unsigned long)sizeof(FontPropRec), nProps); return 1; } - isStringProp = (char *) xalloc (nProps); + isStringProp = malloc (nProps); *pIsStringProp = isStringProp; if (!isStringProp) { fprintf(stderr, "Error: Couldn't allocate isStringProp (%d)\n", nProps); - xfree (fp); + free (fp); return 1; } ptr2 = name; @@ -1020,7 +857,7 @@ ScaleFont(FontPtr opf, /* originating font */ lastRow = opfi->lastRow; } - bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); + bitmapFont = malloc(sizeof(BitmapFontRec)); if (!bitmapFont) { fprintf(stderr, "Error: Couldn't allocate bitmapFont (%ld)\n", (unsigned long)sizeof(BitmapFontRec)); @@ -1041,15 +878,13 @@ ScaleFont(FontPtr opf, /* originating font */ bitmapFont->encoding = 0; bitmapFont->bitmapExtra = 0; bitmapFont->pDefault = 0; - bitmapFont->metrics = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); + bitmapFont->metrics = malloc(nchars * sizeof(CharInfoRec)); if (!bitmapFont->metrics) { fprintf(stderr, "Error: Couldn't allocate metrics (%d*%ld)\n", nchars, (unsigned long)sizeof(CharInfoRec)); goto bail; } - bitmapFont->encoding = - (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nchars), - sizeof(CharInfoPtr*)); + bitmapFont->encoding = calloc(NUM_SEGMENTS(nchars), sizeof(CharInfoPtr*)); if (!bitmapFont->encoding) { fprintf(stderr, "Error: Couldn't allocate encoding (%d*%ld)\n", nchars, (unsigned long)sizeof(CharInfoPtr)); @@ -1127,8 +962,7 @@ ScaleFont(FontPtr opf, /* originating font */ if(!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); + calloc(BITMAP_FONT_SEGMENT_SIZE, sizeof(CharInfoPtr)); if(!bitmapFont->encoding[SEGMENT_MAJOR(i)]) goto bail; } @@ -1270,15 +1104,15 @@ ScaleFont(FontPtr opf, /* originating font */ return pf; bail: if (pf) - xfree(pf); + free(pf); if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); + free(bitmapFont->metrics); + free(bitmapFont->ink_metrics); + free(bitmapFont->bitmaps); if(bitmapFont->encoding) for(i=0; i<NUM_SEGMENTS(nchars); i++) - xfree(bitmapFont->encoding[i]); - xfree(bitmapFont->encoding); + free(bitmapFont->encoding[i]); + free(bitmapFont->encoding); } return NULL; } @@ -1359,23 +1193,19 @@ ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci, /* Looks like we need to anti-alias. Create a workspace to contain the grayscale character plus an additional row and column for scratch */ - char_grayscale = - (unsigned char *)xalloc((width + 1) * (height + 1)); + char_grayscale = malloc((width + 1) * (height + 1)); if (char_grayscale) { - diffusion_workspace = - (INT32 *)xalloc((newWidth + 2) * 2 * sizeof(int)); + diffusion_workspace = calloc((newWidth + 2) * 2, sizeof(int)); if (!diffusion_workspace) { fprintf(stderr, "Warning: Couldn't allocate diffusion" " workspace (%ld)\n", (newWidth + 2) * 2 * (unsigned long)sizeof(int)); - xfree(char_grayscale); + free(char_grayscale); char_grayscale = (unsigned char *)0; } /* Initialize our error diffusion workspace for later use */ - bzero((char *)diffusion_workspace + sizeof(INT32), - (newWidth + 3) * sizeof(int)); thisrow = diffusion_workspace + 1; nextrow = diffusion_workspace + newWidth + 3; } else { @@ -1625,8 +1455,8 @@ ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci, if (char_grayscale) { - xfree(char_grayscale); - xfree(diffusion_workspace); + free(char_grayscale); + free(diffusion_workspace); } } @@ -1677,12 +1507,11 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */ /* Will need to remember to free in the Unload routine */ - bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); + bitmapFont->bitmaps = calloc(1, bytestoalloc); if (!bitmapFont->bitmaps) { fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); goto bail; } - bzero(bitmapFont->bitmaps, bytestoalloc); glyphBytes = bitmapFont->bitmaps; for (i = 0; i < nchars; i++) @@ -1700,137 +1529,19 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */ bail: if (pf) - xfree(pf); + free(pf); if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); + free(bitmapFont->metrics); + free(bitmapFont->ink_metrics); + free(bitmapFont->bitmaps); if(bitmapFont->encoding) for(i=0; i<NUM_SEGMENTS(nchars); i++) - xfree(bitmapFont->encoding[i]); - xfree(bitmapFont->encoding); + free(bitmapFont->encoding[i]); + free(bitmapFont->encoding); } return NULL; } -static FontPtr -PrinterScaleBitmaps(FontPtr pf, /* scaled font */ - FontPtr opf, /* originating font */ - double widthMult, /* glyphs width scale factor */ - double heightMult, /* glyphs height scale factor */ - FontScalablePtr vals) -{ - register int i; - int nchars = 0; - char *glyphBytes; - BitmapFontPtr bitmapFont, - obitmapFont; - CharInfoPtr pci; - FontInfoPtr pfi; - int glyph; - unsigned bytestoalloc = 0; - int firstCol, lastCol, firstRow, lastRow; - - double xform[4], inv_xform[4]; - double xmult, ymult; - - bitmapFont = (BitmapFontPtr) pf->fontPrivate; - obitmapFont = (BitmapFontPtr) opf->fontPrivate; - - if (!compute_xform_matrix(vals, widthMult, heightMult, xform, - inv_xform, &xmult, &ymult)) - goto bail; - - pfi = &pf->info; - firstCol = pfi->firstCol; - lastCol = pfi->lastCol; - firstRow = pfi->firstRow; - lastRow = pfi->lastRow; - - nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); - glyph = pf->glyph; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i))) - bytestoalloc = MAX(bytestoalloc,BYTES_FOR_GLYPH(pci, glyph)); - } - - /* Do we add the font malloc stuff for VALUE ADDED ? */ - /* Will need to remember to free in the Unload routine */ - - - bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); - if (!bitmapFont->bitmaps) { - fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); - goto bail; - } - bzero(bitmapFont->bitmaps, bytestoalloc); - - glyphBytes = bitmapFont->bitmaps; - for (i = 0; i < nchars; i++) - { - if ((pci = ACCESSENCODING(bitmapFont->encoding, i)) && - (ACCESSENCODING(obitmapFont->encoding, OLDINDEX(i)))) - { - pci->bits = glyphBytes; - } - } - return pf; - -bail: - if (pf) - xfree(pf); - if (bitmapFont) { - xfree(bitmapFont->metrics); - xfree(bitmapFont->ink_metrics); - xfree(bitmapFont->bitmaps); - if(bitmapFont->encoding) - for(i=0; i<NUM_SEGMENTS(nchars); i++) - xfree(bitmapFont->encoding[i]); - xfree(bitmapFont->encoding); - } - return NULL; -} - -#ifdef NOTDEF -/* - * exported interfaces - */ - -FontFileLoadName(FontFileDirPtr *dirs, int ndirs, char *name, FontPtr *pfont, - fsBitmapFormat format, fsBitmapFormatMask fmask) -{ - FontFileNamePtr fname; - char full_name[1024]; - int ret = BadFontName; - int i; - - i = 0; - while (i < ndirs) { - if (fname = FontFileFindNameInDir(dirs[i], name)) { - if (!fname->alias) { - if (!fname->font) { - strcpy(full_name, dirs[i]->dir); - strcat(full_name, fname->file); - ret = FontFileLoad(pfont, full_name, format, fmask); - if (ret == Successful) { - fname->font = *pfont; - (*pfont)->fpePrivate = (pointer) fname; - } - return ret; - } - *pfont = fname->font; - return Successful; - } - name = fname->file; - i = 0; - } else - i++; - } - return BadFontName; -} -#endif - /* ARGSUSED */ int BitmapOpenScalable (FontPathElementPtr fpe, @@ -1855,17 +1566,12 @@ BitmapOpenScalable (FontPathElementPtr fpe, long sWidth; FontEntryPtr scaleFrom; - FontPathElementPtr scaleFPE; + FontPathElementPtr scaleFPE = NULL; FontPtr sourceFont; char fontName[MAXFONTNAMELEN]; /* Can't deal with mix-endian fonts yet */ -#ifdef NOTDEF /* XXX need better test */ - if ((format & BitmapFormatByteOrderMask) != - (format & BitmapFormatBitOrderMask)) - return NullFontFileName; -#endif /* Reject outrageously small font sizes to keep the math from blowing up. */ @@ -1873,8 +1579,8 @@ BitmapOpenScalable (FontPathElementPtr fpe, get_matrix_horizontal_component(vals->pixel_matrix) < 1.0) return BadFontName; - scaleFrom = (*find_scale[BitmapGetRenderIndex(entry->u.bitmap.renderer)]) - (fpe, entry, vals, &best, &dx, &dy, &sdx, &sdy, &scaleFPE); + scaleFrom = FindBestToScale(fpe, entry, vals, &best, &dx, &dy, &sdx, &sdy, + &scaleFPE); if (!scaleFrom) return BadFontName; @@ -1894,8 +1600,7 @@ BitmapOpenScalable (FontPathElementPtr fpe, savedY = dy; font = ScaleFont(sourceFont, dx, dy, sdx, sdy, vals, &dx, &dy, &sWidth); if (font) - font = (*scale[ BitmapGetRenderIndex(entry->u.bitmap.renderer) ]) - (font, sourceFont, savedX, savedY, vals); + font = BitmapScaleBitmaps(font, sourceFont, savedX, savedY, vals); if (!font) { @@ -1970,18 +1675,18 @@ bitmapUnloadScalable (FontPtr pFont) bitmapFont = (BitmapFontPtr) pFont->fontPrivate; pfi = &pFont->info; - xfree (pfi->props); - xfree (pfi->isStringProp); + free (pfi->props); + free (pfi->isStringProp); if(bitmapFont->encoding) { nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * (pFont->info.lastRow - pFont->info.firstRow + 1); for(i=0; i<NUM_SEGMENTS(nencoding); i++) - xfree(bitmapFont->encoding[i]); + free(bitmapFont->encoding[i]); } - xfree (bitmapFont->encoding); - xfree (bitmapFont->bitmaps); - xfree (bitmapFont->ink_metrics); - xfree (bitmapFont->metrics); - xfree (pFont->fontPrivate); + free (bitmapFont->encoding); + free (bitmapFont->bitmaps); + free (bitmapFont->ink_metrics); + free (bitmapFont->metrics); + free (pFont->fontPrivate); DestroyFontRec (pFont); } diff --git a/libXfont/src/bitmap/pcfread.c b/libXfont/src/bitmap/pcfread.c index c5db2555b..182144adc 100644 --- a/libXfont/src/bitmap/pcfread.c +++ b/libXfont/src/bitmap/pcfread.c @@ -1,4 +1,3 @@ -/* $Xorg: pcfread.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group @@ -138,7 +137,7 @@ pcfReadTOC(FontFilePtr file, int *countp) pcfError("pcfReadTOC(): invalid file format\n"); return NULL; } - tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); + tables = malloc(count * sizeof(PCFTableRec)); if (!tables) { pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); return (PCFTablePtr) NULL; @@ -155,7 +154,7 @@ pcfReadTOC(FontFilePtr file, int *countp) return tables; Bail: - xfree(tables); + free(tables); return (PCFTablePtr) NULL; } @@ -262,12 +261,12 @@ pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, goto Bail; } if (IS_EOF(file)) goto Bail; - props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); + props = malloc(nprops * sizeof(FontPropRec)); if (!props) { pcfError("pcfGetProperties(): Couldn't allocate props (%d*%d)\n", nprops, sizeof(FontPropRec)); goto Bail; } - isStringProp = (char *) xalloc(nprops * sizeof(char)); + isStringProp = malloc(nprops * sizeof(char)); if (!isStringProp) { pcfError("pcfGetProperties(): Couldn't allocate isStringProp (%d*%d)\n", nprops, sizeof(char)); goto Bail; @@ -300,7 +299,7 @@ pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, string_size = pcfGetINT32(file, format); if (string_size < 0) goto Bail; if (IS_EOF(file)) goto Bail; - strings = (char *) xalloc(string_size); + strings = malloc(string_size); if (!strings) { pcfError("pcfGetProperties(): Couldn't allocate strings (%d)\n", string_size); goto Bail; @@ -316,14 +315,14 @@ pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, strlen(strings + props[i].value), TRUE); } } - xfree(strings); + free(strings); pFontInfo->isStringProp = isStringProp; pFontInfo->props = props; pFontInfo->nprops = nprops; return TRUE; Bail: - xfree(isStringProp); - xfree(props); + free(isStringProp); + free(props); return FALSE; } @@ -443,7 +442,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, pcfError("pcfReadFont(): invalid file format\n"); goto Bail; } - metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); + metrics = malloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); goto Bail; @@ -469,7 +468,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, if (nbitmaps != nmetrics || IS_EOF(file)) goto Bail; /* nmetrics is already ok, so nbitmap also is */ - offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); + offsets = malloc(nbitmaps * sizeof(CARD32)); if (!offsets) { pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); goto Bail; @@ -487,7 +486,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; /* guard against completely empty font */ - bitmaps = xalloc(sizebitmaps ? sizebitmaps : 1); + bitmaps = malloc(sizebitmaps ? sizebitmaps : 1); if (!bitmaps) { pcfError("pcfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps ? sizebitmaps : 1); goto Bail; @@ -518,7 +517,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, xCharInfo *metric; sizepadbitmaps = bitmapSizes[PCF_SIZE_TO_INDEX(glyph)]; - padbitmaps = (char *) xalloc(sizepadbitmaps); + padbitmaps = malloc(sizepadbitmaps); if (!padbitmaps) { pcfError("pcfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); goto Bail; @@ -533,13 +532,13 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, metric->rightSideBearing - metric->leftSideBearing, metric->ascent + metric->descent); } - xfree(bitmaps); + free(bitmaps); bitmaps = padbitmaps; } for (i = 0; i < nbitmaps; i++) metrics[i].bits = bitmaps + offsets[i]; - xfree(offsets); + free(offsets); offsets = NULL; /* ink metrics ? */ @@ -559,7 +558,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, if (nink_metrics != nmetrics) goto Bail; /* nmetrics already checked */ - ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); + ink_metrics = malloc(nink_metrics * sizeof(xCharInfo)); if (!ink_metrics) { pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); goto Bail; @@ -595,8 +594,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * (pFont->info.lastRow - pFont->info.firstRow + 1); - encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); + encoding = calloc(NUM_SEGMENTS(nencoding), sizeof(CharInfoPtr*)); if (!encoding) { pcfError("pcfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); goto Bail; @@ -611,8 +609,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, } else { if(!encoding[SEGMENT_MAJOR(i)]) { encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); + calloc(BITMAP_FONT_SEGMENT_SIZE, sizeof(CharInfoPtr)); if(!encoding[SEGMENT_MAJOR(i)]) goto Bail; } @@ -626,7 +623,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_BDF_ACCELERATORS)) goto Bail; - bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); + bitmapFont = malloc(sizeof *bitmapFont); if (!bitmapFont) { pcfError("pcfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); goto Bail; @@ -665,24 +662,24 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, pFont->byte = byte; pFont->glyph = glyph; pFont->scan = scan; - xfree(tables); + free(tables); return Successful; Bail: - xfree(ink_metrics); + free(ink_metrics); if(encoding) { for(i=0; i<NUM_SEGMENTS(nencoding); i++) - xfree(encoding[i]); + free(encoding[i]); } - xfree(encoding); - xfree(bitmaps); - xfree(metrics); - xfree(pFont->info.props); + free(encoding); + free(bitmaps); + free(metrics); + free(pFont->info.props); pFont->info.nprops = 0; pFont->info.props = 0; - xfree (pFont->info.isStringProp); - xfree(bitmapFont); - xfree(tables); - xfree(offsets); + free (pFont->info.isStringProp); + free(bitmapFont); + free(tables); + free(offsets); return AllocError; } @@ -750,13 +747,13 @@ pcfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) if (!pcfGetAccel (pFontInfo, file, tables, ntables, PCF_BDF_ACCELERATORS)) goto Bail; - xfree(tables); + free(tables); return Successful; Bail: pFontInfo->nprops = 0; - xfree (pFontInfo->props); - xfree (pFontInfo->isStringProp); - xfree(tables); + free (pFontInfo->props); + free (pFontInfo->isStringProp); + free(tables); return AllocError; } @@ -767,258 +764,18 @@ pcfUnloadFont(FontPtr pFont) int i,nencoding; bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - xfree(bitmapFont->ink_metrics); + free(bitmapFont->ink_metrics); if(bitmapFont->encoding) { nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * (pFont->info.lastRow - pFont->info.firstRow + 1); for(i=0; i<NUM_SEGMENTS(nencoding); i++) - xfree(bitmapFont->encoding[i]); - } - xfree(bitmapFont->encoding); - xfree(bitmapFont->bitmaps); - xfree(bitmapFont->metrics); - xfree(pFont->info.isStringProp); - xfree(pFont->info.props); - xfree(bitmapFont); + free(bitmapFont->encoding[i]); + } + free(bitmapFont->encoding); + free(bitmapFont->bitmaps); + free(bitmapFont->metrics); + free(pFont->info.isStringProp); + free(pFont->info.props); + free(bitmapFont); DestroyFontRec(pFont); } - -int -pmfReadFont(FontPtr pFont, FontFilePtr file, - int bit, int byte, int glyph, int scan) -{ - CARD32 format; - CARD32 size; - BitmapFontPtr bitmapFont = 0; - int i; - PCFTablePtr tables = 0; - int ntables; - int nmetrics; - int sizebitmaps; - int nink_metrics; - CharInfoPtr metrics = 0; - xCharInfo *ink_metrics = 0; - char *bitmaps = 0; - CharInfoPtr **encoding = 0; - int nencoding = 0; - int encodingOffset; - Bool hasBDFAccelerators; - CharInfoPtr pci; - - pFont->info.nprops = 0; - pFont->info.props = 0; - - if (!(tables = pcfReadTOC(file, &ntables))) - goto Bail; - - /* properties */ - - if (!pcfGetProperties(&pFont->info, file, tables, ntables)) - goto Bail; - - /* Use the old accelerators if no BDF accelerators are in the file */ - - hasBDFAccelerators = pcfHasType (tables, ntables, PCF_BDF_ACCELERATORS); - if (!hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_ACCELERATORS)) - goto Bail; - - /* metrics */ - - if (!pcfSeekToType(file, tables, ntables, PCF_METRICS, &format, &size)) { - goto Bail; - } - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nmetrics = pcfGetINT32(file, format); - else - nmetrics = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { - pcfError("pmfReadFont(): invalid file format\n"); - goto Bail; - } - metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); - if (!metrics) { - pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); - goto Bail; - } - for (i = 0; i < nmetrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, &(metrics + i)->metrics)) - goto Bail; - } - - /* Set the bitmaps to all point to the same zero filled array - * that is the size of the largest bitmap. - */ - - pci = metrics; - sizebitmaps = 0; - for (i = 0; i < nmetrics; i++) - { - sizebitmaps = MAX(sizebitmaps,BYTES_FOR_GLYPH(pci, glyph)); - pci++; - } - -#ifdef FONTMODULE - sizebitmaps = 1024; /* Default - we xalloc the size anyway */ -#else - sizebitmaps = BUFSIZ; -#endif - /* guard against completely empty font */ - bitmaps = (char *) xalloc(sizebitmaps); - if (!bitmaps) { - pcfError("pmfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps); - goto Bail; - } - - memset(bitmaps,0,sizebitmaps); - for (i = 0; i < nmetrics; i++) - metrics[i].bits = bitmaps; - - /* ink metrics ? */ - - ink_metrics = NULL; - if (pcfSeekToType(file, tables, ntables, PCF_INK_METRICS, &format, &size)) { - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) && - !PCF_FORMAT_MATCH(format, PCF_COMPRESSED_METRICS)) { - goto Bail; - } - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - nink_metrics = pcfGetINT32(file, format); - else - nink_metrics = pcfGetINT16(file, format); - if (nink_metrics != nmetrics) - goto Bail; - if (IS_EOF(file)) goto Bail; - ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); - if (!ink_metrics) { - pcfError("pmfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); - goto Bail; - } - for (i = 0; i < nink_metrics; i++) - if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { - if (!pcfGetMetric(file, format, ink_metrics + i)) - goto Bail; - } else { - if (!pcfGetCompressedMetric(file, format, ink_metrics + i)) - goto Bail; - } - } - - /* encoding */ - - if (!pcfSeekToType(file, tables, ntables, PCF_BDF_ENCODINGS, &format, &size)) - goto Bail; - format = pcfGetLSB32(file); - if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) - goto Bail; - - pFont->info.firstCol = pcfGetINT16(file, format); - pFont->info.lastCol = pcfGetINT16(file, format); - pFont->info.firstRow = pcfGetINT16(file, format); - pFont->info.lastRow = pcfGetINT16(file, format); - pFont->info.defaultCh = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - - nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) * - (pFont->info.lastRow - pFont->info.firstRow + 1); - - encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), - sizeof(CharInfoPtr*)); - if (!encoding) { - pcfError("pmfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); - goto Bail; - } - pFont->info.allExist = TRUE; - for (i = 0; i < nencoding; i++) { - encodingOffset = pcfGetINT16(file, format); - if (IS_EOF(file)) goto Bail; - if (encodingOffset == 0xFFFF) { - pFont->info.allExist = FALSE; - } else { - if(!encoding[SEGMENT_MAJOR(i)]) { - encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); - if(!encoding[SEGMENT_MAJOR(i)]) - goto Bail; - } - ACCESSENCODINGL(encoding, i) = metrics + encodingOffset; - } - } - if (IS_EOF(file)) goto Bail; - - /* BDF style accelerators (i.e. bounds based on encoded glyphs) */ - - if (hasBDFAccelerators) - if (!pcfGetAccel (&pFont->info, file, tables, ntables, PCF_BDF_ACCELERATORS)) - goto Bail; - - bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); - if (!bitmapFont) { - pcfError("pmfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); - goto Bail; - } - - bitmapFont->version_num = PCF_FILE_VERSION; - bitmapFont->num_chars = nmetrics; - bitmapFont->num_tables = ntables; - bitmapFont->metrics = metrics; - bitmapFont->ink_metrics = ink_metrics; - bitmapFont->bitmaps = bitmaps; - bitmapFont->encoding = encoding; - bitmapFont->pDefault = (CharInfoPtr) 0; - if (pFont->info.defaultCh != (unsigned short) NO_SUCH_CHAR) { - unsigned int r, - c, - cols; - - r = pFont->info.defaultCh >> 8; - c = pFont->info.defaultCh & 0xFF; - if (pFont->info.firstRow <= r && r <= pFont->info.lastRow && - pFont->info.firstCol <= c && c <= pFont->info.lastCol) { - cols = pFont->info.lastCol - pFont->info.firstCol + 1; - r = r - pFont->info.firstRow; - c = c - pFont->info.firstCol; - bitmapFont->pDefault = ACCESSENCODING(encoding, r * cols + c); - } - } - bitmapFont->bitmapExtra = (BitmapExtraPtr) 0; - pFont->fontPrivate = (pointer) bitmapFont; - pFont->get_glyphs = bitmapGetGlyphs; - pFont->get_metrics = bitmapGetMetrics; - pFont->unload_font = pcfUnloadFont; - pFont->unload_glyphs = NULL; - pFont->bit = bit; - pFont->byte = byte; - pFont->glyph = glyph; - pFont->scan = scan; - xfree(tables); - return Successful; -Bail: - xfree(ink_metrics); - if(encoding) { - for(i=0; i<NUM_SEGMENTS(nencoding); i++) - xfree(encoding[i]); - } - xfree(encoding); - xfree(bitmaps); - xfree(metrics); - xfree(pFont->info.props); - pFont->info.nprops = 0; - pFont->info.props = 0; - xfree (pFont->info.isStringProp); - xfree(bitmapFont); - xfree(tables); - return AllocError; -} diff --git a/libXfont/src/bitmap/pcfwrite.c b/libXfont/src/bitmap/pcfwrite.c index 8d5e9425f..5d1aab154 100644 --- a/libXfont/src/bitmap/pcfwrite.c +++ b/libXfont/src/bitmap/pcfwrite.c @@ -236,7 +236,7 @@ pcfWriteFont(FontPtr pFont, FontFilePtr file) ink_minbounds = &pFont->info.ink_minbounds; ink_maxbounds = &pFont->info.ink_maxbounds; } - offsetProps = (FontPropPtr) xalloc(pFont->info.nprops * sizeof(FontPropRec)); + offsetProps = malloc(pFont->info.nprops * sizeof(FontPropRec)); if (!offsetProps) { pcfError("pcfWriteFont(): Couldn't allocate offsetProps (%d*%d)", pFont->info.nprops, sizeof(FontPropRec)); return AllocError; @@ -358,7 +358,7 @@ pcfWriteFont(FontPtr pFont, FontFilePtr file) if (current_position > table->offset) { printf("can't go backwards... %d > %d\n", (int)current_position, (int)table->offset); - xfree(offsetProps); + free(offsetProps); return BadFontName; } while (current_position < table->offset) @@ -463,6 +463,6 @@ pcfWriteFont(FontPtr pFont, FontFilePtr file) } } - xfree(offsetProps); + free(offsetProps); return Successful; } diff --git a/libXfont/src/bitmap/snfread.c b/libXfont/src/bitmap/snfread.c index f48e2d8a7..53a72da9f 100644 --- a/libXfont/src/bitmap/snfread.c +++ b/libXfont/src/bitmap/snfread.c @@ -55,10 +55,7 @@ from The Open Group. #include <config.h> #endif -#ifndef FONTMODULE #include <ctype.h> -#endif - #include <X11/fonts/fntfilst.h> #include <X11/fonts/bitmap.h> #include "snfstr.h" @@ -150,14 +147,14 @@ snfReadProps(snfFontInfoPtr snfInfo, FontInfoPtr pFontInfo, FontFilePtr file) bytestoalloc = snfInfo->nProps * sizeof(snfFontPropRec) + BYTESOFSTRINGINFO(snfInfo); - propspace = (char *) xalloc(bytestoalloc); + propspace = malloc(bytestoalloc); if (!propspace) { snfError("snfReadProps(): Couldn't allocate propspace (%d)\n", bytestoalloc); return AllocError; } if (FontFileRead(file, propspace, bytestoalloc) != bytestoalloc) { - xfree(propspace); + free(propspace); return BadFontName; } psnfp = (snfFontPropPtr) propspace; @@ -175,7 +172,7 @@ snfReadProps(snfFontInfoPtr snfInfo, FontInfoPtr pFontInfo, FontFilePtr file) pfp->value = psnfp->value; } - xfree(propspace); + free(propspace); return Successful; } @@ -269,16 +266,16 @@ snfReadFont(FontPtr pFont, FontFilePtr file, if (fi.inkMetrics) bytestoalloc += num_chars * sizeof(xCharInfo); /* ink_metrics */ - fontspace = (char *) xalloc(bytestoalloc); + fontspace = malloc(bytestoalloc); if (!fontspace) { snfError("snfReadFont(): Couldn't allocate fontspace (%d)\n", bytestoalloc); return AllocError; } - bitmaps = (char *) xalloc (bitmapsSize); + bitmaps = malloc (bitmapsSize); if (!bitmaps) { snfError("snfReadFont(): Couldn't allocate bitmaps (%d)\n", bitmapsSize); - xfree (fontspace); + free (fontspace); return AllocError; } /* @@ -311,8 +308,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file, if (bitmapFont->metrics[i].bits) { if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { bitmapFont->encoding[SEGMENT_MAJOR(i)]= - (CharInfoPtr*)xcalloc(BITMAP_FONT_SEGMENT_SIZE, - sizeof(CharInfoPtr)); + calloc(BITMAP_FONT_SEGMENT_SIZE, sizeof(CharInfoPtr)); if (!bitmapFont->encoding[SEGMENT_MAJOR(i)]) { ret = AllocError; break; @@ -323,12 +319,12 @@ snfReadFont(FontPtr pFont, FontFilePtr file, } if (ret != Successful) { - xfree(bitmaps); + free(bitmaps); if(bitmapFont->encoding) { for(j=0; j<SEGMENT_MAJOR(i); j++) - xfree(bitmapFont->encoding[i]); + free(bitmapFont->encoding[i]); } - xfree(fontspace); + free(fontspace); return ret; } /* @@ -336,8 +332,8 @@ snfReadFont(FontPtr pFont, FontFilePtr file, */ if (FontFileRead(file, bitmaps, bitmapsSize) != bitmapsSize) { - xfree(bitmaps); - xfree(fontspace); + free(bitmaps); + free(fontspace); return BadFontName; } @@ -369,11 +365,11 @@ snfReadFont(FontPtr pFont, FontFilePtr file, sizepadbitmaps += BYTES_FOR_GLYPH(metric,glyph); metric++; } - padbitmaps = (char *) xalloc(sizepadbitmaps); + padbitmaps = malloc(sizepadbitmaps); if (!padbitmaps) { snfError("snfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); - xfree (bitmaps); - xfree (fontspace); + free (bitmaps); + free (fontspace); return AllocError; } metric = bitmapFont->metrics; @@ -388,14 +384,14 @@ snfReadFont(FontPtr pFont, FontFilePtr file, padbitmaps += sizechar; metric++; } - xfree(bitmaps); + free(bitmaps); } /* now read and atom'ize properties */ ret = snfReadProps(&fi, &pFont->info, file); if (ret != Successful) { - xfree(fontspace); + free(fontspace); return ret; } snfCopyInfo(&fi, &pFont->info); @@ -409,7 +405,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file, for (i = 0; ret == Successful && i < num_chars; i++) ret = snfReadxCharInfo(file, &bitmapFont->ink_metrics[i]); if (ret != Successful) { - xfree(fontspace); + free(fontspace); return ret; } } else { @@ -458,15 +454,15 @@ snfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) return ret; snfCopyInfo(&fi, pFontInfo); - pFontInfo->props = (FontPropPtr) xalloc(fi.nProps * sizeof(FontPropRec)); + pFontInfo->props = malloc(fi.nProps * sizeof(FontPropRec)); if (!pFontInfo->props) { snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n", fi.nProps, sizeof(FontPropRec)); return AllocError; } - pFontInfo->isStringProp = (char *) xalloc(fi.nProps * sizeof(char)); + pFontInfo->isStringProp = malloc(fi.nProps * sizeof(char)); if (!pFontInfo->isStringProp) { snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n", fi.nProps, sizeof(char)); - xfree(pFontInfo->props); + free(pFontInfo->props); return AllocError; } num_chars = n2dChars(&fi); @@ -476,21 +472,21 @@ snfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file) ret = snfReadProps(&fi, pFontInfo, file); if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); + free(pFontInfo->props); + free(pFontInfo->isStringProp); return ret; } if (fi.inkMetrics) { ret = snfReadxCharInfo(file, &pFontInfo->ink_minbounds); if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); + free(pFontInfo->props); + free(pFontInfo->isStringProp); return ret; } ret = snfReadxCharInfo(file, &pFontInfo->ink_maxbounds); if (ret != Successful) { - xfree(pFontInfo->props); - xfree(pFontInfo->isStringProp); + free(pFontInfo->props); + free(pFontInfo->isStringProp); return ret; } } else { @@ -507,8 +503,8 @@ snfUnloadFont(FontPtr pFont) BitmapFontPtr bitmapFont; bitmapFont = (BitmapFontPtr) pFont->fontPrivate; - xfree (bitmapFont->bitmaps); - xfree (bitmapFont); + free (bitmapFont->bitmaps); + free (bitmapFont); DestroyFontRec (pFont); } diff --git a/libXfont/src/builtins/Makefile.in b/libXfont/src/builtins/Makefile.in index 3d57cfa88..d96bb41bd 100644 --- a/libXfont/src/builtins/Makefile.in +++ b/libXfont/src/builtins/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -46,7 +46,7 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libbuiltins_la_LIBADD = am_libbuiltins_la_OBJECTS = dir.lo file.lo fonts.lo fpe.lo render.lo libbuiltins_la_OBJECTS = $(am_libbuiltins_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -77,22 +77,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -102,17 +98,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -122,6 +125,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -135,8 +139,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -169,6 +172,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -181,6 +185,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -206,8 +211,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -287,8 +292,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -300,8 +305,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -311,13 +316,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/builtins/dir.c b/libXfont/src/builtins/dir.c index dd2ea1a86..bf351b147 100644 --- a/libXfont/src/builtins/dir.c +++ b/libXfont/src/builtins/dir.c @@ -1,6 +1,4 @@ /* - * Id: dir.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ - * * Copyright 1999 SuSE, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -22,7 +20,6 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/dir.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ #ifdef HAVE_CONFIG_H #include <config.h> @@ -39,17 +36,13 @@ BuiltinDirsDup (const BuiltinDirPtr a_dirs, if (!a_dirs) return NULL ; - dirs = xcalloc (a_dirs_len, sizeof (BuiltinDirRec)) ; + dirs = calloc (a_dirs_len, sizeof (BuiltinDirRec)) ; if (!dirs) return NULL ; for (i=0; i < a_dirs_len; i++) { - int len = strlen (a_dirs[i].file_name) ; - dirs[i].file_name = xcalloc (1, len+1) ; - memmove (dirs[i].file_name, a_dirs[i].file_name, len); - len = strlen (a_dirs[i].font_name) ; - dirs[i].font_name = xcalloc (1, len+1) ; - memmove (dirs[i].font_name, a_dirs[i].font_name, len); + dirs[i].file_name = strdup(a_dirs[i].file_name); + dirs[i].font_name = strdup(a_dirs[i].font_name); } return dirs ; } @@ -104,14 +97,12 @@ BuiltinAliasesDup (const BuiltinAliasPtr a_aliases, if (!a_aliases) return NULL ; - aliases = xcalloc (a_aliases_len, sizeof (BuiltinAliasRec)) ; + aliases = calloc (a_aliases_len, sizeof (BuiltinAliasRec)) ; if (!aliases) return NULL ; for (i=0; i < a_aliases_len; i++) { - int len = strlen (a_aliases[i].font_name) ; - aliases[i].font_name = xcalloc (1, len+1) ; - memmove (aliases[i].font_name, a_aliases[i].font_name, len); + aliases[i].font_name = strdup(a_aliases[i].font_name); } return aliases ; } diff --git a/libXfont/src/builtins/file.c b/libXfont/src/builtins/file.c index a46b0a65e..f08f67f88 100644 --- a/libXfont/src/builtins/file.c +++ b/libXfont/src/builtins/file.c @@ -87,7 +87,7 @@ BuiltinClose (BufFilePtr f, int unused) { BuiltinIOPtr io = ((BuiltinIOPtr) f->private); - xfree (io); + free (io); return 1; } @@ -105,7 +105,7 @@ BuiltinFileOpen (char *name) break; if (i == builtin_files_count) return NULL; - io = (BuiltinIOPtr) xalloc (sizeof (BuiltinIORec)); + io = malloc (sizeof (BuiltinIORec)); if (!io) return NULL; io->offset = 0; @@ -113,7 +113,7 @@ BuiltinFileOpen (char *name) raw = BufFileCreate ((char *) io, BuiltinFill, 0, BuiltinSkip, BuiltinClose); if (!raw) { - xfree (io); + free (io); return NULL; } if ((cooked = BufFilePushZIP (raw))) diff --git a/libXfont/src/builtins/render.c b/libXfont/src/builtins/render.c index 871665f89..52c24b9dc 100644 --- a/libXfont/src/builtins/render.c +++ b/libXfont/src/builtins/render.c @@ -50,7 +50,7 @@ BuiltinOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, file = BuiltinFileOpen (fileName); if (!file) return BadFontName; - pFont = (FontPtr) xalloc(sizeof(FontRec)); + pFont = malloc(sizeof(FontRec)); if (!pFont) { BuiltinFileClose (file, 0); return AllocError; @@ -69,7 +69,7 @@ BuiltinOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, BuiltinFileClose (file, 0); if (ret != Successful) - xfree(pFont); + free(pFont); else *ppFont = pFont; return ret; diff --git a/libXfont/src/fc/Makefile.in b/libXfont/src/fc/Makefile.in index 77afa8db3..a94136b14 100644 --- a/libXfont/src/fc/Makefile.in +++ b/libXfont/src/fc/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -46,7 +46,7 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libfc_la_LIBADD = am_libfc_la_OBJECTS = fsconvert.lo fserve.lo fsio.lo fstrans.lo libfc_la_OBJECTS = $(am_libfc_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -77,22 +77,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -102,17 +98,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -122,6 +125,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -135,8 +139,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -169,6 +172,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -181,6 +185,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -206,8 +211,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -286,8 +291,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -299,8 +304,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -310,13 +315,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/fc/fsconvert.c b/libXfont/src/fc/fsconvert.c index 8cdda2a79..724bc5fb4 100644 --- a/libXfont/src/fc/fsconvert.c +++ b/libXfont/src/fc/fsconvert.c @@ -108,8 +108,7 @@ _fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd, || nprops > SIZE_MAX/(sizeof(FontPropRec) + sizeof(char))) return -1; - dprop = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops + - sizeof (char) * nprops); + dprop = malloc(sizeof(FontPropRec) * nprops + sizeof (char) * nprops); if (!dprop) return -1; @@ -132,7 +131,7 @@ _fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd, local_off.value.length, 1); if (dprop->value == BAD_RESOURCE) { - xfree (pfi->props); + free (pfi->props); pfi->nprops = 0; pfi->props = 0; pfi->isStringProp = 0; @@ -150,7 +149,7 @@ _fs_free_props (FontInfoPtr pfi) { if (pfi->props) { - xfree (pfi->props); + free (pfi->props); pfi->nprops = 0; pfi->props = 0; } @@ -616,12 +615,12 @@ _fs_unload_font(FontPtr pfont) * fsdata points at FSFontRec, FSFontDataRec and name */ if (encoding) - xfree(encoding); + free(encoding); while ((glyphs = fsdata->glyphs)) { fsdata->glyphs = glyphs->next; - xfree (glyphs); + free (glyphs); } /* XXX we may get called after the resource DB has been cleaned out */ @@ -630,7 +629,7 @@ _fs_unload_font(FontPtr pfont) _fs_free_props (&pfont->info); - xfree(fsdata); + free(fsdata); DestroyFontRec(pfont); } @@ -650,9 +649,7 @@ fs_create_font (FontPathElementPtr fpe, pfont = CreateFontRec (); if (!pfont) return 0; - fsfont = (FSFontPtr) xalloc (sizeof (FSFontRec) + - sizeof (FSFontDataRec) + - namelen + 1); + fsfont = malloc (sizeof (FSFontRec) + sizeof (FSFontDataRec) + namelen + 1); if (!fsfont) { DestroyFontRec (pfont); @@ -703,7 +700,7 @@ fs_create_font (FontPathElementPtr fpe, /* save the ID */ if (!StoreFontClientFont(pfont, fsd->fontid)) { - xfree (fsfont); + free (fsfont); DestroyFontRec (pfont); return 0; } @@ -717,7 +714,7 @@ fs_alloc_glyphs (FontPtr pFont, int size) FSGlyphPtr glyphs; FSFontPtr fsfont = (FSFontPtr) pFont->fontPrivate; - glyphs = xalloc (sizeof (FSGlyphRec) + size); + glyphs = malloc (sizeof (FSGlyphRec) + size); glyphs->next = fsfont->glyphs; fsfont->glyphs = glyphs; return (pointer) (glyphs + 1); diff --git a/libXfont/src/fc/fserve.c b/libXfont/src/fc/fserve.c index 07ada34b6..2ba08e8b0 100644 --- a/libXfont/src/fc/fserve.c +++ b/libXfont/src/fc/fserve.c @@ -217,14 +217,6 @@ _fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep) static Bool fs_name_check(char *name) { -#ifdef __UNIXOS2__ - /* OS/2 uses D:/usr/X11R6/.... as fontfile pathnames, so check that - * there is not only a protocol/ prefix, but also that the first chars - * are not a drive letter - */ - if (name && isalpha(*name) && name[1] == ':') - return FALSE; -#endif /* Just make sure there is a protocol/ prefix */ return (name && *name != '/' && strchr(name, '/')); } @@ -266,7 +258,7 @@ fs_close_conn(FSFpePtr conn) for (client = conn->clients; client; client = nclient) { nclient = client->next; - xfree (client); + free (client); } conn->clients = NULL; } @@ -411,7 +403,7 @@ fs_new_block_rec(FontPathElementPtr fpe, pointer client, int type) size = 0; break; } - blockrec = (FSBlockDataPtr) xalloc(sizeof(FSBlockDataRec) + size); + blockrec = malloc(sizeof(FSBlockDataRec) + size); if (!blockrec) return (FSBlockDataPtr) 0; blockrec->data = (pointer) (blockrec + 1); @@ -462,9 +454,9 @@ _fs_remove_block_rec(FSFpePtr conn, FSBlockDataPtr blockrec) { FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr)blockrec->data; if (bglyph->num_expected_ranges) - xfree(bglyph->expected_ranges); + free(bglyph->expected_ranges); } - xfree(blockrec); + free(blockrec); _fs_set_pending_reply (conn); } @@ -477,7 +469,7 @@ _fs_signal_clients_depending(FSClientsDependingPtr *clients_depending) { *clients_depending = p->next; ClientSignal(p->client); - xfree(p); + free(p); } } @@ -493,7 +485,7 @@ _fs_add_clients_depending(FSClientsDependingPtr *clients_depending, pointer clie return Suspended; } - new = (FSClientsDependingPtr)xalloc (sizeof (FSClientsDependingRec)); + new = malloc (sizeof (FSClientsDependingRec)); if (!new) return BadAlloc; @@ -981,7 +973,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec) numInfos *= 2; haveInk = TRUE; } - ci = pCI = (CharInfoPtr) xalloc(sizeof(CharInfoRec) * numInfos); + ci = pCI = malloc(sizeof(CharInfoRec) * numInfos); if (!pCI) { @@ -1626,6 +1618,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags, buf[0] = (unsigned char) namelen; memcpy(&buf[1], name, namelen); openreq.reqType = FS_OpenBitmapFont; + openreq.pad = 0; openreq.fid = fsd->fontid; openreq.format_hint = fsd->format; openreq.format_mask = fsd->fmask; @@ -1638,6 +1631,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags, blockrec->sequenceNumber = conn->current_seq; inforeq.reqType = FS_QueryXInfo; + inforeq.pad = 0; inforeq.id = fsd->fontid; inforeq.length = SIZEOF(fsQueryXInfoReq) >> 2; @@ -1764,6 +1758,7 @@ fs_send_close_font(FontPathElementPtr fpe, Font id) return Successful; /* tell the font server to close the font */ req.reqType = FS_CloseFont; + req.pad = 0; req.length = SIZEOF(fsCloseReq) >> 2; req.id = id; _fs_add_req_log(conn, FS_CloseFont); @@ -2156,7 +2151,7 @@ _fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag, if (nranges) { _fs_clean_aborted_loadglyphs(pfont, nranges, ranges); - xfree(ranges); + free(ranges); } return _fs_add_clients_depending(clients_depending, client); } @@ -2184,7 +2179,7 @@ _fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag, /* Since we're not ready to send the load_glyphs request yet, clean up the damage caused by the fs_build_range() call. */ _fs_clean_aborted_loadglyphs(pfont, nranges, ranges); - xfree(ranges); + free(ranges); /* Now try to reopen the font. */ return fs_send_open_font(client, pfont->fpe, @@ -2296,6 +2291,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern, /* send the request */ req.reqType = FS_ListFonts; + req.pad = 0; req.maxNames = maxnames; req.nbytes = patlen; req.length = (SIZEOF(fsListFontsReq) + patlen + 3) >> 2; @@ -2466,6 +2462,7 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe, /* send the request */ req.reqType = FS_ListFontsWithXInfo; + req.pad = 0; req.maxNames = maxnames; req.nbytes = len; req.length = (SIZEOF(fsListFontsWithXInfoReq) + len + 3) >> 2; @@ -2566,12 +2563,13 @@ fs_client_died(pointer client, FontPathElementPtr fpe) { if (cur->client == client) { freeac.reqType = FS_FreeAC; + freeac.pad = 0; freeac.id = cur->acid; freeac.length = sizeof (fsFreeACReq) >> 2; _fs_add_req_log(conn, FS_FreeAC); _fs_write (conn, (char *) &freeac, sizeof (fsFreeACReq)); *prev = cur->next; - xfree (cur); + free (cur); break; } } @@ -2625,7 +2623,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync) } if (!cur) { - cur = (FSClientPtr) xalloc (sizeof (FSClientRec)); + cur = malloc (sizeof (FSClientRec)); if (!cur) return; cur->client = client; @@ -2640,6 +2638,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync) { fsFreeACReq freeac; freeac.reqType = FS_FreeAC; + freeac.pad = 0; freeac.id = cur->acid; freeac.length = sizeof (fsFreeACReq) >> 2; _fs_add_req_log(conn, FS_FreeAC); @@ -2668,6 +2667,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync) if (conn->curacid != cur->acid) { setac.reqType = FS_SetAuthorization; + setac.pad = 0; setac.length = sizeof (fsSetAuthorizationReq) >> 2; setac.id = cur->acid; _fs_add_req_log(conn, FS_SetAuthorization); @@ -2810,15 +2810,14 @@ _fs_recv_conn_setup (FSFpePtr conn) */ if (conn->alts) { - xfree (conn->alts); + free (conn->alts); conn->alts = 0; conn->numAlts = 0; } if (setup->num_alternates) { - alts = (FSFpeAltPtr) xalloc (setup->num_alternates * - sizeof (FSFpeAltRec) + - (setup->alternate_len << 2)); + alts = malloc (setup->num_alternates * sizeof (FSFpeAltRec) + + (setup->alternate_len << 2)); if (alts) { alt_names = (char *) (setup + 1); @@ -2971,6 +2970,7 @@ _fs_send_cat_sync (FSFpePtr conn) lcreq.length = (SIZEOF(fsListCataloguesReq)) >> 2; lcreq.maxNames = 0; lcreq.nbytes = 0; + lcreq.pad2 = 0; _fs_add_req_log(conn, FS_SetCatalogues); if (_fs_write(conn, (char *) &lcreq, SIZEOF(fsListCataloguesReq)) != FSIO_READY) return FSIO_ERROR; @@ -3151,13 +3151,12 @@ _fs_init_conn (char *servername) { FSFpePtr conn; - conn = xalloc (sizeof (FSFpeRec) + strlen (servername) + 1); + conn = calloc (1, sizeof (FSFpeRec) + strlen (servername) + 1); if (!conn) return 0; - memset (conn, '\0', sizeof (FSFpeRec)); if (!_fs_io_init (conn)) { - xfree (conn); + free (conn); return 0; } conn->servername = (char *) (conn + 1); @@ -3173,8 +3172,8 @@ _fs_free_conn (FSFpePtr conn) _fs_close_server (conn); _fs_io_fini (conn); if (conn->alts) - xfree (conn->alts); - xfree (conn); + free (conn->alts); + free (conn); } /* @@ -3200,70 +3199,3 @@ fs_register_fpe_functions(void) NULL, NULL); } - -static int -check_fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *ppfont, - char **alias, FontPtr non_cachable_font) -{ - if (XpClientIsBitmapClient(client)) - return (fs_open_font(client, fpe, flags, name, namelen, format, - fmask, id, ppfont, alias, non_cachable_font) ); - return BadFontName; -} - -static int -check_fs_list_fonts(pointer client, FontPathElementPtr fpe, - char *pattern, int patlen, int maxnames, - FontNamesPtr newnames) -{ - if (XpClientIsBitmapClient(client)) - return (fs_list_fonts(client, fpe, pattern, patlen, maxnames, - newnames)); - return BadFontName; -} - -static int -check_fs_start_list_with_info(pointer client, FontPathElementPtr fpe, - char *pattern, int len, int maxnames, - pointer *pdata) -{ - if (XpClientIsBitmapClient(client)) - return (fs_start_list_with_info(client, fpe, pattern, len, maxnames, - pdata)); - return BadFontName; -} - -static int -check_fs_next_list_with_info(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, int *numFonts, - pointer private) -{ - if (XpClientIsBitmapClient(client)) - return (fs_next_list_with_info(client, fpe, namep, namelenp, pFontInfo, - numFonts,private)); - return BadFontName; -} - -void -check_fs_register_fpe_functions(void) -{ - RegisterFPEFunctions(fs_name_check, - fs_init_fpe, - fs_free_fpe, - fs_reset_fpe, - check_fs_open_font, - fs_close_font, - check_fs_list_fonts, - check_fs_start_list_with_info, - check_fs_next_list_with_info, - fs_wakeup, - fs_client_died, - _fs_load_glyphs, - NULL, - NULL, - NULL); -} diff --git a/libXfont/src/fc/fsio.c b/libXfont/src/fc/fsio.c index 2b55f8520..79dc0d695 100644 --- a/libXfont/src/fc/fsio.c +++ b/libXfont/src/fc/fsio.c @@ -64,9 +64,6 @@ #define EINTR WSAEINTR #endif -#ifdef __UNIXOS2__ -#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) -#endif static int padlength[4] = {0, 3, 2, 1}; @@ -284,7 +281,7 @@ _fs_flush (FSFpePtr conn) { _fs_unmark_block (conn, FS_BROKEN_WRITE|FS_PENDING_WRITE); if (conn->outBuf.size > FS_BUF_INC) - conn->outBuf.buf = xrealloc (conn->outBuf.buf, FS_BUF_INC); + conn->outBuf.buf = realloc (conn->outBuf.buf, FS_BUF_INC); conn->outBuf.remove = conn->outBuf.insert = 0; } return FSIO_READY; @@ -310,7 +307,7 @@ _fs_resize (FSBufPtr buf, long size) if (buf->size - buf->remove < size) { new_size = ((buf->remove + size + FS_BUF_INC) / FS_BUF_INC) * FS_BUF_INC; - new = xrealloc (buf->buf, new_size); + new = realloc (buf->buf, new_size); if (!new) return FSIO_ERROR; buf->buf = new; @@ -327,7 +324,7 @@ _fs_downsize (FSBufPtr buf, long size) buf->insert = buf->remove = 0; if (buf->size > size) { - buf->buf = xrealloc (buf->buf, size); + buf->buf = realloc (buf->buf, size); buf->size = size; } } @@ -346,16 +343,16 @@ Bool _fs_io_init (FSFpePtr conn) { conn->outBuf.insert = conn->outBuf.remove = 0; - conn->outBuf.buf = xalloc (FS_BUF_INC); + conn->outBuf.buf = malloc (FS_BUF_INC); if (!conn->outBuf.buf) return FALSE; conn->outBuf.size = FS_BUF_INC; conn->inBuf.insert = conn->inBuf.remove = 0; - conn->inBuf.buf = xalloc (FS_BUF_INC); + conn->inBuf.buf = malloc (FS_BUF_INC); if (!conn->inBuf.buf) { - xfree (conn->outBuf.buf); + free (conn->outBuf.buf); conn->outBuf.buf = 0; return FALSE; } @@ -368,9 +365,9 @@ void _fs_io_fini (FSFpePtr conn) { if (conn->outBuf.buf) - xfree (conn->outBuf.buf); + free (conn->outBuf.buf); if (conn->inBuf.buf) - xfree (conn->inBuf.buf); + free (conn->inBuf.buf); } static int @@ -397,6 +394,8 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size) } } memcpy (conn->outBuf.buf + conn->outBuf.insert, data, len); + /* Clear pad data */ + memset (conn->outBuf.buf + conn->outBuf.insert + len, 0, size - len); conn->outBuf.insert += size; _fs_mark_block (conn, FS_PENDING_WRITE); return FSIO_READY; diff --git a/libXfont/src/fc/fslibos.h b/libXfont/src/fc/fslibos.h index acc1f16dc..65c440c7a 100644 --- a/libXfont/src/fc/fslibos.h +++ b/libXfont/src/fc/fslibos.h @@ -64,7 +64,7 @@ from The Open Group. # endif #endif #ifndef OPEN_MAX -#if defined(SVR4) || defined(__UNIXOS2__) +#if defined(SVR4) #define OPEN_MAX 256 #else #include <sys/param.h> diff --git a/libXfont/src/fontfile/Makefile.am b/libXfont/src/fontfile/Makefile.am index 45d1dbaa4..05aded262 100644 --- a/libXfont/src/fontfile/Makefile.am +++ b/libXfont/src/fontfile/Makefile.am @@ -18,7 +18,6 @@ libfontfile_la_SOURCES = \ decompress.c \ defaults.c \ dirfile.c \ - ffcheck.c \ fileio.c \ filewr.c \ fontdir.c \ @@ -26,7 +25,6 @@ libfontfile_la_SOURCES = \ fontfile.c \ fontscale.c \ gunzip.c \ - printerfont.c \ register.c \ renderers.c \ catalogue.c diff --git a/libXfont/src/fontfile/Makefile.in b/libXfont/src/fontfile/Makefile.in index dca443eaa..90d04a5a6 100644 --- a/libXfont/src/fontfile/Makefile.in +++ b/libXfont/src/fontfile/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -47,17 +47,16 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libfontfile_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libfontfile_la_SOURCES_DIST = bitsource.c bufio.c decompress.c \ - defaults.c dirfile.c ffcheck.c fileio.c filewr.c fontdir.c \ - fontencc.c fontfile.c fontscale.c gunzip.c printerfont.c \ - register.c renderers.c catalogue.c bunzip2.c + defaults.c dirfile.c fileio.c filewr.c fontdir.c fontencc.c \ + fontfile.c fontscale.c gunzip.c register.c renderers.c \ + catalogue.c bunzip2.c @X_BZIP2_FONT_COMPRESSION_TRUE@am__objects_1 = bunzip2.lo am_libfontfile_la_OBJECTS = bitsource.lo bufio.lo decompress.lo \ - defaults.lo dirfile.lo ffcheck.lo fileio.lo filewr.lo \ - fontdir.lo fontencc.lo fontfile.lo fontscale.lo gunzip.lo \ - printerfont.lo register.lo renderers.lo catalogue.lo \ - $(am__objects_1) + defaults.lo dirfile.lo fileio.lo filewr.lo fontdir.lo \ + fontencc.lo fontfile.lo fontscale.lo gunzip.lo register.lo \ + renderers.lo catalogue.lo $(am__objects_1) libfontfile_la_OBJECTS = $(am_libfontfile_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -88,22 +87,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -113,17 +108,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -133,6 +135,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -146,8 +149,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -180,6 +182,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -192,6 +195,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ FONTENCDIR = @ENCODINGSDIR@ @@ -206,9 +210,9 @@ libfontfile_la_LIBADD = \ $(Z_LIBS) libfontfile_la_SOURCES = bitsource.c bufio.c decompress.c defaults.c \ - dirfile.c ffcheck.c fileio.c filewr.c fontdir.c fontencc.c \ - fontfile.c fontscale.c gunzip.c printerfont.c register.c \ - renderers.c catalogue.c $(am__append_1) + dirfile.c fileio.c filewr.c fontdir.c fontencc.c fontfile.c \ + fontscale.c gunzip.c register.c renderers.c catalogue.c \ + $(am__append_1) all: all-am .SUFFIXES: @@ -217,8 +221,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -267,7 +271,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decompress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defaults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filewr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontdir.Plo@am__quote@ @@ -275,7 +278,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontscale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gunzip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printerfont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/register.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderers.Plo@am__quote@ @@ -311,8 +313,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -324,8 +326,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -335,13 +337,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/fontfile/bitsource.c b/libXfont/src/fontfile/bitsource.c index ae27de8fe..d828ce815 100644 --- a/libXfont/src/fontfile/bitsource.c +++ b/libXfont/src/fontfile/bitsource.c @@ -51,7 +51,7 @@ FontFileRegisterBitmapSource (FontPathElementPtr fpe) if (FontFileBitmapSources.count == FontFileBitmapSources.size) { newsize = FontFileBitmapSources.size + 4; - new = (FontPathElementPtr *) xrealloc (FontFileBitmapSources.fpe, newsize * sizeof *new); + new = realloc (FontFileBitmapSources.fpe, newsize * sizeof *new); if (!new) return FALSE; FontFileBitmapSources.size = newsize; @@ -73,7 +73,7 @@ FontFileUnregisterBitmapSource (FontPathElementPtr fpe) if (FontFileBitmapSources.count == 0) { FontFileBitmapSources.size = 0; - xfree (FontFileBitmapSources.fpe); + free (FontFileBitmapSources.fpe); FontFileBitmapSources.fpe = 0; } else @@ -99,7 +99,7 @@ FontFileEmptyBitmapSource(void) FontFileBitmapSources.count = 0; FontFileBitmapSources.size = 0; - xfree (FontFileBitmapSources.fpe); + free (FontFileBitmapSources.fpe); FontFileBitmapSources.fpe = 0; } diff --git a/libXfont/src/fontfile/bufio.c b/libXfont/src/fontfile/bufio.c index a5746e3bd..dd8d6e282 100644 --- a/libXfont/src/fontfile/bufio.c +++ b/libXfont/src/fontfile/bufio.c @@ -51,7 +51,7 @@ BufFileCreate (char *private, { BufFilePtr f; - f = (BufFilePtr) xalloc (sizeof *f); + f = malloc (sizeof *f); if (!f) return 0; f->private = private; @@ -125,7 +125,7 @@ BufFileRawClose (BufFilePtr f, int doClose) BufFilePtr BufFileOpenRead (int fd) { -#if defined(__UNIXOS2__) || defined (WIN32) +#if defined (WIN32) /* hv: I'd bet WIN32 has the same effect here */ setmode(fd,O_BINARY); #endif @@ -160,7 +160,7 @@ BufFileOpenWrite (int fd) { BufFilePtr f; -#if defined(__UNIXOS2__) || defined(WIN32) +#if defined(WIN32) /* hv: I'd bet WIN32 has the same effect here */ setmode(fd,O_BINARY); #endif @@ -201,6 +201,6 @@ BufFileClose (BufFilePtr f, int doClose) { int ret; ret = (*f->close) (f, doClose); - xfree (f); + free (f); return ret; } diff --git a/libXfont/src/fontfile/bunzip2.c b/libXfont/src/fontfile/bunzip2.c index 9964de6e9..d8b9321e1 100644 --- a/libXfont/src/fontfile/bunzip2.c +++ b/libXfont/src/fontfile/bunzip2.c @@ -54,7 +54,7 @@ BufFilePushBZIP2 (BufFilePtr f) { xzip_buf *x; - x = (xzip_buf *) xalloc (sizeof (xzip_buf)); + x = malloc (sizeof (xzip_buf)); if (!x) return NULL; bzero(&(x->z), sizeof(bz_stream)); @@ -64,7 +64,7 @@ BufFilePushBZIP2 (BufFilePtr f) 0, /* verbosity: 0 silent, 4 max */ 0); /* 0: go faster, 1: use less memory */ if (x->zstat != BZ_OK) { - xfree(x); + free(x); return NULL; } @@ -87,7 +87,7 @@ BufBzip2FileClose(BufFilePtr f, int flag) xzip_buf *x = (xzip_buf *)f->private; BZ2_bzDecompressEnd (&(x->z)); BufFileClose (x->f, flag); - xfree (x); + free (x); return 1; } diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c index d49423617..3a04a754d 100644 --- a/libXfont/src/fontfile/catalogue.c +++ b/libXfont/src/fontfile/catalogue.c @@ -61,8 +61,7 @@ CatalogueAddFPE (CataloguePtr cat, FontPathElementPtr fpe) else cat->fpeAlloc *= 2; - new = xrealloc(cat->fpeList, - cat->fpeAlloc * sizeof(FontPathElementPtr)); + new = realloc(cat->fpeList, cat->fpeAlloc * sizeof(FontPathElementPtr)); if (new == NULL) return AllocError; @@ -115,8 +114,8 @@ CatalogueUnrefFPEs (FontPathElementPtr fpe) if (subfpe->refcount == 0) { FontFileFreeFPE (subfpe); - xfree(subfpe->name); - xfree(subfpe); + free(subfpe->name); + free(subfpe); } } @@ -150,7 +149,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) dir = opendir(path); if (dir == NULL) { - xfree(cat); + free(cat); return BadFontPath; } @@ -180,7 +179,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) len += strlen(attrib); } - subfpe = xalloc(sizeof *subfpe); + subfpe = malloc(sizeof *subfpe); if (subfpe == NULL) continue; @@ -190,10 +189,10 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) * (which uses font->fpe->type) goes to CatalogueCloseFont. */ subfpe->type = fpe->type; subfpe->name_length = len; - subfpe->name = xalloc (len + 1); + subfpe->name = malloc (len + 1); if (subfpe == NULL) { - xfree(subfpe); + free(subfpe); continue; } @@ -207,15 +206,15 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) if (FontFileInitFPE (subfpe) != Successful) { - xfree(subfpe->name); - xfree(subfpe); + free(subfpe->name); + free(subfpe); continue; } if (CatalogueAddFPE(cat, subfpe) != Successful) { FontFileFreeFPE (subfpe); - xfree(subfpe); + free(subfpe); continue; } } @@ -235,7 +234,7 @@ CatalogueInitFPE (FontPathElementPtr fpe) { CataloguePtr cat; - cat = (CataloguePtr) xalloc(sizeof *cat); + cat = malloc(sizeof *cat); if (cat == NULL) return AllocError; @@ -271,8 +270,8 @@ CatalogueFreeFPE (FontPathElementPtr fpe) return FontFileFreeFPE (fpe); CatalogueUnrefFPEs (fpe); - xfree(cat->fpeList); - xfree(cat); + free(cat->fpeList); + free(cat); return Successful; } @@ -356,8 +355,7 @@ CatalogueStartListFonts(pointer client, FontPathElementPtr fpe, CatalogueRescan (fpe, FALSE); - data = (LFWIDataPtr) xalloc (sizeof *data + - sizeof data->privates[0] * cat->fpeCount); + data = malloc (sizeof *data + sizeof data->privates[0] * cat->fpeCount); if (!data) return AllocError; data->privates = (pointer *) (data + 1); @@ -377,7 +375,7 @@ CatalogueStartListFonts(pointer client, FontPathElementPtr fpe, bail: for (j = 0; j < i; j++) /* FIXME: we have no way to free the per-fpe privates. */; - xfree (data); + free (data); return AllocError; } @@ -402,7 +400,7 @@ CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe, if (data->current == cat->fpeCount) { - xfree(data); + free(data); return BadFontName; } @@ -439,7 +437,7 @@ CatalogueListNextFontOrAlias(pointer client, FontPathElementPtr fpe, if (data->current == cat->fpeCount) { - xfree(data); + free(data); return BadFontName; } diff --git a/libXfont/src/fontfile/decompress.c b/libXfont/src/fontfile/decompress.c index a4c546871..cdfb49279 100644 --- a/libXfont/src/fontfile/decompress.c +++ b/libXfont/src/fontfile/decompress.c @@ -162,7 +162,7 @@ BufFilePushCompressed (BufFilePtr f) hsize = hsize_table[maxbits - 12]; extra = (1 << maxbits) * sizeof (char_type) + hsize * sizeof (unsigned short); - file = (CompressedFile *) xalloc (sizeof (CompressedFile) + extra); + file = malloc (sizeof (CompressedFile) + extra); if (!file) return 0; file->file = f; @@ -203,7 +203,7 @@ BufCompressedClose (BufFilePtr f, int doClose) file = (CompressedFile *) f->private; raw = file->file; - xfree (file); + free (file); BufFileClose (raw, doClose); return 1; } diff --git a/libXfont/src/fontfile/dirfile.c b/libXfont/src/fontfile/dirfile.c index 148993896..588464ffb 100644 --- a/libXfont/src/fontfile/dirfile.c +++ b/libXfont/src/fontfile/dirfile.c @@ -66,7 +66,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir) status; struct stat statb; static char format[24] = ""; -#if defined(__UNIXOS2__) || defined(WIN32) +#if defined(WIN32) int i; #endif @@ -76,7 +76,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir) return BadFontPath; /* Check for font directory attributes */ -#if !defined(__UNIXOS2__) && !defined(WIN32) +#if !defined(WIN32) if ((ptr = strchr(directory, ':'))) { #else /* OS/2 and WIN32 path might start with a drive letter, don't clip this */ @@ -118,7 +118,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir) MAXFONTFILENAMELEN-1, MAXFONTNAMELEN-1); while ((count = fscanf(file, format, file_name, font_name)) != EOF) { -#if defined(__UNIXOS2__) || defined(WIN32) +#if defined(WIN32) /* strip any existing trailing CR */ for (i=0; i<strlen(font_name); i++) { if (font_name[i]=='\r') font_name[i] = '\0'; @@ -378,7 +378,7 @@ lexAlias(FILE *file, char **lexToken) char *nbuf; nsize = tokenSize ? (tokenSize << 1) : 64; - nbuf = (char *) xrealloc(tokenBuf, nsize); + nbuf = realloc(tokenBuf, nsize); if (!nbuf) return EALLOC; tokenBuf = nbuf; diff --git a/libXfont/src/fontfile/ffcheck.c b/libXfont/src/fontfile/ffcheck.c deleted file mode 100644 index 70d117e46..000000000 --- a/libXfont/src/fontfile/ffcheck.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $Xorg: ffcheck.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.15tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ -/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/bitmap.h> -#include <X11/fonts/fontmod.h> - -/* - * Map FPE functions to renderer functions - */ - - -/* Here we must check the client to see if it has a context attached to - * it that allows us to access the printer fonts - */ - -static int -FontFileCheckOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font) -{ - if (XpClientIsBitmapClient(client)) - return (FontFileOpenFont (client, fpe, flags, name, namelen, format, - fmask, id, pFont, aliasName, non_cachable_font)); - return BadFontName; -} - -static int -FontFileCheckListFonts (pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, FontNamesPtr names) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListFonts (client, fpe, pat, len, max, names); - return BadFontName; -} - -static int -FontFileCheckStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsBitmapClient(client)) - return FontFileStartListFontsWithInfo(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -FontFileCheckListNextFontWithInfo(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListNextFontWithInfo(client, fpe, namep, namelenp, - pFontInfo, numFonts, private); - return BadFontName; -} - -static int -FontFileCheckStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsBitmapClient(client)) - return FontFileStartListFontsAndAliases(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -FontFileCheckListNextFontOrAlias(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - char **resolvedp, int *resolvedlenp, - pointer private) -{ - if (XpClientIsBitmapClient(client)) - return FontFileListNextFontOrAlias(client, fpe, namep, namelenp, - resolvedp, resolvedlenp, private); - return BadFontName; -} - -/* Font renderers to initialize when not linked into something like - Xorg that provides its own module configuration options */ -static const FontModule builtinFontModuleList[] = { -#ifdef XFONT_SPEEDO - { - SpeedoRegisterFontFileFunctions, - "speedo", - NULL - }, -#endif -#ifdef XFONT_TYPE1 - { - Type1RegisterFontFileFunctions, - "type1", - NULL - }, -#endif -#ifdef XFONT_FREETYPE - { - FreeTypeRegisterFontFileFunctions, - "freetype", - NULL - }, -#endif - /* List terminator - must be last entry */ - { NULL, NULL, NULL } -}; - -void -FontFileCheckRegisterFpeFunctions (void) -{ - const FontModule *fmlist = builtinFontModuleList; - -#ifdef XFONT_BITMAP - /* bitmap is always builtin to libXfont now */ - BitmapRegisterFontFileFunctions (); -#endif - -#ifdef LOADABLEFONTS - if (FontModuleList) { - fmlist = FontModuleList; - } -#endif - - if (fmlist) { - int i; - - for (i = 0; fmlist[i].name; i++) { - if (fmlist[i].initFunc) { - fmlist[i].initFunc(); - } - } - } - - RegisterFPEFunctions(FontFileNameCheck, - FontFileInitFPE, - FontFileFreeFPE, - FontFileResetFPE, - FontFileCheckOpenFont, - FontFileCloseFont, - FontFileCheckListFonts, - FontFileCheckStartListFontsWithInfo, - FontFileCheckListNextFontWithInfo, - NULL, - NULL, - NULL, - FontFileCheckStartListFontsAndAliases, - FontFileCheckListNextFontOrAlias, - FontFileEmptyBitmapSource); -} diff --git a/libXfont/src/fontfile/fileio.c b/libXfont/src/fontfile/fileio.c index 3733148a5..3e2f98a2b 100644 --- a/libXfont/src/fontfile/fileio.c +++ b/libXfont/src/fontfile/fileio.c @@ -57,12 +57,7 @@ FontFileOpen (const char *name) return 0; } len = strlen (name); -#ifndef __UNIXOS2__ if (len > 2 && !strcmp (name + len - 2, ".Z")) { -#else - if (len > 2 && (!strcmp (name + len - 4, ".pcz") || - !strcmp (name + len - 2, ".Z"))) { -#endif cooked = BufFilePushCompressed (raw); if (!cooked) { BufFileClose (raw, TRUE); diff --git a/libXfont/src/fontfile/filewr.c b/libXfont/src/fontfile/filewr.c index d076f166a..f9c53a2be 100644 --- a/libXfont/src/fontfile/filewr.c +++ b/libXfont/src/fontfile/filewr.c @@ -42,7 +42,7 @@ FontFileOpenWrite (const char *name) { int fd; -#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__) +#if defined(WIN32) || defined(__CYGWIN__) fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666); #else fd = creat (name, 0666); diff --git a/libXfont/src/fontfile/fontdir.c b/libXfont/src/fontfile/fontdir.c index 00c751153..8b446a975 100644 --- a/libXfont/src/fontfile/fontdir.c +++ b/libXfont/src/fontfile/fontdir.c @@ -51,7 +51,7 @@ FontFileInitTable (FontTablePtr table, int size) return FALSE; if (size) { - table->entries = (FontEntryPtr) xalloc(sizeof(FontEntryRec) * size); + table->entries = malloc(sizeof(FontEntryRec) * size); if (!table->entries) return FALSE; } @@ -70,32 +70,28 @@ FontFileFreeEntry (FontEntryPtr entry) int i; if (entry->name.name) - xfree(entry->name.name); + free(entry->name.name); entry->name.name = NULL; switch (entry->type) { case FONT_ENTRY_SCALABLE: - xfree (entry->u.scalable.fileName); + free (entry->u.scalable.fileName); extra = entry->u.scalable.extra; for (i = 0; i < extra->numScaled; i++) if (extra->scaled[i].vals.ranges) - xfree (extra->scaled[i].vals.ranges); - xfree (extra->scaled); - xfree (extra); + free (extra->scaled[i].vals.ranges); + free (extra->scaled); + free (extra); break; case FONT_ENTRY_BITMAP: - xfree (entry->u.bitmap.fileName); + free (entry->u.bitmap.fileName); entry->u.bitmap.fileName = NULL; break; case FONT_ENTRY_ALIAS: - xfree (entry->u.alias.resolved); + free (entry->u.alias.resolved); entry->u.alias.resolved = NULL; break; -#ifdef NOTYET - case FONT_ENTRY_BC: - break; -#endif } } @@ -106,7 +102,7 @@ FontFileFreeTable (FontTablePtr table) for (i = 0; i < table->used; i++) FontFileFreeEntry (&table->entries[i]); - xfree (table->entries); + free (table->entries); } FontDirectoryPtr @@ -118,7 +114,7 @@ FontFileMakeDir(char *dirName, int size) char *attrib; int attriblen; -#if !defined(__UNIXOS2__) && !defined(WIN32) +#if !defined(WIN32) attrib = strchr(dirName, ':'); #else /* OS/2 uses the colon in the drive letter descriptor, skip this */ @@ -136,19 +132,19 @@ FontFileMakeDir(char *dirName, int size) if (dirlen) /* leave out slash for builtins */ #endif needslash = 1; - dir = (FontDirectoryPtr) xalloc(sizeof *dir + dirlen + needslash + 1 + - (attriblen ? attriblen + 1 : 0)); + dir = malloc(sizeof *dir + dirlen + needslash + 1 + + (attriblen ? attriblen + 1 : 0)); if (!dir) return (FontDirectoryPtr)0; if (!FontFileInitTable (&dir->scalable, 0)) { - xfree (dir); + free (dir); return (FontDirectoryPtr)0; } if (!FontFileInitTable (&dir->nonScalable, size)) { FontFileFreeTable (&dir->scalable); - xfree (dir); + free (dir); return (FontDirectoryPtr)0; } dir->directory = (char *) (dir + 1); @@ -172,7 +168,7 @@ FontFileFreeDir (FontDirectoryPtr dir) { FontFileFreeTable (&dir->scalable); FontFileFreeTable (&dir->nonScalable); - xfree(dir); + free(dir); } FontEntryPtr @@ -186,8 +182,7 @@ FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype) return (FontEntryPtr) 0; /* "cannot" happen */ if (table->used == table->size) { newsize = table->size + 100; - entry = (FontEntryPtr) xrealloc(table->entries, - newsize * sizeof(FontEntryRec)); + entry = realloc(table->entries, newsize * sizeof(FontEntryRec)); if (!entry) return (FontEntryPtr)0; table->size = newsize; @@ -195,7 +190,7 @@ FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype) } entry = &table->entries[table->used]; *entry = *prototype; - entry->name.name = (char *) xalloc(prototype->name.length + 1); + entry->name.name = malloc(prototype->name.length + 1); if (!entry->name.name) return (FontEntryPtr)0; memcpy (entry->name.name, prototype->name.name, prototype->name.length); @@ -439,7 +434,7 @@ FontFileSaveString (char *s) { char *n; - n = (char *) xalloc (strlen (s) + 1); + n = malloc (strlen (s) + 1); if (!n) return 0; strcpy (n, s); @@ -695,7 +690,7 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) return FALSE; if (!(bitmap = FontFileAddEntry (&dir->nonScalable, &entry))) { - xfree (entry.u.bitmap.fileName); + free (entry.u.bitmap.fileName); return FALSE; } } @@ -723,7 +718,7 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) { existing->u.scalable.extra->defaults = vals; - xfree (existing->u.scalable.fileName); + free (existing->u.scalable.fileName); if (!(existing->u.scalable.fileName = FontFileSaveString (fileName))) return FALSE; } @@ -738,10 +733,10 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) } if (!(entry.u.scalable.fileName = FontFileSaveString (fileName))) return FALSE; - extra = (FontScalableExtraPtr) xalloc (sizeof (FontScalableExtraRec)); + extra = malloc (sizeof (FontScalableExtraRec)); if (!extra) { - xfree (entry.u.scalable.fileName); + free (entry.u.scalable.fileName); return FALSE; } bzero((char *)&extra->defaults, sizeof(extra->defaults)); @@ -791,8 +786,8 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) entry.u.scalable.extra = extra; if (!(scalable = FontFileAddEntry (&dir->scalable, &entry))) { - xfree (extra); - xfree (entry.u.scalable.fileName); + free (extra); + free (entry.u.scalable.fileName); return FALSE; } if (vals.values_supplied & SIZE_SPECIFY_MASK) @@ -826,7 +821,7 @@ FontFileAddFontAlias (FontDirectoryPtr dir, char *aliasName, char *fontName) return FALSE; if (!FontFileAddEntry (&dir->nonScalable, &entry)) { - xfree (entry.u.alias.resolved); + free (entry.u.alias.resolved); return FALSE; } return TRUE; diff --git a/libXfont/src/fontfile/fontfile.c b/libXfont/src/fontfile/fontfile.c index f900f7508..a738c4d34 100644 --- a/libXfont/src/fontfile/fontfile.c +++ b/libXfont/src/fontfile/fontfile.c @@ -36,11 +36,33 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include <X11/fonts/fntfilst.h> +#include <X11/fonts/fntfilst.h> +#include <X11/keysym.h> #ifdef WIN32 #include <ctype.h> #endif +static unsigned char +ISOLatin1ToLower(unsigned char source) +{ + if (source >= XK_A && source <= XK_Z) + return source + (XK_a - XK_A); + if (source >= XK_Agrave && source <= XK_Odiaeresis) + return source + (XK_agrave - XK_Agrave); + if (source >= XK_Ooblique && source <= XK_Thorn) + return source + (XK_oslash - XK_Ooblique); + return source; +} + +_X_HIDDEN void +CopyISOLatin1Lowered(char *dest, char *source, int length) +{ + int i; + for (i = 0; i < length; i++, source++, dest++) + *dest = ISOLatin1ToLower(*source); + *dest = '\0'; +} + /* * Map FPE functions to renderer functions */ @@ -55,7 +77,7 @@ int FontFileNameCheck (char *name) { #ifndef NCD -#if defined(__UNIXOS2__) || defined(WIN32) +#if defined(WIN32) /* OS/2 uses D:/... as a path name for fonts, so accept this as a valid * path if it starts with a letter and a colon. Same applies for WIN32 */ @@ -303,17 +325,6 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, entry->u.alias.resolved, aliasName, &vals); ret = FontNameAlias; break; -#ifdef NOTYET - case FONT_ENTRY_BC: - bc = &entry->u.bc; - entry = bc->entry; - ret = (*scalable->renderer->OpenScalable) - (fpe, pFont, flags, entry, &bc->vals, format, fmask, - non_cachable_font); - if (ret == Successful && *pFont) - (*pFont)->fpe = fpe; - break; -#endif default: ret = BadFontName; } @@ -325,7 +336,7 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, if (ret != BadFontName) { - if (ranges) xfree(ranges); + if (ranges) free(ranges); return ret; } @@ -476,7 +487,7 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, ret = BadFontName; if (ranges) - xfree(ranges); + free(ranges); return ret; } @@ -730,7 +741,7 @@ _FontFileListFonts (pointer client, FontPathElementPtr fpe, scaleNames = MakeFontNamesRecord (0); if (!scaleNames) { - if (ranges) xfree(ranges); + if (ranges) free(ranges); return AllocError; } FontFileFindNamesInScalableDir (&dir->scalable, &zeroName, max, @@ -747,7 +758,7 @@ _FontFileListFonts (pointer client, FontPathElementPtr fpe, scaleNames = MakeFontNamesRecord (0); if (!scaleNames) { - if (ranges) xfree(ranges); + if (ranges) free(ranges); return AllocError; } FontFileFindNamesInScalableDir (&dir->nonScalable, &zeroName, @@ -760,7 +771,7 @@ _FontFileListFonts (pointer client, FontPathElementPtr fpe, &max); FreeFontNames (scaleNames); - if (ranges) xfree(ranges); + if (ranges) free(ranges); } else { @@ -802,13 +813,13 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe, LFWIDataPtr data; int ret; - data = (LFWIDataPtr) xalloc (sizeof *data); + data = malloc (sizeof *data); if (!data) return AllocError; data->names = MakeFontNamesRecord (0); if (!data->names) { - xfree (data); + free (data); return AllocError; } ret = _FontFileListFonts (client, fpe, pat, len, @@ -816,7 +827,7 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe, if (ret != Successful) { FreeFontNames (data->names); - xfree (data); + free (data); return ret; } data->current = 0; @@ -900,23 +911,6 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, *namelenp = strlen (*namep); ret = FontNameAlias; break; -#ifdef NOTYET - case FONT_ENTRY_BC: - /* no LFWI for this yet */ - bc = &entry->u.bc; - entry = bc->entry; - /* Make a new scaled instance */ - if (strlen(dir->directory) + strlen(scalable->fileName) >= - sizeof(fileName)) { - ret = BadFontName; - } else { - strcpy (fileName, dir->directory); - strcat (fileName, scalable->fileName); - ret = (*scalable->renderer->GetInfoScalable) - (fpe, *pFontInfo, entry, tmpName, fileName, &bc->vals); - } - break; -#endif default: ret = BadFontName; } @@ -928,7 +922,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, if (ret != BadFontName) { - if (ranges) xfree(ranges); + if (ranges) free(ranges); return ret; } @@ -1004,11 +998,6 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, } else { -#ifdef NOTDEF - /* no special case yet */ - ret = FontFileMatchBitmapSource (fpe, pFont, flags, entry, &vals, format, fmask, noSpecificSize); - if (ret != Successful) -#endif { char origName[MAXFONTNAMELEN]; @@ -1034,7 +1023,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, (fpe, *pFontInfo, entry, fileName); } if (ranges) { - xfree(ranges); + free(ranges); ranges = NULL; } } @@ -1048,7 +1037,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, ret = BadFontName; if (ranges) - xfree(ranges); + free(ranges); return ret; } @@ -1066,7 +1055,7 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe, if (data->current == data->names->nnames) { FreeFontNames (data->names); - xfree (data); + free (data); return BadFontName; } name = data->names->names[data->current]; @@ -1102,7 +1091,7 @@ FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe, if (data->current == data->names->nnames) { FreeFontNames (data->names); - xfree (data); + free (data); return BadFontName; } name = data->names->names[data->current]; diff --git a/libXfont/src/fontfile/fontscale.c b/libXfont/src/fontfile/fontscale.c index 8e9de513d..8002dde81 100644 --- a/libXfont/src/fontfile/fontscale.c +++ b/libXfont/src/fontfile/fontscale.c @@ -35,13 +35,7 @@ in this Software without prior written authorization from The Open Group. #include <config.h> #endif #include <X11/fonts/fntfilst.h> -#ifdef _XOPEN_SOURCE #include <math.h> -#else -#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ -#include <math.h> -#undef _XOPEN_SOURCE -#endif Bool FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals, @@ -57,8 +51,7 @@ FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals, if (extra->numScaled == extra->sizeScaled) { newsize = extra->sizeScaled + 4; - new = (FontScaledPtr) xrealloc (extra->scaled, - newsize * sizeof (FontScaledRec)); + new = realloc (extra->scaled, newsize * sizeof (FontScaledRec)); if (!new) return FALSE; extra->sizeScaled = newsize; @@ -113,7 +106,7 @@ FontFileRemoveScaledInstance (FontEntryPtr entry, FontPtr pFont) if (extra->scaled[i].pFont == pFont) { if (extra->scaled[i].vals.ranges) - xfree (extra->scaled[i].vals.ranges); + free (extra->scaled[i].vals.ranges); extra->numScaled--; for (; i < extra->numScaled; i++) extra->scaled[i] = extra->scaled[i+1]; diff --git a/libXfont/src/fontfile/gunzip.c b/libXfont/src/fontfile/gunzip.c index 8c9c317aa..6cf192bb8 100644 --- a/libXfont/src/fontfile/gunzip.c +++ b/libXfont/src/fontfile/gunzip.c @@ -29,7 +29,7 @@ BufFilePushZIP (BufFilePtr f) { xzip_buf *x; - x = (xzip_buf *) xalloc (sizeof (xzip_buf)); + x = malloc (sizeof (xzip_buf)); if (!x) return 0; /* these are just for raw calloc/free */ x->z.zalloc = Z_NULL; @@ -46,7 +46,7 @@ BufFilePushZIP (BufFilePtr f) zlib header checking [undocumented, for gzip compatibility only?] */ x->zstat = inflateInit2(&(x->z), -MAX_WBITS); if (x->zstat != Z_OK) { - xfree(x); + free(x); return 0; } @@ -57,7 +57,7 @@ BufFilePushZIP (BufFilePtr f) x->z.avail_in = 0; if (BufCheckZipHeader(x->f)) { - xfree(x); + free(x); return 0; } @@ -74,7 +74,7 @@ BufZipFileClose(BufFilePtr f, int flag) xzip_buf *x = (xzip_buf *)f->private; inflateEnd (&(x->z)); BufFileClose (x->f, flag); - xfree (x); + free (x); return 1; } diff --git a/libXfont/src/fontfile/printerfont.c b/libXfont/src/fontfile/printerfont.c deleted file mode 100644 index 0b6c19c62..000000000 --- a/libXfont/src/fontfile/printerfont.c +++ /dev/null @@ -1,178 +0,0 @@ -/* $Xorg: printerfont.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - -/* - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.5tsi Exp $ */ - -/* - * Author: Keith Packard, MIT X Consortium - */ -/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/fonts/fntfilst.h> - -/* - * Map FPE functions to renderer functions - */ - -#define PRINTERPATHPREFIX "PRINTER:" - -/* STUB -int XpClientIsPrintClient(client,fpe) -pointer client; -FontPathElementPtr fpe; -{ return 1; } - */ - -static int -PrinterFontNameCheck (char *name) -{ - if (strncmp(name,PRINTERPATHPREFIX,strlen(PRINTERPATHPREFIX)) != 0) - return 0; - name += strlen(PRINTERPATHPREFIX); -#ifndef NCD - return *name == '/'; -#else - return ((strcmp(name, "built-ins") == 0) || (*name == '/')); -#endif -} - -static int -PrinterFontInitFPE (FontPathElementPtr fpe) -{ - int status; - FontDirectoryPtr dir; - char * name; - - name = fpe->name + strlen(PRINTERPATHPREFIX); - status = FontFileReadDirectory (name, &dir); - if (status == Successful) - { - if (dir->nonScalable.used > 0) - if (!FontFileRegisterBitmapSource (fpe)) - { - FontFileFreeFPE (fpe); - return AllocError; - } - fpe->private = (pointer) dir; - } - return status; -} - -/* Here we must check the client to see if it has a context attached to - * it that allows us to access the printer fonts - */ - -static int -PrinterFontOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, - char *name, int namelen, - fsBitmapFormat format, fsBitmapFormatMask fmask, - XID id, FontPtr *pFont, char **aliasName, - FontPtr non_cachable_font) -{ - if (XpClientIsPrintClient(client,fpe)) - return (FontFileOpenFont (client, fpe, flags, name, namelen, format, - fmask, id, pFont, aliasName, non_cachable_font)); - return BadFontName; -} - -static int -PrinterFontListFonts (pointer client, FontPathElementPtr fpe, char *pat, - int len, int max, FontNamesPtr names) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListFonts (client, fpe, pat, len, max, names); - return BadFontName; -} - -static int -PrinterFontStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileStartListFontsWithInfo(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -PrinterFontListNextFontWithInfo(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - FontInfoPtr *pFontInfo, - int *numFonts, pointer private) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListNextFontWithInfo(client, fpe, namep, namelenp, - pFontInfo, numFonts, private); - return BadFontName; -} - -static int -PrinterFontStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, - pointer *privatep) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileStartListFontsAndAliases(client, fpe, pat, len, - max, privatep); - return BadFontName; -} - -static int -PrinterFontListNextFontOrAlias(pointer client, FontPathElementPtr fpe, - char **namep, int *namelenp, - char **resolvedp, int *resolvedlenp, - pointer private) -{ - if (XpClientIsPrintClient(client,fpe)) - return FontFileListNextFontOrAlias(client, fpe, namep, namelenp, - resolvedp, resolvedlenp, private); - return BadFontName; -} - -void -PrinterFontRegisterFpeFunctions (void) -{ - RegisterFPEFunctions(PrinterFontNameCheck, - PrinterFontInitFPE, - FontFileFreeFPE, - FontFileResetFPE, - PrinterFontOpenFont, - FontFileCloseFont, - PrinterFontListFonts, - PrinterFontStartListFontsWithInfo, - PrinterFontListNextFontWithInfo, - NULL, - NULL, - NULL, - PrinterFontStartListFontsAndAliases, - PrinterFontListNextFontOrAlias, - FontFileEmptyBitmapSource); -} diff --git a/libXfont/src/fontfile/register.c b/libXfont/src/fontfile/register.c index 5b70df76a..1a63cb331 100644 --- a/libXfont/src/fontfile/register.c +++ b/libXfont/src/fontfile/register.c @@ -1,5 +1,3 @@ -/* $Xorg: register.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - /* Copyright 1994, 1998 The Open Group @@ -25,13 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/register.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ - -/* - * This is in a separate source file so that small programs - * such as mkfontdir that want to use the fontfile utilities don't - * end up dragging in code from all the renderers, which is not small. - */ #ifdef HAVE_CONFIG_H #include <config.h> @@ -42,7 +33,6 @@ in this Software without prior written authorization from The Open Group. #include <X11/fonts/fontmisc.h> #include <X11/fonts/fntfilst.h> #include <X11/fonts/bitmap.h> -#include <X11/fonts/fontmod.h> /* * Translate monolithic build symbols to modular build symbols. @@ -51,72 +41,20 @@ in this Software without prior written authorization from The Open Group. * with other packages. */ -#ifndef CRAY -# ifdef BUILD_SPEEDO -# define XFONT_SPEEDO 1 -# endif -# ifdef BUILD_TYPE1 -# define XFONT_TYPE1 1 -# endif -#endif - #ifdef BUILD_FREETYPE # define XFONT_FREETYPE 1 #endif -/* Font renderers to initialize when not linked into something like - Xorg that provides its own module configuration options */ -static const FontModule builtinFontModuleList[] = { -#ifdef XFONT_SPEEDO - { - SpeedoRegisterFontFileFunctions, - "speedo", - NULL - }, -#endif -#ifdef XFONT_TYPE1 - { - Type1RegisterFontFileFunctions, - "type1", - NULL - }, -#endif -#ifdef XFONT_FREETYPE - { - FreeTypeRegisterFontFileFunctions, - "freetype", - NULL - }, -#endif - /* List terminator - must be last entry */ - { NULL, NULL, NULL } -}; - void FontFileRegisterFpeFunctions(void) { - const FontModule *fmlist = builtinFontModuleList; - #ifdef XFONT_BITMAP /* bitmap is always builtin to libXfont now */ BitmapRegisterFontFileFunctions (); #endif - -#ifdef LOADABLEFONTS - if (FontModuleList) { - fmlist = FontModuleList; - } -#endif - - if (fmlist) { - int i; - - for (i = 0; fmlist[i].name; i++) { - if (fmlist[i].initFunc) { - fmlist[i].initFunc(); - } - } - } +#ifdef XFONT_FREETYPE + FreeTypeRegisterFontFileFunctions(); +#endif FontFileRegisterLocalFpeFunctions (); CatalogueRegisterLocalFpeFunctions (); diff --git a/libXfont/src/fontfile/renderers.c b/libXfont/src/fontfile/renderers.c index f110ba817..bf82c1c1e 100644 --- a/libXfont/src/fontfile/renderers.c +++ b/libXfont/src/fontfile/renderers.c @@ -1,5 +1,3 @@ -/* $Xorg: renderers.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ - /* Copyright 1991, 1998 The Open Group @@ -62,13 +60,13 @@ FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority) rendererGeneration = serverGeneration; renderers.number = 0; if (renderers.renderers) - xfree(renderers.renderers); + free(renderers.renderers); renderers.renderers = NULL; } for (i = 0; i < renderers.number; i++) { - if (!strcmp (renderers.renderers[i].renderer->fileSuffix, - renderer->fileSuffix)) { + if (!strcasecmp (renderers.renderers[i].renderer->fileSuffix, + renderer->fileSuffix)) { if(renderers.renderers[i].priority >= priority) { if(renderers.renderers[i].priority == priority) { if (rendererGeneration == 1) @@ -84,7 +82,7 @@ FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority) } if(i >= renderers.number) { - new = xrealloc (renderers.renderers, sizeof(*new) * (i + 1)); + new = realloc (renderers.renderers, sizeof(*new) * (i + 1)); if (!new) return FALSE; renderers.renderers = new; @@ -108,7 +106,7 @@ FontFileMatchRenderer (char *fileName) { r = renderers.renderers[i].renderer; if (fileLen >= r->fileSuffixLen && - !strcmp (fileName + fileLen - r->fileSuffixLen, r->fileSuffix)) + !strcasecmp (fileName + fileLen - r->fileSuffixLen, r->fileSuffix)) { return r; } diff --git a/libXfont/src/stubs/Makefile.am b/libXfont/src/stubs/Makefile.am index 963470f52..4d60c2a58 100644 --- a/libXfont/src/stubs/Makefile.am +++ b/libXfont/src/stubs/Makefile.am @@ -12,7 +12,6 @@ libstubs_la_SOURCES = \ errorf.c \ fatalerror.c \ findoldfnt.c \ - fontmod.c \ getcres.c \ getdefptsize.c \ getnewfntcid.c \ @@ -23,5 +22,4 @@ libstubs_la_SOURCES = \ servclient.c \ setfntauth.c \ stfntcfnt.c \ - stubs.h \ - xpstubs.c + stubs.h diff --git a/libXfont/src/stubs/Makefile.in b/libXfont/src/stubs/Makefile.in index 53363bb45..e67e12003 100644 --- a/libXfont/src/stubs/Makefile.in +++ b/libXfont/src/stubs/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -45,12 +45,11 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libstubs_la_LIBADD = am_libstubs_la_OBJECTS = cauthgen.lo csignal.lo delfntcid.lo errorf.lo \ - fatalerror.lo findoldfnt.lo fontmod.lo getcres.lo \ - getdefptsize.lo getnewfntcid.lo gettime.lo initfshdl.lo \ - regfpefunc.lo rmfshdl.lo servclient.lo setfntauth.lo \ - stfntcfnt.lo xpstubs.lo + fatalerror.lo findoldfnt.lo getcres.lo getdefptsize.lo \ + getnewfntcid.lo gettime.lo initfshdl.lo regfpefunc.lo \ + rmfshdl.lo servclient.lo setfntauth.lo stfntcfnt.lo libstubs_la_OBJECTS = $(am_libstubs_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -81,22 +80,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -106,17 +101,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -126,6 +128,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -139,8 +142,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -173,6 +175,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -185,6 +188,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -199,7 +203,6 @@ libstubs_la_SOURCES = \ errorf.c \ fatalerror.c \ findoldfnt.c \ - fontmod.c \ getcres.c \ getdefptsize.c \ getnewfntcid.c \ @@ -210,8 +213,7 @@ libstubs_la_SOURCES = \ servclient.c \ setfntauth.c \ stfntcfnt.c \ - stubs.h \ - xpstubs.c + stubs.h all: all-am @@ -221,8 +223,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -270,7 +272,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errorf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatalerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findoldfnt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcres.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdefptsize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getnewfntcid.Plo@am__quote@ @@ -281,7 +282,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/servclient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfntauth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stfntcfnt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpstubs.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -315,8 +315,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -328,8 +328,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -339,13 +339,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/stubs/fontmod.c b/libXfont/src/stubs/fontmod.c deleted file mode 100644 index 5a0bd0e9d..000000000 --- a/libXfont/src/stubs/fontmod.c +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef LOADABLEFONTS -#include "stubs.h" -#include <X11/fonts/fontmod.h> - -#ifdef __SUNPRO_C -#pragma weak FontModuleList -#endif - -weak FontModule *FontModuleList; -#endif /* LOADABLEFONTS */ diff --git a/libXfont/src/stubs/xpstubs.c b/libXfont/src/stubs/xpstubs.c deleted file mode 100644 index 939b34f21..000000000 --- a/libXfont/src/stubs/xpstubs.c +++ /dev/null @@ -1,21 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "stubs.h" - -#ifdef __SUNPRO_C -#pragma weak XpClientIsBitmapClient -#pragma weak XpClientIsPrintClient -#endif - -weak Bool -XpClientIsBitmapClient(ClientPtr client) -{ - return True; -} - -weak Bool -XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe) -{ - return False; -} diff --git a/libXfont/src/util/Makefile.in b/libXfont/src/util/Makefile.in index a86e54064..63b966b12 100644 --- a/libXfont/src/util/Makefile.in +++ b/libXfont/src/util/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 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, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 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. @@ -48,7 +48,7 @@ am_libutil_la_OBJECTS = atom.lo fontaccel.lo fontnames.lo fontutil.lo \ fontxlfd.lo format.lo miscutil.lo patcache.lo private.lo \ utilbitmap.lo libutil_la_OBJECTS = $(am_libutil_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -79,22 +79,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENCODINGSDIR = @ENCODINGSDIR@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ @@ -104,17 +100,24 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATH_LIBS = @MATH_LIBS@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -124,6 +127,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -137,8 +141,7 @@ 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_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -171,6 +174,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -183,6 +187,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ @@ -211,8 +216,8 @@ $(srcdir)/Makefile.in: $(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; \ @@ -297,8 +302,8 @@ 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -310,8 +315,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(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) \ @@ -321,13 +326,12 @@ ctags: CTAGS CTAGS: $(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; } \ - END { for (i in files) print i; }'`; \ + $(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 diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c index b770dc9de..bfb05ccbd 100644 --- a/libXfont/src/util/atom.c +++ b/libXfont/src/util/atom.c @@ -84,14 +84,13 @@ ResizeHashTable (void) newHashSize = 1024; else newHashSize = hashSize * 2; - newHashTable = (AtomListPtr *) xalloc (newHashSize * sizeof (AtomListPtr)); + newHashTable = calloc (newHashSize, sizeof (AtomListPtr)); if (!newHashTable) { fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate" " newHashTable (%ld)\n", newHashSize * (unsigned long)sizeof (AtomListPtr)); return FALSE; } - bzero ((char *) newHashTable, newHashSize * sizeof (AtomListPtr)); newHashMask = newHashSize - 1; newRehash = (newHashMask - 2); for (i = 0; i < hashSize; i++) @@ -111,7 +110,7 @@ ResizeHashTable (void) newHashTable[h] = hashTable[i]; } } - xfree (hashTable); + free (hashTable); hashTable = newHashTable; hashSize = newHashSize; hashMask = newHashMask; @@ -127,7 +126,7 @@ ResizeReverseMap (void) reverseMapSize = 1000; else reverseMapSize *= 2; - reverseMap = (AtomListPtr *) xrealloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); + reverseMap = realloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); if (!reverseMap) { fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate" " reverseMap (%ld)\n", @@ -187,7 +186,7 @@ MakeAtom(char *string, unsigned len, int makeit) } if (!makeit) return None; - a = (AtomListPtr) xalloc (sizeof (AtomListRec) + len + 1); + a = malloc (sizeof (AtomListRec) + len + 1); if (a == NULL) { fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec" " (%ld)\n", (unsigned long)sizeof (AtomListRec) + len + 1); diff --git a/libXfont/src/util/fontnames.c b/libXfont/src/util/fontnames.c index 2d3a51752..d03cea773 100644 --- a/libXfont/src/util/fontnames.c +++ b/libXfont/src/util/fontnames.c @@ -49,11 +49,11 @@ FreeFontNames(FontNamesPtr pFN) if (!pFN) return; for (i = 0; i < pFN->nnames; i++) { - xfree(pFN->names[i]); + free(pFN->names[i]); } - xfree(pFN->names); - xfree(pFN->length); - xfree(pFN); + free(pFN->names); + free(pFN->length); + free(pFN); } FontNamesPtr @@ -61,18 +61,18 @@ MakeFontNamesRecord(unsigned int size) { FontNamesPtr pFN; - pFN = (FontNamesPtr) xalloc(sizeof(FontNamesRec)); + pFN = malloc(sizeof(FontNamesRec)); if (pFN) { pFN->nnames = 0; pFN->size = size; if (size) { - pFN->length = (int *) xalloc(size * sizeof(int)); - pFN->names = (char **) xalloc(size * sizeof(char *)); + pFN->length = malloc(size * sizeof(int)); + pFN->names = malloc(size * sizeof(char *)); if (!pFN->length || !pFN->names) { - xfree(pFN->length); - xfree(pFN->names); - xfree(pFN); + free(pFN->length); + free(pFN->names); + free(pFN); pFN = (FontNamesPtr) 0; } } @@ -91,7 +91,7 @@ AddFontNamesName(FontNamesPtr names, char *name, int length) int index = names->nnames; char *nelt; - nelt = (char *) xalloc(length + 1); + nelt = malloc(length + 1); if (!nelt) return AllocError; if (index >= names->size) { @@ -101,16 +101,16 @@ AddFontNamesName(FontNamesPtr names, char *name, int length) if (size == 0) size = 8; - nlength = (int *) xrealloc(names->length, size * sizeof(int)); - nnames = (char **) xrealloc(names->names, size * sizeof(char *)); + nlength = realloc(names->length, size * sizeof(int)); + nnames = realloc(names->names, size * sizeof(char *)); if (nlength && nnames) { names->size = size; names->length = nlength; names->names = nnames; } else { - xfree(nelt); - xfree(nlength); - xfree(nnames); + free(nelt); + free(nlength); + free(nnames); return AllocError; } } diff --git a/libXfont/src/util/fontutil.c b/libXfont/src/util/fontutil.c index 05fe5c2f2..aa89ce01a 100644 --- a/libXfont/src/util/fontutil.c +++ b/libXfont/src/util/fontutil.c @@ -149,7 +149,7 @@ QueryTextExtents(FontPtr pFont, unsigned char defc[2]; int firstReal; - charinfo = (xCharInfo **) xalloc(count * sizeof(xCharInfo *)); + charinfo = malloc(count * sizeof(xCharInfo *)); if (!charinfo) return FALSE; encoding = TwoD16Bit; @@ -188,7 +188,7 @@ QueryTextExtents(FontPtr pFont, QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal, n - firstReal, info); pFont->info.constantMetrics = cm; - xfree(charinfo); + free(charinfo); return TRUE; } @@ -315,15 +315,13 @@ add_range(fsRange *newrange, /* Grow the list if necessary */ if (*nranges == 0 || *range == (fsRange *)0) { - *range = (fsRange *)xalloc(range_alloc_granularity * - SIZEOF(fsRange)); + *range = malloc(range_alloc_granularity * SIZEOF(fsRange)); *nranges = 0; } else if (!(*nranges % range_alloc_granularity)) { - *range = (fsRange *)xrealloc((char *)*range, - (*nranges + range_alloc_granularity) * - SIZEOF(fsRange)); + *range = realloc(*range, (*nranges + range_alloc_granularity) * + SIZEOF(fsRange)); } /* If alloc failed, just return a null list */ @@ -413,31 +411,3 @@ add_range(fsRange *newrange, return Successful; } - -/* It is difficult to find a good place for this. */ -#ifdef NEED_STRCASECMP -int -f_strcasecmp(const char *s1, const char *s2) -{ - char c1, c2; - - if (*s1 == 0) - if (*s2 == 0) - return 0; - else - return 1; - - c1 = (isupper (*s1) ? tolower (*s1) : *s1); - c2 = (isupper (*s2) ? tolower (*s2) : *s2); - while (c1 == c2) { - if (c1 == '\0') - return 0; - s1++; - s2++; - c1 = (isupper (*s1) ? tolower (*s1) : *s1); - c2 = (isupper (*s2) ? tolower (*s2) : *s2); - } - return c1 - c2; -} -#endif - diff --git a/libXfont/src/util/fontxlfd.c b/libXfont/src/util/fontxlfd.c index 7adf74f4c..462554006 100644 --- a/libXfont/src/util/fontxlfd.c +++ b/libXfont/src/util/fontxlfd.c @@ -202,7 +202,6 @@ xlfd_round_double(double x) defined(__hppa__) || \ defined(__amd64__) || defined(__amd64) || \ defined(sgi) -#if !defined(__UNIXOS2__) #include <float.h> /* if we have IEEE 754 fp, we can round to binary digits... */ @@ -263,7 +262,6 @@ xlfd_round_double(double x) } else #endif -#endif /* !__UNIXOS2__ */ #endif /* i386 || __i386__ */ { /* diff --git a/libXfont/src/util/miscutil.c b/libXfont/src/util/miscutil.c index c44527a29..345927515 100644 --- a/libXfont/src/util/miscutil.c +++ b/libXfont/src/util/miscutil.c @@ -43,66 +43,12 @@ from The Open Group. #ifdef __SUNPRO_C #pragma weak serverGeneration -#pragma weak Xalloc -#pragma weak Xrealloc -#pragma weak Xfree -#pragma weak Xcalloc -#pragma weak CopyISOLatin1Lowered #pragma weak register_fpe_functions #endif /* make sure everything initializes themselves at least once */ weak long serverGeneration = 1; -weak void * -Xalloc (unsigned long m) -{ - return malloc (m); -} - -weak void * -Xrealloc (void *n, unsigned long m) -{ - if (!n) - return malloc (m); - else - return realloc (n, m); -} - -weak void -Xfree (void *n) -{ - if (n) - free (n); -} - -weak void * -Xcalloc (unsigned long n) -{ - return calloc (n, 1); -} - -weak void -CopyISOLatin1Lowered (char *dst, char *src, int len) -{ - register unsigned char *dest, *source; - - for (dest = (unsigned char *)dst, source = (unsigned char *)src; - *source && len > 0; - source++, dest++, len--) - { - if ((*source >= XK_A) && (*source <= XK_Z)) - *dest = *source + (XK_a - XK_A); - else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis)) - *dest = *source + (XK_agrave - XK_Agrave); - else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn)) - *dest = *source + (XK_oslash - XK_Ooblique); - else - *dest = *source; - } - *dest = '\0'; -} - weak void register_fpe_functions (void) { diff --git a/libXfont/src/util/patcache.c b/libXfont/src/util/patcache.c index 0351b1ac2..5411810d6 100644 --- a/libXfont/src/util/patcache.c +++ b/libXfont/src/util/patcache.c @@ -77,7 +77,7 @@ EmptyFontPatternCache (FontPatternCachePtr cache) cache->entries[i].next = &cache->entries[i+1]; cache->entries[i].prev = 0; cache->entries[i].pFont = 0; - xfree (cache->entries[i].pattern); + free (cache->entries[i].pattern); cache->entries[i].pattern = 0; cache->entries[i].patlen = 0; } @@ -91,7 +91,7 @@ MakeFontPatternCache (void) { FontPatternCachePtr cache; int i; - cache = (FontPatternCachePtr) xalloc (sizeof *cache); + cache = malloc (sizeof *cache); if (!cache) return 0; for (i = 0; i < NENTRIES; i++) { @@ -110,8 +110,8 @@ FreeFontPatternCache (FontPatternCachePtr cache) int i; for (i = 0; i < NENTRIES; i++) - xfree (cache->entries[i].pattern); - xfree (cache); + free (cache->entries[i].pattern); + free (cache); } /* compute id for string */ @@ -139,7 +139,7 @@ CacheFontPattern (FontPatternCachePtr cache, char *newpat; int i; - newpat = (char *) xalloc (patlen); + newpat = malloc (patlen); if (!newpat) return; if (cache->free) @@ -157,7 +157,7 @@ CacheFontPattern (FontPatternCachePtr cache, if (e->next) e->next->prev = e->prev; *e->prev = e->next; - xfree (e->pattern); + free (e->pattern); } /* set pattern */ memcpy (newpat, pattern, patlen); @@ -214,7 +214,7 @@ RemoveCachedFontPattern (FontPatternCachePtr cache, *e->prev = e->next; e->next = cache->free; cache->free = e; - xfree (e->pattern); + free (e->pattern); e->pattern = 0; } } diff --git a/libXfont/src/util/private.c b/libXfont/src/util/private.c index 85e90e57b..6b760b4c3 100644 --- a/libXfont/src/util/private.c +++ b/libXfont/src/util/private.c @@ -53,7 +53,7 @@ CreateFontRec (void) size = sizeof(FontRec) + (sizeof(pointer) * _FontPrivateAllocateIndex); - pFont = (FontPtr)xalloc(size); + pFont = malloc(size); if(pFont) { bzero((char*)pFont, size); @@ -69,8 +69,8 @@ void DestroyFontRec (FontPtr pFont) { if (pFont->devPrivates && pFont->devPrivates != (pointer)(&pFont[1])) - xfree(pFont->devPrivates); - xfree(pFont); + free(pFont->devPrivates); + free(pFont); } void @@ -86,11 +86,12 @@ _FontSetNewPrivate (FontPtr pFont, int n, pointer ptr) if (n > pFont->maxPrivate) { if (pFont->devPrivates && pFont->devPrivates != (pointer)(&pFont[1])) { - new = (pointer *) xrealloc (pFont->devPrivates, (n + 1) * sizeof (pointer)); + new = realloc (pFont->devPrivates, (n + 1) * sizeof (pointer)); if (!new) return FALSE; } else { - new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); + /* omg realloc */ + new = malloc ((n + 1) * sizeof (pointer)); if (!new) return FALSE; if (pFont->devPrivates) diff --git a/libXfont/src/util/utilbitmap.c b/libXfont/src/util/utilbitmap.c index a817a4ec6..978db89c8 100644 --- a/libXfont/src/util/utilbitmap.c +++ b/libXfont/src/util/utilbitmap.c @@ -1,5 +1,3 @@ -/* $Xorg: utilbitmap.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ - /* Copyright 1990, 1994, 1998 The Open Group @@ -38,7 +36,7 @@ in this Software without prior written authorization from The Open Group. /* Utility functions for reformating font bitmaps */ -static unsigned char _reverse_byte[0x100] = { +static const unsigned char _reverse_byte[0x100] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, @@ -79,7 +77,7 @@ static unsigned char _reverse_byte[0x100] = { void BitOrderInvert(unsigned char *buf, int nbytes) { - unsigned char *rev = _reverse_byte; + const unsigned char *rev = _reverse_byte; for (; --nbytes >= 0; buf++) *buf = rev[*buf]; |