aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/embryo
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/embryo')
-rw-r--r--libraries/embryo/ABOUT-NLS0
-rw-r--r--libraries/embryo/AUTHORS2
-rw-r--r--libraries/embryo/COPYING47
-rw-r--r--libraries/embryo/ChangeLog29
-rw-r--r--libraries/embryo/INSTALL236
-rw-r--r--libraries/embryo/Makefile.am44
-rw-r--r--libraries/embryo/Makefile.in849
-rw-r--r--libraries/embryo/NEWS13
-rw-r--r--libraries/embryo/README90
-rw-r--r--libraries/embryo/aclocal.m41182
-rwxr-xr-xlibraries/embryo/autogen.sh38
-rwxr-xr-xlibraries/embryo/compile143
-rwxr-xr-xlibraries/embryo/config.guess1502
-rw-r--r--libraries/embryo/config.h.in151
-rwxr-xr-xlibraries/embryo/config.sub1714
-rwxr-xr-xlibraries/embryo/configure15960
-rw-r--r--libraries/embryo/configure.ac222
-rwxr-xr-xlibraries/embryo/depcomp630
-rw-r--r--libraries/embryo/doc/Doxyfile139
-rw-r--r--libraries/embryo/doc/Doxyfile.in139
-rw-r--r--libraries/embryo/doc/Makefile.am33
-rw-r--r--libraries/embryo/doc/Makefile.in419
-rw-r--r--libraries/embryo/doc/e.css436
-rw-r--r--libraries/embryo/doc/embryo.dox.in0
-rw-r--r--libraries/embryo/doc/foot.html19
-rw-r--r--libraries/embryo/doc/head.html66
-rw-r--r--libraries/embryo/doc/img/e.pngbin3825 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/e_big.pngbin30052 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/edoxy.css966
-rw-r--r--libraries/embryo/doc/img/foot_bg.pngbin173 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/head_bg.pngbin214 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/hilite.pngbin6127 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/menu_bg.pngbin192 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/menu_bg_current.pngbin1200 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/menu_bg_hover.pngbin3278 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/menu_bg_last.pngbin637 -> 0 bytes
-rw-r--r--libraries/embryo/doc/img/menu_bg_unsel.pngbin1596 -> 0 bytes
-rw-r--r--libraries/embryo/embryo.pc.in15
-rw-r--r--libraries/embryo/embryo.spec77
-rw-r--r--libraries/embryo/embryo.spec.in77
-rw-r--r--libraries/embryo/include/Makefile.am7
-rw-r--r--libraries/embryo/include/Makefile.in442
-rw-r--r--libraries/embryo/include/default.inc213
-rwxr-xr-xlibraries/embryo/install-sh520
-rwxr-xr-xlibraries/embryo/ltmain.sh8413
-rw-r--r--libraries/embryo/m4/ac_attribute.m447
-rw-r--r--libraries/embryo/m4/efl_binary.m444
-rw-r--r--libraries/embryo/m4/efl_doxygen.m497
-rw-r--r--libraries/embryo/m4/efl_fnmatch.m431
-rw-r--r--libraries/embryo/m4/efl_gettimeofday.m448
-rw-r--r--libraries/embryo/m4/efl_path_max.m436
-rw-r--r--libraries/embryo/m4/libtool.m47377
-rw-r--r--libraries/embryo/m4/ltoptions.m4368
-rw-r--r--libraries/embryo/m4/ltsugar.m4123
-rw-r--r--libraries/embryo/m4/ltversion.m423
-rw-r--r--libraries/embryo/m4/lt~obsolete.m492
-rwxr-xr-xlibraries/embryo/missing376
-rw-r--r--libraries/embryo/sha1-for-source.txt1
-rw-r--r--libraries/embryo/src/Makefile.am3
-rw-r--r--libraries/embryo/src/Makefile.in592
-rw-r--r--libraries/embryo/src/bin/Makefile.am40
-rw-r--r--libraries/embryo/src/bin/Makefile.in790
-rw-r--r--libraries/embryo/src/bin/embryo_cc_amx.h226
-rw-r--r--libraries/embryo/src/bin/embryo_cc_prefix.c61
-rw-r--r--libraries/embryo/src/bin/embryo_cc_prefix.h6
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc.h667
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc1.c4079
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc2.c2779
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc3.c2438
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc4.c1308
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc5.c154
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc5.scp317
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc6.c1077
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc7.c688
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sc7.scp1473
-rw-r--r--libraries/embryo/src/bin/embryo_cc_scexpand.c53
-rw-r--r--libraries/embryo/src/bin/embryo_cc_sclist.c293
-rw-r--r--libraries/embryo/src/bin/embryo_cc_scvars.c88
-rw-r--r--libraries/embryo/src/lib/Embryo.h901
-rw-r--r--libraries/embryo/src/lib/Makefile.am36
-rw-r--r--libraries/embryo/src/lib/Makefile.in686
-rw-r--r--libraries/embryo/src/lib/embryo_amx.c1995
-rw-r--r--libraries/embryo/src/lib/embryo_args.c128
-rw-r--r--libraries/embryo/src/lib/embryo_float.c331
-rw-r--r--libraries/embryo/src/lib/embryo_main.c36
-rw-r--r--libraries/embryo/src/lib/embryo_private.h298
-rw-r--r--libraries/embryo/src/lib/embryo_rand.c36
-rw-r--r--libraries/embryo/src/lib/embryo_str.c498
-rw-r--r--libraries/embryo/src/lib/embryo_time.c97
89 files changed, 0 insertions, 65670 deletions
diff --git a/libraries/embryo/ABOUT-NLS b/libraries/embryo/ABOUT-NLS
deleted file mode 100644
index e69de29..0000000
--- a/libraries/embryo/ABOUT-NLS
+++ /dev/null
diff --git a/libraries/embryo/AUTHORS b/libraries/embryo/AUTHORS
deleted file mode 100644
index 7bf31c1..0000000
--- a/libraries/embryo/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
1The Rasterman (Carsten Haitzler) <raster@rasterman.com>
2
diff --git a/libraries/embryo/COPYING b/libraries/embryo/COPYING
deleted file mode 100644
index 26d6208..0000000
--- a/libraries/embryo/COPYING
+++ /dev/null
@@ -1,47 +0,0 @@
1Copyright notice for Embryo:
2
3Copyright (C) 2004-2011 Carsten Haitzler and various contributors (see AUTHORS)
4
5All rights reserved.
6
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
18FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27Large parts of this source come under the following license from the
28original Small (renamed to Pawn afterwards, but was named Small when
29Embryo split off). See the source files that are clearly marked as below:
30
31Copyright (c) ITB CompuPhase, 1997-2003
32
33This software is provided "as-is", without any express or implied warranty.
34In no event will the authors be held liable for any damages arising from
35the use of this software.
36
37Permission is granted to anyone to use this software for any purpose,
38including commercial applications, and to alter it and redistribute it
39freely, subject to the following restrictions:
40
41 1. The origin of this software must not be misrepresented; you must not
42 claim that you wrote the original software. If you use this software in
43 a product, an acknowledgment in the product documentation would be
44 appreciated but is not required.
45 2. Altered source versions must be plainly marked as such, and must not be
46 misrepresented as being the original software.
47 3. This notice may not be removed or altered from any source distribution.
diff --git a/libraries/embryo/ChangeLog b/libraries/embryo/ChangeLog
deleted file mode 100644
index 297abf1..0000000
--- a/libraries/embryo/ChangeLog
+++ /dev/null
@@ -1,29 +0,0 @@
12011-01-29 Carsten Haitzler (The Rasterman)
2
3 1.0.0 release
4
52011-05-12 Carsten Haitzler (The Rasterman)
6
7 * Make embryo_cc use eina and eina_prefix to determine include location
8
92011-07-16 Vincent Torri
10
11 * delete temporary files on Windows
12
132011-10-05 Vincent Torri
14
15 * use fseek() instead of rewind() as the latter does not exist on
16 Windows CE and fix compilation with Evil.
17
182011-12-02 Carsten Haitzler (The Rasterman)
19
20 1.1.0 release
21
222012-02-24 Cedric Bail
23
24 * Add exotic support
25
262012-03-07 Vincent Torri
27
28 * Fix windows compilation issues
29
diff --git a/libraries/embryo/INSTALL b/libraries/embryo/INSTALL
deleted file mode 100644
index 23e5f25..0000000
--- a/libraries/embryo/INSTALL
+++ /dev/null
@@ -1,236 +0,0 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
5Software Foundation, Inc.
6
7This file is free documentation; the Free Software Foundation gives
8unlimited permission to copy, distribute and modify it.
9
10Basic Installation
11==================
12
13These are generic installation instructions.
14
15 The `configure' shell script attempts to guess correct values for
16various system-dependent variables used during compilation. It uses
17those values to create a `Makefile' in each directory of the package.
18It may also create one or more `.h' files containing system-dependent
19definitions. Finally, it creates a shell script `config.status' that
20you can run in the future to recreate the current configuration, and a
21file `config.log' containing compiler output (useful mainly for
22debugging `configure').
23
24 It can also use an optional file (typically called `config.cache'
25and enabled with `--cache-file=config.cache' or simply `-C') that saves
26the results of its tests to speed up reconfiguring. (Caching is
27disabled by default to prevent problems with accidental use of stale
28cache files.)
29
30 If you need to do unusual things to compile the package, please try
31to figure out how `configure' could check whether to do them, and mail
32diffs or instructions to the address given in the `README' so they can
33be considered for the next release. If you are using the cache, and at
34some point `config.cache' contains results you don't want to keep, you
35may remove or edit it.
36
37 The file `configure.ac' (or `configure.in') is used to create
38`configure' by a program called `autoconf'. You only need
39`configure.ac' if you want to change it or regenerate `configure' using
40a newer version of `autoconf'.
41
42The simplest way to compile this package is:
43
44 1. `cd' to the directory containing the package's source code and type
45 `./configure' to configure the package for your system. If you're
46 using `csh' on an old version of System V, you might need to type
47 `sh ./configure' instead to prevent `csh' from trying to execute
48 `configure' itself.
49
50 Running `configure' takes awhile. While running, it prints some
51 messages telling which features it is checking for.
52
53 2. Type `make' to compile the package.
54
55 3. Optionally, type `make check' to run any self-tests that come with
56 the package.
57
58 4. Type `make install' to install the programs and any data files and
59 documentation.
60
61 5. You can remove the program binaries and object files from the
62 source code directory by typing `make clean'. To also remove the
63 files that `configure' created (so you can compile the package for
64 a different kind of computer), type `make distclean'. There is
65 also a `make maintainer-clean' target, but that is intended mainly
66 for the package's developers. If you use it, you may have to get
67 all sorts of other programs in order to regenerate files that came
68 with the distribution.
69
70Compilers and Options
71=====================
72
73Some systems require unusual options for compilation or linking that the
74`configure' script does not know about. Run `./configure --help' for
75details on some of the pertinent environment variables.
76
77 You can give `configure' initial values for configuration parameters
78by setting variables in the command line or in the environment. Here
79is an example:
80
81 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
82
83 *Note Defining Variables::, for more details.
84
85Compiling For Multiple Architectures
86====================================
87
88You can compile the package for more than one kind of computer at the
89same time, by placing the object files for each architecture in their
90own directory. To do this, you must use a version of `make' that
91supports the `VPATH' variable, such as GNU `make'. `cd' to the
92directory where you want the object files and executables to go and run
93the `configure' script. `configure' automatically checks for the
94source code in the directory that `configure' is in and in `..'.
95
96 If you have to use a `make' that does not support the `VPATH'
97variable, you have to compile the package for one architecture at a
98time in the source code directory. After you have installed the
99package for one architecture, use `make distclean' before reconfiguring
100for another architecture.
101
102Installation Names
103==================
104
105By default, `make install' installs the package's commands under
106`/usr/local/bin', include files under `/usr/local/include', etc. You
107can specify an installation prefix other than `/usr/local' by giving
108`configure' the option `--prefix=PREFIX'.
109
110 You can specify separate installation prefixes for
111architecture-specific files and architecture-independent files. If you
112pass the option `--exec-prefix=PREFIX' to `configure', the package uses
113PREFIX as the prefix for installing programs and libraries.
114Documentation and other data files still use the regular prefix.
115
116 In addition, if you use an unusual directory layout you can give
117options like `--bindir=DIR' to specify different values for particular
118kinds of files. Run `configure --help' for a list of the directories
119you can set and what kinds of files go in them.
120
121 If the package supports it, you can cause programs to be installed
122with an extra prefix or suffix on their names by giving `configure' the
123option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
124
125Optional Features
126=================
127
128Some packages pay attention to `--enable-FEATURE' options to
129`configure', where FEATURE indicates an optional part of the package.
130They may also pay attention to `--with-PACKAGE' options, where PACKAGE
131is something like `gnu-as' or `x' (for the X Window System). The
132`README' should mention any `--enable-' and `--with-' options that the
133package recognizes.
134
135 For packages that use the X Window System, `configure' can usually
136find the X include and library files automatically, but if it doesn't,
137you can use the `configure' options `--x-includes=DIR' and
138`--x-libraries=DIR' to specify their locations.
139
140Specifying the System Type
141==========================
142
143There may be some features `configure' cannot figure out automatically,
144but needs to determine by the type of machine the package will run on.
145Usually, assuming the package is built to be run on the _same_
146architectures, `configure' can figure that out, but if it prints a
147message saying it cannot guess the machine type, give it the
148`--build=TYPE' option. TYPE can either be a short name for the system
149type, such as `sun4', or a canonical name which has the form:
150
151 CPU-COMPANY-SYSTEM
152
153where SYSTEM can have one of these forms:
154
155 OS KERNEL-OS
156
157 See the file `config.sub' for the possible values of each field. If
158`config.sub' isn't included in this package, then this package doesn't
159need to know the machine type.
160
161 If you are _building_ compiler tools for cross-compiling, you should
162use the option `--target=TYPE' to select the type of system they will
163produce code for.
164
165 If you want to _use_ a cross compiler, that generates code for a
166platform different from the build platform, you should specify the
167"host" platform (i.e., that on which the generated programs will
168eventually be run) with `--host=TYPE'.
169
170Sharing Defaults
171================
172
173If you want to set default values for `configure' scripts to share, you
174can create a site shell script called `config.site' that gives default
175values for variables like `CC', `cache_file', and `prefix'.
176`configure' looks for `PREFIX/share/config.site' if it exists, then
177`PREFIX/etc/config.site' if it exists. Or, you can set the
178`CONFIG_SITE' environment variable to the location of the site script.
179A warning: not all `configure' scripts look for a site script.
180
181Defining Variables
182==================
183
184Variables not defined in a site shell script can be set in the
185environment passed to `configure'. However, some packages may run
186configure again during the build, and the customized values of these
187variables may be lost. In order to avoid this problem, you should set
188them in the `configure' command line, using `VAR=value'. For example:
189
190 ./configure CC=/usr/local2/bin/gcc
191
192causes the specified `gcc' to be used as the C compiler (unless it is
193overridden in the site shell script). Here is a another example:
194
195 /bin/bash ./configure CONFIG_SHELL=/bin/bash
196
197Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
198configuration-related scripts to be executed by `/bin/bash'.
199
200`configure' Invocation
201======================
202
203`configure' recognizes the following options to control how it operates.
204
205`--help'
206`-h'
207 Print a summary of the options to `configure', and exit.
208
209`--version'
210`-V'
211 Print the version of Autoconf used to generate the `configure'
212 script, and exit.
213
214`--cache-file=FILE'
215 Enable the cache: use and save the results of the tests in FILE,
216 traditionally `config.cache'. FILE defaults to `/dev/null' to
217 disable caching.
218
219`--config-cache'
220`-C'
221 Alias for `--cache-file=config.cache'.
222
223`--quiet'
224`--silent'
225`-q'
226 Do not print messages saying which checks are being made. To
227 suppress all normal output, redirect it to `/dev/null' (any error
228 messages will still be shown).
229
230`--srcdir=DIR'
231 Look for the package's source code in directory DIR. Usually
232 `configure' can determine that directory automatically.
233
234`configure' also accepts some other, not widely useful, options. Run
235`configure --help' for more details.
236
diff --git a/libraries/embryo/Makefile.am b/libraries/embryo/Makefile.am
deleted file mode 100644
index 5c70db3..0000000
--- a/libraries/embryo/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
1ACLOCAL_AMFLAGS = -I m4
2
3SUBDIRS = src include doc
4
5MAINTAINERCLEANFILES = \
6Makefile.in \
7aclocal.m4 \
8compile \
9config.guess \
10config.h.in \
11config.h.in~ \
12config.sub \
13configure \
14depcomp \
15install-sh \
16ltmain.sh \
17missing \
18$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
19$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
20$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
21m4/libtool.m4 \
22m4/lt~obsolete.m4 \
23m4/ltoptions.m4 \
24m4/ltsugar.m4 \
25m4/ltversion.m4
26
27EXTRA_DIST = \
28AUTHORS \
29COPYING \
30autogen.sh \
31embryo.pc.in \
32embryo.spec.in \
33embryo.spec
34
35pkgconfigdir = $(libdir)/pkgconfig
36pkgconfig_DATA = embryo.pc
37
38.PHONY: doc
39
40# Documentation
41
42doc:
43 @echo "entering doc/"
44 make -C doc doc
diff --git a/libraries/embryo/Makefile.in b/libraries/embryo/Makefile.in
deleted file mode 100644
index b7f26fd..0000000
--- a/libraries/embryo/Makefile.in
+++ /dev/null
@@ -1,849 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = .
38DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
39 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
40 $(srcdir)/embryo.pc.in $(srcdir)/embryo.spec.in \
41 $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
42 INSTALL NEWS compile config.guess config.sub depcomp \
43 install-sh ltmain.sh missing
44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
46 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
47 $(top_srcdir)/m4/efl_fnmatch.m4 \
48 $(top_srcdir)/m4/efl_gettimeofday.m4 \
49 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
56 configure.lineno config.status.lineno
57mkinstalldirs = $(install_sh) -d
58CONFIG_HEADER = config.h
59CONFIG_CLEAN_FILES = embryo.pc embryo.spec
60CONFIG_CLEAN_VPATH_FILES =
61AM_V_GEN = $(am__v_GEN_$(V))
62am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
63am__v_GEN_0 = @echo " GEN " $@;
64AM_V_at = $(am__v_at_$(V))
65am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
66am__v_at_0 = @
67SOURCES =
68DIST_SOURCES =
69RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
70 html-recursive info-recursive install-data-recursive \
71 install-dvi-recursive install-exec-recursive \
72 install-html-recursive install-info-recursive \
73 install-pdf-recursive install-ps-recursive install-recursive \
74 installcheck-recursive installdirs-recursive pdf-recursive \
75 ps-recursive uninstall-recursive
76am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
77am__vpath_adj = case $$p in \
78 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
79 *) f=$$p;; \
80 esac;
81am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
82am__install_max = 40
83am__nobase_strip_setup = \
84 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
85am__nobase_strip = \
86 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
87am__nobase_list = $(am__nobase_strip_setup); \
88 for p in $$list; do echo "$$p $$p"; done | \
89 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
90 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
91 if (++n[$$2] == $(am__install_max)) \
92 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
93 END { for (dir in files) print dir, files[dir] }'
94am__base_list = \
95 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
96 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
97am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
98DATA = $(pkgconfig_DATA)
99RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
100 distclean-recursive maintainer-clean-recursive
101AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
102 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
103 distdir dist dist-all distcheck
104ETAGS = etags
105CTAGS = ctags
106DIST_SUBDIRS = $(SUBDIRS)
107DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
108distdir = $(PACKAGE)-$(VERSION)
109top_distdir = $(distdir)
110am__remove_distdir = \
111 { test ! -d "$(distdir)" \
112 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
113 && rm -fr "$(distdir)"; }; }
114am__relativize = \
115 dir0=`pwd`; \
116 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
117 sed_rest='s,^[^/]*/*,,'; \
118 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
119 sed_butlast='s,/*[^/]*$$,,'; \
120 while test -n "$$dir1"; do \
121 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
122 if test "$$first" != "."; then \
123 if test "$$first" = ".."; then \
124 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
125 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
126 else \
127 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
128 if test "$$first2" = "$$first"; then \
129 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
130 else \
131 dir2="../$$dir2"; \
132 fi; \
133 dir0="$$dir0"/"$$first"; \
134 fi; \
135 fi; \
136 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
137 done; \
138 reldir="$$dir2"
139DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
140GZIP_ENV = --best
141distuninstallcheck_listfiles = find . -type f -print
142distcleancheck_listfiles = find . -type f -print
143ACLOCAL = @ACLOCAL@
144ALLOCA = @ALLOCA@
145AMTAR = @AMTAR@
146AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
147AR = @AR@
148AS = @AS@
149AUTOCONF = @AUTOCONF@
150AUTOHEADER = @AUTOHEADER@
151AUTOMAKE = @AUTOMAKE@
152AWK = @AWK@
153CC = @CC@
154CCDEPMODE = @CCDEPMODE@
155CFLAGS = @CFLAGS@
156CPP = @CPP@
157CPPFLAGS = @CPPFLAGS@
158CYGPATH_W = @CYGPATH_W@
159DEFS = @DEFS@
160DEPDIR = @DEPDIR@
161DLLTOOL = @DLLTOOL@
162DSYMUTIL = @DSYMUTIL@
163DUMPBIN = @DUMPBIN@
164ECHO_C = @ECHO_C@
165ECHO_N = @ECHO_N@
166ECHO_T = @ECHO_T@
167EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
168EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
169EGREP = @EGREP@
170EINA_CFLAGS = @EINA_CFLAGS@
171EINA_LIBS = @EINA_LIBS@
172EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
173EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
174EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
175EVIL_CFLAGS = @EVIL_CFLAGS@
176EVIL_LIBS = @EVIL_LIBS@
177EXEEXT = @EXEEXT@
178EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
179EXOTIC_LIBS = @EXOTIC_LIBS@
180FGREP = @FGREP@
181GREP = @GREP@
182INSTALL = @INSTALL@
183INSTALL_DATA = @INSTALL_DATA@
184INSTALL_PROGRAM = @INSTALL_PROGRAM@
185INSTALL_SCRIPT = @INSTALL_SCRIPT@
186INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
187LD = @LD@
188LDFLAGS = @LDFLAGS@
189LIBOBJS = @LIBOBJS@
190LIBS = @LIBS@
191LIBTOOL = @LIBTOOL@
192LIPO = @LIPO@
193LN_S = @LN_S@
194LTLIBOBJS = @LTLIBOBJS@
195MAKEINFO = @MAKEINFO@
196MKDIR_P = @MKDIR_P@
197NM = @NM@
198NMEDIT = @NMEDIT@
199OBJDUMP = @OBJDUMP@
200OBJEXT = @OBJEXT@
201OTOOL = @OTOOL@
202OTOOL64 = @OTOOL64@
203PACKAGE = @PACKAGE@
204PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
205PACKAGE_NAME = @PACKAGE_NAME@
206PACKAGE_STRING = @PACKAGE_STRING@
207PACKAGE_TARNAME = @PACKAGE_TARNAME@
208PACKAGE_URL = @PACKAGE_URL@
209PACKAGE_VERSION = @PACKAGE_VERSION@
210PATH_SEPARATOR = @PATH_SEPARATOR@
211PKG_CONFIG = @PKG_CONFIG@
212PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
213PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
214RANLIB = @RANLIB@
215SED = @SED@
216SET_MAKE = @SET_MAKE@
217SHELL = @SHELL@
218STRIP = @STRIP@
219VERSION = @VERSION@
220VMAJ = @VMAJ@
221abs_builddir = @abs_builddir@
222abs_srcdir = @abs_srcdir@
223abs_top_builddir = @abs_top_builddir@
224abs_top_srcdir = @abs_top_srcdir@
225ac_ct_CC = @ac_ct_CC@
226ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
227am__include = @am__include@
228am__leading_dot = @am__leading_dot@
229am__quote = @am__quote@
230am__tar = @am__tar@
231am__untar = @am__untar@
232bindir = @bindir@
233build = @build@
234build_alias = @build_alias@
235build_cpu = @build_cpu@
236build_os = @build_os@
237build_vendor = @build_vendor@
238builddir = @builddir@
239datadir = @datadir@
240datarootdir = @datarootdir@
241docdir = @docdir@
242dvidir = @dvidir@
243efl_doxygen = @efl_doxygen@
244efl_have_doxygen = @efl_have_doxygen@
245embryoincludedir = @embryoincludedir@
246exec_prefix = @exec_prefix@
247host = @host@
248host_alias = @host_alias@
249host_cpu = @host_cpu@
250host_os = @host_os@
251host_vendor = @host_vendor@
252htmldir = @htmldir@
253includedir = @includedir@
254infodir = @infodir@
255install_sh = @install_sh@
256libdir = @libdir@
257libexecdir = @libexecdir@
258localedir = @localedir@
259localstatedir = @localstatedir@
260lt_ECHO = @lt_ECHO@
261lt_enable_auto_import = @lt_enable_auto_import@
262mandir = @mandir@
263mkdir_p = @mkdir_p@
264oldincludedir = @oldincludedir@
265pdfdir = @pdfdir@
266pkgconfig_requires_private = @pkgconfig_requires_private@
267prefix = @prefix@
268program_transform_name = @program_transform_name@
269psdir = @psdir@
270release_info = @release_info@
271requirement_embryo = @requirement_embryo@
272sbindir = @sbindir@
273sharedstatedir = @sharedstatedir@
274srcdir = @srcdir@
275sysconfdir = @sysconfdir@
276target_alias = @target_alias@
277top_build_prefix = @top_build_prefix@
278top_builddir = @top_builddir@
279top_srcdir = @top_srcdir@
280version_info = @version_info@
281ACLOCAL_AMFLAGS = -I m4
282SUBDIRS = src include doc
283MAINTAINERCLEANFILES = \
284Makefile.in \
285aclocal.m4 \
286compile \
287config.guess \
288config.h.in \
289config.h.in~ \
290config.sub \
291configure \
292depcomp \
293install-sh \
294ltmain.sh \
295missing \
296$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
297$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
298$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
299m4/libtool.m4 \
300m4/lt~obsolete.m4 \
301m4/ltoptions.m4 \
302m4/ltsugar.m4 \
303m4/ltversion.m4
304
305EXTRA_DIST = \
306AUTHORS \
307COPYING \
308autogen.sh \
309embryo.pc.in \
310embryo.spec.in \
311embryo.spec
312
313pkgconfigdir = $(libdir)/pkgconfig
314pkgconfig_DATA = embryo.pc
315all: config.h
316 $(MAKE) $(AM_MAKEFLAGS) all-recursive
317
318.SUFFIXES:
319am--refresh:
320 @:
321$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
322 @for dep in $?; do \
323 case '$(am__configure_deps)' in \
324 *$$dep*) \
325 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
326 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
327 && exit 0; \
328 exit 1;; \
329 esac; \
330 done; \
331 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
332 $(am__cd) $(top_srcdir) && \
333 $(AUTOMAKE) --gnu Makefile
334.PRECIOUS: Makefile
335Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
336 @case '$?' in \
337 *config.status*) \
338 echo ' $(SHELL) ./config.status'; \
339 $(SHELL) ./config.status;; \
340 *) \
341 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
342 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
343 esac;
344
345$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
346 $(SHELL) ./config.status --recheck
347
348$(top_srcdir)/configure: $(am__configure_deps)
349 $(am__cd) $(srcdir) && $(AUTOCONF)
350$(ACLOCAL_M4): $(am__aclocal_m4_deps)
351 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
352$(am__aclocal_m4_deps):
353
354config.h: stamp-h1
355 @if test ! -f $@; then \
356 rm -f stamp-h1; \
357 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
358 else :; fi
359
360stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
361 @rm -f stamp-h1
362 cd $(top_builddir) && $(SHELL) ./config.status config.h
363$(srcdir)/config.h.in: $(am__configure_deps)
364 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
365 rm -f stamp-h1
366 touch $@
367
368distclean-hdr:
369 -rm -f config.h stamp-h1
370embryo.pc: $(top_builddir)/config.status $(srcdir)/embryo.pc.in
371 cd $(top_builddir) && $(SHELL) ./config.status $@
372embryo.spec: $(top_builddir)/config.status $(srcdir)/embryo.spec.in
373 cd $(top_builddir) && $(SHELL) ./config.status $@
374
375mostlyclean-libtool:
376 -rm -f *.lo
377
378clean-libtool:
379 -rm -rf .libs _libs
380
381distclean-libtool:
382 -rm -f libtool config.lt
383install-pkgconfigDATA: $(pkgconfig_DATA)
384 @$(NORMAL_INSTALL)
385 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
386 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
387 for p in $$list; do \
388 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
389 echo "$$d$$p"; \
390 done | $(am__base_list) | \
391 while read files; do \
392 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
393 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
394 done
395
396uninstall-pkgconfigDATA:
397 @$(NORMAL_UNINSTALL)
398 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
399 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
400 test -n "$$files" || exit 0; \
401 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
402 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
403
404# This directory's subdirectories are mostly independent; you can cd
405# into them and run `make' without going through this Makefile.
406# To change the values of `make' variables: instead of editing Makefiles,
407# (1) if the variable is set in `config.status', edit `config.status'
408# (which will cause the Makefiles to be regenerated when you run `make');
409# (2) otherwise, pass the desired values on the `make' command line.
410$(RECURSIVE_TARGETS):
411 @fail= failcom='exit 1'; \
412 for f in x $$MAKEFLAGS; do \
413 case $$f in \
414 *=* | --[!k]*);; \
415 *k*) failcom='fail=yes';; \
416 esac; \
417 done; \
418 dot_seen=no; \
419 target=`echo $@ | sed s/-recursive//`; \
420 list='$(SUBDIRS)'; for subdir in $$list; do \
421 echo "Making $$target in $$subdir"; \
422 if test "$$subdir" = "."; then \
423 dot_seen=yes; \
424 local_target="$$target-am"; \
425 else \
426 local_target="$$target"; \
427 fi; \
428 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
429 || eval $$failcom; \
430 done; \
431 if test "$$dot_seen" = "no"; then \
432 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
433 fi; test -z "$$fail"
434
435$(RECURSIVE_CLEAN_TARGETS):
436 @fail= failcom='exit 1'; \
437 for f in x $$MAKEFLAGS; do \
438 case $$f in \
439 *=* | --[!k]*);; \
440 *k*) failcom='fail=yes';; \
441 esac; \
442 done; \
443 dot_seen=no; \
444 case "$@" in \
445 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
446 *) list='$(SUBDIRS)' ;; \
447 esac; \
448 rev=''; for subdir in $$list; do \
449 if test "$$subdir" = "."; then :; else \
450 rev="$$subdir $$rev"; \
451 fi; \
452 done; \
453 rev="$$rev ."; \
454 target=`echo $@ | sed s/-recursive//`; \
455 for subdir in $$rev; do \
456 echo "Making $$target in $$subdir"; \
457 if test "$$subdir" = "."; then \
458 local_target="$$target-am"; \
459 else \
460 local_target="$$target"; \
461 fi; \
462 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
463 || eval $$failcom; \
464 done && test -z "$$fail"
465tags-recursive:
466 list='$(SUBDIRS)'; for subdir in $$list; do \
467 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
468 done
469ctags-recursive:
470 list='$(SUBDIRS)'; for subdir in $$list; do \
471 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
472 done
473
474ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
475 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
476 unique=`for i in $$list; do \
477 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
478 done | \
479 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
480 END { if (nonempty) { for (i in files) print i; }; }'`; \
481 mkid -fID $$unique
482tags: TAGS
483
484TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
485 $(TAGS_FILES) $(LISP)
486 set x; \
487 here=`pwd`; \
488 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
489 include_option=--etags-include; \
490 empty_fix=.; \
491 else \
492 include_option=--include; \
493 empty_fix=; \
494 fi; \
495 list='$(SUBDIRS)'; for subdir in $$list; do \
496 if test "$$subdir" = .; then :; else \
497 test ! -f $$subdir/TAGS || \
498 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
499 fi; \
500 done; \
501 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
502 unique=`for i in $$list; do \
503 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
504 done | \
505 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
506 END { if (nonempty) { for (i in files) print i; }; }'`; \
507 shift; \
508 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
509 test -n "$$unique" || unique=$$empty_fix; \
510 if test $$# -gt 0; then \
511 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
512 "$$@" $$unique; \
513 else \
514 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
515 $$unique; \
516 fi; \
517 fi
518ctags: CTAGS
519CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
520 $(TAGS_FILES) $(LISP)
521 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
522 unique=`for i in $$list; do \
523 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
524 done | \
525 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
526 END { if (nonempty) { for (i in files) print i; }; }'`; \
527 test -z "$(CTAGS_ARGS)$$unique" \
528 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
529 $$unique
530
531GTAGS:
532 here=`$(am__cd) $(top_builddir) && pwd` \
533 && $(am__cd) $(top_srcdir) \
534 && gtags -i $(GTAGS_ARGS) "$$here"
535
536distclean-tags:
537 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
538
539distdir: $(DISTFILES)
540 $(am__remove_distdir)
541 test -d "$(distdir)" || mkdir "$(distdir)"
542 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
543 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
544 list='$(DISTFILES)'; \
545 dist_files=`for file in $$list; do echo $$file; done | \
546 sed -e "s|^$$srcdirstrip/||;t" \
547 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
548 case $$dist_files in \
549 */*) $(MKDIR_P) `echo "$$dist_files" | \
550 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
551 sort -u` ;; \
552 esac; \
553 for file in $$dist_files; do \
554 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
555 if test -d $$d/$$file; then \
556 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
557 if test -d "$(distdir)/$$file"; then \
558 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
559 fi; \
560 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
561 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
562 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
563 fi; \
564 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
565 else \
566 test -f "$(distdir)/$$file" \
567 || cp -p $$d/$$file "$(distdir)/$$file" \
568 || exit 1; \
569 fi; \
570 done
571 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
572 if test "$$subdir" = .; then :; else \
573 test -d "$(distdir)/$$subdir" \
574 || $(MKDIR_P) "$(distdir)/$$subdir" \
575 || exit 1; \
576 fi; \
577 done
578 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
579 if test "$$subdir" = .; then :; else \
580 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
581 $(am__relativize); \
582 new_distdir=$$reldir; \
583 dir1=$$subdir; dir2="$(top_distdir)"; \
584 $(am__relativize); \
585 new_top_distdir=$$reldir; \
586 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
587 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
588 ($(am__cd) $$subdir && \
589 $(MAKE) $(AM_MAKEFLAGS) \
590 top_distdir="$$new_top_distdir" \
591 distdir="$$new_distdir" \
592 am__remove_distdir=: \
593 am__skip_length_check=: \
594 am__skip_mode_fix=: \
595 distdir) \
596 || exit 1; \
597 fi; \
598 done
599 -test -n "$(am__skip_mode_fix)" \
600 || find "$(distdir)" -type d ! -perm -755 \
601 -exec chmod u+rwx,go+rx {} \; -o \
602 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
603 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
604 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
605 || chmod -R a+r "$(distdir)"
606dist-gzip: distdir
607 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
608 $(am__remove_distdir)
609dist-bzip2: distdir
610 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
611 $(am__remove_distdir)
612
613dist-lzma: distdir
614 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
615 $(am__remove_distdir)
616
617dist-xz: distdir
618 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
619 $(am__remove_distdir)
620
621dist-tarZ: distdir
622 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
623 $(am__remove_distdir)
624
625dist-shar: distdir
626 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
627 $(am__remove_distdir)
628
629dist-zip: distdir
630 -rm -f $(distdir).zip
631 zip -rq $(distdir).zip $(distdir)
632 $(am__remove_distdir)
633
634dist dist-all: distdir
635 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
636 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
637 $(am__remove_distdir)
638
639# This target untars the dist file and tries a VPATH configuration. Then
640# it guarantees that the distribution is self-contained by making another
641# tarfile.
642distcheck: dist
643 case '$(DIST_ARCHIVES)' in \
644 *.tar.gz*) \
645 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
646 *.tar.bz2*) \
647 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
648 *.tar.lzma*) \
649 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
650 *.tar.xz*) \
651 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
652 *.tar.Z*) \
653 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
654 *.shar.gz*) \
655 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
656 *.zip*) \
657 unzip $(distdir).zip ;;\
658 esac
659 chmod -R a-w $(distdir); chmod a+w $(distdir)
660 mkdir $(distdir)/_build
661 mkdir $(distdir)/_inst
662 chmod a-w $(distdir)
663 test -d $(distdir)/_build || exit 0; \
664 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
665 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
666 && am__cwd=`pwd` \
667 && $(am__cd) $(distdir)/_build \
668 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
669 $(DISTCHECK_CONFIGURE_FLAGS) \
670 && $(MAKE) $(AM_MAKEFLAGS) \
671 && $(MAKE) $(AM_MAKEFLAGS) dvi \
672 && $(MAKE) $(AM_MAKEFLAGS) check \
673 && $(MAKE) $(AM_MAKEFLAGS) install \
674 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
675 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
676 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
677 distuninstallcheck \
678 && chmod -R a-w "$$dc_install_base" \
679 && ({ \
680 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
681 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
682 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
683 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
684 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
685 } || { rm -rf "$$dc_destdir"; exit 1; }) \
686 && rm -rf "$$dc_destdir" \
687 && $(MAKE) $(AM_MAKEFLAGS) dist \
688 && rm -rf $(DIST_ARCHIVES) \
689 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
690 && cd "$$am__cwd" \
691 || exit 1
692 $(am__remove_distdir)
693 @(echo "$(distdir) archives ready for distribution: "; \
694 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
695 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
696distuninstallcheck:
697 @$(am__cd) '$(distuninstallcheck_dir)' \
698 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
699 || { echo "ERROR: files left after uninstall:" ; \
700 if test -n "$(DESTDIR)"; then \
701 echo " (check DESTDIR support)"; \
702 fi ; \
703 $(distuninstallcheck_listfiles) ; \
704 exit 1; } >&2
705distcleancheck: distclean
706 @if test '$(srcdir)' = . ; then \
707 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
708 exit 1 ; \
709 fi
710 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
711 || { echo "ERROR: files left in build directory after distclean:" ; \
712 $(distcleancheck_listfiles) ; \
713 exit 1; } >&2
714check-am: all-am
715check: check-recursive
716all-am: Makefile $(DATA) config.h
717installdirs: installdirs-recursive
718installdirs-am:
719 for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
720 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
721 done
722install: install-recursive
723install-exec: install-exec-recursive
724install-data: install-data-recursive
725uninstall: uninstall-recursive
726
727install-am: all-am
728 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
729
730installcheck: installcheck-recursive
731install-strip:
732 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
733 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
734 `test -z '$(STRIP)' || \
735 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
736mostlyclean-generic:
737
738clean-generic:
739
740distclean-generic:
741 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
742 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
743
744maintainer-clean-generic:
745 @echo "This command is intended for maintainers to use"
746 @echo "it deletes files that may require special tools to rebuild."
747 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
748clean: clean-recursive
749
750clean-am: clean-generic clean-libtool mostlyclean-am
751
752distclean: distclean-recursive
753 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
754 -rm -f Makefile
755distclean-am: clean-am distclean-generic distclean-hdr \
756 distclean-libtool distclean-tags
757
758dvi: dvi-recursive
759
760dvi-am:
761
762html: html-recursive
763
764html-am:
765
766info: info-recursive
767
768info-am:
769
770install-data-am: install-pkgconfigDATA
771
772install-dvi: install-dvi-recursive
773
774install-dvi-am:
775
776install-exec-am:
777
778install-html: install-html-recursive
779
780install-html-am:
781
782install-info: install-info-recursive
783
784install-info-am:
785
786install-man:
787
788install-pdf: install-pdf-recursive
789
790install-pdf-am:
791
792install-ps: install-ps-recursive
793
794install-ps-am:
795
796installcheck-am:
797
798maintainer-clean: maintainer-clean-recursive
799 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
800 -rm -rf $(top_srcdir)/autom4te.cache
801 -rm -f Makefile
802maintainer-clean-am: distclean-am maintainer-clean-generic
803
804mostlyclean: mostlyclean-recursive
805
806mostlyclean-am: mostlyclean-generic mostlyclean-libtool
807
808pdf: pdf-recursive
809
810pdf-am:
811
812ps: ps-recursive
813
814ps-am:
815
816uninstall-am: uninstall-pkgconfigDATA
817
818.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
819 ctags-recursive install-am install-strip tags-recursive
820
821.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
822 all all-am am--refresh check check-am clean clean-generic \
823 clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
824 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
825 distcheck distclean distclean-generic distclean-hdr \
826 distclean-libtool distclean-tags distcleancheck distdir \
827 distuninstallcheck dvi dvi-am html html-am info info-am \
828 install install-am install-data install-data-am install-dvi \
829 install-dvi-am install-exec install-exec-am install-html \
830 install-html-am install-info install-info-am install-man \
831 install-pdf install-pdf-am install-pkgconfigDATA install-ps \
832 install-ps-am install-strip installcheck installcheck-am \
833 installdirs installdirs-am maintainer-clean \
834 maintainer-clean-generic mostlyclean mostlyclean-generic \
835 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
836 uninstall uninstall-am uninstall-pkgconfigDATA
837
838
839.PHONY: doc
840
841# Documentation
842
843doc:
844 @echo "entering doc/"
845 make -C doc doc
846
847# Tell versions [3.59,3.63) of GNU make to not export all variables.
848# Otherwise a system limit (for SysV at least) may be exceeded.
849.NOEXPORT:
diff --git a/libraries/embryo/NEWS b/libraries/embryo/NEWS
deleted file mode 100644
index 8cc49e0..0000000
--- a/libraries/embryo/NEWS
+++ /dev/null
@@ -1,13 +0,0 @@
1Embryo 1.1.0
2
3Changes since Embryo 1.0.0:
4---------------------------
5
6Fixes:
7
8 * on windows use fseek instead of rewind as rewind doesn't exist on wince
9 * delete tmp files on windows
10
11Improvements:
12
13 * make embryo_cc use eina_prefix to determine installation location
diff --git a/libraries/embryo/README b/libraries/embryo/README
deleted file mode 100644
index f2cd749..0000000
--- a/libraries/embryo/README
+++ /dev/null
@@ -1,90 +0,0 @@
1Embryo 1.2.0
2
3******************************************************************************
4
5 FOR ANY ISSUES PLEASE EMAIL:
6 enlightenment-devel@lists.sourceforge.net
7
8******************************************************************************
9
10Requirements:
11-------------
12
13Must:
14 eina
15 libc
16
17WARNING: gcc compatibility!!!
18There seems to be some bug (or disagreement) between embryo and gcc 3.2.x
19where IEEE floating point format encoding does not "agree" with embryo's own
20hand-made tests. embryo_cc may not work if you compile using gcc 3.2.x. gcc
213.3.x is known to work fine. we are not 100% sure whose fault this is yet, so
22we won't be jumping up and down, but be warned - gcc 3.2.x does not agree
23with embryo.
24
25To view the API docs, run ./gendoc and view doc/html/index.html.
26
27OK a lot of people ask this. What is Embryo?
28
29Embryo is primarily a shared library that gives you an API to load and control
30interpreted programs compiled into an abstract machine bytecode that it
31understands. This abstract (or virtual) machine is similar to a real machine
32with a CPU, but it is emulated in software. The architecture is simple and is
33the same as the abstract machine (AMX) in the
34<a href=http://www.compuphase.com/pawn>PAWN</a> language (formerly called
35SMALL) as it is based on exactly the same code. Embryo has modified the code
36for the AMX extensively and has made it smaller and more portable. It is VERY
37small. The total size of the virtual machine code AND header files is less
38than 2500 lines of code. It includes the floating point library support by
39default as well. This makes it one of the smallest interpreters around, and
40thus makes is very efficient to use in code.
41
42Embryo also uses the PAWN compiler from the same code base. This code has
43barely been touched and so suffers from lots of portability issues. It has
44been partially fixed and now works on both big and little endian but the code
45still need to be gone over and really cleaned up . It does work, but it's only
46just working. It has been called embryo_cc and compiled a subset of PAWN
47binary outputs. It does not support packed strings, variable alignment, or
48debugging output. It does not support many features of the full PAWN
49compiler because the Embryo AMX does not support these either. You will find
50the Embryo codebase to work much better on Linux (and BSD and MacOS X) and
51other UNIX operating systems as it has been developed and tested on them. IT
52is known to work on:
53 gcc Linux (x86-32)
54 gcc Linux (PPC)
55 gcc MacOS X (PPC)
56
57And will likely work on more combinations. IT currently has problems on 64bit
58SPARC CPUs. Other 64bit systems are untested. It is the aim to fix the code
59so it works on all commonly used architectures (32, 64bit, big and little
60endian, alignment forgiving/unforgiving). So far 64bit support is the major
61issue.
62
63For more documentation please see the Language guide here:
64
65<a href=http://www.compuphase.com/pawn>Pawn Language Booklet</a>
66
67This documents the PAWN language and is 100% relevant for Embryo and the
68syntax of files it can compile (.sma files).
69
70Any help is appreciated in helping clean and port this code, so feel free to
71send patches to the Enlightenment development lists.
72
73The main aim of Embryo is to provide an easy to use library for running
74compiled PAWN programs and giving them access to the calling program and
75any API it exports to the PAWN script. PAWN programs/scripts are completely
76sand-boxed. They cannot access any system or function calls other than the
77ones provided by the calling application to the Embryo API. This means a
78PAWN script cannot open or write to, delete or load files. It is fairly
79harmless and this also keeps Embryo small.
80
81This is a work in progress, so please be patient if things don't work for you
82- and patches and help in fixing it is very much appreciated.
83
84------------------------------------------------------------------------------
85COMPILING AND INSTALLING:
86
87 ./configure
88 make
89(as root unless you are installing in your users directories):
90 make install
diff --git a/libraries/embryo/aclocal.m4 b/libraries/embryo/aclocal.m4
deleted file mode 100644
index d3a77dd..0000000
--- a/libraries/embryo/aclocal.m4
+++ /dev/null
@@ -1,1182 +0,0 @@
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17[m4_warning([this file was generated for autoconf 2.67.
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23# serial 1 (pkg-config-0.24)
24#
25# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26#
27# This program is free software; you can redistribute it and/or modify
28# it under the terms of the GNU General Public License as published by
29# the Free Software Foundation; either version 2 of the License, or
30# (at your option) any later version.
31#
32# This program is distributed in the hope that it will be useful, but
33# WITHOUT ANY WARRANTY; without even the implied warranty of
34# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35# General Public License for more details.
36#
37# You should have received a copy of the GNU General Public License
38# along with this program; if not, write to the Free Software
39# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40#
41# As a special exception to the GNU General Public License, if you
42# distribute this file as part of a program that contains a
43# configuration script generated by Autoconf, you may include it under
44# the same distribution terms that you use for the rest of that program.
45
46# PKG_PROG_PKG_CONFIG([MIN-VERSION])
47# ----------------------------------
48AC_DEFUN([PKG_PROG_PKG_CONFIG],
49[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
52AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
54
55if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
57fi
58if test -n "$PKG_CONFIG"; then
59 _pkg_min_version=m4_default([$1], [0.9.0])
60 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
61 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
62 AC_MSG_RESULT([yes])
63 else
64 AC_MSG_RESULT([no])
65 PKG_CONFIG=""
66 fi
67fi[]dnl
68])# PKG_PROG_PKG_CONFIG
69
70# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
71#
72# Check to see whether a particular set of modules exists. Similar
73# to PKG_CHECK_MODULES(), but does not set variables or print errors.
74#
75# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
76# only at the first occurence in configure.ac, so if the first place
77# it's called might be skipped (such as if it is within an "if", you
78# have to call PKG_CHECK_EXISTS manually
79# --------------------------------------------------------------
80AC_DEFUN([PKG_CHECK_EXISTS],
81[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82if test -n "$PKG_CONFIG" && \
83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
84 m4_default([$2], [:])
85m4_ifvaln([$3], [else
86 $3])dnl
87fi])
88
89# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90# ---------------------------------------------
91m4_define([_PKG_CONFIG],
92[if test -n "$$1"; then
93 pkg_cv_[]$1="$$1"
94 elif test -n "$PKG_CONFIG"; then
95 PKG_CHECK_EXISTS([$3],
96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
97 [pkg_failed=yes])
98 else
99 pkg_failed=untried
100fi[]dnl
101])# _PKG_CONFIG
102
103# _PKG_SHORT_ERRORS_SUPPORTED
104# -----------------------------
105AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
106[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
107if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
108 _pkg_short_errors_supported=yes
109else
110 _pkg_short_errors_supported=no
111fi[]dnl
112])# _PKG_SHORT_ERRORS_SUPPORTED
113
114
115# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
116# [ACTION-IF-NOT-FOUND])
117#
118#
119# Note that if there is a possibility the first call to
120# PKG_CHECK_MODULES might not happen, you should be sure to include an
121# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
122#
123#
124# --------------------------------------------------------------
125AC_DEFUN([PKG_CHECK_MODULES],
126[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
127AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
128AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
129
130pkg_failed=no
131AC_MSG_CHECKING([for $1])
132
133_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
134_PKG_CONFIG([$1][_LIBS], [libs], [$2])
135
136m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
137and $1[]_LIBS to avoid the need to call pkg-config.
138See the pkg-config man page for more details.])
139
140if test $pkg_failed = yes; then
141 AC_MSG_RESULT([no])
142 _PKG_SHORT_ERRORS_SUPPORTED
143 if test $_pkg_short_errors_supported = yes; then
144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
145 else
146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
147 fi
148 # Put the nasty error message in config.log where it belongs
149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
150
151 m4_default([$4], [AC_MSG_ERROR(
152[Package requirements ($2) were not met:
153
154$$1_PKG_ERRORS
155
156Consider adjusting the PKG_CONFIG_PATH environment variable if you
157installed software in a non-standard prefix.
158
159_PKG_TEXT])[]dnl
160 ])
161elif test $pkg_failed = untried; then
162 AC_MSG_RESULT([no])
163 m4_default([$4], [AC_MSG_FAILURE(
164[The pkg-config script could not be found or is too old. Make sure it
165is in your PATH or set the PKG_CONFIG environment variable to the full
166path to pkg-config.
167
168_PKG_TEXT
169
170To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
171 ])
172else
173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
175 AC_MSG_RESULT([yes])
176 $3
177fi[]dnl
178])# PKG_CHECK_MODULES
179
180# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
181#
182# This file is free software; the Free Software Foundation
183# gives unlimited permission to copy and/or distribute it,
184# with or without modifications, as long as this notice is preserved.
185
186# AM_AUTOMAKE_VERSION(VERSION)
187# ----------------------------
188# Automake X.Y traces this macro to ensure aclocal.m4 has been
189# generated from the m4 files accompanying Automake X.Y.
190# (This private macro should not be called outside this file.)
191AC_DEFUN([AM_AUTOMAKE_VERSION],
192[am__api_version='1.11'
193dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
194dnl require some minimum version. Point them to the right macro.
195m4_if([$1], [1.11.1], [],
196 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
197])
198
199# _AM_AUTOCONF_VERSION(VERSION)
200# -----------------------------
201# aclocal traces this macro to find the Autoconf version.
202# This is a private macro too. Using m4_define simplifies
203# the logic in aclocal, which can simply ignore this definition.
204m4_define([_AM_AUTOCONF_VERSION], [])
205
206# AM_SET_CURRENT_AUTOMAKE_VERSION
207# -------------------------------
208# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
209# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
210AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
211[AM_AUTOMAKE_VERSION([1.11.1])dnl
212m4_ifndef([AC_AUTOCONF_VERSION],
213 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
214_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
215
216# AM_AUX_DIR_EXPAND -*- Autoconf -*-
217
218# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
219#
220# This file is free software; the Free Software Foundation
221# gives unlimited permission to copy and/or distribute it,
222# with or without modifications, as long as this notice is preserved.
223
224# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
225# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
226# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
227#
228# Of course, Automake must honor this variable whenever it calls a
229# tool from the auxiliary directory. The problem is that $srcdir (and
230# therefore $ac_aux_dir as well) can be either absolute or relative,
231# depending on how configure is run. This is pretty annoying, since
232# it makes $ac_aux_dir quite unusable in subdirectories: in the top
233# source directory, any form will work fine, but in subdirectories a
234# relative path needs to be adjusted first.
235#
236# $ac_aux_dir/missing
237# fails when called from a subdirectory if $ac_aux_dir is relative
238# $top_srcdir/$ac_aux_dir/missing
239# fails if $ac_aux_dir is absolute,
240# fails when called from a subdirectory in a VPATH build with
241# a relative $ac_aux_dir
242#
243# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
244# are both prefixed by $srcdir. In an in-source build this is usually
245# harmless because $srcdir is `.', but things will broke when you
246# start a VPATH build or use an absolute $srcdir.
247#
248# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
249# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
250# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
251# and then we would define $MISSING as
252# MISSING="\${SHELL} $am_aux_dir/missing"
253# This will work as long as MISSING is not called from configure, because
254# unfortunately $(top_srcdir) has no meaning in configure.
255# However there are other variables, like CC, which are often used in
256# configure, and could therefore not use this "fixed" $ac_aux_dir.
257#
258# Another solution, used here, is to always expand $ac_aux_dir to an
259# absolute PATH. The drawback is that using absolute paths prevent a
260# configured tree to be moved without reconfiguration.
261
262AC_DEFUN([AM_AUX_DIR_EXPAND],
263[dnl Rely on autoconf to set up CDPATH properly.
264AC_PREREQ([2.50])dnl
265# expand $ac_aux_dir to an absolute path
266am_aux_dir=`cd $ac_aux_dir && pwd`
267])
268
269# AM_CONDITIONAL -*- Autoconf -*-
270
271# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
272# Free Software Foundation, Inc.
273#
274# This file is free software; the Free Software Foundation
275# gives unlimited permission to copy and/or distribute it,
276# with or without modifications, as long as this notice is preserved.
277
278# serial 9
279
280# AM_CONDITIONAL(NAME, SHELL-CONDITION)
281# -------------------------------------
282# Define a conditional.
283AC_DEFUN([AM_CONDITIONAL],
284[AC_PREREQ(2.52)dnl
285 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
286 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
287AC_SUBST([$1_TRUE])dnl
288AC_SUBST([$1_FALSE])dnl
289_AM_SUBST_NOTMAKE([$1_TRUE])dnl
290_AM_SUBST_NOTMAKE([$1_FALSE])dnl
291m4_define([_AM_COND_VALUE_$1], [$2])dnl
292if $2; then
293 $1_TRUE=
294 $1_FALSE='#'
295else
296 $1_TRUE='#'
297 $1_FALSE=
298fi
299AC_CONFIG_COMMANDS_PRE(
300[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
301 AC_MSG_ERROR([[conditional "$1" was never defined.
302Usually this means the macro was only invoked conditionally.]])
303fi])])
304
305# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
306# Free Software Foundation, Inc.
307#
308# This file is free software; the Free Software Foundation
309# gives unlimited permission to copy and/or distribute it,
310# with or without modifications, as long as this notice is preserved.
311
312# serial 10
313
314# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
315# written in clear, in which case automake, when reading aclocal.m4,
316# will think it sees a *use*, and therefore will trigger all it's
317# C support machinery. Also note that it means that autoscan, seeing
318# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
319
320
321# _AM_DEPENDENCIES(NAME)
322# ----------------------
323# See how the compiler implements dependency checking.
324# NAME is "CC", "CXX", "GCJ", or "OBJC".
325# We try a few techniques and use that to set a single cache variable.
326#
327# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
328# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
329# dependency, and given that the user is not expected to run this macro,
330# just rely on AC_PROG_CC.
331AC_DEFUN([_AM_DEPENDENCIES],
332[AC_REQUIRE([AM_SET_DEPDIR])dnl
333AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
334AC_REQUIRE([AM_MAKE_INCLUDE])dnl
335AC_REQUIRE([AM_DEP_TRACK])dnl
336
337ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
338 [$1], CXX, [depcc="$CXX" am_compiler_list=],
339 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
340 [$1], UPC, [depcc="$UPC" am_compiler_list=],
341 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
342 [depcc="$$1" am_compiler_list=])
343
344AC_CACHE_CHECK([dependency style of $depcc],
345 [am_cv_$1_dependencies_compiler_type],
346[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
347 # We make a subdir and do the tests there. Otherwise we can end up
348 # making bogus files that we don't know about and never remove. For
349 # instance it was reported that on HP-UX the gcc test will end up
350 # making a dummy file named `D' -- because `-MD' means `put the output
351 # in D'.
352 mkdir conftest.dir
353 # Copy depcomp to subdir because otherwise we won't find it if we're
354 # using a relative directory.
355 cp "$am_depcomp" conftest.dir
356 cd conftest.dir
357 # We will build objects and dependencies in a subdirectory because
358 # it helps to detect inapplicable dependency modes. For instance
359 # both Tru64's cc and ICC support -MD to output dependencies as a
360 # side effect of compilation, but ICC will put the dependencies in
361 # the current directory while Tru64 will put them in the object
362 # directory.
363 mkdir sub
364
365 am_cv_$1_dependencies_compiler_type=none
366 if test "$am_compiler_list" = ""; then
367 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
368 fi
369 am__universal=false
370 m4_case([$1], [CC],
371 [case " $depcc " in #(
372 *\ -arch\ *\ -arch\ *) am__universal=true ;;
373 esac],
374 [CXX],
375 [case " $depcc " in #(
376 *\ -arch\ *\ -arch\ *) am__universal=true ;;
377 esac])
378
379 for depmode in $am_compiler_list; do
380 # Setup a source with many dependencies, because some compilers
381 # like to wrap large dependency lists on column 80 (with \), and
382 # we should not choose a depcomp mode which is confused by this.
383 #
384 # We need to recreate these files for each test, as the compiler may
385 # overwrite some of them when testing with obscure command lines.
386 # This happens at least with the AIX C compiler.
387 : > sub/conftest.c
388 for i in 1 2 3 4 5 6; do
389 echo '#include "conftst'$i'.h"' >> sub/conftest.c
390 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
391 # Solaris 8's {/usr,}/bin/sh.
392 touch sub/conftst$i.h
393 done
394 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
395
396 # We check with `-c' and `-o' for the sake of the "dashmstdout"
397 # mode. It turns out that the SunPro C++ compiler does not properly
398 # handle `-M -o', and we need to detect this. Also, some Intel
399 # versions had trouble with output in subdirs
400 am__obj=sub/conftest.${OBJEXT-o}
401 am__minus_obj="-o $am__obj"
402 case $depmode in
403 gcc)
404 # This depmode causes a compiler race in universal mode.
405 test "$am__universal" = false || continue
406 ;;
407 nosideeffect)
408 # after this tag, mechanisms are not by side-effect, so they'll
409 # only be used when explicitly requested
410 if test "x$enable_dependency_tracking" = xyes; then
411 continue
412 else
413 break
414 fi
415 ;;
416 msvisualcpp | msvcmsys)
417 # This compiler won't grok `-c -o', but also, the minuso test has
418 # not run yet. These depmodes are late enough in the game, and
419 # so weak that their functioning should not be impacted.
420 am__obj=conftest.${OBJEXT-o}
421 am__minus_obj=
422 ;;
423 none) break ;;
424 esac
425 if depmode=$depmode \
426 source=sub/conftest.c object=$am__obj \
427 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
428 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
429 >/dev/null 2>conftest.err &&
430 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
431 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
432 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
433 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
434 # icc doesn't choke on unknown options, it will just issue warnings
435 # or remarks (even with -Werror). So we grep stderr for any message
436 # that says an option was ignored or not supported.
437 # When given -MP, icc 7.0 and 7.1 complain thusly:
438 # icc: Command line warning: ignoring option '-M'; no argument required
439 # The diagnosis changed in icc 8.0:
440 # icc: Command line remark: option '-MP' not supported
441 if (grep 'ignoring option' conftest.err ||
442 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
443 am_cv_$1_dependencies_compiler_type=$depmode
444 break
445 fi
446 fi
447 done
448
449 cd ..
450 rm -rf conftest.dir
451else
452 am_cv_$1_dependencies_compiler_type=none
453fi
454])
455AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
456AM_CONDITIONAL([am__fastdep$1], [
457 test "x$enable_dependency_tracking" != xno \
458 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
459])
460
461
462# AM_SET_DEPDIR
463# -------------
464# Choose a directory name for dependency files.
465# This macro is AC_REQUIREd in _AM_DEPENDENCIES
466AC_DEFUN([AM_SET_DEPDIR],
467[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
468AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
469])
470
471
472# AM_DEP_TRACK
473# ------------
474AC_DEFUN([AM_DEP_TRACK],
475[AC_ARG_ENABLE(dependency-tracking,
476[ --disable-dependency-tracking speeds up one-time build
477 --enable-dependency-tracking do not reject slow dependency extractors])
478if test "x$enable_dependency_tracking" != xno; then
479 am_depcomp="$ac_aux_dir/depcomp"
480 AMDEPBACKSLASH='\'
481fi
482AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
483AC_SUBST([AMDEPBACKSLASH])dnl
484_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
485])
486
487# Generate code to set up dependency tracking. -*- Autoconf -*-
488
489# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
490# Free Software Foundation, Inc.
491#
492# This file is free software; the Free Software Foundation
493# gives unlimited permission to copy and/or distribute it,
494# with or without modifications, as long as this notice is preserved.
495
496#serial 5
497
498# _AM_OUTPUT_DEPENDENCY_COMMANDS
499# ------------------------------
500AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
501[{
502 # Autoconf 2.62 quotes --file arguments for eval, but not when files
503 # are listed without --file. Let's play safe and only enable the eval
504 # if we detect the quoting.
505 case $CONFIG_FILES in
506 *\'*) eval set x "$CONFIG_FILES" ;;
507 *) set x $CONFIG_FILES ;;
508 esac
509 shift
510 for mf
511 do
512 # Strip MF so we end up with the name of the file.
513 mf=`echo "$mf" | sed -e 's/:.*$//'`
514 # Check whether this is an Automake generated Makefile or not.
515 # We used to match only the files named `Makefile.in', but
516 # some people rename them; so instead we look at the file content.
517 # Grep'ing the first line is not enough: some people post-process
518 # each Makefile.in and add a new line on top of each file to say so.
519 # Grep'ing the whole file is not good either: AIX grep has a line
520 # limit of 2048, but all sed's we know have understand at least 4000.
521 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
522 dirpart=`AS_DIRNAME("$mf")`
523 else
524 continue
525 fi
526 # Extract the definition of DEPDIR, am__include, and am__quote
527 # from the Makefile without running `make'.
528 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
529 test -z "$DEPDIR" && continue
530 am__include=`sed -n 's/^am__include = //p' < "$mf"`
531 test -z "am__include" && continue
532 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
533 # When using ansi2knr, U may be empty or an underscore; expand it
534 U=`sed -n 's/^U = //p' < "$mf"`
535 # Find all dependency output files, they are included files with
536 # $(DEPDIR) in their names. We invoke sed twice because it is the
537 # simplest approach to changing $(DEPDIR) to its actual value in the
538 # expansion.
539 for file in `sed -n "
540 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
541 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
542 # Make sure the directory exists.
543 test -f "$dirpart/$file" && continue
544 fdir=`AS_DIRNAME(["$file"])`
545 AS_MKDIR_P([$dirpart/$fdir])
546 # echo "creating $dirpart/$file"
547 echo '# dummy' > "$dirpart/$file"
548 done
549 done
550}
551])# _AM_OUTPUT_DEPENDENCY_COMMANDS
552
553
554# AM_OUTPUT_DEPENDENCY_COMMANDS
555# -----------------------------
556# This macro should only be invoked once -- use via AC_REQUIRE.
557#
558# This code is only required when automatic dependency tracking
559# is enabled. FIXME. This creates each `.P' file that we will
560# need in order to bootstrap the dependency handling code.
561AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
562[AC_CONFIG_COMMANDS([depfiles],
563 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
564 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
565])
566
567# Do all the work for Automake. -*- Autoconf -*-
568
569# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
570# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
571#
572# This file is free software; the Free Software Foundation
573# gives unlimited permission to copy and/or distribute it,
574# with or without modifications, as long as this notice is preserved.
575
576# serial 16
577
578# This macro actually does too much. Some checks are only needed if
579# your package does certain things. But this isn't really a big deal.
580
581# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
582# AM_INIT_AUTOMAKE([OPTIONS])
583# -----------------------------------------------
584# The call with PACKAGE and VERSION arguments is the old style
585# call (pre autoconf-2.50), which is being phased out. PACKAGE
586# and VERSION should now be passed to AC_INIT and removed from
587# the call to AM_INIT_AUTOMAKE.
588# We support both call styles for the transition. After
589# the next Automake release, Autoconf can make the AC_INIT
590# arguments mandatory, and then we can depend on a new Autoconf
591# release and drop the old call support.
592AC_DEFUN([AM_INIT_AUTOMAKE],
593[AC_PREREQ([2.62])dnl
594dnl Autoconf wants to disallow AM_ names. We explicitly allow
595dnl the ones we care about.
596m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
597AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
598AC_REQUIRE([AC_PROG_INSTALL])dnl
599if test "`cd $srcdir && pwd`" != "`pwd`"; then
600 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
601 # is not polluted with repeated "-I."
602 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
603 # test to see if srcdir already configured
604 if test -f $srcdir/config.status; then
605 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
606 fi
607fi
608
609# test whether we have cygpath
610if test -z "$CYGPATH_W"; then
611 if (cygpath --version) >/dev/null 2>/dev/null; then
612 CYGPATH_W='cygpath -w'
613 else
614 CYGPATH_W=echo
615 fi
616fi
617AC_SUBST([CYGPATH_W])
618
619# Define the identity of the package.
620dnl Distinguish between old-style and new-style calls.
621m4_ifval([$2],
622[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
623 AC_SUBST([PACKAGE], [$1])dnl
624 AC_SUBST([VERSION], [$2])],
625[_AM_SET_OPTIONS([$1])dnl
626dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
627m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
628 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
629 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
630 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
631
632_AM_IF_OPTION([no-define],,
633[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
634 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
635
636# Some tools Automake needs.
637AC_REQUIRE([AM_SANITY_CHECK])dnl
638AC_REQUIRE([AC_ARG_PROGRAM])dnl
639AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
640AM_MISSING_PROG(AUTOCONF, autoconf)
641AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
642AM_MISSING_PROG(AUTOHEADER, autoheader)
643AM_MISSING_PROG(MAKEINFO, makeinfo)
644AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
645AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
646AC_REQUIRE([AM_PROG_MKDIR_P])dnl
647# We need awk for the "check" target. The system "awk" is bad on
648# some platforms.
649AC_REQUIRE([AC_PROG_AWK])dnl
650AC_REQUIRE([AC_PROG_MAKE_SET])dnl
651AC_REQUIRE([AM_SET_LEADING_DOT])dnl
652_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
653 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
654 [_AM_PROG_TAR([v7])])])
655_AM_IF_OPTION([no-dependencies],,
656[AC_PROVIDE_IFELSE([AC_PROG_CC],
657 [_AM_DEPENDENCIES(CC)],
658 [define([AC_PROG_CC],
659 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
660AC_PROVIDE_IFELSE([AC_PROG_CXX],
661 [_AM_DEPENDENCIES(CXX)],
662 [define([AC_PROG_CXX],
663 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
664AC_PROVIDE_IFELSE([AC_PROG_OBJC],
665 [_AM_DEPENDENCIES(OBJC)],
666 [define([AC_PROG_OBJC],
667 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
668])
669_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
670dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
671dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
672dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
673AC_CONFIG_COMMANDS_PRE(dnl
674[m4_provide_if([_AM_COMPILER_EXEEXT],
675 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
676])
677
678dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
679dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
680dnl mangled by Autoconf and run in a shell conditional statement.
681m4_define([_AC_COMPILER_EXEEXT],
682m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
683
684
685# When config.status generates a header, we must update the stamp-h file.
686# This file resides in the same directory as the config header
687# that is generated. The stamp files are numbered to have different names.
688
689# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
690# loop where config.status creates the headers, so we can generate
691# our stamp files there.
692AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
693[# Compute $1's index in $config_headers.
694_am_arg=$1
695_am_stamp_count=1
696for _am_header in $config_headers :; do
697 case $_am_header in
698 $_am_arg | $_am_arg:* )
699 break ;;
700 * )
701 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
702 esac
703done
704echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
705
706# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
707#
708# This file is free software; the Free Software Foundation
709# gives unlimited permission to copy and/or distribute it,
710# with or without modifications, as long as this notice is preserved.
711
712# AM_PROG_INSTALL_SH
713# ------------------
714# Define $install_sh.
715AC_DEFUN([AM_PROG_INSTALL_SH],
716[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
717if test x"${install_sh}" != xset; then
718 case $am_aux_dir in
719 *\ * | *\ *)
720 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
721 *)
722 install_sh="\${SHELL} $am_aux_dir/install-sh"
723 esac
724fi
725AC_SUBST(install_sh)])
726
727# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
728#
729# This file is free software; the Free Software Foundation
730# gives unlimited permission to copy and/or distribute it,
731# with or without modifications, as long as this notice is preserved.
732
733# serial 2
734
735# Check whether the underlying file-system supports filenames
736# with a leading dot. For instance MS-DOS doesn't.
737AC_DEFUN([AM_SET_LEADING_DOT],
738[rm -rf .tst 2>/dev/null
739mkdir .tst 2>/dev/null
740if test -d .tst; then
741 am__leading_dot=.
742else
743 am__leading_dot=_
744fi
745rmdir .tst 2>/dev/null
746AC_SUBST([am__leading_dot])])
747
748# Check to see how 'make' treats includes. -*- Autoconf -*-
749
750# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
751#
752# This file is free software; the Free Software Foundation
753# gives unlimited permission to copy and/or distribute it,
754# with or without modifications, as long as this notice is preserved.
755
756# serial 4
757
758# AM_MAKE_INCLUDE()
759# -----------------
760# Check to see how make treats includes.
761AC_DEFUN([AM_MAKE_INCLUDE],
762[am_make=${MAKE-make}
763cat > confinc << 'END'
764am__doit:
765 @echo this is the am__doit target
766.PHONY: am__doit
767END
768# If we don't find an include directive, just comment out the code.
769AC_MSG_CHECKING([for style of include used by $am_make])
770am__include="#"
771am__quote=
772_am_result=none
773# First try GNU make style include.
774echo "include confinc" > confmf
775# Ignore all kinds of additional output from `make'.
776case `$am_make -s -f confmf 2> /dev/null` in #(
777*the\ am__doit\ target*)
778 am__include=include
779 am__quote=
780 _am_result=GNU
781 ;;
782esac
783# Now try BSD make style include.
784if test "$am__include" = "#"; then
785 echo '.include "confinc"' > confmf
786 case `$am_make -s -f confmf 2> /dev/null` in #(
787 *the\ am__doit\ target*)
788 am__include=.include
789 am__quote="\""
790 _am_result=BSD
791 ;;
792 esac
793fi
794AC_SUBST([am__include])
795AC_SUBST([am__quote])
796AC_MSG_RESULT([$_am_result])
797rm -f confinc confmf
798])
799
800# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
801# Free Software Foundation, Inc.
802#
803# This file is free software; the Free Software Foundation
804# gives unlimited permission to copy and/or distribute it,
805# with or without modifications, as long as this notice is preserved.
806
807# serial 6
808
809# AM_PROG_CC_C_O
810# --------------
811# Like AC_PROG_CC_C_O, but changed for automake.
812AC_DEFUN([AM_PROG_CC_C_O],
813[AC_REQUIRE([AC_PROG_CC_C_O])dnl
814AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
815AC_REQUIRE_AUX_FILE([compile])dnl
816# FIXME: we rely on the cache variable name because
817# there is no other way.
818set dummy $CC
819am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
820eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
821if test "$am_t" != yes; then
822 # Losing compiler, so override with the script.
823 # FIXME: It is wrong to rewrite CC.
824 # But if we don't then we get into trouble of one sort or another.
825 # A longer-term fix would be to have automake use am__CC in this case,
826 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
827 CC="$am_aux_dir/compile $CC"
828fi
829dnl Make sure AC_PROG_CC is never called again, or it will override our
830dnl setting of CC.
831m4_define([AC_PROG_CC],
832 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
833])
834
835# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
836
837# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
838# Free Software Foundation, Inc.
839#
840# This file is free software; the Free Software Foundation
841# gives unlimited permission to copy and/or distribute it,
842# with or without modifications, as long as this notice is preserved.
843
844# serial 6
845
846# AM_MISSING_PROG(NAME, PROGRAM)
847# ------------------------------
848AC_DEFUN([AM_MISSING_PROG],
849[AC_REQUIRE([AM_MISSING_HAS_RUN])
850$1=${$1-"${am_missing_run}$2"}
851AC_SUBST($1)])
852
853
854# AM_MISSING_HAS_RUN
855# ------------------
856# Define MISSING if not defined so far and test if it supports --run.
857# If it does, set am_missing_run to use it, otherwise, to nothing.
858AC_DEFUN([AM_MISSING_HAS_RUN],
859[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
860AC_REQUIRE_AUX_FILE([missing])dnl
861if test x"${MISSING+set}" != xset; then
862 case $am_aux_dir in
863 *\ * | *\ *)
864 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
865 *)
866 MISSING="\${SHELL} $am_aux_dir/missing" ;;
867 esac
868fi
869# Use eval to expand $SHELL
870if eval "$MISSING --run true"; then
871 am_missing_run="$MISSING --run "
872else
873 am_missing_run=
874 AC_MSG_WARN([`missing' script is too old or missing])
875fi
876])
877
878# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
879#
880# This file is free software; the Free Software Foundation
881# gives unlimited permission to copy and/or distribute it,
882# with or without modifications, as long as this notice is preserved.
883
884# AM_PROG_MKDIR_P
885# ---------------
886# Check for `mkdir -p'.
887AC_DEFUN([AM_PROG_MKDIR_P],
888[AC_PREREQ([2.60])dnl
889AC_REQUIRE([AC_PROG_MKDIR_P])dnl
890dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
891dnl while keeping a definition of mkdir_p for backward compatibility.
892dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
893dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
894dnl Makefile.ins that do not define MKDIR_P, so we do our own
895dnl adjustment using top_builddir (which is defined more often than
896dnl MKDIR_P).
897AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
898case $mkdir_p in
899 [[\\/$]]* | ?:[[\\/]]*) ;;
900 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
901esac
902])
903
904# Helper functions for option handling. -*- Autoconf -*-
905
906# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
907#
908# This file is free software; the Free Software Foundation
909# gives unlimited permission to copy and/or distribute it,
910# with or without modifications, as long as this notice is preserved.
911
912# serial 4
913
914# _AM_MANGLE_OPTION(NAME)
915# -----------------------
916AC_DEFUN([_AM_MANGLE_OPTION],
917[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
918
919# _AM_SET_OPTION(NAME)
920# ------------------------------
921# Set option NAME. Presently that only means defining a flag for this option.
922AC_DEFUN([_AM_SET_OPTION],
923[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
924
925# _AM_SET_OPTIONS(OPTIONS)
926# ----------------------------------
927# OPTIONS is a space-separated list of Automake options.
928AC_DEFUN([_AM_SET_OPTIONS],
929[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
930
931# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
932# -------------------------------------------
933# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
934AC_DEFUN([_AM_IF_OPTION],
935[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
936
937# Check to make sure that the build environment is sane. -*- Autoconf -*-
938
939# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
940# Free Software Foundation, Inc.
941#
942# This file is free software; the Free Software Foundation
943# gives unlimited permission to copy and/or distribute it,
944# with or without modifications, as long as this notice is preserved.
945
946# serial 5
947
948# AM_SANITY_CHECK
949# ---------------
950AC_DEFUN([AM_SANITY_CHECK],
951[AC_MSG_CHECKING([whether build environment is sane])
952# Just in case
953sleep 1
954echo timestamp > conftest.file
955# Reject unsafe characters in $srcdir or the absolute working directory
956# name. Accept space and tab only in the latter.
957am_lf='
958'
959case `pwd` in
960 *[[\\\"\#\$\&\'\`$am_lf]]*)
961 AC_MSG_ERROR([unsafe absolute working directory name]);;
962esac
963case $srcdir in
964 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
965 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
966esac
967
968# Do `set' in a subshell so we don't clobber the current shell's
969# arguments. Must try -L first in case configure is actually a
970# symlink; some systems play weird games with the mod time of symlinks
971# (eg FreeBSD returns the mod time of the symlink's containing
972# directory).
973if (
974 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
975 if test "$[*]" = "X"; then
976 # -L didn't work.
977 set X `ls -t "$srcdir/configure" conftest.file`
978 fi
979 rm -f conftest.file
980 if test "$[*]" != "X $srcdir/configure conftest.file" \
981 && test "$[*]" != "X conftest.file $srcdir/configure"; then
982
983 # If neither matched, then we have a broken ls. This can happen
984 # if, for instance, CONFIG_SHELL is bash and it inherits a
985 # broken ls alias from the environment. This has actually
986 # happened. Such a system could not be considered "sane".
987 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
988alias in your environment])
989 fi
990
991 test "$[2]" = conftest.file
992 )
993then
994 # Ok.
995 :
996else
997 AC_MSG_ERROR([newly created file is older than distributed files!
998Check your system clock])
999fi
1000AC_MSG_RESULT(yes)])
1001
1002# Copyright (C) 2009 Free Software Foundation, Inc.
1003#
1004# This file is free software; the Free Software Foundation
1005# gives unlimited permission to copy and/or distribute it,
1006# with or without modifications, as long as this notice is preserved.
1007
1008# serial 1
1009
1010# AM_SILENT_RULES([DEFAULT])
1011# --------------------------
1012# Enable less verbose build rules; with the default set to DEFAULT
1013# (`yes' being less verbose, `no' or empty being verbose).
1014AC_DEFUN([AM_SILENT_RULES],
1015[AC_ARG_ENABLE([silent-rules],
1016[ --enable-silent-rules less verbose build output (undo: `make V=1')
1017 --disable-silent-rules verbose build output (undo: `make V=0')])
1018case $enable_silent_rules in
1019yes) AM_DEFAULT_VERBOSITY=0;;
1020no) AM_DEFAULT_VERBOSITY=1;;
1021*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1022esac
1023AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1024AM_BACKSLASH='\'
1025AC_SUBST([AM_BACKSLASH])dnl
1026_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1027])
1028
1029# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1030#
1031# This file is free software; the Free Software Foundation
1032# gives unlimited permission to copy and/or distribute it,
1033# with or without modifications, as long as this notice is preserved.
1034
1035# AM_PROG_INSTALL_STRIP
1036# ---------------------
1037# One issue with vendor `install' (even GNU) is that you can't
1038# specify the program used to strip binaries. This is especially
1039# annoying in cross-compiling environments, where the build's strip
1040# is unlikely to handle the host's binaries.
1041# Fortunately install-sh will honor a STRIPPROG variable, so we
1042# always use install-sh in `make install-strip', and initialize
1043# STRIPPROG with the value of the STRIP variable (set by the user).
1044AC_DEFUN([AM_PROG_INSTALL_STRIP],
1045[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1046# Installed binaries are usually stripped using `strip' when the user
1047# run `make install-strip'. However `strip' might not be the right
1048# tool to use in cross-compilation environments, therefore Automake
1049# will honor the `STRIP' environment variable to overrule this program.
1050dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1051if test "$cross_compiling" != no; then
1052 AC_CHECK_TOOL([STRIP], [strip], :)
1053fi
1054INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1055AC_SUBST([INSTALL_STRIP_PROGRAM])])
1056
1057# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1058#
1059# This file is free software; the Free Software Foundation
1060# gives unlimited permission to copy and/or distribute it,
1061# with or without modifications, as long as this notice is preserved.
1062
1063# serial 2
1064
1065# _AM_SUBST_NOTMAKE(VARIABLE)
1066# ---------------------------
1067# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1068# This macro is traced by Automake.
1069AC_DEFUN([_AM_SUBST_NOTMAKE])
1070
1071# AM_SUBST_NOTMAKE(VARIABLE)
1072# ---------------------------
1073# Public sister of _AM_SUBST_NOTMAKE.
1074AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1075
1076# Check how to create a tarball. -*- Autoconf -*-
1077
1078# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1079#
1080# This file is free software; the Free Software Foundation
1081# gives unlimited permission to copy and/or distribute it,
1082# with or without modifications, as long as this notice is preserved.
1083
1084# serial 2
1085
1086# _AM_PROG_TAR(FORMAT)
1087# --------------------
1088# Check how to create a tarball in format FORMAT.
1089# FORMAT should be one of `v7', `ustar', or `pax'.
1090#
1091# Substitute a variable $(am__tar) that is a command
1092# writing to stdout a FORMAT-tarball containing the directory
1093# $tardir.
1094# tardir=directory && $(am__tar) > result.tar
1095#
1096# Substitute a variable $(am__untar) that extract such
1097# a tarball read from stdin.
1098# $(am__untar) < result.tar
1099AC_DEFUN([_AM_PROG_TAR],
1100[# Always define AMTAR for backward compatibility.
1101AM_MISSING_PROG([AMTAR], [tar])
1102m4_if([$1], [v7],
1103 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1104 [m4_case([$1], [ustar],, [pax],,
1105 [m4_fatal([Unknown tar format])])
1106AC_MSG_CHECKING([how to create a $1 tar archive])
1107# Loop over all known methods to create a tar archive until one works.
1108_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1109_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1110# Do not fold the above two line into one, because Tru64 sh and
1111# Solaris sh will not grok spaces in the rhs of `-'.
1112for _am_tool in $_am_tools
1113do
1114 case $_am_tool in
1115 gnutar)
1116 for _am_tar in tar gnutar gtar;
1117 do
1118 AM_RUN_LOG([$_am_tar --version]) && break
1119 done
1120 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1121 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1122 am__untar="$_am_tar -xf -"
1123 ;;
1124 plaintar)
1125 # Must skip GNU tar: if it does not support --format= it doesn't create
1126 # ustar tarball either.
1127 (tar --version) >/dev/null 2>&1 && continue
1128 am__tar='tar chf - "$$tardir"'
1129 am__tar_='tar chf - "$tardir"'
1130 am__untar='tar xf -'
1131 ;;
1132 pax)
1133 am__tar='pax -L -x $1 -w "$$tardir"'
1134 am__tar_='pax -L -x $1 -w "$tardir"'
1135 am__untar='pax -r'
1136 ;;
1137 cpio)
1138 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1139 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1140 am__untar='cpio -i -H $1 -d'
1141 ;;
1142 none)
1143 am__tar=false
1144 am__tar_=false
1145 am__untar=false
1146 ;;
1147 esac
1148
1149 # If the value was cached, stop now. We just wanted to have am__tar
1150 # and am__untar set.
1151 test -n "${am_cv_prog_tar_$1}" && break
1152
1153 # tar/untar a dummy directory, and stop if the command works
1154 rm -rf conftest.dir
1155 mkdir conftest.dir
1156 echo GrepMe > conftest.dir/file
1157 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1158 rm -rf conftest.dir
1159 if test -s conftest.tar; then
1160 AM_RUN_LOG([$am__untar <conftest.tar])
1161 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1162 fi
1163done
1164rm -rf conftest.dir
1165
1166AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1167AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1168AC_SUBST([am__tar])
1169AC_SUBST([am__untar])
1170]) # _AM_PROG_TAR
1171
1172m4_include([m4/ac_attribute.m4])
1173m4_include([m4/efl_binary.m4])
1174m4_include([m4/efl_doxygen.m4])
1175m4_include([m4/efl_fnmatch.m4])
1176m4_include([m4/efl_gettimeofday.m4])
1177m4_include([m4/efl_path_max.m4])
1178m4_include([m4/libtool.m4])
1179m4_include([m4/ltoptions.m4])
1180m4_include([m4/ltsugar.m4])
1181m4_include([m4/ltversion.m4])
1182m4_include([m4/lt~obsolete.m4])
diff --git a/libraries/embryo/autogen.sh b/libraries/embryo/autogen.sh
deleted file mode 100755
index 72e1033..0000000
--- a/libraries/embryo/autogen.sh
+++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch ABOUT-NLS
7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
12echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
13
14W=0
15
16rm -f config.cache-env.tmp
17echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
18echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
19echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
20echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
21echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
22
23cmp config.cache-env.tmp config.cache-env >> /dev/null
24if [ $? -ne 0 ]; then
25 W=1;
26fi
27
28if [ $W -ne 0 ]; then
29 echo "Cleaning configure cache...";
30 rm -f config.cache config.cache-env
31 mv config.cache-env.tmp config.cache-env
32else
33 rm -f config.cache-env.tmp
34fi
35
36if [ -z "$NOCONFIGURE" ]; then
37 ./configure -C "$@"
38fi
diff --git a/libraries/embryo/compile b/libraries/embryo/compile
deleted file mode 100755
index c0096a7..0000000
--- a/libraries/embryo/compile
+++ /dev/null
@@ -1,143 +0,0 @@
1#! /bin/sh
2# Wrapper for compilers which do not understand `-c -o'.
3
4scriptversion=2009-10-06.20; # UTC
5
6# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
7# Foundation, Inc.
8# Written by Tom Tromey <tromey@cygnus.com>.
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2, or (at your option)
13# any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program.
27
28# This file is maintained in Automake, please report
29# bugs to <bug-automake@gnu.org> or send patches to
30# <automake-patches@gnu.org>.
31
32case $1 in
33 '')
34 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
35 exit 1;
36 ;;
37 -h | --h*)
38 cat <<\EOF
39Usage: compile [--help] [--version] PROGRAM [ARGS]
40
41Wrapper for compilers which do not understand `-c -o'.
42Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
43arguments, and rename the output as expected.
44
45If you are trying to build a whole package this is not the
46right script to run: please start by reading the file `INSTALL'.
47
48Report bugs to <bug-automake@gnu.org>.
49EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "compile $scriptversion"
54 exit $?
55 ;;
56esac
57
58ofile=
59cfile=
60eat=
61
62for arg
63do
64 if test -n "$eat"; then
65 eat=
66 else
67 case $1 in
68 -o)
69 # configure might choose to run compile as `compile cc -o foo foo.c'.
70 # So we strip `-o arg' only if arg is an object.
71 eat=1
72 case $2 in
73 *.o | *.obj)
74 ofile=$2
75 ;;
76 *)
77 set x "$@" -o "$2"
78 shift
79 ;;
80 esac
81 ;;
82 *.c)
83 cfile=$1
84 set x "$@" "$1"
85 shift
86 ;;
87 *)
88 set x "$@" "$1"
89 shift
90 ;;
91 esac
92 fi
93 shift
94done
95
96if test -z "$ofile" || test -z "$cfile"; then
97 # If no `-o' option was seen then we might have been invoked from a
98 # pattern rule where we don't need one. That is ok -- this is a
99 # normal compilation that the losing compiler can handle. If no
100 # `.c' file was seen then we are probably linking. That is also
101 # ok.
102 exec "$@"
103fi
104
105# Name of file we expect compiler to create.
106cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
107
108# Create the lock directory.
109# Note: use `[/\\:.-]' here to ensure that we don't use the same name
110# that we are using for the .o file. Also, base the name on the expected
111# object file name, since that is what matters with a parallel build.
112lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
113while true; do
114 if mkdir "$lockdir" >/dev/null 2>&1; then
115 break
116 fi
117 sleep 1
118done
119# FIXME: race condition here if user kills between mkdir and trap.
120trap "rmdir '$lockdir'; exit 1" 1 2 15
121
122# Run the compile.
123"$@"
124ret=$?
125
126if test -f "$cofile"; then
127 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
128elif test -f "${cofile}bj"; then
129 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
130fi
131
132rmdir "$lockdir"
133exit $ret
134
135# Local Variables:
136# mode: shell-script
137# sh-indentation: 2
138# eval: (add-hook 'write-file-hooks 'time-stamp)
139# time-stamp-start: "scriptversion="
140# time-stamp-format: "%:y-%02m-%02d.%02H"
141# time-stamp-time-zone: "UTC"
142# time-stamp-end: "; # UTC"
143# End:
diff --git a/libraries/embryo/config.guess b/libraries/embryo/config.guess
deleted file mode 100755
index c2246a4..0000000
--- a/libraries/embryo/config.guess
+++ /dev/null
@@ -1,1502 +0,0 @@
1#! /bin/sh
2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.
6
7timestamp='2009-12-30'
8
9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23#
24# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program.
28
29
30# Originally written by Per Bothner. Please send patches (context
31# diff format) to <config-patches@gnu.org> and include a ChangeLog
32# entry.
33#
34# This script attempts to guess a canonical system name similar to
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37#
38# You can get the latest version of this script from:
39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40
41me=`echo "$0" | sed -e 's,.*/,,'`
42
43usage="\
44Usage: $0 [OPTION]
45
46Output the configuration name of the system \`$me' is run on.
47
48Operation modes:
49 -h, --help print this help, then exit
50 -t, --time-stamp print date of last modification, then exit
51 -v, --version print version number, then exit
52
53Report bugs and patches to <config-patches@gnu.org>."
54
55version="\
56GNU config.guess ($timestamp)
57
58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61Software Foundation, Inc.
62
63This is free software; see the source for copying conditions. There is NO
64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65
66help="
67Try \`$me --help' for more information."
68
69# Parse command line
70while test $# -gt 0 ; do
71 case $1 in
72 --time-stamp | --time* | -t )
73 echo "$timestamp" ; exit ;;
74 --version | -v )
75 echo "$version" ; exit ;;
76 --help | --h* | -h )
77 echo "$usage"; exit ;;
78 -- ) # Stop option processing
79 shift; break ;;
80 - ) # Use stdin as input.
81 break ;;
82 -* )
83 echo "$me: invalid option $1$help" >&2
84 exit 1 ;;
85 * )
86 break ;;
87 esac
88done
89
90if test $# != 0; then
91 echo "$me: too many arguments$help" >&2
92 exit 1
93fi
94
95trap 'exit 1' 1 2 15
96
97# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98# compiler to aid in system detection is discouraged as it requires
99# temporary files to be created and, as you can see below, it is a
100# headache to deal with in a portable fashion.
101
102# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
103# use `HOST_CC' if defined, but it is deprecated.
104
105# Portable tmp directory creation inspired by the Autoconf team.
106
107set_cc_for_build='
108trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
109trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
110: ${TMPDIR=/tmp} ;
111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
115dummy=$tmp/dummy ;
116tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
117case $CC_FOR_BUILD,$HOST_CC,$CC in
118 ,,) echo "int x;" > $dummy.c ;
119 for c in cc gcc c89 c99 ; do
120 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
121 CC_FOR_BUILD="$c"; break ;
122 fi ;
123 done ;
124 if test x"$CC_FOR_BUILD" = x ; then
125 CC_FOR_BUILD=no_compiler_found ;
126 fi
127 ;;
128 ,,*) CC_FOR_BUILD=$CC ;;
129 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
130esac ; set_cc_for_build= ;'
131
132# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
133# (ghazi@noc.rutgers.edu 1994-08-24)
134if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
135 PATH=$PATH:/.attbin ; export PATH
136fi
137
138UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
141UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142
143# Note: order is significant - the case branches are not exclusive.
144
145case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146 *:NetBSD:*:*)
147 # NetBSD (nbsd) targets should (where applicable) match one or
148 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
149 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
150 # switched to ELF, *-*-netbsd* would select the old
151 # object file format. This provides both forward
152 # compatibility and a consistent mechanism for selecting the
153 # object file format.
154 #
155 # Note: NetBSD doesn't particularly care about the vendor
156 # portion of the name. We always set it to "unknown".
157 sysctl="sysctl -n hw.machine_arch"
158 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
159 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
160 case "${UNAME_MACHINE_ARCH}" in
161 armeb) machine=armeb-unknown ;;
162 arm*) machine=arm-unknown ;;
163 sh3el) machine=shl-unknown ;;
164 sh3eb) machine=sh-unknown ;;
165 sh5el) machine=sh5le-unknown ;;
166 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
167 esac
168 # The Operating System including object format, if it has switched
169 # to ELF recently, or will in the future.
170 case "${UNAME_MACHINE_ARCH}" in
171 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
172 eval $set_cc_for_build
173 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
174 | grep -q __ELF__
175 then
176 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
177 # Return netbsd for either. FIX?
178 os=netbsd
179 else
180 os=netbsdelf
181 fi
182 ;;
183 *)
184 os=netbsd
185 ;;
186 esac
187 # The OS release
188 # Debian GNU/NetBSD machines have a different userland, and
189 # thus, need a distinct triplet. However, they do not need
190 # kernel version information, so it can be replaced with a
191 # suitable tag, in the style of linux-gnu.
192 case "${UNAME_VERSION}" in
193 Debian*)
194 release='-gnu'
195 ;;
196 *)
197 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
198 ;;
199 esac
200 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201 # contains redundant information, the shorter form:
202 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203 echo "${machine}-${os}${release}"
204 exit ;;
205 *:OpenBSD:*:*)
206 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208 exit ;;
209 *:ekkoBSD:*:*)
210 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
211 exit ;;
212 *:SolidBSD:*:*)
213 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214 exit ;;
215 macppc:MirBSD:*:*)
216 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
217 exit ;;
218 *:MirBSD:*:*)
219 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
220 exit ;;
221 alpha:OSF1:*:*)
222 case $UNAME_RELEASE in
223 *4.0)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225 ;;
226 *5.*)
227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228 ;;
229 esac
230 # According to Compaq, /usr/sbin/psrinfo has been available on
231 # OSF/1 and Tru64 systems produced since 1995. I hope that
232 # covers most systems running today. This code pipes the CPU
233 # types through head -n 1, so we only detect the type of CPU 0.
234 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
235 case "$ALPHA_CPU_TYPE" in
236 "EV4 (21064)")
237 UNAME_MACHINE="alpha" ;;
238 "EV4.5 (21064)")
239 UNAME_MACHINE="alpha" ;;
240 "LCA4 (21066/21068)")
241 UNAME_MACHINE="alpha" ;;
242 "EV5 (21164)")
243 UNAME_MACHINE="alphaev5" ;;
244 "EV5.6 (21164A)")
245 UNAME_MACHINE="alphaev56" ;;
246 "EV5.6 (21164PC)")
247 UNAME_MACHINE="alphapca56" ;;
248 "EV5.7 (21164PC)")
249 UNAME_MACHINE="alphapca57" ;;
250 "EV6 (21264)")
251 UNAME_MACHINE="alphaev6" ;;
252 "EV6.7 (21264A)")
253 UNAME_MACHINE="alphaev67" ;;
254 "EV6.8CB (21264C)")
255 UNAME_MACHINE="alphaev68" ;;
256 "EV6.8AL (21264B)")
257 UNAME_MACHINE="alphaev68" ;;
258 "EV6.8CX (21264D)")
259 UNAME_MACHINE="alphaev68" ;;
260 "EV6.9A (21264/EV69A)")
261 UNAME_MACHINE="alphaev69" ;;
262 "EV7 (21364)")
263 UNAME_MACHINE="alphaev7" ;;
264 "EV7.9 (21364A)")
265 UNAME_MACHINE="alphaev79" ;;
266 esac
267 # A Pn.n version is a patched version.
268 # A Vn.n version is a released version.
269 # A Tn.n version is a released field test version.
270 # A Xn.n version is an unreleased experimental baselevel.
271 # 1.2 uses "1.2" for uname -r.
272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273 exit ;;
274 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model?
278 echo alpha-pc-interix
279 exit ;;
280 21064:Windows_NT:50:3)
281 echo alpha-dec-winnt3.5
282 exit ;;
283 Amiga*:UNIX_System_V:4.0:*)
284 echo m68k-unknown-sysv4
285 exit ;;
286 *:[Aa]miga[Oo][Ss]:*:*)
287 echo ${UNAME_MACHINE}-unknown-amigaos
288 exit ;;
289 *:[Mm]orph[Oo][Ss]:*:*)
290 echo ${UNAME_MACHINE}-unknown-morphos
291 exit ;;
292 *:OS/390:*:*)
293 echo i370-ibm-openedition
294 exit ;;
295 *:z/VM:*:*)
296 echo s390-ibm-zvmoe
297 exit ;;
298 *:OS400:*:*)
299 echo powerpc-ibm-os400
300 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*)
305 echo arm-unknown-riscos
306 exit ;;
307 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308 echo hppa1.1-hitachi-hiuxmpp
309 exit ;;
310 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312 if test "`(/bin/universe) 2>/dev/null`" = att ; then
313 echo pyramid-pyramid-sysv3
314 else
315 echo pyramid-pyramid-bsd
316 fi
317 exit ;;
318 NILE*:*:*:dcosx)
319 echo pyramid-pyramid-svr4
320 exit ;;
321 DRS?6000:unix:4.0:6*)
322 echo sparc-icl-nx6
323 exit ;;
324 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325 case `/usr/bin/uname -p` in
326 sparc) echo sparc-icl-nx7; exit ;;
327 esac ;;
328 s390x:SunOS:*:*)
329 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
331 sun4H:SunOS:5.*:*)
332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341 eval $set_cc_for_build
342 SUN_ARCH="i386"
343 # If there is a compiler, see if it is configured for 64-bit objects.
344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345 # This test works for both compilers.
346 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349 grep IS_64BIT_ARCH >/dev/null
350 then
351 SUN_ARCH="x86_64"
352 fi
353 fi
354 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 sun4*:SunOS:6*:*)
357 # According to config.sub, this is the proper way to canonicalize
358 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
359 # it's likely to be more like Solaris than SunOS4.
360 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361 exit ;;
362 sun4*:SunOS:*:*)
363 case "`/usr/bin/arch -k`" in
364 Series*|S4*)
365 UNAME_RELEASE=`uname -v`
366 ;;
367 esac
368 # Japanese Language versions have a version number like `4.1.3-JL'.
369 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
370 exit ;;
371 sun3*:SunOS:*:*)
372 echo m68k-sun-sunos${UNAME_RELEASE}
373 exit ;;
374 sun*:*:4.2BSD:*)
375 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377 case "`/bin/arch`" in
378 sun3)
379 echo m68k-sun-sunos${UNAME_RELEASE}
380 ;;
381 sun4)
382 echo sparc-sun-sunos${UNAME_RELEASE}
383 ;;
384 esac
385 exit ;;
386 aushp:SunOS:*:*)
387 echo sparc-auspex-sunos${UNAME_RELEASE}
388 exit ;;
389 # The situation for MiNT is a little confusing. The machine name
390 # can be virtually everything (everything which is not
391 # "atarist" or "atariste" at least should have a processor
392 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
393 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;;
415 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;;
418 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE}
420 exit ;;
421 RISC*:Mach:*:*)
422 echo mips-dec-mach_bsd4.3
423 exit ;;
424 RISC*:ULTRIX:*:*)
425 echo mips-dec-ultrix${UNAME_RELEASE}
426 exit ;;
427 VAX*:ULTRIX*:*:*)
428 echo vax-dec-ultrix${UNAME_RELEASE}
429 exit ;;
430 2020:CLIX:*:* | 2430:CLIX:*:*)
431 echo clipper-intergraph-clix${UNAME_RELEASE}
432 exit ;;
433 mips:*:*:UMIPS | mips:*:*:RISCos)
434 eval $set_cc_for_build
435 sed 's/^ //' << EOF >$dummy.c
436#ifdef __cplusplus
437#include <stdio.h> /* for printf() prototype */
438 int main (int argc, char *argv[]) {
439#else
440 int main (argc, argv) int argc; char *argv[]; {
441#endif
442 #if defined (host_mips) && defined (MIPSEB)
443 #if defined (SYSTYPE_SYSV)
444 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445 #endif
446 #if defined (SYSTYPE_SVR4)
447 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448 #endif
449 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451 #endif
452 #endif
453 exit (-1);
454 }
455EOF
456 $CC_FOR_BUILD -o $dummy $dummy.c &&
457 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
458 SYSTEM_NAME=`$dummy $dummyarg` &&
459 { echo "$SYSTEM_NAME"; exit; }
460 echo mips-mips-riscos${UNAME_RELEASE}
461 exit ;;
462 Motorola:PowerMAX_OS:*:*)
463 echo powerpc-motorola-powermax
464 exit ;;
465 Motorola:*:4.3:PL8-*)
466 echo powerpc-harris-powermax
467 exit ;;
468 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469 echo powerpc-harris-powermax
470 exit ;;
471 Night_Hawk:Power_UNIX:*:*)
472 echo powerpc-harris-powerunix
473 exit ;;
474 m88k:CX/UX:7*:*)
475 echo m88k-harris-cxux7
476 exit ;;
477 m88k:*:4*:R4*)
478 echo m88k-motorola-sysv4
479 exit ;;
480 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3
482 exit ;;
483 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then
491 echo m88k-dg-dgux${UNAME_RELEASE}
492 else
493 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi
495 else
496 echo i586-dg-dgux${UNAME_RELEASE}
497 fi
498 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3
501 exit ;;
502 M88*:*:R3*:*)
503 # Delta 88k system running SVR3
504 echo m88k-motorola-sysv3
505 exit ;;
506 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507 echo m88k-tektronix-sysv3
508 exit ;;
509 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510 echo m68k-tektronix-bsd
511 exit ;;
512 *:IRIX*:*:*)
513 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514 exit ;;
515 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
517 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518 i*86:AIX:*:*)
519 echo i386-ibm-aix
520 exit ;;
521 ia64:AIX:*:*)
522 if [ -x /usr/bin/oslevel ] ; then
523 IBM_REV=`/usr/bin/oslevel`
524 else
525 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526 fi
527 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528 exit ;;
529 *:AIX:2:3)
530 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531 eval $set_cc_for_build
532 sed 's/^ //' << EOF >$dummy.c
533 #include <sys/systemcfg.h>
534
535 main()
536 {
537 if (!__power_pc())
538 exit(1);
539 puts("powerpc-ibm-aix3.2.5");
540 exit(0);
541 }
542EOF
543 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
544 then
545 echo "$SYSTEM_NAME"
546 else
547 echo rs6000-ibm-aix3.2.5
548 fi
549 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550 echo rs6000-ibm-aix3.2.4
551 else
552 echo rs6000-ibm-aix3.2
553 fi
554 exit ;;
555 *:AIX:*:[456])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000
559 else
560 IBM_ARCH=powerpc
561 fi
562 if [ -x /usr/bin/oslevel ] ; then
563 IBM_REV=`/usr/bin/oslevel`
564 else
565 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566 fi
567 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
568 exit ;;
569 *:AIX:*:*)
570 echo rs6000-ibm-aix
571 exit ;;
572 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573 echo romp-ibm-bsd4.4
574 exit ;;
575 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
576 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
577 exit ;; # report: romp-ibm BSD 4.3
578 *:BOSX:*:*)
579 echo rs6000-bull-bosx
580 exit ;;
581 DPX/2?00:B.O.S.:*:*)
582 echo m68k-bull-sysv3
583 exit ;;
584 9000/[34]??:4.3bsd:1.*:*)
585 echo m68k-hp-bsd
586 exit ;;
587 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588 echo m68k-hp-bsd4.4
589 exit ;;
590 9000/[34678]??:HP-UX:*:*)
591 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592 case "${UNAME_MACHINE}" in
593 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;;
608 esac
609 fi
610 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c
613
614 #define _HPUX_SOURCE
615 #include <stdlib.h>
616 #include <unistd.h>
617
618 int main ()
619 {
620 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif
623 long cpu = sysconf (_SC_CPU_VERSION);
624
625 switch (cpu)
626 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS)
631 switch (bits)
632 {
633 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break;
636 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break;
639 #endif
640 default: puts ("hppa1.0"); break;
641 }
642 exit (0);
643 }
644EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;;
648 esac
649 if [ ${HP_ARCH} = "hppa2.0w" ]
650 then
651 eval $set_cc_for_build
652
653 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
654 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
655 # generating 64-bit code. GNU and HP use different nomenclature:
656 #
657 # $ CC_FOR_BUILD=cc ./config.guess
658 # => hppa2.0w-hp-hpux11.23
659 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
660 # => hppa64-hp-hpux11.23
661
662 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
663 grep -q __LP64__
664 then
665 HP_ARCH="hppa2.0w"
666 else
667 HP_ARCH="hppa64"
668 fi
669 fi
670 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
671 exit ;;
672 ia64:HP-UX:*:*)
673 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674 echo ia64-hp-hpux${HPUX_REV}
675 exit ;;
676 3050*:HI-UX:*:*)
677 eval $set_cc_for_build
678 sed 's/^ //' << EOF >$dummy.c
679 #include <unistd.h>
680 int
681 main ()
682 {
683 long cpu = sysconf (_SC_CPU_VERSION);
684 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
686 results, however. */
687 if (CPU_IS_PA_RISC (cpu))
688 {
689 switch (cpu)
690 {
691 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694 default: puts ("hppa-hitachi-hiuxwe2"); break;
695 }
696 }
697 else if (CPU_IS_HP_MC68K (cpu))
698 puts ("m68k-hitachi-hiuxwe2");
699 else puts ("unknown-hitachi-hiuxwe2");
700 exit (0);
701 }
702EOF
703 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
704 { echo "$SYSTEM_NAME"; exit; }
705 echo unknown-hitachi-hiuxwe2
706 exit ;;
707 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708 echo hppa1.1-hp-bsd
709 exit ;;
710 9000/8??:4.3bsd:*:*)
711 echo hppa1.0-hp-bsd
712 exit ;;
713 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714 echo hppa1.0-hp-mpeix
715 exit ;;
716 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717 echo hppa1.1-hp-osf
718 exit ;;
719 hp8??:OSF1:*:*)
720 echo hppa1.0-hp-osf
721 exit ;;
722 i*86:OSF1:*:*)
723 if [ -x /usr/sbin/sysversion ] ; then
724 echo ${UNAME_MACHINE}-unknown-osf1mk
725 else
726 echo ${UNAME_MACHINE}-unknown-osf1
727 fi
728 exit ;;
729 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites
731 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd
734 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd
738 else echo c2-convex-bsd
739 fi
740 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd
743 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd
746 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd
749 exit ;;
750 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;;
753 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757 -e 's/\.[^.]*$/.X/'
758 exit ;;
759 CRAY*TS:*:*:*)
760 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
761 exit ;;
762 CRAY*T3E:*:*:*)
763 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
764 exit ;;
765 CRAY*SV1:*:*:*)
766 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
767 exit ;;
768 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
777 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;;
785 sparc*:BSD/OS:*:*)
786 echo sparc-unknown-bsdi${UNAME_RELEASE}
787 exit ;;
788 *:BSD/OS:*:*)
789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790 exit ;;
791 *:FreeBSD:*:*)
792 case ${UNAME_MACHINE} in
793 pc98)
794 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 amd64)
796 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797 *)
798 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799 esac
800 exit ;;
801 i*:CYGWIN*:*)
802 echo ${UNAME_MACHINE}-pc-cygwin
803 exit ;;
804 *:MINGW*:*)
805 echo ${UNAME_MACHINE}-pc-mingw32
806 exit ;;
807 i*:windows32*:*)
808 # uname -m includes "-pc" on this system.
809 echo ${UNAME_MACHINE}-mingw32
810 exit ;;
811 i*:PW*:*)
812 echo ${UNAME_MACHINE}-pc-pw32
813 exit ;;
814 *:Interix*:*)
815 case ${UNAME_MACHINE} in
816 x86)
817 echo i586-pc-interix${UNAME_RELEASE}
818 exit ;;
819 authenticamd | genuineintel | EM64T)
820 echo x86_64-unknown-interix${UNAME_RELEASE}
821 exit ;;
822 IA64)
823 echo ia64-unknown-interix${UNAME_RELEASE}
824 exit ;;
825 esac ;;
826 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
827 echo i${UNAME_MACHINE}-pc-mks
828 exit ;;
829 8664:Windows_NT:*)
830 echo x86_64-pc-mks
831 exit ;;
832 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
833 # How do we know it's Interix rather than the generic POSIX subsystem?
834 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
835 # UNAME_MACHINE based on the output of uname instead of i386?
836 echo i586-pc-interix
837 exit ;;
838 i*:UWIN*:*)
839 echo ${UNAME_MACHINE}-pc-uwin
840 exit ;;
841 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
842 echo x86_64-unknown-cygwin
843 exit ;;
844 p*:CYGWIN*:*)
845 echo powerpcle-unknown-cygwin
846 exit ;;
847 prep*:SunOS:5.*:*)
848 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
849 exit ;;
850 *:GNU:*:*)
851 # the GNU system
852 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
853 exit ;;
854 *:GNU/*:*:*)
855 # other systems with GNU libc and userland
856 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
857 exit ;;
858 i*86:Minix:*:*)
859 echo ${UNAME_MACHINE}-pc-minix
860 exit ;;
861 alpha:Linux:*:*)
862 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863 EV5) UNAME_MACHINE=alphaev5 ;;
864 EV56) UNAME_MACHINE=alphaev56 ;;
865 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874 exit ;;
875 arm*:Linux:*:*)
876 eval $set_cc_for_build
877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878 | grep -q __ARM_EABI__
879 then
880 echo ${UNAME_MACHINE}-unknown-linux-gnu
881 else
882 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
883 fi
884 exit ;;
885 avr32*:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu
887 exit ;;
888 cris:Linux:*:*)
889 echo cris-axis-linux-gnu
890 exit ;;
891 crisv32:Linux:*:*)
892 echo crisv32-axis-linux-gnu
893 exit ;;
894 frv:Linux:*:*)
895 echo frv-unknown-linux-gnu
896 exit ;;
897 i*86:Linux:*:*)
898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
907 exit ;;
908 ia64:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu
910 exit ;;
911 m32r*:Linux:*:*)
912 echo ${UNAME_MACHINE}-unknown-linux-gnu
913 exit ;;
914 m68*:Linux:*:*)
915 echo ${UNAME_MACHINE}-unknown-linux-gnu
916 exit ;;
917 mips:Linux:*:* | mips64:Linux:*:*)
918 eval $set_cc_for_build
919 sed 's/^ //' << EOF >$dummy.c
920 #undef CPU
921 #undef ${UNAME_MACHINE}
922 #undef ${UNAME_MACHINE}el
923 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
924 CPU=${UNAME_MACHINE}el
925 #else
926 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
927 CPU=${UNAME_MACHINE}
928 #else
929 CPU=
930 #endif
931 #endif
932EOF
933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935 ;;
936 or32:Linux:*:*)
937 echo or32-unknown-linux-gnu
938 exit ;;
939 padre:Linux:*:*)
940 echo sparc-unknown-linux-gnu
941 exit ;;
942 parisc64:Linux:*:* | hppa64:Linux:*:*)
943 echo hppa64-unknown-linux-gnu
944 exit ;;
945 parisc:Linux:*:* | hppa:Linux:*:*)
946 # Look for CPU level
947 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948 PA7*) echo hppa1.1-unknown-linux-gnu ;;
949 PA8*) echo hppa2.0-unknown-linux-gnu ;;
950 *) echo hppa-unknown-linux-gnu ;;
951 esac
952 exit ;;
953 ppc64:Linux:*:*)
954 echo powerpc64-unknown-linux-gnu
955 exit ;;
956 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu
958 exit ;;
959 s390:Linux:*:* | s390x:Linux:*:*)
960 echo ${UNAME_MACHINE}-ibm-linux
961 exit ;;
962 sh64*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu
964 exit ;;
965 sh*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu
967 exit ;;
968 sparc:Linux:*:* | sparc64:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;;
971 vax:Linux:*:*)
972 echo ${UNAME_MACHINE}-dec-linux-gnu
973 exit ;;
974 x86_64:Linux:*:*)
975 echo x86_64-unknown-linux-gnu
976 exit ;;
977 xtensa*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu
979 exit ;;
980 i*86:DYNIX/ptx:4*:*)
981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
982 # earlier versions are messed up and put the nodename in both
983 # sysname and nodename.
984 echo i386-sequent-sysv4
985 exit ;;
986 i*86:UNIX_SV:4.2MP:2.*)
987 # Unixware is an offshoot of SVR4, but it has its own version
988 # number series starting with 2...
989 # I am not positive that other SVR4 systems won't match this,
990 # I just have to hope. -- rms.
991 # Use sysv4.2uw... so that sysv4* matches it.
992 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
993 exit ;;
994 i*86:OS/2:*:*)
995 # If we were able to find `uname', then EMX Unix compatibility
996 # is probably installed.
997 echo ${UNAME_MACHINE}-pc-os2-emx
998 exit ;;
999 i*86:XTS-300:*:STOP)
1000 echo ${UNAME_MACHINE}-unknown-stop
1001 exit ;;
1002 i*86:atheos:*:*)
1003 echo ${UNAME_MACHINE}-unknown-atheos
1004 exit ;;
1005 i*86:syllable:*:*)
1006 echo ${UNAME_MACHINE}-pc-syllable
1007 exit ;;
1008 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1009 echo i386-unknown-lynxos${UNAME_RELEASE}
1010 exit ;;
1011 i*86:*DOS:*:*)
1012 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1013 exit ;;
1014 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1015 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1016 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1017 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1018 else
1019 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1020 fi
1021 exit ;;
1022 i*86:*:5:[678]*)
1023 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1024 case `/bin/uname -X | grep "^Machine"` in
1025 *486*) UNAME_MACHINE=i486 ;;
1026 *Pentium) UNAME_MACHINE=i586 ;;
1027 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1028 esac
1029 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1030 exit ;;
1031 i*86:*:3.2:*)
1032 if test -f /usr/options/cb.name; then
1033 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1034 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1035 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1036 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1037 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1038 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1039 && UNAME_MACHINE=i586
1040 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1041 && UNAME_MACHINE=i686
1042 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1043 && UNAME_MACHINE=i686
1044 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1045 else
1046 echo ${UNAME_MACHINE}-pc-sysv32
1047 fi
1048 exit ;;
1049 pc:*:*:*)
1050 # Left here for compatibility:
1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1052 # the processor, so we play safe by assuming i586.
1053 # Note: whatever this is, it MUST be the same as what config.sub
1054 # prints for the "djgpp" host, or else GDB configury will decide that
1055 # this is a cross-build.
1056 echo i586-pc-msdosdjgpp
1057 exit ;;
1058 Intel:Mach:3*:*)
1059 echo i386-pc-mach3
1060 exit ;;
1061 paragon:*:*:*)
1062 echo i860-intel-osf1
1063 exit ;;
1064 i860:*:4.*:*) # i860-SVR4
1065 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1066 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1067 else # Add other i860-SVR4 vendors below as they are discovered.
1068 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1069 fi
1070 exit ;;
1071 mini*:CTIX:SYS*5:*)
1072 # "miniframe"
1073 echo m68010-convergent-sysv
1074 exit ;;
1075 mc68k:UNIX:SYSTEM5:3.51m)
1076 echo m68k-convergent-sysv
1077 exit ;;
1078 M680?0:D-NIX:5.3:*)
1079 echo m68k-diab-dnix
1080 exit ;;
1081 M68*:*:R3V[5678]*:*)
1082 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1083 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1084 OS_REL=''
1085 test -r /etc/.relid \
1086 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1093 && { echo i486-ncr-sysv4; exit; } ;;
1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095 OS_REL='.3'
1096 test -r /etc/.relid \
1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1099 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1100 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1101 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1102 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1103 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1104 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1105 echo m68k-unknown-lynxos${UNAME_RELEASE}
1106 exit ;;
1107 mc68030:UNIX_System_V:4.*:*)
1108 echo m68k-atari-sysv4
1109 exit ;;
1110 TSUNAMI:LynxOS:2.*:*)
1111 echo sparc-unknown-lynxos${UNAME_RELEASE}
1112 exit ;;
1113 rs6000:LynxOS:2.*:*)
1114 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1115 exit ;;
1116 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1117 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1118 exit ;;
1119 SM[BE]S:UNIX_SV:*:*)
1120 echo mips-dde-sysv${UNAME_RELEASE}
1121 exit ;;
1122 RM*:ReliantUNIX-*:*:*)
1123 echo mips-sni-sysv4
1124 exit ;;
1125 RM*:SINIX-*:*:*)
1126 echo mips-sni-sysv4
1127 exit ;;
1128 *:SINIX-*:*:*)
1129 if uname -p 2>/dev/null >/dev/null ; then
1130 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1131 echo ${UNAME_MACHINE}-sni-sysv4
1132 else
1133 echo ns32k-sni-sysv
1134 fi
1135 exit ;;
1136 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1137 # says <Richard.M.Bartel@ccMail.Census.GOV>
1138 echo i586-unisys-sysv4
1139 exit ;;
1140 *:UNIX_System_V:4*:FTX*)
1141 # From Gerald Hewes <hewes@openmarket.com>.
1142 # How about differentiating between stratus architectures? -djm
1143 echo hppa1.1-stratus-sysv4
1144 exit ;;
1145 *:*:*:FTX*)
1146 # From seanf@swdc.stratus.com.
1147 echo i860-stratus-sysv4
1148 exit ;;
1149 i*86:VOS:*:*)
1150 # From Paul.Green@stratus.com.
1151 echo ${UNAME_MACHINE}-stratus-vos
1152 exit ;;
1153 *:VOS:*:*)
1154 # From Paul.Green@stratus.com.
1155 echo hppa1.1-stratus-vos
1156 exit ;;
1157 mc68*:A/UX:*:*)
1158 echo m68k-apple-aux${UNAME_RELEASE}
1159 exit ;;
1160 news*:NEWS-OS:6*:*)
1161 echo mips-sony-newsos6
1162 exit ;;
1163 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1164 if [ -d /usr/nec ]; then
1165 echo mips-nec-sysv${UNAME_RELEASE}
1166 else
1167 echo mips-unknown-sysv${UNAME_RELEASE}
1168 fi
1169 exit ;;
1170 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1171 echo powerpc-be-beos
1172 exit ;;
1173 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1174 echo powerpc-apple-beos
1175 exit ;;
1176 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1177 echo i586-pc-beos
1178 exit ;;
1179 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1180 echo i586-pc-haiku
1181 exit ;;
1182 SX-4:SUPER-UX:*:*)
1183 echo sx4-nec-superux${UNAME_RELEASE}
1184 exit ;;
1185 SX-5:SUPER-UX:*:*)
1186 echo sx5-nec-superux${UNAME_RELEASE}
1187 exit ;;
1188 SX-6:SUPER-UX:*:*)
1189 echo sx6-nec-superux${UNAME_RELEASE}
1190 exit ;;
1191 SX-7:SUPER-UX:*:*)
1192 echo sx7-nec-superux${UNAME_RELEASE}
1193 exit ;;
1194 SX-8:SUPER-UX:*:*)
1195 echo sx8-nec-superux${UNAME_RELEASE}
1196 exit ;;
1197 SX-8R:SUPER-UX:*:*)
1198 echo sx8r-nec-superux${UNAME_RELEASE}
1199 exit ;;
1200 Power*:Rhapsody:*:*)
1201 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1202 exit ;;
1203 *:Rhapsody:*:*)
1204 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1205 exit ;;
1206 *:Darwin:*:*)
1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1208 case $UNAME_PROCESSOR in
1209 i386)
1210 eval $set_cc_for_build
1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1214 grep IS_64BIT_ARCH >/dev/null
1215 then
1216 UNAME_PROCESSOR="x86_64"
1217 fi
1218 fi ;;
1219 unknown) UNAME_PROCESSOR=powerpc ;;
1220 esac
1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1222 exit ;;
1223 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1224 UNAME_PROCESSOR=`uname -p`
1225 if test "$UNAME_PROCESSOR" = "x86"; then
1226 UNAME_PROCESSOR=i386
1227 UNAME_MACHINE=pc
1228 fi
1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1230 exit ;;
1231 *:QNX:*:4*)
1232 echo i386-pc-qnx
1233 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;;
1237 NSR-?:NONSTOP_KERNEL:*:*)
1238 echo nsr-tandem-nsk${UNAME_RELEASE}
1239 exit ;;
1240 *:NonStop-UX:*:*)
1241 echo mips-compaq-nonstopux
1242 exit ;;
1243 BS2000:POSIX*:*:*)
1244 echo bs2000-siemens-sysv
1245 exit ;;
1246 DS/*:UNIX_System_V:*:*)
1247 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1248 exit ;;
1249 *:Plan9:*:*)
1250 # "uname -m" is not consistent, so use $cputype instead. 386
1251 # is converted to i386 for consistency with other x86
1252 # operating systems.
1253 if test "$cputype" = "386"; then
1254 UNAME_MACHINE=i386
1255 else
1256 UNAME_MACHINE="$cputype"
1257 fi
1258 echo ${UNAME_MACHINE}-unknown-plan9
1259 exit ;;
1260 *:TOPS-10:*:*)
1261 echo pdp10-unknown-tops10
1262 exit ;;
1263 *:TENEX:*:*)
1264 echo pdp10-unknown-tenex
1265 exit ;;
1266 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1267 echo pdp10-dec-tops20
1268 exit ;;
1269 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1270 echo pdp10-xkl-tops20
1271 exit ;;
1272 *:TOPS-20:*:*)
1273 echo pdp10-unknown-tops20
1274 exit ;;
1275 *:ITS:*:*)
1276 echo pdp10-unknown-its
1277 exit ;;
1278 SEI:*:*:SEIUX)
1279 echo mips-sei-seiux${UNAME_RELEASE}
1280 exit ;;
1281 *:DragonFly:*:*)
1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1283 exit ;;
1284 *:*VMS:*:*)
1285 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1286 case "${UNAME_MACHINE}" in
1287 A*) echo alpha-dec-vms ; exit ;;
1288 I*) echo ia64-dec-vms ; exit ;;
1289 V*) echo vax-dec-vms ; exit ;;
1290 esac ;;
1291 *:XENIX:*:SysV)
1292 echo i386-pc-xenix
1293 exit ;;
1294 i*86:skyos:*:*)
1295 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1296 exit ;;
1297 i*86:rdos:*:*)
1298 echo ${UNAME_MACHINE}-pc-rdos
1299 exit ;;
1300 i*86:AROS:*:*)
1301 echo ${UNAME_MACHINE}-pc-aros
1302 exit ;;
1303esac
1304
1305#echo '(No uname command or uname output not recognized.)' 1>&2
1306#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1307
1308eval $set_cc_for_build
1309cat >$dummy.c <<EOF
1310#ifdef _SEQUENT_
1311# include <sys/types.h>
1312# include <sys/utsname.h>
1313#endif
1314main ()
1315{
1316#if defined (sony)
1317#if defined (MIPSEB)
1318 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1319 I don't know.... */
1320 printf ("mips-sony-bsd\n"); exit (0);
1321#else
1322#include <sys/param.h>
1323 printf ("m68k-sony-newsos%s\n",
1324#ifdef NEWSOS4
1325 "4"
1326#else
1327 ""
1328#endif
1329 ); exit (0);
1330#endif
1331#endif
1332
1333#if defined (__arm) && defined (__acorn) && defined (__unix)
1334 printf ("arm-acorn-riscix\n"); exit (0);
1335#endif
1336
1337#if defined (hp300) && !defined (hpux)
1338 printf ("m68k-hp-bsd\n"); exit (0);
1339#endif
1340
1341#if defined (NeXT)
1342#if !defined (__ARCHITECTURE__)
1343#define __ARCHITECTURE__ "m68k"
1344#endif
1345 int version;
1346 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1347 if (version < 4)
1348 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1349 else
1350 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1351 exit (0);
1352#endif
1353
1354#if defined (MULTIMAX) || defined (n16)
1355#if defined (UMAXV)
1356 printf ("ns32k-encore-sysv\n"); exit (0);
1357#else
1358#if defined (CMU)
1359 printf ("ns32k-encore-mach\n"); exit (0);
1360#else
1361 printf ("ns32k-encore-bsd\n"); exit (0);
1362#endif
1363#endif
1364#endif
1365
1366#if defined (__386BSD__)
1367 printf ("i386-pc-bsd\n"); exit (0);
1368#endif
1369
1370#if defined (sequent)
1371#if defined (i386)
1372 printf ("i386-sequent-dynix\n"); exit (0);
1373#endif
1374#if defined (ns32000)
1375 printf ("ns32k-sequent-dynix\n"); exit (0);
1376#endif
1377#endif
1378
1379#if defined (_SEQUENT_)
1380 struct utsname un;
1381
1382 uname(&un);
1383
1384 if (strncmp(un.version, "V2", 2) == 0) {
1385 printf ("i386-sequent-ptx2\n"); exit (0);
1386 }
1387 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1388 printf ("i386-sequent-ptx1\n"); exit (0);
1389 }
1390 printf ("i386-sequent-ptx\n"); exit (0);
1391
1392#endif
1393
1394#if defined (vax)
1395# if !defined (ultrix)
1396# include <sys/param.h>
1397# if defined (BSD)
1398# if BSD == 43
1399 printf ("vax-dec-bsd4.3\n"); exit (0);
1400# else
1401# if BSD == 199006
1402 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1403# else
1404 printf ("vax-dec-bsd\n"); exit (0);
1405# endif
1406# endif
1407# else
1408 printf ("vax-dec-bsd\n"); exit (0);
1409# endif
1410# else
1411 printf ("vax-dec-ultrix\n"); exit (0);
1412# endif
1413#endif
1414
1415#if defined (alliant) && defined (i860)
1416 printf ("i860-alliant-bsd\n"); exit (0);
1417#endif
1418
1419 exit (1);
1420}
1421EOF
1422
1423$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1424 { echo "$SYSTEM_NAME"; exit; }
1425
1426# Apollos put the system type in the environment.
1427
1428test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1429
1430# Convex versions that predate uname can use getsysinfo(1)
1431
1432if [ -x /usr/convex/getsysinfo ]
1433then
1434 case `getsysinfo -f cpu_type` in
1435 c1*)
1436 echo c1-convex-bsd
1437 exit ;;
1438 c2*)
1439 if getsysinfo -f scalar_acc
1440 then echo c32-convex-bsd
1441 else echo c2-convex-bsd
1442 fi
1443 exit ;;
1444 c34*)
1445 echo c34-convex-bsd
1446 exit ;;
1447 c38*)
1448 echo c38-convex-bsd
1449 exit ;;
1450 c4*)
1451 echo c4-convex-bsd
1452 exit ;;
1453 esac
1454fi
1455
1456cat >&2 <<EOF
1457$0: unable to guess system type
1458
1459This script, last modified $timestamp, has failed to recognize
1460the operating system you are using. It is advised that you
1461download the most up to date version of the config scripts from
1462
1463 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1464and
1465 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1466
1467If the version you run ($0) is already up to date, please
1468send the following data and any information you think might be
1469pertinent to <config-patches@gnu.org> in order to provide the needed
1470information to handle your system.
1471
1472config.guess timestamp = $timestamp
1473
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1481
1482hostinfo = `(hostinfo) 2>/dev/null`
1483/bin/universe = `(/bin/universe) 2>/dev/null`
1484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1485/bin/arch = `(/bin/arch) 2>/dev/null`
1486/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1488
1489UNAME_MACHINE = ${UNAME_MACHINE}
1490UNAME_RELEASE = ${UNAME_RELEASE}
1491UNAME_SYSTEM = ${UNAME_SYSTEM}
1492UNAME_VERSION = ${UNAME_VERSION}
1493EOF
1494
1495exit 1
1496
1497# Local variables:
1498# eval: (add-hook 'write-file-hooks 'time-stamp)
1499# time-stamp-start: "timestamp='"
1500# time-stamp-format: "%:y-%02m-%02d"
1501# time-stamp-end: "'"
1502# End:
diff --git a/libraries/embryo/config.h.in b/libraries/embryo/config.h.in
deleted file mode 100644
index cd3ce40..0000000
--- a/libraries/embryo/config.h.in
+++ /dev/null
@@ -1,151 +0,0 @@
1/* config.h.in. Generated from configure.ac by autoheader. */
2
3
4#ifndef EFL_CONFIG_H__
5#define EFL_CONFIG_H__
6
7
8/* Define if building universal (internal helper macro) */
9#undef AC_APPLE_UNIVERSAL_BUILD
10
11/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
12 systems. This function is required for `alloca.c' support on those systems.
13 */
14#undef CRAY_STACKSEG_END
15
16/* Define to 1 if using `alloca.c'. */
17#undef C_ALLOCA
18
19/* Defined if gettimeofday is available. */
20#undef EFL_HAVE_GETTIMEOFDAY
21
22/* Define to 1 if you have `alloca', as a function or macro. */
23#undef HAVE_ALLOCA
24
25/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
26 */
27#undef HAVE_ALLOCA_H
28
29/* Define to 1 if you have the <dlfcn.h> header file. */
30#undef HAVE_DLFCN_H
31
32/* Set to 1 if Evil library is installed */
33#undef HAVE_EVIL
34
35/* Define to 1 if you have Exotic. */
36#undef HAVE_EXOTIC
37
38/* Define to 1 if you have the <inttypes.h> header file. */
39#undef HAVE_INTTYPES_H
40
41/* Define to 1 if you have the <memory.h> header file. */
42#undef HAVE_MEMORY_H
43
44/* Define to 1 if you have the <stdint.h> header file. */
45#undef HAVE_STDINT_H
46
47/* Define to 1 if you have the <stdlib.h> header file. */
48#undef HAVE_STDLIB_H
49
50/* Define to 1 if you have the <strings.h> header file. */
51#undef HAVE_STRINGS_H
52
53/* Define to 1 if you have the <string.h> header file. */
54#undef HAVE_STRING_H
55
56/* Define to 1 if you have the <sys/stat.h> header file. */
57#undef HAVE_SYS_STAT_H
58
59/* Define to 1 if you have the <sys/types.h> header file. */
60#undef HAVE_SYS_TYPES_H
61
62/* Define to 1 if you have the <unistd.h> header file. */
63#undef HAVE_UNISTD_H
64
65/* Define to 1 if your compiler has __attribute__ */
66#undef HAVE___ATTRIBUTE__
67
68/* Define to the sub-directory in which libtool stores uninstalled libraries.
69 */
70#undef LT_OBJDIR
71
72/* Define to 1 if your C compiler doesn't accept -c and -o together. */
73#undef NO_MINUS_C_MINUS_O
74
75/* Name of package */
76#undef PACKAGE
77
78/* Define to the address where bug reports for this package should be sent. */
79#undef PACKAGE_BUGREPORT
80
81/* Define to the full name of this package. */
82#undef PACKAGE_NAME
83
84/* Define to the full name and version of this package. */
85#undef PACKAGE_STRING
86
87/* Define to the one symbol short name of this package. */
88#undef PACKAGE_TARNAME
89
90/* Define to the home page for this package. */
91#undef PACKAGE_URL
92
93/* Define to the version of this package. */
94#undef PACKAGE_VERSION
95
96/* default value since PATH_MAX is not defined */
97#undef PATH_MAX
98
99/* If using the C implementation of alloca, define if you know the
100 direction of stack growth for your system; otherwise it will be
101 automatically deduced at runtime.
102 STACK_DIRECTION > 0 => grows toward higher addresses
103 STACK_DIRECTION < 0 => grows toward lower addresses
104 STACK_DIRECTION = 0 => direction of growth unknown */
105#undef STACK_DIRECTION
106
107/* Define to 1 if you have the ANSI C header files. */
108#undef STDC_HEADERS
109
110/* Version number of package */
111#undef VERSION
112
113/* Major version */
114#undef VMAJ
115
116/* Micro version */
117#undef VMIC
118
119/* Minor version */
120#undef VMIN
121
122/* Revison */
123#undef VREV
124
125/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
126 significant byte first (like Motorola and SPARC, unlike Intel). */
127#if defined AC_APPLE_UNIVERSAL_BUILD
128# if defined __BIG_ENDIAN__
129# define WORDS_BIGENDIAN 1
130# endif
131#else
132# ifndef WORDS_BIGENDIAN
133# undef WORDS_BIGENDIAN
134# endif
135#endif
136
137/* Macro declaring a function argument to be unused */
138#undef __UNUSED__
139
140/* Define to empty if `const' does not conform to ANSI C. */
141#undef const
142
143/* Define to `__inline__' or `__inline' if that's what the C compiler
144 calls it, or to nothing if 'inline' is not supported under any name. */
145#ifndef __cplusplus
146#undef inline
147#endif
148
149
150#endif /* EFL_CONFIG_H__ */
151
diff --git a/libraries/embryo/config.sub b/libraries/embryo/config.sub
deleted file mode 100755
index c2d1257..0000000
--- a/libraries/embryo/config.sub
+++ /dev/null
@@ -1,1714 +0,0 @@
1#! /bin/sh
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.
6
7timestamp='2010-01-22'
8
9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software
11# can handle that machine. It does not imply ALL GNU software can.
12#
13# This file is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26# 02110-1301, USA.
27#
28# As a special exception to the GNU General Public License, if you
29# distribute this file as part of a program that contains a
30# configuration script generated by Autoconf, you may include it under
31# the same distribution terms that you use for the rest of that program.
32
33
34# Please send patches to <config-patches@gnu.org>. Submit a context
35# diff and a properly formatted GNU ChangeLog entry.
36#
37# Configuration subroutine to validate and canonicalize a configuration type.
38# Supply the specified configuration type as an argument.
39# If it is invalid, we print an error message on stderr and exit with code 1.
40# Otherwise, we print the canonical config type on stdout and succeed.
41
42# You can get the latest version of this script from:
43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44
45# This file is supposed to be the same for all GNU packages
46# and recognize all the CPU types, system types and aliases
47# that are meaningful with *any* GNU software.
48# Each package is responsible for reporting which valid configurations
49# it does not support. The user should be able to distinguish
50# a failure to support a valid configuration from a meaningless
51# configuration.
52
53# The goal of this file is to map all the various variations of a given
54# machine specification into a single specification in the form:
55# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
56# or in some cases, the newer four-part form:
57# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
58# It is wrong to echo any other type of specification.
59
60me=`echo "$0" | sed -e 's,.*/,,'`
61
62usage="\
63Usage: $0 [OPTION] CPU-MFR-OPSYS
64 $0 [OPTION] ALIAS
65
66Canonicalize a configuration name.
67
68Operation modes:
69 -h, --help print this help, then exit
70 -t, --time-stamp print date of last modification, then exit
71 -v, --version print version number, then exit
72
73Report bugs and patches to <config-patches@gnu.org>."
74
75version="\
76GNU config.sub ($timestamp)
77
78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
80Software Foundation, Inc.
81
82This is free software; see the source for copying conditions. There is NO
83warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
84
85help="
86Try \`$me --help' for more information."
87
88# Parse command line
89while test $# -gt 0 ; do
90 case $1 in
91 --time-stamp | --time* | -t )
92 echo "$timestamp" ; exit ;;
93 --version | -v )
94 echo "$version" ; exit ;;
95 --help | --h* | -h )
96 echo "$usage"; exit ;;
97 -- ) # Stop option processing
98 shift; break ;;
99 - ) # Use stdin as input.
100 break ;;
101 -* )
102 echo "$me: invalid option $1$help"
103 exit 1 ;;
104
105 *local*)
106 # First pass through any local machine types.
107 echo $1
108 exit ;;
109
110 * )
111 break ;;
112 esac
113done
114
115case $# in
116 0) echo "$me: missing argument$help" >&2
117 exit 1;;
118 1) ;;
119 *) echo "$me: too many arguments$help" >&2
120 exit 1;;
121esac
122
123# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
124# Here we must recognize all the valid KERNEL-OS combinations.
125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126case $maybe_os in
127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os
132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
133 ;;
134 *)
135 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
136 if [ $basic_machine != $1 ]
137 then os=`echo $1 | sed 's/.*-/-/'`
138 else os=; fi
139 ;;
140esac
141
142### Let's recognize common machines as not being operating systems so
143### that things like config.sub decstation-3100 work. We also
144### recognize some manufacturers as not being operating systems, so we
145### can provide default operating systems below.
146case $os in
147 -sun*os*)
148 # Prevent following clause from handling this invalid input.
149 ;;
150 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
151 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
152 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156 -apple | -axis | -knuth | -cray | -microblaze)
157 os=
158 basic_machine=$1
159 ;;
160 -bluegene*)
161 os=-cnk
162 ;;
163 -sim | -cisco | -oki | -wec | -winbond)
164 os=
165 basic_machine=$1
166 ;;
167 -scout)
168 ;;
169 -wrs)
170 os=-vxworks
171 basic_machine=$1
172 ;;
173 -chorusos*)
174 os=-chorusos
175 basic_machine=$1
176 ;;
177 -chorusrdb)
178 os=-chorusrdb
179 basic_machine=$1
180 ;;
181 -hiux*)
182 os=-hiuxwe2
183 ;;
184 -sco6)
185 os=-sco5v6
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco5)
189 os=-sco3.2v5
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco4)
193 os=-sco3.2v4
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco3.2.[4-9]*)
197 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco3.2v[4-9]*)
201 # Don't forget version if it is 3.2v4 or newer.
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -sco5v6*)
205 # Don't forget version if it is 3.2v4 or newer.
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 ;;
208 -sco*)
209 os=-sco3.2v2
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 ;;
212 -udk*)
213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 ;;
215 -isc)
216 os=-isc2.2
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -clix*)
220 basic_machine=clipper-intergraph
221 ;;
222 -isc*)
223 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
233 ;;
234 -psos*)
235 os=-psos
236 ;;
237 -mint | -mint[0-9]*)
238 basic_machine=m68k-atari
239 os=-mint
240 ;;
241esac
242
243# Decode aliases for certain CPU-COMPANY combinations.
244case $basic_machine in
245 # Recognize the basic CPU types without company name.
246 # Some are omitted here because they have special meanings below.
247 1750a | 580 \
248 | a29k \
249 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
250 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
251 | am33_2.0 \
252 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
253 | bfin \
254 | c4x | clipper \
255 | d10v | d30v | dlx | dsp16xx \
256 | fido | fr30 | frv \
257 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
258 | i370 | i860 | i960 | ia64 \
259 | ip2k | iq2000 \
260 | lm32 \
261 | m32c | m32r | m32rle | m68000 | m68k | m88k \
262 | maxq | mb | microblaze | mcore | mep | metag \
263 | mips | mipsbe | mipseb | mipsel | mipsle \
264 | mips16 \
265 | mips64 | mips64el \
266 | mips64octeon | mips64octeonel \
267 | mips64orion | mips64orionel \
268 | mips64r5900 | mips64r5900el \
269 | mips64vr | mips64vrel \
270 | mips64vr4100 | mips64vr4100el \
271 | mips64vr4300 | mips64vr4300el \
272 | mips64vr5000 | mips64vr5000el \
273 | mips64vr5900 | mips64vr5900el \
274 | mipsisa32 | mipsisa32el \
275 | mipsisa32r2 | mipsisa32r2el \
276 | mipsisa64 | mipsisa64el \
277 | mipsisa64r2 | mipsisa64r2el \
278 | mipsisa64sb1 | mipsisa64sb1el \
279 | mipsisa64sr71k | mipsisa64sr71kel \
280 | mipstx39 | mipstx39el \
281 | mn10200 | mn10300 \
282 | moxie \
283 | mt \
284 | msp430 \
285 | nios | nios2 \
286 | ns16k | ns32k \
287 | or32 \
288 | pdp10 | pdp11 | pj | pjl \
289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
290 | pyramid \
291 | rx \
292 | score \
293 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
294 | sh64 | sh64le \
295 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
297 | spu | strongarm \
298 | tahoe | thumb | tic4x | tic80 | tron \
299 | ubicom32 \
300 | v850 | v850e \
301 | we32k \
302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
303 | z8k | z80)
304 basic_machine=$basic_machine-unknown
305 ;;
306 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
307 # Motorola 68HC11/12.
308 basic_machine=$basic_machine-unknown
309 os=-none
310 ;;
311 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
312 ;;
313 ms1)
314 basic_machine=mt-unknown
315 ;;
316
317 # We use `pc' rather than `unknown'
318 # because (1) that's what they normally are, and
319 # (2) the word "unknown" tends to confuse beginning users.
320 i*86 | x86_64)
321 basic_machine=$basic_machine-pc
322 ;;
323 # Object if more than one company name word.
324 *-*-*)
325 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
326 exit 1
327 ;;
328 # Recognize the basic CPU types with company name.
329 580-* \
330 | a29k-* \
331 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
332 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
333 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
334 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
335 | avr-* | avr32-* \
336 | bfin-* | bs2000-* \
337 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
338 | clipper-* | craynv-* | cydra-* \
339 | d10v-* | d30v-* | dlx-* \
340 | elxsi-* \
341 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
342 | h8300-* | h8500-* \
343 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
344 | i*86-* | i860-* | i960-* | ia64-* \
345 | ip2k-* | iq2000-* \
346 | lm32-* \
347 | m32c-* | m32r-* | m32rle-* \
348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
351 | mips16-* \
352 | mips64-* | mips64el-* \
353 | mips64octeon-* | mips64octeonel-* \
354 | mips64orion-* | mips64orionel-* \
355 | mips64r5900-* | mips64r5900el-* \
356 | mips64vr-* | mips64vrel-* \
357 | mips64vr4100-* | mips64vr4100el-* \
358 | mips64vr4300-* | mips64vr4300el-* \
359 | mips64vr5000-* | mips64vr5000el-* \
360 | mips64vr5900-* | mips64vr5900el-* \
361 | mipsisa32-* | mipsisa32el-* \
362 | mipsisa32r2-* | mipsisa32r2el-* \
363 | mipsisa64-* | mipsisa64el-* \
364 | mipsisa64r2-* | mipsisa64r2el-* \
365 | mipsisa64sb1-* | mipsisa64sb1el-* \
366 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
367 | mipstx39-* | mipstx39el-* \
368 | mmix-* \
369 | mt-* \
370 | msp430-* \
371 | nios-* | nios2-* \
372 | none-* | np1-* | ns16k-* | ns32k-* \
373 | orion-* \
374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
376 | pyramid-* \
377 | romp-* | rs6000-* | rx-* \
378 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
381 | sparclite-* \
382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
383 | tahoe-* | thumb-* \
384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
385 | tile-* | tilegx-* \
386 | tron-* \
387 | ubicom32-* \
388 | v850-* | v850e-* | vax-* \
389 | we32k-* \
390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
391 | xstormy16-* | xtensa*-* \
392 | ymp-* \
393 | z8k-* | z80-*)
394 ;;
395 # Recognize the basic CPU types without company name, with glob match.
396 xtensa*)
397 basic_machine=$basic_machine-unknown
398 ;;
399 # Recognize the various machine names and aliases which stand
400 # for a CPU type and a company and sometimes even an OS.
401 386bsd)
402 basic_machine=i386-unknown
403 os=-bsd
404 ;;
405 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
406 basic_machine=m68000-att
407 ;;
408 3b*)
409 basic_machine=we32k-att
410 ;;
411 a29khif)
412 basic_machine=a29k-amd
413 os=-udi
414 ;;
415 abacus)
416 basic_machine=abacus-unknown
417 ;;
418 adobe68k)
419 basic_machine=m68010-adobe
420 os=-scout
421 ;;
422 alliant | fx80)
423 basic_machine=fx80-alliant
424 ;;
425 altos | altos3068)
426 basic_machine=m68k-altos
427 ;;
428 am29k)
429 basic_machine=a29k-none
430 os=-bsd
431 ;;
432 amd64)
433 basic_machine=x86_64-pc
434 ;;
435 amd64-*)
436 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
437 ;;
438 amdahl)
439 basic_machine=580-amdahl
440 os=-sysv
441 ;;
442 amiga | amiga-*)
443 basic_machine=m68k-unknown
444 ;;
445 amigaos | amigados)
446 basic_machine=m68k-unknown
447 os=-amigaos
448 ;;
449 amigaunix | amix)
450 basic_machine=m68k-unknown
451 os=-sysv4
452 ;;
453 apollo68)
454 basic_machine=m68k-apollo
455 os=-sysv
456 ;;
457 apollo68bsd)
458 basic_machine=m68k-apollo
459 os=-bsd
460 ;;
461 aros)
462 basic_machine=i386-pc
463 os=-aros
464 ;;
465 aux)
466 basic_machine=m68k-apple
467 os=-aux
468 ;;
469 balance)
470 basic_machine=ns32k-sequent
471 os=-dynix
472 ;;
473 blackfin)
474 basic_machine=bfin-unknown
475 os=-linux
476 ;;
477 blackfin-*)
478 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
479 os=-linux
480 ;;
481 bluegene*)
482 basic_machine=powerpc-ibm
483 os=-cnk
484 ;;
485 c90)
486 basic_machine=c90-cray
487 os=-unicos
488 ;;
489 cegcc)
490 basic_machine=arm-unknown
491 os=-cegcc
492 ;;
493 convex-c1)
494 basic_machine=c1-convex
495 os=-bsd
496 ;;
497 convex-c2)
498 basic_machine=c2-convex
499 os=-bsd
500 ;;
501 convex-c32)
502 basic_machine=c32-convex
503 os=-bsd
504 ;;
505 convex-c34)
506 basic_machine=c34-convex
507 os=-bsd
508 ;;
509 convex-c38)
510 basic_machine=c38-convex
511 os=-bsd
512 ;;
513 cray | j90)
514 basic_machine=j90-cray
515 os=-unicos
516 ;;
517 craynv)
518 basic_machine=craynv-cray
519 os=-unicosmp
520 ;;
521 cr16)
522 basic_machine=cr16-unknown
523 os=-elf
524 ;;
525 crds | unos)
526 basic_machine=m68k-crds
527 ;;
528 crisv32 | crisv32-* | etraxfs*)
529 basic_machine=crisv32-axis
530 ;;
531 cris | cris-* | etrax*)
532 basic_machine=cris-axis
533 ;;
534 crx)
535 basic_machine=crx-unknown
536 os=-elf
537 ;;
538 da30 | da30-*)
539 basic_machine=m68k-da30
540 ;;
541 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
542 basic_machine=mips-dec
543 ;;
544 decsystem10* | dec10*)
545 basic_machine=pdp10-dec
546 os=-tops10
547 ;;
548 decsystem20* | dec20*)
549 basic_machine=pdp10-dec
550 os=-tops20
551 ;;
552 delta | 3300 | motorola-3300 | motorola-delta \
553 | 3300-motorola | delta-motorola)
554 basic_machine=m68k-motorola
555 ;;
556 delta88)
557 basic_machine=m88k-motorola
558 os=-sysv3
559 ;;
560 dicos)
561 basic_machine=i686-pc
562 os=-dicos
563 ;;
564 djgpp)
565 basic_machine=i586-pc
566 os=-msdosdjgpp
567 ;;
568 dpx20 | dpx20-*)
569 basic_machine=rs6000-bull
570 os=-bosx
571 ;;
572 dpx2* | dpx2*-bull)
573 basic_machine=m68k-bull
574 os=-sysv3
575 ;;
576 ebmon29k)
577 basic_machine=a29k-amd
578 os=-ebmon
579 ;;
580 elxsi)
581 basic_machine=elxsi-elxsi
582 os=-bsd
583 ;;
584 encore | umax | mmax)
585 basic_machine=ns32k-encore
586 ;;
587 es1800 | OSE68k | ose68k | ose | OSE)
588 basic_machine=m68k-ericsson
589 os=-ose
590 ;;
591 fx2800)
592 basic_machine=i860-alliant
593 ;;
594 genix)
595 basic_machine=ns32k-ns
596 ;;
597 gmicro)
598 basic_machine=tron-gmicro
599 os=-sysv
600 ;;
601 go32)
602 basic_machine=i386-pc
603 os=-go32
604 ;;
605 h3050r* | hiux*)
606 basic_machine=hppa1.1-hitachi
607 os=-hiuxwe2
608 ;;
609 h8300hms)
610 basic_machine=h8300-hitachi
611 os=-hms
612 ;;
613 h8300xray)
614 basic_machine=h8300-hitachi
615 os=-xray
616 ;;
617 h8500hms)
618 basic_machine=h8500-hitachi
619 os=-hms
620 ;;
621 harris)
622 basic_machine=m88k-harris
623 os=-sysv3
624 ;;
625 hp300-*)
626 basic_machine=m68k-hp
627 ;;
628 hp300bsd)
629 basic_machine=m68k-hp
630 os=-bsd
631 ;;
632 hp300hpux)
633 basic_machine=m68k-hp
634 os=-hpux
635 ;;
636 hp3k9[0-9][0-9] | hp9[0-9][0-9])
637 basic_machine=hppa1.0-hp
638 ;;
639 hp9k2[0-9][0-9] | hp9k31[0-9])
640 basic_machine=m68000-hp
641 ;;
642 hp9k3[2-9][0-9])
643 basic_machine=m68k-hp
644 ;;
645 hp9k6[0-9][0-9] | hp6[0-9][0-9])
646 basic_machine=hppa1.0-hp
647 ;;
648 hp9k7[0-79][0-9] | hp7[0-79][0-9])
649 basic_machine=hppa1.1-hp
650 ;;
651 hp9k78[0-9] | hp78[0-9])
652 # FIXME: really hppa2.0-hp
653 basic_machine=hppa1.1-hp
654 ;;
655 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
656 # FIXME: really hppa2.0-hp
657 basic_machine=hppa1.1-hp
658 ;;
659 hp9k8[0-9][13679] | hp8[0-9][13679])
660 basic_machine=hppa1.1-hp
661 ;;
662 hp9k8[0-9][0-9] | hp8[0-9][0-9])
663 basic_machine=hppa1.0-hp
664 ;;
665 hppa-next)
666 os=-nextstep3
667 ;;
668 hppaosf)
669 basic_machine=hppa1.1-hp
670 os=-osf
671 ;;
672 hppro)
673 basic_machine=hppa1.1-hp
674 os=-proelf
675 ;;
676 i370-ibm* | ibm*)
677 basic_machine=i370-ibm
678 ;;
679# I'm not sure what "Sysv32" means. Should this be sysv3.2?
680 i*86v32)
681 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
682 os=-sysv32
683 ;;
684 i*86v4*)
685 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
686 os=-sysv4
687 ;;
688 i*86v)
689 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
690 os=-sysv
691 ;;
692 i*86sol2)
693 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
694 os=-solaris2
695 ;;
696 i386mach)
697 basic_machine=i386-mach
698 os=-mach
699 ;;
700 i386-vsta | vsta)
701 basic_machine=i386-unknown
702 os=-vsta
703 ;;
704 iris | iris4d)
705 basic_machine=mips-sgi
706 case $os in
707 -irix*)
708 ;;
709 *)
710 os=-irix4
711 ;;
712 esac
713 ;;
714 isi68 | isi)
715 basic_machine=m68k-isi
716 os=-sysv
717 ;;
718 m68knommu)
719 basic_machine=m68k-unknown
720 os=-linux
721 ;;
722 m68knommu-*)
723 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
724 os=-linux
725 ;;
726 m88k-omron*)
727 basic_machine=m88k-omron
728 ;;
729 magnum | m3230)
730 basic_machine=mips-mips
731 os=-sysv
732 ;;
733 merlin)
734 basic_machine=ns32k-utek
735 os=-sysv
736 ;;
737 microblaze)
738 basic_machine=microblaze-xilinx
739 ;;
740 mingw32)
741 basic_machine=i386-pc
742 os=-mingw32
743 ;;
744 mingw32ce)
745 basic_machine=arm-unknown
746 os=-mingw32ce
747 ;;
748 miniframe)
749 basic_machine=m68000-convergent
750 ;;
751 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
752 basic_machine=m68k-atari
753 os=-mint
754 ;;
755 mips3*-*)
756 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
757 ;;
758 mips3*)
759 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
760 ;;
761 monitor)
762 basic_machine=m68k-rom68k
763 os=-coff
764 ;;
765 morphos)
766 basic_machine=powerpc-unknown
767 os=-morphos
768 ;;
769 msdos)
770 basic_machine=i386-pc
771 os=-msdos
772 ;;
773 ms1-*)
774 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
775 ;;
776 mvs)
777 basic_machine=i370-ibm
778 os=-mvs
779 ;;
780 ncr3000)
781 basic_machine=i486-ncr
782 os=-sysv4
783 ;;
784 netbsd386)
785 basic_machine=i386-unknown
786 os=-netbsd
787 ;;
788 netwinder)
789 basic_machine=armv4l-rebel
790 os=-linux
791 ;;
792 news | news700 | news800 | news900)
793 basic_machine=m68k-sony
794 os=-newsos
795 ;;
796 news1000)
797 basic_machine=m68030-sony
798 os=-newsos
799 ;;
800 news-3600 | risc-news)
801 basic_machine=mips-sony
802 os=-newsos
803 ;;
804 necv70)
805 basic_machine=v70-nec
806 os=-sysv
807 ;;
808 next | m*-next )
809 basic_machine=m68k-next
810 case $os in
811 -nextstep* )
812 ;;
813 -ns2*)
814 os=-nextstep2
815 ;;
816 *)
817 os=-nextstep3
818 ;;
819 esac
820 ;;
821 nh3000)
822 basic_machine=m68k-harris
823 os=-cxux
824 ;;
825 nh[45]000)
826 basic_machine=m88k-harris
827 os=-cxux
828 ;;
829 nindy960)
830 basic_machine=i960-intel
831 os=-nindy
832 ;;
833 mon960)
834 basic_machine=i960-intel
835 os=-mon960
836 ;;
837 nonstopux)
838 basic_machine=mips-compaq
839 os=-nonstopux
840 ;;
841 np1)
842 basic_machine=np1-gould
843 ;;
844 nsr-tandem)
845 basic_machine=nsr-tandem
846 ;;
847 op50n-* | op60c-*)
848 basic_machine=hppa1.1-oki
849 os=-proelf
850 ;;
851 openrisc | openrisc-*)
852 basic_machine=or32-unknown
853 ;;
854 os400)
855 basic_machine=powerpc-ibm
856 os=-os400
857 ;;
858 OSE68000 | ose68000)
859 basic_machine=m68000-ericsson
860 os=-ose
861 ;;
862 os68k)
863 basic_machine=m68k-none
864 os=-os68k
865 ;;
866 pa-hitachi)
867 basic_machine=hppa1.1-hitachi
868 os=-hiuxwe2
869 ;;
870 paragon)
871 basic_machine=i860-intel
872 os=-osf
873 ;;
874 parisc)
875 basic_machine=hppa-unknown
876 os=-linux
877 ;;
878 parisc-*)
879 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
880 os=-linux
881 ;;
882 pbd)
883 basic_machine=sparc-tti
884 ;;
885 pbb)
886 basic_machine=m68k-tti
887 ;;
888 pc532 | pc532-*)
889 basic_machine=ns32k-pc532
890 ;;
891 pc98)
892 basic_machine=i386-pc
893 ;;
894 pc98-*)
895 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
896 ;;
897 pentium | p5 | k5 | k6 | nexgen | viac3)
898 basic_machine=i586-pc
899 ;;
900 pentiumpro | p6 | 6x86 | athlon | athlon_*)
901 basic_machine=i686-pc
902 ;;
903 pentiumii | pentium2 | pentiumiii | pentium3)
904 basic_machine=i686-pc
905 ;;
906 pentium4)
907 basic_machine=i786-pc
908 ;;
909 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
910 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
911 ;;
912 pentiumpro-* | p6-* | 6x86-* | athlon-*)
913 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
914 ;;
915 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
916 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
917 ;;
918 pentium4-*)
919 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
920 ;;
921 pn)
922 basic_machine=pn-gould
923 ;;
924 power) basic_machine=power-ibm
925 ;;
926 ppc) basic_machine=powerpc-unknown
927 ;;
928 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
929 ;;
930 ppcle | powerpclittle | ppc-le | powerpc-little)
931 basic_machine=powerpcle-unknown
932 ;;
933 ppcle-* | powerpclittle-*)
934 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
935 ;;
936 ppc64) basic_machine=powerpc64-unknown
937 ;;
938 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
939 ;;
940 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
941 basic_machine=powerpc64le-unknown
942 ;;
943 ppc64le-* | powerpc64little-*)
944 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
945 ;;
946 ps2)
947 basic_machine=i386-ibm
948 ;;
949 pw32)
950 basic_machine=i586-unknown
951 os=-pw32
952 ;;
953 rdos)
954 basic_machine=i386-pc
955 os=-rdos
956 ;;
957 rom68k)
958 basic_machine=m68k-rom68k
959 os=-coff
960 ;;
961 rm[46]00)
962 basic_machine=mips-siemens
963 ;;
964 rtpc | rtpc-*)
965 basic_machine=romp-ibm
966 ;;
967 s390 | s390-*)
968 basic_machine=s390-ibm
969 ;;
970 s390x | s390x-*)
971 basic_machine=s390x-ibm
972 ;;
973 sa29200)
974 basic_machine=a29k-amd
975 os=-udi
976 ;;
977 sb1)
978 basic_machine=mipsisa64sb1-unknown
979 ;;
980 sb1el)
981 basic_machine=mipsisa64sb1el-unknown
982 ;;
983 sde)
984 basic_machine=mipsisa32-sde
985 os=-elf
986 ;;
987 sei)
988 basic_machine=mips-sei
989 os=-seiux
990 ;;
991 sequent)
992 basic_machine=i386-sequent
993 ;;
994 sh)
995 basic_machine=sh-hitachi
996 os=-hms
997 ;;
998 sh5el)
999 basic_machine=sh5le-unknown
1000 ;;
1001 sh64)
1002 basic_machine=sh64-unknown
1003 ;;
1004 sparclite-wrs | simso-wrs)
1005 basic_machine=sparclite-wrs
1006 os=-vxworks
1007 ;;
1008 sps7)
1009 basic_machine=m68k-bull
1010 os=-sysv2
1011 ;;
1012 spur)
1013 basic_machine=spur-unknown
1014 ;;
1015 st2000)
1016 basic_machine=m68k-tandem
1017 ;;
1018 stratus)
1019 basic_machine=i860-stratus
1020 os=-sysv4
1021 ;;
1022 sun2)
1023 basic_machine=m68000-sun
1024 ;;
1025 sun2os3)
1026 basic_machine=m68000-sun
1027 os=-sunos3
1028 ;;
1029 sun2os4)
1030 basic_machine=m68000-sun
1031 os=-sunos4
1032 ;;
1033 sun3os3)
1034 basic_machine=m68k-sun
1035 os=-sunos3
1036 ;;
1037 sun3os4)
1038 basic_machine=m68k-sun
1039 os=-sunos4
1040 ;;
1041 sun4os3)
1042 basic_machine=sparc-sun
1043 os=-sunos3
1044 ;;
1045 sun4os4)
1046 basic_machine=sparc-sun
1047 os=-sunos4
1048 ;;
1049 sun4sol2)
1050 basic_machine=sparc-sun
1051 os=-solaris2
1052 ;;
1053 sun3 | sun3-*)
1054 basic_machine=m68k-sun
1055 ;;
1056 sun4)
1057 basic_machine=sparc-sun
1058 ;;
1059 sun386 | sun386i | roadrunner)
1060 basic_machine=i386-sun
1061 ;;
1062 sv1)
1063 basic_machine=sv1-cray
1064 os=-unicos
1065 ;;
1066 symmetry)
1067 basic_machine=i386-sequent
1068 os=-dynix
1069 ;;
1070 t3e)
1071 basic_machine=alphaev5-cray
1072 os=-unicos
1073 ;;
1074 t90)
1075 basic_machine=t90-cray
1076 os=-unicos
1077 ;;
1078 tic54x | c54x*)
1079 basic_machine=tic54x-unknown
1080 os=-coff
1081 ;;
1082 tic55x | c55x*)
1083 basic_machine=tic55x-unknown
1084 os=-coff
1085 ;;
1086 tic6x | c6x*)
1087 basic_machine=tic6x-unknown
1088 os=-coff
1089 ;;
1090 # This must be matched before tile*.
1091 tilegx*)
1092 basic_machine=tilegx-unknown
1093 os=-linux-gnu
1094 ;;
1095 tile*)
1096 basic_machine=tile-unknown
1097 os=-linux-gnu
1098 ;;
1099 tx39)
1100 basic_machine=mipstx39-unknown
1101 ;;
1102 tx39el)
1103 basic_machine=mipstx39el-unknown
1104 ;;
1105 toad1)
1106 basic_machine=pdp10-xkl
1107 os=-tops20
1108 ;;
1109 tower | tower-32)
1110 basic_machine=m68k-ncr
1111 ;;
1112 tpf)
1113 basic_machine=s390x-ibm
1114 os=-tpf
1115 ;;
1116 udi29k)
1117 basic_machine=a29k-amd
1118 os=-udi
1119 ;;
1120 ultra3)
1121 basic_machine=a29k-nyu
1122 os=-sym1
1123 ;;
1124 v810 | necv810)
1125 basic_machine=v810-nec
1126 os=-none
1127 ;;
1128 vaxv)
1129 basic_machine=vax-dec
1130 os=-sysv
1131 ;;
1132 vms)
1133 basic_machine=vax-dec
1134 os=-vms
1135 ;;
1136 vpp*|vx|vx-*)
1137 basic_machine=f301-fujitsu
1138 ;;
1139 vxworks960)
1140 basic_machine=i960-wrs
1141 os=-vxworks
1142 ;;
1143 vxworks68)
1144 basic_machine=m68k-wrs
1145 os=-vxworks
1146 ;;
1147 vxworks29k)
1148 basic_machine=a29k-wrs
1149 os=-vxworks
1150 ;;
1151 w65*)
1152 basic_machine=w65-wdc
1153 os=-none
1154 ;;
1155 w89k-*)
1156 basic_machine=hppa1.1-winbond
1157 os=-proelf
1158 ;;
1159 xbox)
1160 basic_machine=i686-pc
1161 os=-mingw32
1162 ;;
1163 xps | xps100)
1164 basic_machine=xps100-honeywell
1165 ;;
1166 ymp)
1167 basic_machine=ymp-cray
1168 os=-unicos
1169 ;;
1170 z8k-*-coff)
1171 basic_machine=z8k-unknown
1172 os=-sim
1173 ;;
1174 z80-*-coff)
1175 basic_machine=z80-unknown
1176 os=-sim
1177 ;;
1178 none)
1179 basic_machine=none-none
1180 os=-none
1181 ;;
1182
1183# Here we handle the default manufacturer of certain CPU types. It is in
1184# some cases the only manufacturer, in others, it is the most popular.
1185 w89k)
1186 basic_machine=hppa1.1-winbond
1187 ;;
1188 op50n)
1189 basic_machine=hppa1.1-oki
1190 ;;
1191 op60c)
1192 basic_machine=hppa1.1-oki
1193 ;;
1194 romp)
1195 basic_machine=romp-ibm
1196 ;;
1197 mmix)
1198 basic_machine=mmix-knuth
1199 ;;
1200 rs6000)
1201 basic_machine=rs6000-ibm
1202 ;;
1203 vax)
1204 basic_machine=vax-dec
1205 ;;
1206 pdp10)
1207 # there are many clones, so DEC is not a safe bet
1208 basic_machine=pdp10-unknown
1209 ;;
1210 pdp11)
1211 basic_machine=pdp11-dec
1212 ;;
1213 we32k)
1214 basic_machine=we32k-att
1215 ;;
1216 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1217 basic_machine=sh-unknown
1218 ;;
1219 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1220 basic_machine=sparc-sun
1221 ;;
1222 cydra)
1223 basic_machine=cydra-cydrome
1224 ;;
1225 orion)
1226 basic_machine=orion-highlevel
1227 ;;
1228 orion105)
1229 basic_machine=clipper-highlevel
1230 ;;
1231 mac | mpw | mac-mpw)
1232 basic_machine=m68k-apple
1233 ;;
1234 pmac | pmac-mpw)
1235 basic_machine=powerpc-apple
1236 ;;
1237 *-unknown)
1238 # Make sure to match an already-canonicalized machine name.
1239 ;;
1240 *)
1241 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1242 exit 1
1243 ;;
1244esac
1245
1246# Here we canonicalize certain aliases for manufacturers.
1247case $basic_machine in
1248 *-digital*)
1249 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1250 ;;
1251 *-commodore*)
1252 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1253 ;;
1254 *)
1255 ;;
1256esac
1257
1258# Decode manufacturer-specific aliases for certain operating systems.
1259
1260if [ x"$os" != x"" ]
1261then
1262case $os in
1263 # First match some system type aliases
1264 # that might get confused with valid system types.
1265 # -solaris* is a basic system type, with this one exception.
1266 -auroraux)
1267 os=-auroraux
1268 ;;
1269 -solaris1 | -solaris1.*)
1270 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1271 ;;
1272 -solaris)
1273 os=-solaris2
1274 ;;
1275 -svr4*)
1276 os=-sysv4
1277 ;;
1278 -unixware*)
1279 os=-sysv4.2uw
1280 ;;
1281 -gnu/linux*)
1282 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1283 ;;
1284 # First accept the basic system types.
1285 # The portable systems comes first.
1286 # Each alternative MUST END IN A *, to match a version number.
1287 # -sysv* is not here because it comes later, after sysvr4.
1288 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1289 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1290 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1291 | -sym* | -kopensolaris* \
1292 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1293 | -aos* | -aros* \
1294 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1295 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1296 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1297 | -openbsd* | -solidbsd* \
1298 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1299 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1300 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1301 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1302 | -chorusos* | -chorusrdb* | -cegcc* \
1303 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1304 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1305 | -uxpv* | -beos* | -mpeix* | -udk* \
1306 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1307 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1308 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1309 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1310 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1311 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1312 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1313 # Remember, each alternative MUST END IN *, to match a version number.
1314 ;;
1315 -qnx*)
1316 case $basic_machine in
1317 x86-* | i*86-*)
1318 ;;
1319 *)
1320 os=-nto$os
1321 ;;
1322 esac
1323 ;;
1324 -nto-qnx*)
1325 ;;
1326 -nto*)
1327 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1328 ;;
1329 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1330 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1331 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1332 ;;
1333 -mac*)
1334 os=`echo $os | sed -e 's|mac|macos|'`
1335 ;;
1336 -linux-dietlibc)
1337 os=-linux-dietlibc
1338 ;;
1339 -linux*)
1340 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1341 ;;
1342 -sunos5*)
1343 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1344 ;;
1345 -sunos6*)
1346 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1347 ;;
1348 -opened*)
1349 os=-openedition
1350 ;;
1351 -os400*)
1352 os=-os400
1353 ;;
1354 -wince*)
1355 os=-wince
1356 ;;
1357 -osfrose*)
1358 os=-osfrose
1359 ;;
1360 -osf*)
1361 os=-osf
1362 ;;
1363 -utek*)
1364 os=-bsd
1365 ;;
1366 -dynix*)
1367 os=-bsd
1368 ;;
1369 -acis*)
1370 os=-aos
1371 ;;
1372 -atheos*)
1373 os=-atheos
1374 ;;
1375 -syllable*)
1376 os=-syllable
1377 ;;
1378 -386bsd)
1379 os=-bsd
1380 ;;
1381 -ctix* | -uts*)
1382 os=-sysv
1383 ;;
1384 -nova*)
1385 os=-rtmk-nova
1386 ;;
1387 -ns2 )
1388 os=-nextstep2
1389 ;;
1390 -nsk*)
1391 os=-nsk
1392 ;;
1393 # Preserve the version number of sinix5.
1394 -sinix5.*)
1395 os=`echo $os | sed -e 's|sinix|sysv|'`
1396 ;;
1397 -sinix*)
1398 os=-sysv4
1399 ;;
1400 -tpf*)
1401 os=-tpf
1402 ;;
1403 -triton*)
1404 os=-sysv3
1405 ;;
1406 -oss*)
1407 os=-sysv3
1408 ;;
1409 -svr4)
1410 os=-sysv4
1411 ;;
1412 -svr3)
1413 os=-sysv3
1414 ;;
1415 -sysvr4)
1416 os=-sysv4
1417 ;;
1418 # This must come after -sysvr4.
1419 -sysv*)
1420 ;;
1421 -ose*)
1422 os=-ose
1423 ;;
1424 -es1800*)
1425 os=-ose
1426 ;;
1427 -xenix)
1428 os=-xenix
1429 ;;
1430 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1431 os=-mint
1432 ;;
1433 -aros*)
1434 os=-aros
1435 ;;
1436 -kaos*)
1437 os=-kaos
1438 ;;
1439 -zvmoe)
1440 os=-zvmoe
1441 ;;
1442 -dicos*)
1443 os=-dicos
1444 ;;
1445 -nacl*)
1446 ;;
1447 -none)
1448 ;;
1449 *)
1450 # Get rid of the `-' at the beginning of $os.
1451 os=`echo $os | sed 's/[^-]*-//'`
1452 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1453 exit 1
1454 ;;
1455esac
1456else
1457
1458# Here we handle the default operating systems that come with various machines.
1459# The value should be what the vendor currently ships out the door with their
1460# machine or put another way, the most popular os provided with the machine.
1461
1462# Note that if you're going to try to match "-MANUFACTURER" here (say,
1463# "-sun"), then you have to tell the case statement up towards the top
1464# that MANUFACTURER isn't an operating system. Otherwise, code above
1465# will signal an error saying that MANUFACTURER isn't an operating
1466# system, and we'll never get to this point.
1467
1468case $basic_machine in
1469 score-*)
1470 os=-elf
1471 ;;
1472 spu-*)
1473 os=-elf
1474 ;;
1475 *-acorn)
1476 os=-riscix1.2
1477 ;;
1478 arm*-rebel)
1479 os=-linux
1480 ;;
1481 arm*-semi)
1482 os=-aout
1483 ;;
1484 c4x-* | tic4x-*)
1485 os=-coff
1486 ;;
1487 # This must come before the *-dec entry.
1488 pdp10-*)
1489 os=-tops20
1490 ;;
1491 pdp11-*)
1492 os=-none
1493 ;;
1494 *-dec | vax-*)
1495 os=-ultrix4.2
1496 ;;
1497 m68*-apollo)
1498 os=-domain
1499 ;;
1500 i386-sun)
1501 os=-sunos4.0.2
1502 ;;
1503 m68000-sun)
1504 os=-sunos3
1505 # This also exists in the configure program, but was not the
1506 # default.
1507 # os=-sunos4
1508 ;;
1509 m68*-cisco)
1510 os=-aout
1511 ;;
1512 mep-*)
1513 os=-elf
1514 ;;
1515 mips*-cisco)
1516 os=-elf
1517 ;;
1518 mips*-*)
1519 os=-elf
1520 ;;
1521 or32-*)
1522 os=-coff
1523 ;;
1524 *-tti) # must be before sparc entry or we get the wrong os.
1525 os=-sysv3
1526 ;;
1527 sparc-* | *-sun)
1528 os=-sunos4.1.1
1529 ;;
1530 *-be)
1531 os=-beos
1532 ;;
1533 *-haiku)
1534 os=-haiku
1535 ;;
1536 *-ibm)
1537 os=-aix
1538 ;;
1539 *-knuth)
1540 os=-mmixware
1541 ;;
1542 *-wec)
1543 os=-proelf
1544 ;;
1545 *-winbond)
1546 os=-proelf
1547 ;;
1548 *-oki)
1549 os=-proelf
1550 ;;
1551 *-hp)
1552 os=-hpux
1553 ;;
1554 *-hitachi)
1555 os=-hiux
1556 ;;
1557 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1558 os=-sysv
1559 ;;
1560 *-cbm)
1561 os=-amigaos
1562 ;;
1563 *-dg)
1564 os=-dgux
1565 ;;
1566 *-dolphin)
1567 os=-sysv3
1568 ;;
1569 m68k-ccur)
1570 os=-rtu
1571 ;;
1572 m88k-omron*)
1573 os=-luna
1574 ;;
1575 *-next )
1576 os=-nextstep
1577 ;;
1578 *-sequent)
1579 os=-ptx
1580 ;;
1581 *-crds)
1582 os=-unos
1583 ;;
1584 *-ns)
1585 os=-genix
1586 ;;
1587 i370-*)
1588 os=-mvs
1589 ;;
1590 *-next)
1591 os=-nextstep3
1592 ;;
1593 *-gould)
1594 os=-sysv
1595 ;;
1596 *-highlevel)
1597 os=-bsd
1598 ;;
1599 *-encore)
1600 os=-bsd
1601 ;;
1602 *-sgi)
1603 os=-irix
1604 ;;
1605 *-siemens)
1606 os=-sysv4
1607 ;;
1608 *-masscomp)
1609 os=-rtu
1610 ;;
1611 f30[01]-fujitsu | f700-fujitsu)
1612 os=-uxpv
1613 ;;
1614 *-rom68k)
1615 os=-coff
1616 ;;
1617 *-*bug)
1618 os=-coff
1619 ;;
1620 *-apple)
1621 os=-macos
1622 ;;
1623 *-atari*)
1624 os=-mint
1625 ;;
1626 *)
1627 os=-none
1628 ;;
1629esac
1630fi
1631
1632# Here we handle the case where we know the os, and the CPU type, but not the
1633# manufacturer. We pick the logical manufacturer.
1634vendor=unknown
1635case $basic_machine in
1636 *-unknown)
1637 case $os in
1638 -riscix*)
1639 vendor=acorn
1640 ;;
1641 -sunos*)
1642 vendor=sun
1643 ;;
1644 -cnk*|-aix*)
1645 vendor=ibm
1646 ;;
1647 -beos*)
1648 vendor=be
1649 ;;
1650 -hpux*)
1651 vendor=hp
1652 ;;
1653 -mpeix*)
1654 vendor=hp
1655 ;;
1656 -hiux*)
1657 vendor=hitachi
1658 ;;
1659 -unos*)
1660 vendor=crds
1661 ;;
1662 -dgux*)
1663 vendor=dg
1664 ;;
1665 -luna*)
1666 vendor=omron
1667 ;;
1668 -genix*)
1669 vendor=ns
1670 ;;
1671 -mvs* | -opened*)
1672 vendor=ibm
1673 ;;
1674 -os400*)
1675 vendor=ibm
1676 ;;
1677 -ptx*)
1678 vendor=sequent
1679 ;;
1680 -tpf*)
1681 vendor=ibm
1682 ;;
1683 -vxsim* | -vxworks* | -windiss*)
1684 vendor=wrs
1685 ;;
1686 -aux*)
1687 vendor=apple
1688 ;;
1689 -hms*)
1690 vendor=hitachi
1691 ;;
1692 -mpw* | -macos*)
1693 vendor=apple
1694 ;;
1695 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1696 vendor=atari
1697 ;;
1698 -vos*)
1699 vendor=stratus
1700 ;;
1701 esac
1702 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1703 ;;
1704esac
1705
1706echo $basic_machine$os
1707exit
1708
1709# Local variables:
1710# eval: (add-hook 'write-file-hooks 'time-stamp)
1711# time-stamp-start: "timestamp='"
1712# time-stamp-format: "%:y-%02m-%02d"
1713# time-stamp-end: "'"
1714# End:
diff --git a/libraries/embryo/configure b/libraries/embryo/configure
deleted file mode 100755
index 7f04eec..0000000
--- a/libraries/embryo/configure
+++ /dev/null
@@ -1,15960 +0,0 @@
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for embryo 1.2.0-alpha.
4#
5# Report bugs to <enlightenment-devel@lists.sourceforge.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
94case $0 in #((
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
103IFS=$as_save_IFS
104
105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152esac
153fi
154"
155 as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169 exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202fi
203fi
204 done;;
205 esac
206 as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 export CONFIG_SHELL
223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232 else
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: enlightenment-devel@lists.sourceforge.net about your
235$0: system, including any error possibly output before this
236$0: message. Then install a modern shell, or manually run
237$0: the script under such a shell if you do have one."
238 fi
239 exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257 { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266 return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274 set +e
275 as_fn_set_status $1
276 exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285 case $as_dir in #(
286 -*) as_dir=./$as_dir;;
287 esac
288 test -d "$as_dir" || eval $as_mkdir_p || {
289 as_dirs=
290 while :; do
291 case $as_dir in #(
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 *) as_qdir=$as_dir;;
294 esac
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)[^/].*/{
307 s//\1/
308 q
309 }
310 /^X\(\/\/\)$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\).*/{
315 s//\1/
316 q
317 }
318 s/.*/./; q'`
319 test -d "$as_dir" && break
320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
334 {
335 eval $1+=\$2
336 }'
337else
338 as_fn_append ()
339 {
340 eval $1=\$$1\$2
341 }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 eval 'as_fn_arith ()
351 {
352 as_val=$(( $* ))
353 }'
354else
355 as_fn_arith ()
356 {
357 as_val=`expr "$@" || test $? -eq 1`
358 }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369 as_status=$1; test $as_status -eq 0 && as_status=1
370 if test "$4"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373 fi
374 $as_echo "$as_me: error: $2" >&2
375 as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
380 as_expr=expr
381else
382 as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386 as_basename=basename
387else
388 as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 as_dirname=dirname
393else
394 as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402 sed '/^.*\/\([^/][^/]*\)\/*$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\/\)$/{
407 s//\1/
408 q
409 }
410 /^X\/\(\/\).*/{
411 s//\1/
412 q
413 }
414 s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
429 sed -n '
430 p
431 /[$]LINENO/=
432 ' <$as_myself |
433 sed '
434 s/[$]LINENO.*/&-/
435 t lineno
436 b
437 :lineno
438 N
439 :loop
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441 t loop
442 s/-\n.*//
443 ' >$as_me.lineno &&
444 chmod +x "$as_me.lineno" ||
445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
449 # original and so on. Autoconf is especially sensitive to this).
450 . "./$as_me.lineno"
451 # Exit status is that of the last command.
452 exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458 case `echo 'xy\c'` in
459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
460 xy) ECHO_C='\c';;
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 ECHO_T=' ';;
463 esac;;
464*)
465 ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
471else
472 rm -f conf$$.dir
473 mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
477 as_ln_s='ln -s'
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 as_ln_s='cp -p'
484 elif ln conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s=ln
486 else
487 as_ln_s='cp -p'
488 fi
489else
490 as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496 as_mkdir_p='mkdir -p "$as_dir"'
497else
498 test -d ./-p && rmdir ./-p
499 as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503 as_test_x='test -x'
504else
505 if ls -dL / >/dev/null 2>&1; then
506 as_ls_L_option=L
507 else
508 as_ls_L_option=
509 fi
510 as_test_x='
511 eval sh -c '\''
512 if test -d "$1"; then
513 test -d "$1/.";
514 else
515 case $1 in #(
516 -*)set "./$1";;
517 esac;
518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519 ???[sx]*):;;*)false;;esac;fi
520 '\'' sh
521 '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532
533# Check that we are running under the correct shell.
534SHELL=${CONFIG_SHELL-/bin/sh}
535
536case X$lt_ECHO in
537X*--fallback-echo)
538 # Remove one level of quotation (which was required for Make).
539 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
540 ;;
541esac
542
543ECHO=${lt_ECHO-echo}
544if test "X$1" = X--no-reexec; then
545 # Discard the --no-reexec flag, and continue.
546 shift
547elif test "X$1" = X--fallback-echo; then
548 # Avoid inline document here, it may be left over
549 :
550elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
551 # Yippee, $ECHO works!
552 :
553else
554 # Restart under the correct shell.
555 exec $SHELL "$0" --no-reexec ${1+"$@"}
556fi
557
558if test "X$1" = X--fallback-echo; then
559 # used as fallback echo
560 shift
561 cat <<_LT_EOF
562$*
563_LT_EOF
564 exit 0
565fi
566
567# The HP-UX ksh and POSIX shell print the target directory to stdout
568# if CDPATH is set.
569(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
570
571if test -z "$lt_ECHO"; then
572 if test "X${echo_test_string+set}" != Xset; then
573 # find a string as large as possible, as long as the shell can cope with it
574 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
575 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
576 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
577 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
578 then
579 break
580 fi
581 done
582 fi
583
584 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
585 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
586 test "X$echo_testing_string" = "X$echo_test_string"; then
587 :
588 else
589 # The Solaris, AIX, and Digital Unix default echo programs unquote
590 # backslashes. This makes it impossible to quote backslashes using
591 # echo "$something" | sed 's/\\/\\\\/g'
592 #
593 # So, first we look for a working echo in the user's PATH.
594
595 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
596 for dir in $PATH /usr/ucb; do
597 IFS="$lt_save_ifs"
598 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
599 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
600 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
601 test "X$echo_testing_string" = "X$echo_test_string"; then
602 ECHO="$dir/echo"
603 break
604 fi
605 done
606 IFS="$lt_save_ifs"
607
608 if test "X$ECHO" = Xecho; then
609 # We didn't find a better echo, so look for alternatives.
610 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
611 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
612 test "X$echo_testing_string" = "X$echo_test_string"; then
613 # This shell has a builtin print -r that does the trick.
614 ECHO='print -r'
615 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
616 test "X$CONFIG_SHELL" != X/bin/ksh; then
617 # If we have ksh, try running configure again with it.
618 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
619 export ORIGINAL_CONFIG_SHELL
620 CONFIG_SHELL=/bin/ksh
621 export CONFIG_SHELL
622 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
623 else
624 # Try using printf.
625 ECHO='printf %s\n'
626 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
627 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
628 test "X$echo_testing_string" = "X$echo_test_string"; then
629 # Cool, printf works
630 :
631 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
632 test "X$echo_testing_string" = 'X\t' &&
633 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
634 test "X$echo_testing_string" = "X$echo_test_string"; then
635 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
636 export CONFIG_SHELL
637 SHELL="$CONFIG_SHELL"
638 export SHELL
639 ECHO="$CONFIG_SHELL $0 --fallback-echo"
640 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
641 test "X$echo_testing_string" = 'X\t' &&
642 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
643 test "X$echo_testing_string" = "X$echo_test_string"; then
644 ECHO="$CONFIG_SHELL $0 --fallback-echo"
645 else
646 # maybe with a smaller string...
647 prev=:
648
649 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
650 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
651 then
652 break
653 fi
654 prev="$cmd"
655 done
656
657 if test "$prev" != 'sed 50q "$0"'; then
658 echo_test_string=`eval $prev`
659 export echo_test_string
660 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
661 else
662 # Oops. We lost completely, so just stick with echo.
663 ECHO=echo
664 fi
665 fi
666 fi
667 fi
668 fi
669fi
670
671# Copy echo and quote the copy suitably for passing to libtool from
672# the Makefile, instead of quoting the original, which is used later.
673lt_ECHO=$ECHO
674if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
675 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
676fi
677
678
679
680
681test -n "$DJDIR" || exec 7<&0 </dev/null
682exec 6>&1
683
684# Name of the host.
685# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
686# so uname gets run too.
687ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
688
689#
690# Initializations.
691#
692ac_default_prefix=/usr/local
693ac_clean_files=
694ac_config_libobj_dir=.
695LIBOBJS=
696cross_compiling=no
697subdirs=
698MFLAGS=
699MAKEFLAGS=
700
701# Identity of this package.
702PACKAGE_NAME='embryo'
703PACKAGE_TARNAME='embryo'
704PACKAGE_VERSION='1.2.0-alpha'
705PACKAGE_STRING='embryo 1.2.0-alpha'
706PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net'
707PACKAGE_URL=''
708
709ac_unique_file="configure.ac"
710# Factoring default headers for most tests.
711ac_includes_default="\
712#include <stdio.h>
713#ifdef HAVE_SYS_TYPES_H
714# include <sys/types.h>
715#endif
716#ifdef HAVE_SYS_STAT_H
717# include <sys/stat.h>
718#endif
719#ifdef STDC_HEADERS
720# include <stdlib.h>
721# include <stddef.h>
722#else
723# ifdef HAVE_STDLIB_H
724# include <stdlib.h>
725# endif
726#endif
727#ifdef HAVE_STRING_H
728# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
729# include <memory.h>
730# endif
731# include <string.h>
732#endif
733#ifdef HAVE_STRINGS_H
734# include <strings.h>
735#endif
736#ifdef HAVE_INTTYPES_H
737# include <inttypes.h>
738#endif
739#ifdef HAVE_STDINT_H
740# include <stdint.h>
741#endif
742#ifdef HAVE_UNISTD_H
743# include <unistd.h>
744#endif"
745
746ac_subst_vars='am__EXEEXT_FALSE
747am__EXEEXT_TRUE
748LTLIBOBJS
749LIBOBJS
750embryoincludedir
751requirement_embryo
752EFL_FNMATCH_LIBS
753ALLOCA
754lt_enable_auto_import
755EMBRYO_CFLAGS
756EMBRYO_CPPFLAGS
757EXOTIC_LIBS
758EXOTIC_CFLAGS
759EINA_LIBS
760EINA_CFLAGS
761EFL_EMBRYO_BUILD
762EVIL_LIBS
763EVIL_CFLAGS
764pkgconfig_requires_private
765PKG_CONFIG_LIBDIR
766PKG_CONFIG_PATH
767PKG_CONFIG
768EFL_BUILD_DOC_FALSE
769EFL_BUILD_DOC_TRUE
770efl_doxygen
771efl_have_doxygen
772BUILD_EMBRYO_CC_FALSE
773BUILD_EMBRYO_CC_TRUE
774EMBRYO_CC_PRG
775VMAJ
776release_info
777version_info
778CPP
779OTOOL64
780OTOOL
781LIPO
782NMEDIT
783DSYMUTIL
784lt_ECHO
785RANLIB
786AR
787LN_S
788NM
789ac_ct_DUMPBIN
790DUMPBIN
791LD
792FGREP
793EGREP
794GREP
795SED
796am__fastdepCC_FALSE
797am__fastdepCC_TRUE
798CCDEPMODE
799AMDEPBACKSLASH
800AMDEP_FALSE
801AMDEP_TRUE
802am__quote
803am__include
804DEPDIR
805OBJEXT
806EXEEXT
807ac_ct_CC
808CPPFLAGS
809LDFLAGS
810CFLAGS
811CC
812LIBTOOL
813OBJDUMP
814DLLTOOL
815AS
816host_os
817host_vendor
818host_cpu
819host
820build_os
821build_vendor
822build_cpu
823build
824AM_BACKSLASH
825AM_DEFAULT_VERBOSITY
826am__untar
827am__tar
828AMTAR
829am__leading_dot
830SET_MAKE
831AWK
832mkdir_p
833MKDIR_P
834INSTALL_STRIP_PROGRAM
835STRIP
836install_sh
837MAKEINFO
838AUTOHEADER
839AUTOMAKE
840AUTOCONF
841ACLOCAL
842VERSION
843PACKAGE
844CYGPATH_W
845am__isrc
846INSTALL_DATA
847INSTALL_SCRIPT
848INSTALL_PROGRAM
849target_alias
850host_alias
851build_alias
852LIBS
853ECHO_T
854ECHO_N
855ECHO_C
856DEFS
857mandir
858localedir
859libdir
860psdir
861pdfdir
862dvidir
863htmldir
864infodir
865docdir
866oldincludedir
867includedir
868localstatedir
869sharedstatedir
870sysconfdir
871datadir
872datarootdir
873libexecdir
874sbindir
875bindir
876program_transform_name
877prefix
878exec_prefix
879PACKAGE_URL
880PACKAGE_BUGREPORT
881PACKAGE_STRING
882PACKAGE_VERSION
883PACKAGE_TARNAME
884PACKAGE_NAME
885PATH_SEPARATOR
886SHELL'
887ac_subst_files=''
888ac_user_opts='
889enable_option_checking
890enable_silent_rules
891enable_shared
892enable_static
893with_pic
894enable_fast_install
895enable_dependency_tracking
896with_gnu_ld
897enable_libtool_lock
898enable_embryo_cc
899enable_doc
900with_doxygen
901'
902 ac_precious_vars='build_alias
903host_alias
904target_alias
905CC
906CFLAGS
907LDFLAGS
908LIBS
909CPPFLAGS
910CPP
911PKG_CONFIG
912PKG_CONFIG_PATH
913PKG_CONFIG_LIBDIR
914EVIL_CFLAGS
915EVIL_LIBS
916EINA_CFLAGS
917EINA_LIBS
918EXOTIC_CFLAGS
919EXOTIC_LIBS'
920
921
922# Initialize some variables set by options.
923ac_init_help=
924ac_init_version=false
925ac_unrecognized_opts=
926ac_unrecognized_sep=
927# The variables have the same names as the options, with
928# dashes changed to underlines.
929cache_file=/dev/null
930exec_prefix=NONE
931no_create=
932no_recursion=
933prefix=NONE
934program_prefix=NONE
935program_suffix=NONE
936program_transform_name=s,x,x,
937silent=
938site=
939srcdir=
940verbose=
941x_includes=NONE
942x_libraries=NONE
943
944# Installation directory options.
945# These are left unexpanded so users can "make install exec_prefix=/foo"
946# and all the variables that are supposed to be based on exec_prefix
947# by default will actually change.
948# Use braces instead of parens because sh, perl, etc. also accept them.
949# (The list follows the same order as the GNU Coding Standards.)
950bindir='${exec_prefix}/bin'
951sbindir='${exec_prefix}/sbin'
952libexecdir='${exec_prefix}/libexec'
953datarootdir='${prefix}/share'
954datadir='${datarootdir}'
955sysconfdir='${prefix}/etc'
956sharedstatedir='${prefix}/com'
957localstatedir='${prefix}/var'
958includedir='${prefix}/include'
959oldincludedir='/usr/include'
960docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
961infodir='${datarootdir}/info'
962htmldir='${docdir}'
963dvidir='${docdir}'
964pdfdir='${docdir}'
965psdir='${docdir}'
966libdir='${exec_prefix}/lib'
967localedir='${datarootdir}/locale'
968mandir='${datarootdir}/man'
969
970ac_prev=
971ac_dashdash=
972for ac_option
973do
974 # If the previous option needs an argument, assign it.
975 if test -n "$ac_prev"; then
976 eval $ac_prev=\$ac_option
977 ac_prev=
978 continue
979 fi
980
981 case $ac_option in
982 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
983 *=) ac_optarg= ;;
984 *) ac_optarg=yes ;;
985 esac
986
987 # Accept the important Cygnus configure options, so we can diagnose typos.
988
989 case $ac_dashdash$ac_option in
990 --)
991 ac_dashdash=yes ;;
992
993 -bindir | --bindir | --bindi | --bind | --bin | --bi)
994 ac_prev=bindir ;;
995 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
996 bindir=$ac_optarg ;;
997
998 -build | --build | --buil | --bui | --bu)
999 ac_prev=build_alias ;;
1000 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1001 build_alias=$ac_optarg ;;
1002
1003 -cache-file | --cache-file | --cache-fil | --cache-fi \
1004 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1005 ac_prev=cache_file ;;
1006 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1007 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1008 cache_file=$ac_optarg ;;
1009
1010 --config-cache | -C)
1011 cache_file=config.cache ;;
1012
1013 -datadir | --datadir | --datadi | --datad)
1014 ac_prev=datadir ;;
1015 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1016 datadir=$ac_optarg ;;
1017
1018 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1019 | --dataroo | --dataro | --datar)
1020 ac_prev=datarootdir ;;
1021 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1022 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1023 datarootdir=$ac_optarg ;;
1024
1025 -disable-* | --disable-*)
1026 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1027 # Reject names that are not valid shell variable names.
1028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029 as_fn_error $? "invalid feature name: $ac_useropt"
1030 ac_useropt_orig=$ac_useropt
1031 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032 case $ac_user_opts in
1033 *"
1034"enable_$ac_useropt"
1035"*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
1038 esac
1039 eval enable_$ac_useropt=no ;;
1040
1041 -docdir | --docdir | --docdi | --doc | --do)
1042 ac_prev=docdir ;;
1043 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1044 docdir=$ac_optarg ;;
1045
1046 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1047 ac_prev=dvidir ;;
1048 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1049 dvidir=$ac_optarg ;;
1050
1051 -enable-* | --enable-*)
1052 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1053 # Reject names that are not valid shell variable names.
1054 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1055 as_fn_error $? "invalid feature name: $ac_useropt"
1056 ac_useropt_orig=$ac_useropt
1057 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058 case $ac_user_opts in
1059 *"
1060"enable_$ac_useropt"
1061"*) ;;
1062 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1063 ac_unrecognized_sep=', ';;
1064 esac
1065 eval enable_$ac_useropt=\$ac_optarg ;;
1066
1067 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1068 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1069 | --exec | --exe | --ex)
1070 ac_prev=exec_prefix ;;
1071 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1072 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1073 | --exec=* | --exe=* | --ex=*)
1074 exec_prefix=$ac_optarg ;;
1075
1076 -gas | --gas | --ga | --g)
1077 # Obsolete; use --with-gas.
1078 with_gas=yes ;;
1079
1080 -help | --help | --hel | --he | -h)
1081 ac_init_help=long ;;
1082 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1083 ac_init_help=recursive ;;
1084 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1085 ac_init_help=short ;;
1086
1087 -host | --host | --hos | --ho)
1088 ac_prev=host_alias ;;
1089 -host=* | --host=* | --hos=* | --ho=*)
1090 host_alias=$ac_optarg ;;
1091
1092 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1093 ac_prev=htmldir ;;
1094 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1095 | --ht=*)
1096 htmldir=$ac_optarg ;;
1097
1098 -includedir | --includedir | --includedi | --included | --include \
1099 | --includ | --inclu | --incl | --inc)
1100 ac_prev=includedir ;;
1101 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1102 | --includ=* | --inclu=* | --incl=* | --inc=*)
1103 includedir=$ac_optarg ;;
1104
1105 -infodir | --infodir | --infodi | --infod | --info | --inf)
1106 ac_prev=infodir ;;
1107 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1108 infodir=$ac_optarg ;;
1109
1110 -libdir | --libdir | --libdi | --libd)
1111 ac_prev=libdir ;;
1112 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1113 libdir=$ac_optarg ;;
1114
1115 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1116 | --libexe | --libex | --libe)
1117 ac_prev=libexecdir ;;
1118 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1119 | --libexe=* | --libex=* | --libe=*)
1120 libexecdir=$ac_optarg ;;
1121
1122 -localedir | --localedir | --localedi | --localed | --locale)
1123 ac_prev=localedir ;;
1124 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1125 localedir=$ac_optarg ;;
1126
1127 -localstatedir | --localstatedir | --localstatedi | --localstated \
1128 | --localstate | --localstat | --localsta | --localst | --locals)
1129 ac_prev=localstatedir ;;
1130 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1131 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1132 localstatedir=$ac_optarg ;;
1133
1134 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1135 ac_prev=mandir ;;
1136 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1137 mandir=$ac_optarg ;;
1138
1139 -nfp | --nfp | --nf)
1140 # Obsolete; use --without-fp.
1141 with_fp=no ;;
1142
1143 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1144 | --no-cr | --no-c | -n)
1145 no_create=yes ;;
1146
1147 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1148 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1149 no_recursion=yes ;;
1150
1151 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1152 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1153 | --oldin | --oldi | --old | --ol | --o)
1154 ac_prev=oldincludedir ;;
1155 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1156 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1157 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1158 oldincludedir=$ac_optarg ;;
1159
1160 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1161 ac_prev=prefix ;;
1162 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1163 prefix=$ac_optarg ;;
1164
1165 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1166 | --program-pre | --program-pr | --program-p)
1167 ac_prev=program_prefix ;;
1168 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1169 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1170 program_prefix=$ac_optarg ;;
1171
1172 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1173 | --program-suf | --program-su | --program-s)
1174 ac_prev=program_suffix ;;
1175 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1176 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1177 program_suffix=$ac_optarg ;;
1178
1179 -program-transform-name | --program-transform-name \
1180 | --program-transform-nam | --program-transform-na \
1181 | --program-transform-n | --program-transform- \
1182 | --program-transform | --program-transfor \
1183 | --program-transfo | --program-transf \
1184 | --program-trans | --program-tran \
1185 | --progr-tra | --program-tr | --program-t)
1186 ac_prev=program_transform_name ;;
1187 -program-transform-name=* | --program-transform-name=* \
1188 | --program-transform-nam=* | --program-transform-na=* \
1189 | --program-transform-n=* | --program-transform-=* \
1190 | --program-transform=* | --program-transfor=* \
1191 | --program-transfo=* | --program-transf=* \
1192 | --program-trans=* | --program-tran=* \
1193 | --progr-tra=* | --program-tr=* | --program-t=*)
1194 program_transform_name=$ac_optarg ;;
1195
1196 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1197 ac_prev=pdfdir ;;
1198 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1199 pdfdir=$ac_optarg ;;
1200
1201 -psdir | --psdir | --psdi | --psd | --ps)
1202 ac_prev=psdir ;;
1203 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1204 psdir=$ac_optarg ;;
1205
1206 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1207 | -silent | --silent | --silen | --sile | --sil)
1208 silent=yes ;;
1209
1210 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1211 ac_prev=sbindir ;;
1212 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1213 | --sbi=* | --sb=*)
1214 sbindir=$ac_optarg ;;
1215
1216 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1217 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1218 | --sharedst | --shareds | --shared | --share | --shar \
1219 | --sha | --sh)
1220 ac_prev=sharedstatedir ;;
1221 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1222 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1223 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1224 | --sha=* | --sh=*)
1225 sharedstatedir=$ac_optarg ;;
1226
1227 -site | --site | --sit)
1228 ac_prev=site ;;
1229 -site=* | --site=* | --sit=*)
1230 site=$ac_optarg ;;
1231
1232 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1233 ac_prev=srcdir ;;
1234 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1235 srcdir=$ac_optarg ;;
1236
1237 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1238 | --syscon | --sysco | --sysc | --sys | --sy)
1239 ac_prev=sysconfdir ;;
1240 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1241 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1242 sysconfdir=$ac_optarg ;;
1243
1244 -target | --target | --targe | --targ | --tar | --ta | --t)
1245 ac_prev=target_alias ;;
1246 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1247 target_alias=$ac_optarg ;;
1248
1249 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1250 verbose=yes ;;
1251
1252 -version | --version | --versio | --versi | --vers | -V)
1253 ac_init_version=: ;;
1254
1255 -with-* | --with-*)
1256 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1257 # Reject names that are not valid shell variable names.
1258 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1259 as_fn_error $? "invalid package name: $ac_useropt"
1260 ac_useropt_orig=$ac_useropt
1261 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1262 case $ac_user_opts in
1263 *"
1264"with_$ac_useropt"
1265"*) ;;
1266 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1267 ac_unrecognized_sep=', ';;
1268 esac
1269 eval with_$ac_useropt=\$ac_optarg ;;
1270
1271 -without-* | --without-*)
1272 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1273 # Reject names that are not valid shell variable names.
1274 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1275 as_fn_error $? "invalid package name: $ac_useropt"
1276 ac_useropt_orig=$ac_useropt
1277 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1278 case $ac_user_opts in
1279 *"
1280"with_$ac_useropt"
1281"*) ;;
1282 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1283 ac_unrecognized_sep=', ';;
1284 esac
1285 eval with_$ac_useropt=no ;;
1286
1287 --x)
1288 # Obsolete; use --with-x.
1289 with_x=yes ;;
1290
1291 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1292 | --x-incl | --x-inc | --x-in | --x-i)
1293 ac_prev=x_includes ;;
1294 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1295 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1296 x_includes=$ac_optarg ;;
1297
1298 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1299 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1300 ac_prev=x_libraries ;;
1301 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1302 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1303 x_libraries=$ac_optarg ;;
1304
1305 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1306Try \`$0 --help' for more information"
1307 ;;
1308
1309 *=*)
1310 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1311 # Reject names that are not valid shell variable names.
1312 case $ac_envvar in #(
1313 '' | [0-9]* | *[!_$as_cr_alnum]* )
1314 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1315 esac
1316 eval $ac_envvar=\$ac_optarg
1317 export $ac_envvar ;;
1318
1319 *)
1320 # FIXME: should be removed in autoconf 3.0.
1321 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1322 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1323 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1324 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1325 ;;
1326
1327 esac
1328done
1329
1330if test -n "$ac_prev"; then
1331 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1332 as_fn_error $? "missing argument to $ac_option"
1333fi
1334
1335if test -n "$ac_unrecognized_opts"; then
1336 case $enable_option_checking in
1337 no) ;;
1338 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1339 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1340 esac
1341fi
1342
1343# Check all directory arguments for consistency.
1344for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1345 datadir sysconfdir sharedstatedir localstatedir includedir \
1346 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1347 libdir localedir mandir
1348do
1349 eval ac_val=\$$ac_var
1350 # Remove trailing slashes.
1351 case $ac_val in
1352 */ )
1353 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1354 eval $ac_var=\$ac_val;;
1355 esac
1356 # Be sure to have absolute directory names.
1357 case $ac_val in
1358 [\\/$]* | ?:[\\/]* ) continue;;
1359 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1360 esac
1361 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1362done
1363
1364# There might be people who depend on the old broken behavior: `$host'
1365# used to hold the argument of --host etc.
1366# FIXME: To remove some day.
1367build=$build_alias
1368host=$host_alias
1369target=$target_alias
1370
1371# FIXME: To remove some day.
1372if test "x$host_alias" != x; then
1373 if test "x$build_alias" = x; then
1374 cross_compiling=maybe
1375 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1376 If a cross compiler is detected then cross compile mode will be used" >&2
1377 elif test "x$build_alias" != "x$host_alias"; then
1378 cross_compiling=yes
1379 fi
1380fi
1381
1382ac_tool_prefix=
1383test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385test "$silent" = yes && exec 6>/dev/null
1386
1387
1388ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389ac_ls_di=`ls -di .` &&
1390ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1391 as_fn_error $? "working directory cannot be determined"
1392test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1393 as_fn_error $? "pwd does not report name of working directory"
1394
1395
1396# Find the source files, if location was not specified.
1397if test -z "$srcdir"; then
1398 ac_srcdir_defaulted=yes
1399 # Try the directory containing this script, then the parent directory.
1400 ac_confdir=`$as_dirname -- "$as_myself" ||
1401$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402 X"$as_myself" : 'X\(//\)[^/]' \| \
1403 X"$as_myself" : 'X\(//\)$' \| \
1404 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405$as_echo X"$as_myself" |
1406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\/\)[^/].*/{
1411 s//\1/
1412 q
1413 }
1414 /^X\(\/\/\)$/{
1415 s//\1/
1416 q
1417 }
1418 /^X\(\/\).*/{
1419 s//\1/
1420 q
1421 }
1422 s/.*/./; q'`
1423 srcdir=$ac_confdir
1424 if test ! -r "$srcdir/$ac_unique_file"; then
1425 srcdir=..
1426 fi
1427else
1428 ac_srcdir_defaulted=no
1429fi
1430if test ! -r "$srcdir/$ac_unique_file"; then
1431 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1432 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1433fi
1434ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435ac_abs_confdir=`(
1436 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1437 pwd)`
1438# When building in place, set srcdir=.
1439if test "$ac_abs_confdir" = "$ac_pwd"; then
1440 srcdir=.
1441fi
1442# Remove unnecessary trailing slashes from srcdir.
1443# Double slashes in file names in object file debugging info
1444# mess up M-x gdb in Emacs.
1445case $srcdir in
1446*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447esac
1448for ac_var in $ac_precious_vars; do
1449 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_env_${ac_var}_value=\$${ac_var}
1451 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453done
1454
1455#
1456# Report the --help message.
1457#
1458if test "$ac_init_help" = "long"; then
1459 # Omit some internal or obsolete options to make the list less imposing.
1460 # This message is too long to be a string in the A/UX 3.1 sh.
1461 cat <<_ACEOF
1462\`configure' configures embryo 1.2.0-alpha to adapt to many kinds of systems.
1463
1464Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467VAR=VALUE. See below for descriptions of some of the useful variables.
1468
1469Defaults for the options are specified in brackets.
1470
1471Configuration:
1472 -h, --help display this help and exit
1473 --help=short display options specific to this package
1474 --help=recursive display the short help of all the included packages
1475 -V, --version display version information and exit
1476 -q, --quiet, --silent do not print \`checking ...' messages
1477 --cache-file=FILE cache test results in FILE [disabled]
1478 -C, --config-cache alias for \`--cache-file=config.cache'
1479 -n, --no-create do not create output files
1480 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1481
1482Installation directories:
1483 --prefix=PREFIX install architecture-independent files in PREFIX
1484 [$ac_default_prefix]
1485 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1486 [PREFIX]
1487
1488By default, \`make install' will install all the files in
1489\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1490an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491for instance \`--prefix=\$HOME'.
1492
1493For better control, use the options below.
1494
1495Fine tuning of the installation directories:
1496 --bindir=DIR user executables [EPREFIX/bin]
1497 --sbindir=DIR system admin executables [EPREFIX/sbin]
1498 --libexecdir=DIR program executables [EPREFIX/libexec]
1499 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1500 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1501 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1502 --libdir=DIR object code libraries [EPREFIX/lib]
1503 --includedir=DIR C header files [PREFIX/include]
1504 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1505 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1506 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1507 --infodir=DIR info documentation [DATAROOTDIR/info]
1508 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1509 --mandir=DIR man documentation [DATAROOTDIR/man]
1510 --docdir=DIR documentation root [DATAROOTDIR/doc/embryo]
1511 --htmldir=DIR html documentation [DOCDIR]
1512 --dvidir=DIR dvi documentation [DOCDIR]
1513 --pdfdir=DIR pdf documentation [DOCDIR]
1514 --psdir=DIR ps documentation [DOCDIR]
1515_ACEOF
1516
1517 cat <<\_ACEOF
1518
1519Program names:
1520 --program-prefix=PREFIX prepend PREFIX to installed program names
1521 --program-suffix=SUFFIX append SUFFIX to installed program names
1522 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1523
1524System types:
1525 --build=BUILD configure for building on BUILD [guessed]
1526 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1527_ACEOF
1528fi
1529
1530if test -n "$ac_init_help"; then
1531 case $ac_init_help in
1532 short | recursive ) echo "Configuration of embryo 1.2.0-alpha:";;
1533 esac
1534 cat <<\_ACEOF
1535
1536Optional Features:
1537 --disable-option-checking ignore unrecognized --enable/--with options
1538 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1539 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1540 --enable-silent-rules less verbose build output (undo: `make V=1')
1541 --disable-silent-rules verbose build output (undo: `make V=0')
1542 --enable-shared[=PKGS] build shared libraries [default=yes]
1543 --enable-static[=PKGS] build static libraries [default=yes]
1544 --enable-fast-install[=PKGS]
1545 optimize for fast installation [default=yes]
1546 --disable-dependency-tracking speeds up one-time build
1547 --enable-dependency-tracking do not reject slow dependency extractors
1548 --disable-libtool-lock avoid locking (might break parallel builds)
1549 --disable-embryo-cc disable building of embryo_cc
1550 --disable-doc Disable documentation build [default=enabled]
1551
1552Optional Packages:
1553 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1554 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1555 --with-pic try to use only PIC/non-PIC objects [default=use
1556 both]
1557 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1558 --with-doxygen=FILE doxygen program to use [default=doxygen]
1559
1560Some influential environment variables:
1561 CC C compiler command
1562 CFLAGS C compiler flags
1563 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1564 nonstandard directory <lib dir>
1565 LIBS libraries to pass to the linker, e.g. -l<library>
1566 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1567 you have headers in a nonstandard directory <include dir>
1568 CPP C preprocessor
1569 PKG_CONFIG path to pkg-config utility
1570 PKG_CONFIG_PATH
1571 directories to add to pkg-config's search path
1572 PKG_CONFIG_LIBDIR
1573 path overriding pkg-config's built-in search path
1574 EVIL_CFLAGS C compiler flags for EVIL, overriding pkg-config
1575 EVIL_LIBS linker flags for EVIL, overriding pkg-config
1576 EINA_CFLAGS C compiler flags for EINA, overriding pkg-config
1577 EINA_LIBS linker flags for EINA, overriding pkg-config
1578 EXOTIC_CFLAGS
1579 C compiler flags for EXOTIC, overriding pkg-config
1580 EXOTIC_LIBS linker flags for EXOTIC, overriding pkg-config
1581
1582Use these variables to override the choices made by `configure' or to help
1583it to find libraries and programs with nonstandard names/locations.
1584
1585Report bugs to <enlightenment-devel@lists.sourceforge.net>.
1586_ACEOF
1587ac_status=$?
1588fi
1589
1590if test "$ac_init_help" = "recursive"; then
1591 # If there are subdirs, report their specific --help.
1592 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1593 test -d "$ac_dir" ||
1594 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1595 continue
1596 ac_builddir=.
1597
1598case "$ac_dir" in
1599.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1600*)
1601 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1602 # A ".." for each directory in $ac_dir_suffix.
1603 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1604 case $ac_top_builddir_sub in
1605 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1606 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1607 esac ;;
1608esac
1609ac_abs_top_builddir=$ac_pwd
1610ac_abs_builddir=$ac_pwd$ac_dir_suffix
1611# for backward compatibility:
1612ac_top_builddir=$ac_top_build_prefix
1613
1614case $srcdir in
1615 .) # We are building in place.
1616 ac_srcdir=.
1617 ac_top_srcdir=$ac_top_builddir_sub
1618 ac_abs_top_srcdir=$ac_pwd ;;
1619 [\\/]* | ?:[\\/]* ) # Absolute name.
1620 ac_srcdir=$srcdir$ac_dir_suffix;
1621 ac_top_srcdir=$srcdir
1622 ac_abs_top_srcdir=$srcdir ;;
1623 *) # Relative name.
1624 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1625 ac_top_srcdir=$ac_top_build_prefix$srcdir
1626 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1627esac
1628ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1629
1630 cd "$ac_dir" || { ac_status=$?; continue; }
1631 # Check for guested configure.
1632 if test -f "$ac_srcdir/configure.gnu"; then
1633 echo &&
1634 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1635 elif test -f "$ac_srcdir/configure"; then
1636 echo &&
1637 $SHELL "$ac_srcdir/configure" --help=recursive
1638 else
1639 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1640 fi || ac_status=$?
1641 cd "$ac_pwd" || { ac_status=$?; break; }
1642 done
1643fi
1644
1645test -n "$ac_init_help" && exit $ac_status
1646if $ac_init_version; then
1647 cat <<\_ACEOF
1648embryo configure 1.2.0-alpha
1649generated by GNU Autoconf 2.67
1650
1651Copyright (C) 2010 Free Software Foundation, Inc.
1652This configure script is free software; the Free Software Foundation
1653gives unlimited permission to copy, distribute and modify it.
1654_ACEOF
1655 exit
1656fi
1657
1658## ------------------------ ##
1659## Autoconf initialization. ##
1660## ------------------------ ##
1661
1662# ac_fn_c_try_compile LINENO
1663# --------------------------
1664# Try to compile conftest.$ac_ext, and return whether this succeeded.
1665ac_fn_c_try_compile ()
1666{
1667 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668 rm -f conftest.$ac_objext
1669 if { { ac_try="$ac_compile"
1670case "(($ac_try" in
1671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672 *) ac_try_echo=$ac_try;;
1673esac
1674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675$as_echo "$ac_try_echo"; } >&5
1676 (eval "$ac_compile") 2>conftest.err
1677 ac_status=$?
1678 if test -s conftest.err; then
1679 grep -v '^ *+' conftest.err >conftest.er1
1680 cat conftest.er1 >&5
1681 mv -f conftest.er1 conftest.err
1682 fi
1683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1684 test $ac_status = 0; } && {
1685 test -z "$ac_c_werror_flag" ||
1686 test ! -s conftest.err
1687 } && test -s conftest.$ac_objext; then :
1688 ac_retval=0
1689else
1690 $as_echo "$as_me: failed program was:" >&5
1691sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694fi
1695 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1696 as_fn_set_status $ac_retval
1697
1698} # ac_fn_c_try_compile
1699
1700# ac_fn_c_try_link LINENO
1701# -----------------------
1702# Try to link conftest.$ac_ext, and return whether this succeeded.
1703ac_fn_c_try_link ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1706 rm -f conftest.$ac_objext conftest$ac_exeext
1707 if { { ac_try="$ac_link"
1708case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_link") 2>conftest.err
1715 ac_status=$?
1716 if test -s conftest.err; then
1717 grep -v '^ *+' conftest.err >conftest.er1
1718 cat conftest.er1 >&5
1719 mv -f conftest.er1 conftest.err
1720 fi
1721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1722 test $ac_status = 0; } && {
1723 test -z "$ac_c_werror_flag" ||
1724 test ! -s conftest.err
1725 } && test -s conftest$ac_exeext && {
1726 test "$cross_compiling" = yes ||
1727 $as_test_x conftest$ac_exeext
1728 }; then :
1729 ac_retval=0
1730else
1731 $as_echo "$as_me: failed program was:" >&5
1732sed 's/^/| /' conftest.$ac_ext >&5
1733
1734 ac_retval=1
1735fi
1736 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1737 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1738 # interfere with the next link command; also delete a directory that is
1739 # left behind by Apple's compiler. We do this before executing the actions.
1740 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1741 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1742 as_fn_set_status $ac_retval
1743
1744} # ac_fn_c_try_link
1745
1746# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1747# -------------------------------------------------------
1748# Tests whether HEADER exists and can be compiled using the include files in
1749# INCLUDES, setting the cache variable VAR accordingly.
1750ac_fn_c_check_header_compile ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754$as_echo_n "checking for $2... " >&6; }
1755if eval "test \"\${$3+set}\"" = set; then :
1756 $as_echo_n "(cached) " >&6
1757else
1758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1759/* end confdefs.h. */
1760$4
1761#include <$2>
1762_ACEOF
1763if ac_fn_c_try_compile "$LINENO"; then :
1764 eval "$3=yes"
1765else
1766 eval "$3=no"
1767fi
1768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1769fi
1770eval ac_res=\$$3
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1772$as_echo "$ac_res" >&6; }
1773 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1774
1775} # ac_fn_c_check_header_compile
1776
1777# ac_fn_c_try_cpp LINENO
1778# ----------------------
1779# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1780ac_fn_c_try_cpp ()
1781{
1782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783 if { { ac_try="$ac_cpp conftest.$ac_ext"
1784case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } > conftest.i && {
1799 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 }; then :
1802 ac_retval=0
1803else
1804 $as_echo "$as_me: failed program was:" >&5
1805sed 's/^/| /' conftest.$ac_ext >&5
1806
1807 ac_retval=1
1808fi
1809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_cpp
1813
1814# ac_fn_c_try_run LINENO
1815# ----------------------
1816# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1817# that executables *can* be run.
1818ac_fn_c_try_run ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 if { { ac_try="$ac_link"
1822case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_link") 2>&5
1829 ac_status=$?
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1832 { { case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_try") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; }; }; then :
1842 ac_retval=0
1843else
1844 $as_echo "$as_me: program exited with status $ac_status" >&5
1845 $as_echo "$as_me: failed program was:" >&5
1846sed 's/^/| /' conftest.$ac_ext >&5
1847
1848 ac_retval=$ac_status
1849fi
1850 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1851 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1852 as_fn_set_status $ac_retval
1853
1854} # ac_fn_c_try_run
1855
1856# ac_fn_c_check_func LINENO FUNC VAR
1857# ----------------------------------
1858# Tests whether FUNC exists, setting the cache variable VAR accordingly
1859ac_fn_c_check_func ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
1864if eval "test \"\${$3+set}\"" = set; then :
1865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1870 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1871#define $2 innocuous_$2
1872
1873/* System header to define __stub macros and hopefully few prototypes,
1874 which can conflict with char $2 (); below.
1875 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1876 <limits.h> exists even on freestanding compilers. */
1877
1878#ifdef __STDC__
1879# include <limits.h>
1880#else
1881# include <assert.h>
1882#endif
1883
1884#undef $2
1885
1886/* Override any GCC internal prototype to avoid an error.
1887 Use char because int might match the return type of a GCC
1888 builtin and then its argument prototype would still apply. */
1889#ifdef __cplusplus
1890extern "C"
1891#endif
1892char $2 ();
1893/* The GNU C library defines this for functions which it implements
1894 to always fail with ENOSYS. Some functions are actually named
1895 something starting with __ and the normal name is an alias. */
1896#if defined __stub_$2 || defined __stub___$2
1897choke me
1898#endif
1899
1900int
1901main ()
1902{
1903return $2 ();
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_link "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext \
1914 conftest$ac_exeext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
1919 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1920
1921} # ac_fn_c_check_func
1922
1923# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1924# -------------------------------------------------------
1925# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1926# the include files in INCLUDES and setting the cache variable VAR
1927# accordingly.
1928ac_fn_c_check_header_mongrel ()
1929{
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 if eval "test \"\${$3+set}\"" = set; then :
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
1934if eval "test \"\${$3+set}\"" = set; then :
1935 $as_echo_n "(cached) " >&6
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
1940else
1941 # Is the header compilable?
1942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1943$as_echo_n "checking $2 usability... " >&6; }
1944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$4
1947#include <$2>
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 ac_header_compiler=yes
1951else
1952 ac_header_compiler=no
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1956$as_echo "$ac_header_compiler" >&6; }
1957
1958# Is the header present?
1959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1960$as_echo_n "checking $2 presence... " >&6; }
1961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963#include <$2>
1964_ACEOF
1965if ac_fn_c_try_cpp "$LINENO"; then :
1966 ac_header_preproc=yes
1967else
1968 ac_header_preproc=no
1969fi
1970rm -f conftest.err conftest.i conftest.$ac_ext
1971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1972$as_echo "$ac_header_preproc" >&6; }
1973
1974# So? What about this header?
1975case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1976 yes:no: )
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1978$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1980$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1981 ;;
1982 no:yes:* )
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1984$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1986$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1988$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1990$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1992$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1993( $as_echo "## -------------------------------------------------------- ##
1994## Report this to enlightenment-devel@lists.sourceforge.net ##
1995## -------------------------------------------------------- ##"
1996 ) | sed "s/^/$as_me: WARNING: /" >&2
1997 ;;
1998esac
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2000$as_echo_n "checking for $2... " >&6; }
2001if eval "test \"\${$3+set}\"" = set; then :
2002 $as_echo_n "(cached) " >&6
2003else
2004 eval "$3=\$ac_header_compiler"
2005fi
2006eval ac_res=\$$3
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2008$as_echo "$ac_res" >&6; }
2009fi
2010 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011
2012} # ac_fn_c_check_header_mongrel
2013cat >config.log <<_ACEOF
2014This file contains any messages produced by compilers while
2015running configure, to aid debugging if configure makes a mistake.
2016
2017It was created by embryo $as_me 1.2.0-alpha, which was
2018generated by GNU Autoconf 2.67. Invocation command line was
2019
2020 $ $0 $@
2021
2022_ACEOF
2023exec 5>>config.log
2024{
2025cat <<_ASUNAME
2026## --------- ##
2027## Platform. ##
2028## --------- ##
2029
2030hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2031uname -m = `(uname -m) 2>/dev/null || echo unknown`
2032uname -r = `(uname -r) 2>/dev/null || echo unknown`
2033uname -s = `(uname -s) 2>/dev/null || echo unknown`
2034uname -v = `(uname -v) 2>/dev/null || echo unknown`
2035
2036/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2037/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2038
2039/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2040/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2041/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2042/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2043/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2044/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2045/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2046
2047_ASUNAME
2048
2049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050for as_dir in $PATH
2051do
2052 IFS=$as_save_IFS
2053 test -z "$as_dir" && as_dir=.
2054 $as_echo "PATH: $as_dir"
2055 done
2056IFS=$as_save_IFS
2057
2058} >&5
2059
2060cat >&5 <<_ACEOF
2061
2062
2063## ----------- ##
2064## Core tests. ##
2065## ----------- ##
2066
2067_ACEOF
2068
2069
2070# Keep a trace of the command line.
2071# Strip out --no-create and --no-recursion so they do not pile up.
2072# Strip out --silent because we don't want to record it for future runs.
2073# Also quote any args containing shell meta-characters.
2074# Make two passes to allow for proper duplicate-argument suppression.
2075ac_configure_args=
2076ac_configure_args0=
2077ac_configure_args1=
2078ac_must_keep_next=false
2079for ac_pass in 1 2
2080do
2081 for ac_arg
2082 do
2083 case $ac_arg in
2084 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2085 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2086 | -silent | --silent | --silen | --sile | --sil)
2087 continue ;;
2088 *\'*)
2089 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2090 esac
2091 case $ac_pass in
2092 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2093 2)
2094 as_fn_append ac_configure_args1 " '$ac_arg'"
2095 if test $ac_must_keep_next = true; then
2096 ac_must_keep_next=false # Got value, back to normal.
2097 else
2098 case $ac_arg in
2099 *=* | --config-cache | -C | -disable-* | --disable-* \
2100 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2101 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2102 | -with-* | --with-* | -without-* | --without-* | --x)
2103 case "$ac_configure_args0 " in
2104 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2105 esac
2106 ;;
2107 -* ) ac_must_keep_next=true ;;
2108 esac
2109 fi
2110 as_fn_append ac_configure_args " '$ac_arg'"
2111 ;;
2112 esac
2113 done
2114done
2115{ ac_configure_args0=; unset ac_configure_args0;}
2116{ ac_configure_args1=; unset ac_configure_args1;}
2117
2118# When interrupted or exit'd, cleanup temporary files, and complete
2119# config.log. We remove comments because anyway the quotes in there
2120# would cause problems or look ugly.
2121# WARNING: Use '\'' to represent an apostrophe within the trap.
2122# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2123trap 'exit_status=$?
2124 # Save into config.log some information that might help in debugging.
2125 {
2126 echo
2127
2128 $as_echo "## ---------------- ##
2129## Cache variables. ##
2130## ---------------- ##"
2131 echo
2132 # The following way of writing the cache mishandles newlines in values,
2133(
2134 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2135 eval ac_val=\$$ac_var
2136 case $ac_val in #(
2137 *${as_nl}*)
2138 case $ac_var in #(
2139 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2140$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2141 esac
2142 case $ac_var in #(
2143 _ | IFS | as_nl) ;; #(
2144 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2145 *) { eval $ac_var=; unset $ac_var;} ;;
2146 esac ;;
2147 esac
2148 done
2149 (set) 2>&1 |
2150 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2151 *${as_nl}ac_space=\ *)
2152 sed -n \
2153 "s/'\''/'\''\\\\'\'''\''/g;
2154 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2155 ;; #(
2156 *)
2157 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2158 ;;
2159 esac |
2160 sort
2161)
2162 echo
2163
2164 $as_echo "## ----------------- ##
2165## Output variables. ##
2166## ----------------- ##"
2167 echo
2168 for ac_var in $ac_subst_vars
2169 do
2170 eval ac_val=\$$ac_var
2171 case $ac_val in
2172 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2173 esac
2174 $as_echo "$ac_var='\''$ac_val'\''"
2175 done | sort
2176 echo
2177
2178 if test -n "$ac_subst_files"; then
2179 $as_echo "## ------------------- ##
2180## File substitutions. ##
2181## ------------------- ##"
2182 echo
2183 for ac_var in $ac_subst_files
2184 do
2185 eval ac_val=\$$ac_var
2186 case $ac_val in
2187 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2188 esac
2189 $as_echo "$ac_var='\''$ac_val'\''"
2190 done | sort
2191 echo
2192 fi
2193
2194 if test -s confdefs.h; then
2195 $as_echo "## ----------- ##
2196## confdefs.h. ##
2197## ----------- ##"
2198 echo
2199 cat confdefs.h
2200 echo
2201 fi
2202 test "$ac_signal" != 0 &&
2203 $as_echo "$as_me: caught signal $ac_signal"
2204 $as_echo "$as_me: exit $exit_status"
2205 } >&5
2206 rm -f core *.core core.conftest.* &&
2207 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2208 exit $exit_status
2209' 0
2210for ac_signal in 1 2 13 15; do
2211 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2212done
2213ac_signal=0
2214
2215# confdefs.h avoids OS command line length limits that DEFS can exceed.
2216rm -f -r conftest* confdefs.h
2217
2218$as_echo "/* confdefs.h */" > confdefs.h
2219
2220# Predefined preprocessor variables.
2221
2222cat >>confdefs.h <<_ACEOF
2223#define PACKAGE_NAME "$PACKAGE_NAME"
2224_ACEOF
2225
2226cat >>confdefs.h <<_ACEOF
2227#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2228_ACEOF
2229
2230cat >>confdefs.h <<_ACEOF
2231#define PACKAGE_VERSION "$PACKAGE_VERSION"
2232_ACEOF
2233
2234cat >>confdefs.h <<_ACEOF
2235#define PACKAGE_STRING "$PACKAGE_STRING"
2236_ACEOF
2237
2238cat >>confdefs.h <<_ACEOF
2239#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2240_ACEOF
2241
2242cat >>confdefs.h <<_ACEOF
2243#define PACKAGE_URL "$PACKAGE_URL"
2244_ACEOF
2245
2246
2247# Let the site file select an alternate cache file if it wants to.
2248# Prefer an explicitly selected file to automatically selected ones.
2249ac_site_file1=NONE
2250ac_site_file2=NONE
2251if test -n "$CONFIG_SITE"; then
2252 # We do not want a PATH search for config.site.
2253 case $CONFIG_SITE in #((
2254 -*) ac_site_file1=./$CONFIG_SITE;;
2255 */*) ac_site_file1=$CONFIG_SITE;;
2256 *) ac_site_file1=./$CONFIG_SITE;;
2257 esac
2258elif test "x$prefix" != xNONE; then
2259 ac_site_file1=$prefix/share/config.site
2260 ac_site_file2=$prefix/etc/config.site
2261else
2262 ac_site_file1=$ac_default_prefix/share/config.site
2263 ac_site_file2=$ac_default_prefix/etc/config.site
2264fi
2265for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2266do
2267 test "x$ac_site_file" = xNONE && continue
2268 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2269 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2270$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2271 sed 's/^/| /' "$ac_site_file" >&5
2272 . "$ac_site_file" \
2273 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2275as_fn_error $? "failed to load site script $ac_site_file
2276See \`config.log' for more details" "$LINENO" 5 ; }
2277 fi
2278done
2279
2280if test -r "$cache_file"; then
2281 # Some versions of bash will fail to source /dev/null (special files
2282 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2283 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2285$as_echo "$as_me: loading cache $cache_file" >&6;}
2286 case $cache_file in
2287 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2288 *) . "./$cache_file";;
2289 esac
2290 fi
2291else
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2293$as_echo "$as_me: creating cache $cache_file" >&6;}
2294 >$cache_file
2295fi
2296
2297# Check that the precious variables saved in the cache have kept the same
2298# value.
2299ac_cache_corrupted=false
2300for ac_var in $ac_precious_vars; do
2301 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2302 eval ac_new_set=\$ac_env_${ac_var}_set
2303 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2304 eval ac_new_val=\$ac_env_${ac_var}_value
2305 case $ac_old_set,$ac_new_set in
2306 set,)
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2308$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2309 ac_cache_corrupted=: ;;
2310 ,set)
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2312$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2313 ac_cache_corrupted=: ;;
2314 ,);;
2315 *)
2316 if test "x$ac_old_val" != "x$ac_new_val"; then
2317 # differences in whitespace do not lead to failure.
2318 ac_old_val_w=`echo x $ac_old_val`
2319 ac_new_val_w=`echo x $ac_new_val`
2320 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2322$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2323 ac_cache_corrupted=:
2324 else
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2326$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2327 eval $ac_var=\$ac_old_val
2328 fi
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2330$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2332$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2333 fi;;
2334 esac
2335 # Pass precious variables to config.status.
2336 if test "$ac_new_set" = set; then
2337 case $ac_new_val in
2338 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2339 *) ac_arg=$ac_var=$ac_new_val ;;
2340 esac
2341 case " $ac_configure_args " in
2342 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2343 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2344 esac
2345 fi
2346done
2347if $ac_cache_corrupted; then
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2351$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2352 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2353fi
2354## -------------------- ##
2355## Main body of script. ##
2356## -------------------- ##
2357
2358ac_ext=c
2359ac_cpp='$CPP $CPPFLAGS'
2360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2362ac_compiler_gnu=$ac_cv_c_compiler_gnu
2363
2364
2365
2366
2367
2368
2369ac_config_headers="$ac_config_headers config.h"
2370
2371
2372
2373
2374am__api_version='1.11'
2375
2376ac_aux_dir=
2377for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2378 if test -f "$ac_dir/install-sh"; then
2379 ac_aux_dir=$ac_dir
2380 ac_install_sh="$ac_aux_dir/install-sh -c"
2381 break
2382 elif test -f "$ac_dir/install.sh"; then
2383 ac_aux_dir=$ac_dir
2384 ac_install_sh="$ac_aux_dir/install.sh -c"
2385 break
2386 elif test -f "$ac_dir/shtool"; then
2387 ac_aux_dir=$ac_dir
2388 ac_install_sh="$ac_aux_dir/shtool install -c"
2389 break
2390 fi
2391done
2392if test -z "$ac_aux_dir"; then
2393 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2394fi
2395
2396# These three variables are undocumented and unsupported,
2397# and are intended to be withdrawn in a future Autoconf release.
2398# They can cause serious problems if a builder's source tree is in a directory
2399# whose full name contains unusual characters.
2400ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2401ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2402ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2403
2404
2405# Find a good install program. We prefer a C program (faster),
2406# so one script is as good as another. But avoid the broken or
2407# incompatible versions:
2408# SysV /etc/install, /usr/sbin/install
2409# SunOS /usr/etc/install
2410# IRIX /sbin/install
2411# AIX /bin/install
2412# AmigaOS /C/install, which installs bootblocks on floppy discs
2413# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2414# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2415# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2416# OS/2's system install, which has a completely different semantic
2417# ./install, which can be erroneously created by make from ./install.sh.
2418# Reject install programs that cannot install multiple files.
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2420$as_echo_n "checking for a BSD-compatible install... " >&6; }
2421if test -z "$INSTALL"; then
2422if test "${ac_cv_path_install+set}" = set; then :
2423 $as_echo_n "(cached) " >&6
2424else
2425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2426for as_dir in $PATH
2427do
2428 IFS=$as_save_IFS
2429 test -z "$as_dir" && as_dir=.
2430 # Account for people who put trailing slashes in PATH elements.
2431case $as_dir/ in #((
2432 ./ | .// | /[cC]/* | \
2433 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2434 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2435 /usr/ucb/* ) ;;
2436 *)
2437 # OSF1 and SCO ODT 3.0 have their own names for install.
2438 # Don't use installbsd from OSF since it installs stuff as root
2439 # by default.
2440 for ac_prog in ginstall scoinst install; do
2441 for ac_exec_ext in '' $ac_executable_extensions; do
2442 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2443 if test $ac_prog = install &&
2444 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2445 # AIX install. It has an incompatible calling convention.
2446 :
2447 elif test $ac_prog = install &&
2448 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2449 # program-specific install script used by HP pwplus--don't use.
2450 :
2451 else
2452 rm -rf conftest.one conftest.two conftest.dir
2453 echo one > conftest.one
2454 echo two > conftest.two
2455 mkdir conftest.dir
2456 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2457 test -s conftest.one && test -s conftest.two &&
2458 test -s conftest.dir/conftest.one &&
2459 test -s conftest.dir/conftest.two
2460 then
2461 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2462 break 3
2463 fi
2464 fi
2465 fi
2466 done
2467 done
2468 ;;
2469esac
2470
2471 done
2472IFS=$as_save_IFS
2473
2474rm -rf conftest.one conftest.two conftest.dir
2475
2476fi
2477 if test "${ac_cv_path_install+set}" = set; then
2478 INSTALL=$ac_cv_path_install
2479 else
2480 # As a last resort, use the slow shell script. Don't cache a
2481 # value for INSTALL within a source directory, because that will
2482 # break other packages using the cache if that directory is
2483 # removed, or if the value is a relative name.
2484 INSTALL=$ac_install_sh
2485 fi
2486fi
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2488$as_echo "$INSTALL" >&6; }
2489
2490# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2491# It thinks the first close brace ends the variable substitution.
2492test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2493
2494test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2495
2496test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2497
2498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2499$as_echo_n "checking whether build environment is sane... " >&6; }
2500# Just in case
2501sleep 1
2502echo timestamp > conftest.file
2503# Reject unsafe characters in $srcdir or the absolute working directory
2504# name. Accept space and tab only in the latter.
2505am_lf='
2506'
2507case `pwd` in
2508 *[\\\"\#\$\&\'\`$am_lf]*)
2509 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
2510esac
2511case $srcdir in
2512 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2513 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
2514esac
2515
2516# Do `set' in a subshell so we don't clobber the current shell's
2517# arguments. Must try -L first in case configure is actually a
2518# symlink; some systems play weird games with the mod time of symlinks
2519# (eg FreeBSD returns the mod time of the symlink's containing
2520# directory).
2521if (
2522 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2523 if test "$*" = "X"; then
2524 # -L didn't work.
2525 set X `ls -t "$srcdir/configure" conftest.file`
2526 fi
2527 rm -f conftest.file
2528 if test "$*" != "X $srcdir/configure conftest.file" \
2529 && test "$*" != "X conftest.file $srcdir/configure"; then
2530
2531 # If neither matched, then we have a broken ls. This can happen
2532 # if, for instance, CONFIG_SHELL is bash and it inherits a
2533 # broken ls alias from the environment. This has actually
2534 # happened. Such a system could not be considered "sane".
2535 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2536alias in your environment" "$LINENO" 5
2537 fi
2538
2539 test "$2" = conftest.file
2540 )
2541then
2542 # Ok.
2543 :
2544else
2545 as_fn_error $? "newly created file is older than distributed files!
2546Check your system clock" "$LINENO" 5
2547fi
2548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2549$as_echo "yes" >&6; }
2550test "$program_prefix" != NONE &&
2551 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2552# Use a double $ so make ignores it.
2553test "$program_suffix" != NONE &&
2554 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2555# Double any \ or $.
2556# By default was `s,x,x', remove it if useless.
2557ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2558program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2559
2560# expand $ac_aux_dir to an absolute path
2561am_aux_dir=`cd $ac_aux_dir && pwd`
2562
2563if test x"${MISSING+set}" != xset; then
2564 case $am_aux_dir in
2565 *\ * | *\ *)
2566 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2567 *)
2568 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2569 esac
2570fi
2571# Use eval to expand $SHELL
2572if eval "$MISSING --run true"; then
2573 am_missing_run="$MISSING --run "
2574else
2575 am_missing_run=
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
2577$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2578fi
2579
2580if test x"${install_sh}" != xset; then
2581 case $am_aux_dir in
2582 *\ * | *\ *)
2583 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2584 *)
2585 install_sh="\${SHELL} $am_aux_dir/install-sh"
2586 esac
2587fi
2588
2589# Installed binaries are usually stripped using `strip' when the user
2590# run `make install-strip'. However `strip' might not be the right
2591# tool to use in cross-compilation environments, therefore Automake
2592# will honor the `STRIP' environment variable to overrule this program.
2593if test "$cross_compiling" != no; then
2594 if test -n "$ac_tool_prefix"; then
2595 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2596set dummy ${ac_tool_prefix}strip; ac_word=$2
2597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2598$as_echo_n "checking for $ac_word... " >&6; }
2599if test "${ac_cv_prog_STRIP+set}" = set; then :
2600 $as_echo_n "(cached) " >&6
2601else
2602 if test -n "$STRIP"; then
2603 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2604else
2605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2606for as_dir in $PATH
2607do
2608 IFS=$as_save_IFS
2609 test -z "$as_dir" && as_dir=.
2610 for ac_exec_ext in '' $ac_executable_extensions; do
2611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2612 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2614 break 2
2615 fi
2616done
2617 done
2618IFS=$as_save_IFS
2619
2620fi
2621fi
2622STRIP=$ac_cv_prog_STRIP
2623if test -n "$STRIP"; then
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2625$as_echo "$STRIP" >&6; }
2626else
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2628$as_echo "no" >&6; }
2629fi
2630
2631
2632fi
2633if test -z "$ac_cv_prog_STRIP"; then
2634 ac_ct_STRIP=$STRIP
2635 # Extract the first word of "strip", so it can be a program name with args.
2636set dummy strip; ac_word=$2
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2638$as_echo_n "checking for $ac_word... " >&6; }
2639if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2640 $as_echo_n "(cached) " >&6
2641else
2642 if test -n "$ac_ct_STRIP"; then
2643 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2644else
2645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2646for as_dir in $PATH
2647do
2648 IFS=$as_save_IFS
2649 test -z "$as_dir" && as_dir=.
2650 for ac_exec_ext in '' $ac_executable_extensions; do
2651 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2652 ac_cv_prog_ac_ct_STRIP="strip"
2653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2654 break 2
2655 fi
2656done
2657 done
2658IFS=$as_save_IFS
2659
2660fi
2661fi
2662ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2663if test -n "$ac_ct_STRIP"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2665$as_echo "$ac_ct_STRIP" >&6; }
2666else
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2668$as_echo "no" >&6; }
2669fi
2670
2671 if test "x$ac_ct_STRIP" = x; then
2672 STRIP=":"
2673 else
2674 case $cross_compiling:$ac_tool_warned in
2675yes:)
2676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2678ac_tool_warned=yes ;;
2679esac
2680 STRIP=$ac_ct_STRIP
2681 fi
2682else
2683 STRIP="$ac_cv_prog_STRIP"
2684fi
2685
2686fi
2687INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2688
2689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2690$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2691if test -z "$MKDIR_P"; then
2692 if test "${ac_cv_path_mkdir+set}" = set; then :
2693 $as_echo_n "(cached) " >&6
2694else
2695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2696for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2697do
2698 IFS=$as_save_IFS
2699 test -z "$as_dir" && as_dir=.
2700 for ac_prog in mkdir gmkdir; do
2701 for ac_exec_ext in '' $ac_executable_extensions; do
2702 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2703 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2704 'mkdir (GNU coreutils) '* | \
2705 'mkdir (coreutils) '* | \
2706 'mkdir (fileutils) '4.1*)
2707 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2708 break 3;;
2709 esac
2710 done
2711 done
2712 done
2713IFS=$as_save_IFS
2714
2715fi
2716
2717 test -d ./--version && rmdir ./--version
2718 if test "${ac_cv_path_mkdir+set}" = set; then
2719 MKDIR_P="$ac_cv_path_mkdir -p"
2720 else
2721 # As a last resort, use the slow shell script. Don't cache a
2722 # value for MKDIR_P within a source directory, because that will
2723 # break other packages using the cache if that directory is
2724 # removed, or if the value is a relative name.
2725 MKDIR_P="$ac_install_sh -d"
2726 fi
2727fi
2728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2729$as_echo "$MKDIR_P" >&6; }
2730
2731mkdir_p="$MKDIR_P"
2732case $mkdir_p in
2733 [\\/$]* | ?:[\\/]*) ;;
2734 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2735esac
2736
2737for ac_prog in gawk mawk nawk awk
2738do
2739 # Extract the first word of "$ac_prog", so it can be a program name with args.
2740set dummy $ac_prog; ac_word=$2
2741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2742$as_echo_n "checking for $ac_word... " >&6; }
2743if test "${ac_cv_prog_AWK+set}" = set; then :
2744 $as_echo_n "(cached) " >&6
2745else
2746 if test -n "$AWK"; then
2747 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2748else
2749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2750for as_dir in $PATH
2751do
2752 IFS=$as_save_IFS
2753 test -z "$as_dir" && as_dir=.
2754 for ac_exec_ext in '' $ac_executable_extensions; do
2755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2756 ac_cv_prog_AWK="$ac_prog"
2757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2758 break 2
2759 fi
2760done
2761 done
2762IFS=$as_save_IFS
2763
2764fi
2765fi
2766AWK=$ac_cv_prog_AWK
2767if test -n "$AWK"; then
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2769$as_echo "$AWK" >&6; }
2770else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2772$as_echo "no" >&6; }
2773fi
2774
2775
2776 test -n "$AWK" && break
2777done
2778
2779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2780$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2781set x ${MAKE-make}
2782ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2783if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
2784 $as_echo_n "(cached) " >&6
2785else
2786 cat >conftest.make <<\_ACEOF
2787SHELL = /bin/sh
2788all:
2789 @echo '@@@%%%=$(MAKE)=@@@%%%'
2790_ACEOF
2791# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2792case `${MAKE-make} -f conftest.make 2>/dev/null` in
2793 *@@@%%%=?*=@@@%%%*)
2794 eval ac_cv_prog_make_${ac_make}_set=yes;;
2795 *)
2796 eval ac_cv_prog_make_${ac_make}_set=no;;
2797esac
2798rm -f conftest.make
2799fi
2800if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2802$as_echo "yes" >&6; }
2803 SET_MAKE=
2804else
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
2807 SET_MAKE="MAKE=${MAKE-make}"
2808fi
2809
2810rm -rf .tst 2>/dev/null
2811mkdir .tst 2>/dev/null
2812if test -d .tst; then
2813 am__leading_dot=.
2814else
2815 am__leading_dot=_
2816fi
2817rmdir .tst 2>/dev/null
2818
2819if test "`cd $srcdir && pwd`" != "`pwd`"; then
2820 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2821 # is not polluted with repeated "-I."
2822 am__isrc=' -I$(srcdir)'
2823 # test to see if srcdir already configured
2824 if test -f $srcdir/config.status; then
2825 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2826 fi
2827fi
2828
2829# test whether we have cygpath
2830if test -z "$CYGPATH_W"; then
2831 if (cygpath --version) >/dev/null 2>/dev/null; then
2832 CYGPATH_W='cygpath -w'
2833 else
2834 CYGPATH_W=echo
2835 fi
2836fi
2837
2838
2839# Define the identity of the package.
2840 PACKAGE='embryo'
2841 VERSION='1.2.0-alpha'
2842
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE "$PACKAGE"
2846_ACEOF
2847
2848
2849cat >>confdefs.h <<_ACEOF
2850#define VERSION "$VERSION"
2851_ACEOF
2852
2853# Some tools Automake needs.
2854
2855ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2856
2857
2858AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2859
2860
2861AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2862
2863
2864AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2865
2866
2867MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2868
2869# We need awk for the "check" target. The system "awk" is bad on
2870# some platforms.
2871# Always define AMTAR for backward compatibility.
2872
2873AMTAR=${AMTAR-"${am_missing_run}tar"}
2874
2875am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2876
2877
2878
2879
2880
2881# Check whether --enable-silent-rules was given.
2882if test "${enable_silent_rules+set}" = set; then :
2883 enableval=$enable_silent_rules;
2884fi
2885
2886case $enable_silent_rules in
2887yes) AM_DEFAULT_VERBOSITY=0;;
2888no) AM_DEFAULT_VERBOSITY=1;;
2889*) AM_DEFAULT_VERBOSITY=0;;
2890esac
2891AM_BACKSLASH='\'
2892
2893
2894# Make sure we can run config.sub.
2895$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2896 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2897
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2899$as_echo_n "checking build system type... " >&6; }
2900if test "${ac_cv_build+set}" = set; then :
2901 $as_echo_n "(cached) " >&6
2902else
2903 ac_build_alias=$build_alias
2904test "x$ac_build_alias" = x &&
2905 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2906test "x$ac_build_alias" = x &&
2907 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2908ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2909 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2910
2911fi
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2913$as_echo "$ac_cv_build" >&6; }
2914case $ac_cv_build in
2915*-*-*) ;;
2916*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
2917esac
2918build=$ac_cv_build
2919ac_save_IFS=$IFS; IFS='-'
2920set x $ac_cv_build
2921shift
2922build_cpu=$1
2923build_vendor=$2
2924shift; shift
2925# Remember, the first character of IFS is used to create $*,
2926# except with old shells:
2927build_os=$*
2928IFS=$ac_save_IFS
2929case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2930
2931
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2933$as_echo_n "checking host system type... " >&6; }
2934if test "${ac_cv_host+set}" = set; then :
2935 $as_echo_n "(cached) " >&6
2936else
2937 if test "x$host_alias" = x; then
2938 ac_cv_host=$ac_cv_build
2939else
2940 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2941 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2942fi
2943
2944fi
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2946$as_echo "$ac_cv_host" >&6; }
2947case $ac_cv_host in
2948*-*-*) ;;
2949*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
2950esac
2951host=$ac_cv_host
2952ac_save_IFS=$IFS; IFS='-'
2953set x $ac_cv_host
2954shift
2955host_cpu=$1
2956host_vendor=$2
2957shift; shift
2958# Remember, the first character of IFS is used to create $*,
2959# except with old shells:
2960host_os=$*
2961IFS=$ac_save_IFS
2962case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2963
2964
2965enable_win32_dll=yes
2966
2967case $host in
2968*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
2969 if test -n "$ac_tool_prefix"; then
2970 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2971set dummy ${ac_tool_prefix}as; ac_word=$2
2972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973$as_echo_n "checking for $ac_word... " >&6; }
2974if test "${ac_cv_prog_AS+set}" = set; then :
2975 $as_echo_n "(cached) " >&6
2976else
2977 if test -n "$AS"; then
2978 ac_cv_prog_AS="$AS" # Let the user override the test.
2979else
2980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2981for as_dir in $PATH
2982do
2983 IFS=$as_save_IFS
2984 test -z "$as_dir" && as_dir=.
2985 for ac_exec_ext in '' $ac_executable_extensions; do
2986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2987 ac_cv_prog_AS="${ac_tool_prefix}as"
2988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2989 break 2
2990 fi
2991done
2992 done
2993IFS=$as_save_IFS
2994
2995fi
2996fi
2997AS=$ac_cv_prog_AS
2998if test -n "$AS"; then
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
3000$as_echo "$AS" >&6; }
3001else
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3003$as_echo "no" >&6; }
3004fi
3005
3006
3007fi
3008if test -z "$ac_cv_prog_AS"; then
3009 ac_ct_AS=$AS
3010 # Extract the first word of "as", so it can be a program name with args.
3011set dummy as; ac_word=$2
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3013$as_echo_n "checking for $ac_word... " >&6; }
3014if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
3015 $as_echo_n "(cached) " >&6
3016else
3017 if test -n "$ac_ct_AS"; then
3018 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
3019else
3020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3021for as_dir in $PATH
3022do
3023 IFS=$as_save_IFS
3024 test -z "$as_dir" && as_dir=.
3025 for ac_exec_ext in '' $ac_executable_extensions; do
3026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3027 ac_cv_prog_ac_ct_AS="as"
3028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3029 break 2
3030 fi
3031done
3032 done
3033IFS=$as_save_IFS
3034
3035fi
3036fi
3037ac_ct_AS=$ac_cv_prog_ac_ct_AS
3038if test -n "$ac_ct_AS"; then
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
3040$as_echo "$ac_ct_AS" >&6; }
3041else
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3043$as_echo "no" >&6; }
3044fi
3045
3046 if test "x$ac_ct_AS" = x; then
3047 AS="false"
3048 else
3049 case $cross_compiling:$ac_tool_warned in
3050yes:)
3051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3053ac_tool_warned=yes ;;
3054esac
3055 AS=$ac_ct_AS
3056 fi
3057else
3058 AS="$ac_cv_prog_AS"
3059fi
3060
3061 if test -n "$ac_tool_prefix"; then
3062 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3063set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3065$as_echo_n "checking for $ac_word... " >&6; }
3066if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
3067 $as_echo_n "(cached) " >&6
3068else
3069 if test -n "$DLLTOOL"; then
3070 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3071else
3072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073for as_dir in $PATH
3074do
3075 IFS=$as_save_IFS
3076 test -z "$as_dir" && as_dir=.
3077 for ac_exec_ext in '' $ac_executable_extensions; do
3078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3079 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3081 break 2
3082 fi
3083done
3084 done
3085IFS=$as_save_IFS
3086
3087fi
3088fi
3089DLLTOOL=$ac_cv_prog_DLLTOOL
3090if test -n "$DLLTOOL"; then
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
3092$as_echo "$DLLTOOL" >&6; }
3093else
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3095$as_echo "no" >&6; }
3096fi
3097
3098
3099fi
3100if test -z "$ac_cv_prog_DLLTOOL"; then
3101 ac_ct_DLLTOOL=$DLLTOOL
3102 # Extract the first word of "dlltool", so it can be a program name with args.
3103set dummy dlltool; ac_word=$2
3104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3105$as_echo_n "checking for $ac_word... " >&6; }
3106if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
3107 $as_echo_n "(cached) " >&6
3108else
3109 if test -n "$ac_ct_DLLTOOL"; then
3110 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
3111else
3112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3113for as_dir in $PATH
3114do
3115 IFS=$as_save_IFS
3116 test -z "$as_dir" && as_dir=.
3117 for ac_exec_ext in '' $ac_executable_extensions; do
3118 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3119 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
3120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3121 break 2
3122 fi
3123done
3124 done
3125IFS=$as_save_IFS
3126
3127fi
3128fi
3129ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
3130if test -n "$ac_ct_DLLTOOL"; then
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
3132$as_echo "$ac_ct_DLLTOOL" >&6; }
3133else
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3135$as_echo "no" >&6; }
3136fi
3137
3138 if test "x$ac_ct_DLLTOOL" = x; then
3139 DLLTOOL="false"
3140 else
3141 case $cross_compiling:$ac_tool_warned in
3142yes:)
3143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3145ac_tool_warned=yes ;;
3146esac
3147 DLLTOOL=$ac_ct_DLLTOOL
3148 fi
3149else
3150 DLLTOOL="$ac_cv_prog_DLLTOOL"
3151fi
3152
3153 if test -n "$ac_tool_prefix"; then
3154 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3155set dummy ${ac_tool_prefix}objdump; ac_word=$2
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157$as_echo_n "checking for $ac_word... " >&6; }
3158if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
3159 $as_echo_n "(cached) " >&6
3160else
3161 if test -n "$OBJDUMP"; then
3162 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3163else
3164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3171 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3173 break 2
3174 fi
3175done
3176 done
3177IFS=$as_save_IFS
3178
3179fi
3180fi
3181OBJDUMP=$ac_cv_prog_OBJDUMP
3182if test -n "$OBJDUMP"; then
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
3184$as_echo "$OBJDUMP" >&6; }
3185else
3186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3187$as_echo "no" >&6; }
3188fi
3189
3190
3191fi
3192if test -z "$ac_cv_prog_OBJDUMP"; then
3193 ac_ct_OBJDUMP=$OBJDUMP
3194 # Extract the first word of "objdump", so it can be a program name with args.
3195set dummy objdump; ac_word=$2
3196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197$as_echo_n "checking for $ac_word... " >&6; }
3198if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
3199 $as_echo_n "(cached) " >&6
3200else
3201 if test -n "$ac_ct_OBJDUMP"; then
3202 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
3203else
3204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
3209 for ac_exec_ext in '' $ac_executable_extensions; do
3210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3211 ac_cv_prog_ac_ct_OBJDUMP="objdump"
3212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3213 break 2
3214 fi
3215done
3216 done
3217IFS=$as_save_IFS
3218
3219fi
3220fi
3221ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
3222if test -n "$ac_ct_OBJDUMP"; then
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
3224$as_echo "$ac_ct_OBJDUMP" >&6; }
3225else
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227$as_echo "no" >&6; }
3228fi
3229
3230 if test "x$ac_ct_OBJDUMP" = x; then
3231 OBJDUMP="false"
3232 else
3233 case $cross_compiling:$ac_tool_warned in
3234yes:)
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3237ac_tool_warned=yes ;;
3238esac
3239 OBJDUMP=$ac_ct_OBJDUMP
3240 fi
3241else
3242 OBJDUMP="$ac_cv_prog_OBJDUMP"
3243fi
3244
3245 ;;
3246esac
3247
3248test -z "$AS" && AS=as
3249
3250
3251
3252
3253
3254test -z "$DLLTOOL" && DLLTOOL=dlltool
3255
3256
3257
3258
3259
3260test -z "$OBJDUMP" && OBJDUMP=objdump
3261
3262
3263
3264
3265
3266
3267
3268case `pwd` in
3269 *\ * | *\ *)
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
3271$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
3272esac
3273
3274
3275
3276macro_version='2.2.6b'
3277macro_revision='1.3017'
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291ltmain="$ac_aux_dir/ltmain.sh"
3292
3293DEPDIR="${am__leading_dot}deps"
3294
3295ac_config_commands="$ac_config_commands depfiles"
3296
3297
3298am_make=${MAKE-make}
3299cat > confinc << 'END'
3300am__doit:
3301 @echo this is the am__doit target
3302.PHONY: am__doit
3303END
3304# If we don't find an include directive, just comment out the code.
3305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3306$as_echo_n "checking for style of include used by $am_make... " >&6; }
3307am__include="#"
3308am__quote=
3309_am_result=none
3310# First try GNU make style include.
3311echo "include confinc" > confmf
3312# Ignore all kinds of additional output from `make'.
3313case `$am_make -s -f confmf 2> /dev/null` in #(
3314*the\ am__doit\ target*)
3315 am__include=include
3316 am__quote=
3317 _am_result=GNU
3318 ;;
3319esac
3320# Now try BSD make style include.
3321if test "$am__include" = "#"; then
3322 echo '.include "confinc"' > confmf
3323 case `$am_make -s -f confmf 2> /dev/null` in #(
3324 *the\ am__doit\ target*)
3325 am__include=.include
3326 am__quote="\""
3327 _am_result=BSD
3328 ;;
3329 esac
3330fi
3331
3332
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3334$as_echo "$_am_result" >&6; }
3335rm -f confinc confmf
3336
3337# Check whether --enable-dependency-tracking was given.
3338if test "${enable_dependency_tracking+set}" = set; then :
3339 enableval=$enable_dependency_tracking;
3340fi
3341
3342if test "x$enable_dependency_tracking" != xno; then
3343 am_depcomp="$ac_aux_dir/depcomp"
3344 AMDEPBACKSLASH='\'
3345fi
3346 if test "x$enable_dependency_tracking" != xno; then
3347 AMDEP_TRUE=
3348 AMDEP_FALSE='#'
3349else
3350 AMDEP_TRUE='#'
3351 AMDEP_FALSE=
3352fi
3353
3354
3355ac_ext=c
3356ac_cpp='$CPP $CPPFLAGS'
3357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3359ac_compiler_gnu=$ac_cv_c_compiler_gnu
3360if test -n "$ac_tool_prefix"; then
3361 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3362set dummy ${ac_tool_prefix}gcc; ac_word=$2
3363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3364$as_echo_n "checking for $ac_word... " >&6; }
3365if test "${ac_cv_prog_CC+set}" = set; then :
3366 $as_echo_n "(cached) " >&6
3367else
3368 if test -n "$CC"; then
3369 ac_cv_prog_CC="$CC" # Let the user override the test.
3370else
3371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3372for as_dir in $PATH
3373do
3374 IFS=$as_save_IFS
3375 test -z "$as_dir" && as_dir=.
3376 for ac_exec_ext in '' $ac_executable_extensions; do
3377 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3378 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3380 break 2
3381 fi
3382done
3383 done
3384IFS=$as_save_IFS
3385
3386fi
3387fi
3388CC=$ac_cv_prog_CC
3389if test -n "$CC"; then
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3391$as_echo "$CC" >&6; }
3392else
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3394$as_echo "no" >&6; }
3395fi
3396
3397
3398fi
3399if test -z "$ac_cv_prog_CC"; then
3400 ac_ct_CC=$CC
3401 # Extract the first word of "gcc", so it can be a program name with args.
3402set dummy gcc; ac_word=$2
3403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3404$as_echo_n "checking for $ac_word... " >&6; }
3405if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3406 $as_echo_n "(cached) " >&6
3407else
3408 if test -n "$ac_ct_CC"; then
3409 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3410else
3411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3412for as_dir in $PATH
3413do
3414 IFS=$as_save_IFS
3415 test -z "$as_dir" && as_dir=.
3416 for ac_exec_ext in '' $ac_executable_extensions; do
3417 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3418 ac_cv_prog_ac_ct_CC="gcc"
3419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3420 break 2
3421 fi
3422done
3423 done
3424IFS=$as_save_IFS
3425
3426fi
3427fi
3428ac_ct_CC=$ac_cv_prog_ac_ct_CC
3429if test -n "$ac_ct_CC"; then
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3431$as_echo "$ac_ct_CC" >&6; }
3432else
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3434$as_echo "no" >&6; }
3435fi
3436
3437 if test "x$ac_ct_CC" = x; then
3438 CC=""
3439 else
3440 case $cross_compiling:$ac_tool_warned in
3441yes:)
3442{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3443$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3444ac_tool_warned=yes ;;
3445esac
3446 CC=$ac_ct_CC
3447 fi
3448else
3449 CC="$ac_cv_prog_CC"
3450fi
3451
3452if test -z "$CC"; then
3453 if test -n "$ac_tool_prefix"; then
3454 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3455set dummy ${ac_tool_prefix}cc; ac_word=$2
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3457$as_echo_n "checking for $ac_word... " >&6; }
3458if test "${ac_cv_prog_CC+set}" = set; then :
3459 $as_echo_n "(cached) " >&6
3460else
3461 if test -n "$CC"; then
3462 ac_cv_prog_CC="$CC" # Let the user override the test.
3463else
3464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3465for as_dir in $PATH
3466do
3467 IFS=$as_save_IFS
3468 test -z "$as_dir" && as_dir=.
3469 for ac_exec_ext in '' $ac_executable_extensions; do
3470 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3471 ac_cv_prog_CC="${ac_tool_prefix}cc"
3472 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3473 break 2
3474 fi
3475done
3476 done
3477IFS=$as_save_IFS
3478
3479fi
3480fi
3481CC=$ac_cv_prog_CC
3482if test -n "$CC"; then
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3484$as_echo "$CC" >&6; }
3485else
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3487$as_echo "no" >&6; }
3488fi
3489
3490
3491 fi
3492fi
3493if test -z "$CC"; then
3494 # Extract the first word of "cc", so it can be a program name with args.
3495set dummy cc; ac_word=$2
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3497$as_echo_n "checking for $ac_word... " >&6; }
3498if test "${ac_cv_prog_CC+set}" = set; then :
3499 $as_echo_n "(cached) " >&6
3500else
3501 if test -n "$CC"; then
3502 ac_cv_prog_CC="$CC" # Let the user override the test.
3503else
3504 ac_prog_rejected=no
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3512 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3513 ac_prog_rejected=yes
3514 continue
3515 fi
3516 ac_cv_prog_CC="cc"
3517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3518 break 2
3519 fi
3520done
3521 done
3522IFS=$as_save_IFS
3523
3524if test $ac_prog_rejected = yes; then
3525 # We found a bogon in the path, so make sure we never use it.
3526 set dummy $ac_cv_prog_CC
3527 shift
3528 if test $# != 0; then
3529 # We chose a different compiler from the bogus one.
3530 # However, it has the same basename, so the bogon will be chosen
3531 # first if we set CC to just the basename; use the full file name.
3532 shift
3533 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3534 fi
3535fi
3536fi
3537fi
3538CC=$ac_cv_prog_CC
3539if test -n "$CC"; then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3541$as_echo "$CC" >&6; }
3542else
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3544$as_echo "no" >&6; }
3545fi
3546
3547
3548fi
3549if test -z "$CC"; then
3550 if test -n "$ac_tool_prefix"; then
3551 for ac_prog in cl.exe
3552 do
3553 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3554set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3556$as_echo_n "checking for $ac_word... " >&6; }
3557if test "${ac_cv_prog_CC+set}" = set; then :
3558 $as_echo_n "(cached) " >&6
3559else
3560 if test -n "$CC"; then
3561 ac_cv_prog_CC="$CC" # Let the user override the test.
3562else
3563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564for as_dir in $PATH
3565do
3566 IFS=$as_save_IFS
3567 test -z "$as_dir" && as_dir=.
3568 for ac_exec_ext in '' $ac_executable_extensions; do
3569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3570 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3572 break 2
3573 fi
3574done
3575 done
3576IFS=$as_save_IFS
3577
3578fi
3579fi
3580CC=$ac_cv_prog_CC
3581if test -n "$CC"; then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3583$as_echo "$CC" >&6; }
3584else
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3586$as_echo "no" >&6; }
3587fi
3588
3589
3590 test -n "$CC" && break
3591 done
3592fi
3593if test -z "$CC"; then
3594 ac_ct_CC=$CC
3595 for ac_prog in cl.exe
3596do
3597 # Extract the first word of "$ac_prog", so it can be a program name with args.
3598set dummy $ac_prog; ac_word=$2
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3600$as_echo_n "checking for $ac_word... " >&6; }
3601if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3602 $as_echo_n "(cached) " >&6
3603else
3604 if test -n "$ac_ct_CC"; then
3605 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3606else
3607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3608for as_dir in $PATH
3609do
3610 IFS=$as_save_IFS
3611 test -z "$as_dir" && as_dir=.
3612 for ac_exec_ext in '' $ac_executable_extensions; do
3613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3614 ac_cv_prog_ac_ct_CC="$ac_prog"
3615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3616 break 2
3617 fi
3618done
3619 done
3620IFS=$as_save_IFS
3621
3622fi
3623fi
3624ac_ct_CC=$ac_cv_prog_ac_ct_CC
3625if test -n "$ac_ct_CC"; then
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3627$as_echo "$ac_ct_CC" >&6; }
3628else
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3630$as_echo "no" >&6; }
3631fi
3632
3633
3634 test -n "$ac_ct_CC" && break
3635done
3636
3637 if test "x$ac_ct_CC" = x; then
3638 CC=""
3639 else
3640 case $cross_compiling:$ac_tool_warned in
3641yes:)
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3644ac_tool_warned=yes ;;
3645esac
3646 CC=$ac_ct_CC
3647 fi
3648fi
3649
3650fi
3651
3652
3653test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3655as_fn_error $? "no acceptable C compiler found in \$PATH
3656See \`config.log' for more details" "$LINENO" 5 ; }
3657
3658# Provide some information about the compiler.
3659$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3660set X $ac_compile
3661ac_compiler=$2
3662for ac_option in --version -v -V -qversion; do
3663 { { ac_try="$ac_compiler $ac_option >&5"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3671 ac_status=$?
3672 if test -s conftest.err; then
3673 sed '10a\
3674... rest of stderr output deleted ...
3675 10q' conftest.err >conftest.er1
3676 cat conftest.er1 >&5
3677 fi
3678 rm -f conftest.er1 conftest.err
3679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680 test $ac_status = 0; }
3681done
3682
3683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3684/* end confdefs.h. */
3685
3686int
3687main ()
3688{
3689
3690 ;
3691 return 0;
3692}
3693_ACEOF
3694ac_clean_files_save=$ac_clean_files
3695ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3696# Try to create an executable without -o first, disregard a.out.
3697# It will help us diagnose broken compilers, and finding out an intuition
3698# of exeext.
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3700$as_echo_n "checking whether the C compiler works... " >&6; }
3701ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3702
3703# The possible output files:
3704ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3705
3706ac_rmfiles=
3707for ac_file in $ac_files
3708do
3709 case $ac_file in
3710 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3711 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3712 esac
3713done
3714rm -f $ac_rmfiles
3715
3716if { { ac_try="$ac_link_default"
3717case "(($ac_try" in
3718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3719 *) ac_try_echo=$ac_try;;
3720esac
3721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3722$as_echo "$ac_try_echo"; } >&5
3723 (eval "$ac_link_default") 2>&5
3724 ac_status=$?
3725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3726 test $ac_status = 0; }; then :
3727 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3728# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3729# in a Makefile. We should not override ac_cv_exeext if it was cached,
3730# so that the user can short-circuit this test for compilers unknown to
3731# Autoconf.
3732for ac_file in $ac_files ''
3733do
3734 test -f "$ac_file" || continue
3735 case $ac_file in
3736 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3737 ;;
3738 [ab].out )
3739 # We found the default executable, but exeext='' is most
3740 # certainly right.
3741 break;;
3742 *.* )
3743 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3744 then :; else
3745 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3746 fi
3747 # We set ac_cv_exeext here because the later test for it is not
3748 # safe: cross compilers may not add the suffix if given an `-o'
3749 # argument, so we may need to know it at that point already.
3750 # Even if this section looks crufty: it has the advantage of
3751 # actually working.
3752 break;;
3753 * )
3754 break;;
3755 esac
3756done
3757test "$ac_cv_exeext" = no && ac_cv_exeext=
3758
3759else
3760 ac_file=''
3761fi
3762if test -z "$ac_file"; then :
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
3765$as_echo "$as_me: failed program was:" >&5
3766sed 's/^/| /' conftest.$ac_ext >&5
3767
3768{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3770as_fn_error 77 "C compiler cannot create executables
3771See \`config.log' for more details" "$LINENO" 5 ; }
3772else
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3774$as_echo "yes" >&6; }
3775fi
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3777$as_echo_n "checking for C compiler default output file name... " >&6; }
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3779$as_echo "$ac_file" >&6; }
3780ac_exeext=$ac_cv_exeext
3781
3782rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3783ac_clean_files=$ac_clean_files_save
3784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3785$as_echo_n "checking for suffix of executables... " >&6; }
3786if { { ac_try="$ac_link"
3787case "(($ac_try" in
3788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789 *) ac_try_echo=$ac_try;;
3790esac
3791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3792$as_echo "$ac_try_echo"; } >&5
3793 (eval "$ac_link") 2>&5
3794 ac_status=$?
3795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3796 test $ac_status = 0; }; then :
3797 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3798# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3799# work properly (i.e., refer to `conftest.exe'), while it won't with
3800# `rm'.
3801for ac_file in conftest.exe conftest conftest.*; do
3802 test -f "$ac_file" || continue
3803 case $ac_file in
3804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3805 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3806 break;;
3807 * ) break;;
3808 esac
3809done
3810else
3811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3813as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3814See \`config.log' for more details" "$LINENO" 5 ; }
3815fi
3816rm -f conftest conftest$ac_cv_exeext
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3818$as_echo "$ac_cv_exeext" >&6; }
3819
3820rm -f conftest.$ac_ext
3821EXEEXT=$ac_cv_exeext
3822ac_exeext=$EXEEXT
3823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h. */
3825#include <stdio.h>
3826int
3827main ()
3828{
3829FILE *f = fopen ("conftest.out", "w");
3830 return ferror (f) || fclose (f) != 0;
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
3836ac_clean_files="$ac_clean_files conftest.out"
3837# Check that the compiler produces executables we can run. If not, either
3838# the compiler is broken, or we cross compile.
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3840$as_echo_n "checking whether we are cross compiling... " >&6; }
3841if test "$cross_compiling" != yes; then
3842 { { ac_try="$ac_link"
3843case "(($ac_try" in
3844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3845 *) ac_try_echo=$ac_try;;
3846esac
3847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3848$as_echo "$ac_try_echo"; } >&5
3849 (eval "$ac_link") 2>&5
3850 ac_status=$?
3851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3852 test $ac_status = 0; }
3853 if { ac_try='./conftest$ac_cv_exeext'
3854 { { case "(($ac_try" in
3855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3856 *) ac_try_echo=$ac_try;;
3857esac
3858eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3859$as_echo "$ac_try_echo"; } >&5
3860 (eval "$ac_try") 2>&5
3861 ac_status=$?
3862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3863 test $ac_status = 0; }; }; then
3864 cross_compiling=no
3865 else
3866 if test "$cross_compiling" = maybe; then
3867 cross_compiling=yes
3868 else
3869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3871as_fn_error $? "cannot run C compiled programs.
3872If you meant to cross compile, use \`--host'.
3873See \`config.log' for more details" "$LINENO" 5 ; }
3874 fi
3875 fi
3876fi
3877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3878$as_echo "$cross_compiling" >&6; }
3879
3880rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3881ac_clean_files=$ac_clean_files_save
3882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3883$as_echo_n "checking for suffix of object files... " >&6; }
3884if test "${ac_cv_objext+set}" = set; then :
3885 $as_echo_n "(cached) " >&6
3886else
3887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3888/* end confdefs.h. */
3889
3890int
3891main ()
3892{
3893
3894 ;
3895 return 0;
3896}
3897_ACEOF
3898rm -f conftest.o conftest.obj
3899if { { ac_try="$ac_compile"
3900case "(($ac_try" in
3901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3902 *) ac_try_echo=$ac_try;;
3903esac
3904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3905$as_echo "$ac_try_echo"; } >&5
3906 (eval "$ac_compile") 2>&5
3907 ac_status=$?
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }; then :
3910 for ac_file in conftest.o conftest.obj conftest.*; do
3911 test -f "$ac_file" || continue;
3912 case $ac_file in
3913 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3914 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3915 break;;
3916 esac
3917done
3918else
3919 $as_echo "$as_me: failed program was:" >&5
3920sed 's/^/| /' conftest.$ac_ext >&5
3921
3922{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924as_fn_error $? "cannot compute suffix of object files: cannot compile
3925See \`config.log' for more details" "$LINENO" 5 ; }
3926fi
3927rm -f conftest.$ac_cv_objext conftest.$ac_ext
3928fi
3929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3930$as_echo "$ac_cv_objext" >&6; }
3931OBJEXT=$ac_cv_objext
3932ac_objext=$OBJEXT
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3934$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3935if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3936 $as_echo_n "(cached) " >&6
3937else
3938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3939/* end confdefs.h. */
3940
3941int
3942main ()
3943{
3944#ifndef __GNUC__
3945 choke me
3946#endif
3947
3948 ;
3949 return 0;
3950}
3951_ACEOF
3952if ac_fn_c_try_compile "$LINENO"; then :
3953 ac_compiler_gnu=yes
3954else
3955 ac_compiler_gnu=no
3956fi
3957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3958ac_cv_c_compiler_gnu=$ac_compiler_gnu
3959
3960fi
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3962$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3963if test $ac_compiler_gnu = yes; then
3964 GCC=yes
3965else
3966 GCC=
3967fi
3968ac_test_CFLAGS=${CFLAGS+set}
3969ac_save_CFLAGS=$CFLAGS
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3971$as_echo_n "checking whether $CC accepts -g... " >&6; }
3972if test "${ac_cv_prog_cc_g+set}" = set; then :
3973 $as_echo_n "(cached) " >&6
3974else
3975 ac_save_c_werror_flag=$ac_c_werror_flag
3976 ac_c_werror_flag=yes
3977 ac_cv_prog_cc_g=no
3978 CFLAGS="-g"
3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981
3982int
3983main ()
3984{
3985
3986 ;
3987 return 0;
3988}
3989_ACEOF
3990if ac_fn_c_try_compile "$LINENO"; then :
3991 ac_cv_prog_cc_g=yes
3992else
3993 CFLAGS=""
3994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995/* end confdefs.h. */
3996
3997int
3998main ()
3999{
4000
4001 ;
4002 return 0;
4003}
4004_ACEOF
4005if ac_fn_c_try_compile "$LINENO"; then :
4006
4007else
4008 ac_c_werror_flag=$ac_save_c_werror_flag
4009 CFLAGS="-g"
4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4011/* end confdefs.h. */
4012
4013int
4014main ()
4015{
4016
4017 ;
4018 return 0;
4019}
4020_ACEOF
4021if ac_fn_c_try_compile "$LINENO"; then :
4022 ac_cv_prog_cc_g=yes
4023fi
4024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4025fi
4026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4027fi
4028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4029 ac_c_werror_flag=$ac_save_c_werror_flag
4030fi
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4032$as_echo "$ac_cv_prog_cc_g" >&6; }
4033if test "$ac_test_CFLAGS" = set; then
4034 CFLAGS=$ac_save_CFLAGS
4035elif test $ac_cv_prog_cc_g = yes; then
4036 if test "$GCC" = yes; then
4037 CFLAGS="-g -O2"
4038 else
4039 CFLAGS="-g"
4040 fi
4041else
4042 if test "$GCC" = yes; then
4043 CFLAGS="-O2"
4044 else
4045 CFLAGS=
4046 fi
4047fi
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4049$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4050if test "${ac_cv_prog_cc_c89+set}" = set; then :
4051 $as_echo_n "(cached) " >&6
4052else
4053 ac_cv_prog_cc_c89=no
4054ac_save_CC=$CC
4055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4056/* end confdefs.h. */
4057#include <stdarg.h>
4058#include <stdio.h>
4059#include <sys/types.h>
4060#include <sys/stat.h>
4061/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4062struct buf { int x; };
4063FILE * (*rcsopen) (struct buf *, struct stat *, int);
4064static char *e (p, i)
4065 char **p;
4066 int i;
4067{
4068 return p[i];
4069}
4070static char *f (char * (*g) (char **, int), char **p, ...)
4071{
4072 char *s;
4073 va_list v;
4074 va_start (v,p);
4075 s = g (p, va_arg (v,int));
4076 va_end (v);
4077 return s;
4078}
4079
4080/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4081 function prototypes and stuff, but not '\xHH' hex character constants.
4082 These don't provoke an error unfortunately, instead are silently treated
4083 as 'x'. The following induces an error, until -std is added to get
4084 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4085 array size at least. It's necessary to write '\x00'==0 to get something
4086 that's true only with -std. */
4087int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4088
4089/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4090 inside strings and character constants. */
4091#define FOO(x) 'x'
4092int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4093
4094int test (int i, double x);
4095struct s1 {int (*f) (int a);};
4096struct s2 {int (*f) (double a);};
4097int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4098int argc;
4099char **argv;
4100int
4101main ()
4102{
4103return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4104 ;
4105 return 0;
4106}
4107_ACEOF
4108for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4109 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4110do
4111 CC="$ac_save_CC $ac_arg"
4112 if ac_fn_c_try_compile "$LINENO"; then :
4113 ac_cv_prog_cc_c89=$ac_arg
4114fi
4115rm -f core conftest.err conftest.$ac_objext
4116 test "x$ac_cv_prog_cc_c89" != "xno" && break
4117done
4118rm -f conftest.$ac_ext
4119CC=$ac_save_CC
4120
4121fi
4122# AC_CACHE_VAL
4123case "x$ac_cv_prog_cc_c89" in
4124 x)
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4126$as_echo "none needed" >&6; } ;;
4127 xno)
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4129$as_echo "unsupported" >&6; } ;;
4130 *)
4131 CC="$CC $ac_cv_prog_cc_c89"
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4133$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4134esac
4135if test "x$ac_cv_prog_cc_c89" != xno; then :
4136
4137fi
4138
4139ac_ext=c
4140ac_cpp='$CPP $CPPFLAGS'
4141ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4142ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4143ac_compiler_gnu=$ac_cv_c_compiler_gnu
4144
4145depcc="$CC" am_compiler_list=
4146
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4148$as_echo_n "checking dependency style of $depcc... " >&6; }
4149if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4150 $as_echo_n "(cached) " >&6
4151else
4152 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4153 # We make a subdir and do the tests there. Otherwise we can end up
4154 # making bogus files that we don't know about and never remove. For
4155 # instance it was reported that on HP-UX the gcc test will end up
4156 # making a dummy file named `D' -- because `-MD' means `put the output
4157 # in D'.
4158 mkdir conftest.dir
4159 # Copy depcomp to subdir because otherwise we won't find it if we're
4160 # using a relative directory.
4161 cp "$am_depcomp" conftest.dir
4162 cd conftest.dir
4163 # We will build objects and dependencies in a subdirectory because
4164 # it helps to detect inapplicable dependency modes. For instance
4165 # both Tru64's cc and ICC support -MD to output dependencies as a
4166 # side effect of compilation, but ICC will put the dependencies in
4167 # the current directory while Tru64 will put them in the object
4168 # directory.
4169 mkdir sub
4170
4171 am_cv_CC_dependencies_compiler_type=none
4172 if test "$am_compiler_list" = ""; then
4173 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4174 fi
4175 am__universal=false
4176 case " $depcc " in #(
4177 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4178 esac
4179
4180 for depmode in $am_compiler_list; do
4181 # Setup a source with many dependencies, because some compilers
4182 # like to wrap large dependency lists on column 80 (with \), and
4183 # we should not choose a depcomp mode which is confused by this.
4184 #
4185 # We need to recreate these files for each test, as the compiler may
4186 # overwrite some of them when testing with obscure command lines.
4187 # This happens at least with the AIX C compiler.
4188 : > sub/conftest.c
4189 for i in 1 2 3 4 5 6; do
4190 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4191 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4192 # Solaris 8's {/usr,}/bin/sh.
4193 touch sub/conftst$i.h
4194 done
4195 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4196
4197 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4198 # mode. It turns out that the SunPro C++ compiler does not properly
4199 # handle `-M -o', and we need to detect this. Also, some Intel
4200 # versions had trouble with output in subdirs
4201 am__obj=sub/conftest.${OBJEXT-o}
4202 am__minus_obj="-o $am__obj"
4203 case $depmode in
4204 gcc)
4205 # This depmode causes a compiler race in universal mode.
4206 test "$am__universal" = false || continue
4207 ;;
4208 nosideeffect)
4209 # after this tag, mechanisms are not by side-effect, so they'll
4210 # only be used when explicitly requested
4211 if test "x$enable_dependency_tracking" = xyes; then
4212 continue
4213 else
4214 break
4215 fi
4216 ;;
4217 msvisualcpp | msvcmsys)
4218 # This compiler won't grok `-c -o', but also, the minuso test has
4219 # not run yet. These depmodes are late enough in the game, and
4220 # so weak that their functioning should not be impacted.
4221 am__obj=conftest.${OBJEXT-o}
4222 am__minus_obj=
4223 ;;
4224 none) break ;;
4225 esac
4226 if depmode=$depmode \
4227 source=sub/conftest.c object=$am__obj \
4228 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4229 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4230 >/dev/null 2>conftest.err &&
4231 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4232 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4233 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4234 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4235 # icc doesn't choke on unknown options, it will just issue warnings
4236 # or remarks (even with -Werror). So we grep stderr for any message
4237 # that says an option was ignored or not supported.
4238 # When given -MP, icc 7.0 and 7.1 complain thusly:
4239 # icc: Command line warning: ignoring option '-M'; no argument required
4240 # The diagnosis changed in icc 8.0:
4241 # icc: Command line remark: option '-MP' not supported
4242 if (grep 'ignoring option' conftest.err ||
4243 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4244 am_cv_CC_dependencies_compiler_type=$depmode
4245 break
4246 fi
4247 fi
4248 done
4249
4250 cd ..
4251 rm -rf conftest.dir
4252else
4253 am_cv_CC_dependencies_compiler_type=none
4254fi
4255
4256fi
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4258$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4259CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4260
4261 if
4262 test "x$enable_dependency_tracking" != xno \
4263 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4264 am__fastdepCC_TRUE=
4265 am__fastdepCC_FALSE='#'
4266else
4267 am__fastdepCC_TRUE='#'
4268 am__fastdepCC_FALSE=
4269fi
4270
4271
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4273$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4274if test "${ac_cv_path_SED+set}" = set; then :
4275 $as_echo_n "(cached) " >&6
4276else
4277 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4278 for ac_i in 1 2 3 4 5 6 7; do
4279 ac_script="$ac_script$as_nl$ac_script"
4280 done
4281 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4282 { ac_script=; unset ac_script;}
4283 if test -z "$SED"; then
4284 ac_path_SED_found=false
4285 # Loop through the user's path and test for each of PROGNAME-LIST
4286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4287for as_dir in $PATH
4288do
4289 IFS=$as_save_IFS
4290 test -z "$as_dir" && as_dir=.
4291 for ac_prog in sed gsed; do
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4294 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
4295# Check for GNU ac_path_SED and select it if it is found.
4296 # Check for GNU $ac_path_SED
4297case `"$ac_path_SED" --version 2>&1` in
4298*GNU*)
4299 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4300*)
4301 ac_count=0
4302 $as_echo_n 0123456789 >"conftest.in"
4303 while :
4304 do
4305 cat "conftest.in" "conftest.in" >"conftest.tmp"
4306 mv "conftest.tmp" "conftest.in"
4307 cp "conftest.in" "conftest.nl"
4308 $as_echo '' >> "conftest.nl"
4309 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4310 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4311 as_fn_arith $ac_count + 1 && ac_count=$as_val
4312 if test $ac_count -gt ${ac_path_SED_max-0}; then
4313 # Best one so far, save it but keep looking for a better one
4314 ac_cv_path_SED="$ac_path_SED"
4315 ac_path_SED_max=$ac_count
4316 fi
4317 # 10*(2^10) chars as input seems more than enough
4318 test $ac_count -gt 10 && break
4319 done
4320 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4321esac
4322
4323 $ac_path_SED_found && break 3
4324 done
4325 done
4326 done
4327IFS=$as_save_IFS
4328 if test -z "$ac_cv_path_SED"; then
4329 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4330 fi
4331else
4332 ac_cv_path_SED=$SED
4333fi
4334
4335fi
4336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4337$as_echo "$ac_cv_path_SED" >&6; }
4338 SED="$ac_cv_path_SED"
4339 rm -f conftest.sed
4340
4341test -z "$SED" && SED=sed
4342Xsed="$SED -e 1s/^X//"
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4355$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4356if test "${ac_cv_path_GREP+set}" = set; then :
4357 $as_echo_n "(cached) " >&6
4358else
4359 if test -z "$GREP"; then
4360 ac_path_GREP_found=false
4361 # Loop through the user's path and test for each of PROGNAME-LIST
4362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4364do
4365 IFS=$as_save_IFS
4366 test -z "$as_dir" && as_dir=.
4367 for ac_prog in grep ggrep; do
4368 for ac_exec_ext in '' $ac_executable_extensions; do
4369 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4370 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4371# Check for GNU ac_path_GREP and select it if it is found.
4372 # Check for GNU $ac_path_GREP
4373case `"$ac_path_GREP" --version 2>&1` in
4374*GNU*)
4375 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4376*)
4377 ac_count=0
4378 $as_echo_n 0123456789 >"conftest.in"
4379 while :
4380 do
4381 cat "conftest.in" "conftest.in" >"conftest.tmp"
4382 mv "conftest.tmp" "conftest.in"
4383 cp "conftest.in" "conftest.nl"
4384 $as_echo 'GREP' >> "conftest.nl"
4385 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4386 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4387 as_fn_arith $ac_count + 1 && ac_count=$as_val
4388 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4389 # Best one so far, save it but keep looking for a better one
4390 ac_cv_path_GREP="$ac_path_GREP"
4391 ac_path_GREP_max=$ac_count
4392 fi
4393 # 10*(2^10) chars as input seems more than enough
4394 test $ac_count -gt 10 && break
4395 done
4396 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4397esac
4398
4399 $ac_path_GREP_found && break 3
4400 done
4401 done
4402 done
4403IFS=$as_save_IFS
4404 if test -z "$ac_cv_path_GREP"; then
4405 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4406 fi
4407else
4408 ac_cv_path_GREP=$GREP
4409fi
4410
4411fi
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4413$as_echo "$ac_cv_path_GREP" >&6; }
4414 GREP="$ac_cv_path_GREP"
4415
4416
4417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4418$as_echo_n "checking for egrep... " >&6; }
4419if test "${ac_cv_path_EGREP+set}" = set; then :
4420 $as_echo_n "(cached) " >&6
4421else
4422 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4423 then ac_cv_path_EGREP="$GREP -E"
4424 else
4425 if test -z "$EGREP"; then
4426 ac_path_EGREP_found=false
4427 # Loop through the user's path and test for each of PROGNAME-LIST
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4430do
4431 IFS=$as_save_IFS
4432 test -z "$as_dir" && as_dir=.
4433 for ac_prog in egrep; do
4434 for ac_exec_ext in '' $ac_executable_extensions; do
4435 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4436 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4437# Check for GNU ac_path_EGREP and select it if it is found.
4438 # Check for GNU $ac_path_EGREP
4439case `"$ac_path_EGREP" --version 2>&1` in
4440*GNU*)
4441 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4442*)
4443 ac_count=0
4444 $as_echo_n 0123456789 >"conftest.in"
4445 while :
4446 do
4447 cat "conftest.in" "conftest.in" >"conftest.tmp"
4448 mv "conftest.tmp" "conftest.in"
4449 cp "conftest.in" "conftest.nl"
4450 $as_echo 'EGREP' >> "conftest.nl"
4451 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4452 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4453 as_fn_arith $ac_count + 1 && ac_count=$as_val
4454 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4455 # Best one so far, save it but keep looking for a better one
4456 ac_cv_path_EGREP="$ac_path_EGREP"
4457 ac_path_EGREP_max=$ac_count
4458 fi
4459 # 10*(2^10) chars as input seems more than enough
4460 test $ac_count -gt 10 && break
4461 done
4462 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4463esac
4464
4465 $ac_path_EGREP_found && break 3
4466 done
4467 done
4468 done
4469IFS=$as_save_IFS
4470 if test -z "$ac_cv_path_EGREP"; then
4471 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4472 fi
4473else
4474 ac_cv_path_EGREP=$EGREP
4475fi
4476
4477 fi
4478fi
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4480$as_echo "$ac_cv_path_EGREP" >&6; }
4481 EGREP="$ac_cv_path_EGREP"
4482
4483
4484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4485$as_echo_n "checking for fgrep... " >&6; }
4486if test "${ac_cv_path_FGREP+set}" = set; then :
4487 $as_echo_n "(cached) " >&6
4488else
4489 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4490 then ac_cv_path_FGREP="$GREP -F"
4491 else
4492 if test -z "$FGREP"; then
4493 ac_path_FGREP_found=false
4494 # Loop through the user's path and test for each of PROGNAME-LIST
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
4500 for ac_prog in fgrep; do
4501 for ac_exec_ext in '' $ac_executable_extensions; do
4502 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
4503 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
4504# Check for GNU ac_path_FGREP and select it if it is found.
4505 # Check for GNU $ac_path_FGREP
4506case `"$ac_path_FGREP" --version 2>&1` in
4507*GNU*)
4508 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4509*)
4510 ac_count=0
4511 $as_echo_n 0123456789 >"conftest.in"
4512 while :
4513 do
4514 cat "conftest.in" "conftest.in" >"conftest.tmp"
4515 mv "conftest.tmp" "conftest.in"
4516 cp "conftest.in" "conftest.nl"
4517 $as_echo 'FGREP' >> "conftest.nl"
4518 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4519 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4520 as_fn_arith $ac_count + 1 && ac_count=$as_val
4521 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4522 # Best one so far, save it but keep looking for a better one
4523 ac_cv_path_FGREP="$ac_path_FGREP"
4524 ac_path_FGREP_max=$ac_count
4525 fi
4526 # 10*(2^10) chars as input seems more than enough
4527 test $ac_count -gt 10 && break
4528 done
4529 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4530esac
4531
4532 $ac_path_FGREP_found && break 3
4533 done
4534 done
4535 done
4536IFS=$as_save_IFS
4537 if test -z "$ac_cv_path_FGREP"; then
4538 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4539 fi
4540else
4541 ac_cv_path_FGREP=$FGREP
4542fi
4543
4544 fi
4545fi
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4547$as_echo "$ac_cv_path_FGREP" >&6; }
4548 FGREP="$ac_cv_path_FGREP"
4549
4550
4551test -z "$GREP" && GREP=grep
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571# Check whether --with-gnu-ld was given.
4572if test "${with_gnu_ld+set}" = set; then :
4573 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4574else
4575 with_gnu_ld=no
4576fi
4577
4578ac_prog=ld
4579if test "$GCC" = yes; then
4580 # Check if gcc -print-prog-name=ld gives a path.
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
4582$as_echo_n "checking for ld used by $CC... " >&6; }
4583 case $host in
4584 *-*-mingw*)
4585 # gcc leaves a trailing carriage return which upsets mingw
4586 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4587 *)
4588 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4589 esac
4590 case $ac_prog in
4591 # Accept absolute paths.
4592 [\\/]* | ?:[\\/]*)
4593 re_direlt='/[^/][^/]*/\.\./'
4594 # Canonicalize the pathname of ld
4595 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4596 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4597 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4598 done
4599 test -z "$LD" && LD="$ac_prog"
4600 ;;
4601 "")
4602 # If it fails, then pretend we aren't using GCC.
4603 ac_prog=ld
4604 ;;
4605 *)
4606 # If it is relative, then search for the first ld in PATH.
4607 with_gnu_ld=unknown
4608 ;;
4609 esac
4610elif test "$with_gnu_ld" = yes; then
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4612$as_echo_n "checking for GNU ld... " >&6; }
4613else
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
4615$as_echo_n "checking for non-GNU ld... " >&6; }
4616fi
4617if test "${lt_cv_path_LD+set}" = set; then :
4618 $as_echo_n "(cached) " >&6
4619else
4620 if test -z "$LD"; then
4621 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4622 for ac_dir in $PATH; do
4623 IFS="$lt_save_ifs"
4624 test -z "$ac_dir" && ac_dir=.
4625 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4626 lt_cv_path_LD="$ac_dir/$ac_prog"
4627 # Check to see if the program is GNU ld. I'd rather use --version,
4628 # but apparently some variants of GNU ld only accept -v.
4629 # Break only if it was the GNU/non-GNU ld that we prefer.
4630 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4631 *GNU* | *'with BFD'*)
4632 test "$with_gnu_ld" != no && break
4633 ;;
4634 *)
4635 test "$with_gnu_ld" != yes && break
4636 ;;
4637 esac
4638 fi
4639 done
4640 IFS="$lt_save_ifs"
4641else
4642 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4643fi
4644fi
4645
4646LD="$lt_cv_path_LD"
4647if test -n "$LD"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4649$as_echo "$LD" >&6; }
4650else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
4656$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4657if test "${lt_cv_prog_gnu_ld+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
4659else
4660 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4661case `$LD -v 2>&1 </dev/null` in
4662*GNU* | *'with BFD'*)
4663 lt_cv_prog_gnu_ld=yes
4664 ;;
4665*)
4666 lt_cv_prog_gnu_ld=no
4667 ;;
4668esac
4669fi
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
4671$as_echo "$lt_cv_prog_gnu_ld" >&6; }
4672with_gnu_ld=$lt_cv_prog_gnu_ld
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
4683$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4684if test "${lt_cv_path_NM+set}" = set; then :
4685 $as_echo_n "(cached) " >&6
4686else
4687 if test -n "$NM"; then
4688 # Let the user override the test.
4689 lt_cv_path_NM="$NM"
4690else
4691 lt_nm_to_check="${ac_tool_prefix}nm"
4692 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4693 lt_nm_to_check="$lt_nm_to_check nm"
4694 fi
4695 for lt_tmp_nm in $lt_nm_to_check; do
4696 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4697 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4698 IFS="$lt_save_ifs"
4699 test -z "$ac_dir" && ac_dir=.
4700 tmp_nm="$ac_dir/$lt_tmp_nm"
4701 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4702 # Check to see if the nm accepts a BSD-compat flag.
4703 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4704 # nm: unknown option "B" ignored
4705 # Tru64's nm complains that /dev/null is an invalid object file
4706 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4707 */dev/null* | *'Invalid file or object type'*)
4708 lt_cv_path_NM="$tmp_nm -B"
4709 break
4710 ;;
4711 *)
4712 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4713 */dev/null*)
4714 lt_cv_path_NM="$tmp_nm -p"
4715 break
4716 ;;
4717 *)
4718 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4719 continue # so that we can try to find one that supports BSD flags
4720 ;;
4721 esac
4722 ;;
4723 esac
4724 fi
4725 done
4726 IFS="$lt_save_ifs"
4727 done
4728 : ${lt_cv_path_NM=no}
4729fi
4730fi
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
4732$as_echo "$lt_cv_path_NM" >&6; }
4733if test "$lt_cv_path_NM" != "no"; then
4734 NM="$lt_cv_path_NM"
4735else
4736 # Didn't find any BSD compatible name lister, look for dumpbin.
4737 if test -n "$ac_tool_prefix"; then
4738 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4739 do
4740 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4741set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
4745 $as_echo_n "(cached) " >&6
4746else
4747 if test -n "$DUMPBIN"; then
4748 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
4749else
4750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
4756 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4757 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765fi
4766fi
4767DUMPBIN=$ac_cv_prog_DUMPBIN
4768if test -n "$DUMPBIN"; then
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
4770$as_echo "$DUMPBIN" >&6; }
4771else
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777 test -n "$DUMPBIN" && break
4778 done
4779fi
4780if test -z "$DUMPBIN"; then
4781 ac_ct_DUMPBIN=$DUMPBIN
4782 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4783do
4784 # Extract the first word of "$ac_prog", so it can be a program name with args.
4785set dummy $ac_prog; ac_word=$2
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787$as_echo_n "checking for $ac_word... " >&6; }
4788if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
4789 $as_echo_n "(cached) " >&6
4790else
4791 if test -n "$ac_ct_DUMPBIN"; then
4792 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
4793else
4794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in $PATH
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
4799 for ac_exec_ext in '' $ac_executable_extensions; do
4800 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4801 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
4802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4803 break 2
4804 fi
4805done
4806 done
4807IFS=$as_save_IFS
4808
4809fi
4810fi
4811ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
4812if test -n "$ac_ct_DUMPBIN"; then
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
4814$as_echo "$ac_ct_DUMPBIN" >&6; }
4815else
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820
4821 test -n "$ac_ct_DUMPBIN" && break
4822done
4823
4824 if test "x$ac_ct_DUMPBIN" = x; then
4825 DUMPBIN=":"
4826 else
4827 case $cross_compiling:$ac_tool_warned in
4828yes:)
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4831ac_tool_warned=yes ;;
4832esac
4833 DUMPBIN=$ac_ct_DUMPBIN
4834 fi
4835fi
4836
4837
4838 if test "$DUMPBIN" != ":"; then
4839 NM="$DUMPBIN"
4840 fi
4841fi
4842test -z "$NM" && NM=nm
4843
4844
4845
4846
4847
4848
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
4850$as_echo_n "checking the name lister ($NM) interface... " >&6; }
4851if test "${lt_cv_nm_interface+set}" = set; then :
4852 $as_echo_n "(cached) " >&6
4853else
4854 lt_cv_nm_interface="BSD nm"
4855 echo "int some_variable = 0;" > conftest.$ac_ext
4856 (eval echo "\"\$as_me:4856: $ac_compile\"" >&5)
4857 (eval "$ac_compile" 2>conftest.err)
4858 cat conftest.err >&5
4859 (eval echo "\"\$as_me:4859: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4860 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4861 cat conftest.err >&5
4862 (eval echo "\"\$as_me:4862: output\"" >&5)
4863 cat conftest.out >&5
4864 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4865 lt_cv_nm_interface="MS dumpbin"
4866 fi
4867 rm -f conftest*
4868fi
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
4870$as_echo "$lt_cv_nm_interface" >&6; }
4871
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
4873$as_echo_n "checking whether ln -s works... " >&6; }
4874LN_S=$as_ln_s
4875if test "$LN_S" = "ln -s"; then
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4877$as_echo "yes" >&6; }
4878else
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
4880$as_echo "no, using $LN_S" >&6; }
4881fi
4882
4883# find the maximum length of command line arguments
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
4885$as_echo_n "checking the maximum length of command line arguments... " >&6; }
4886if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
4887 $as_echo_n "(cached) " >&6
4888else
4889 i=0
4890 teststring="ABCD"
4891
4892 case $build_os in
4893 msdosdjgpp*)
4894 # On DJGPP, this test can blow up pretty badly due to problems in libc
4895 # (any single argument exceeding 2000 bytes causes a buffer overrun
4896 # during glob expansion). Even if it were fixed, the result of this
4897 # check would be larger than it should be.
4898 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4899 ;;
4900
4901 gnu*)
4902 # Under GNU Hurd, this test is not required because there is
4903 # no limit to the length of command line arguments.
4904 # Libtool will interpret -1 as no limit whatsoever
4905 lt_cv_sys_max_cmd_len=-1;
4906 ;;
4907
4908 cygwin* | mingw* | cegcc*)
4909 # On Win9x/ME, this test blows up -- it succeeds, but takes
4910 # about 5 minutes as the teststring grows exponentially.
4911 # Worse, since 9x/ME are not pre-emptively multitasking,
4912 # you end up with a "frozen" computer, even though with patience
4913 # the test eventually succeeds (with a max line length of 256k).
4914 # Instead, let's just punt: use the minimum linelength reported by
4915 # all of the supported platforms: 8192 (on NT/2K/XP).
4916 lt_cv_sys_max_cmd_len=8192;
4917 ;;
4918
4919 amigaos*)
4920 # On AmigaOS with pdksh, this test takes hours, literally.
4921 # So we just punt and use a minimum line length of 8192.
4922 lt_cv_sys_max_cmd_len=8192;
4923 ;;
4924
4925 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4926 # This has been around since 386BSD, at least. Likely further.
4927 if test -x /sbin/sysctl; then
4928 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4929 elif test -x /usr/sbin/sysctl; then
4930 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4931 else
4932 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
4933 fi
4934 # And add a safety zone
4935 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4936 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4937 ;;
4938
4939 interix*)
4940 # We know the value 262144 and hardcode it with a safety zone (like BSD)
4941 lt_cv_sys_max_cmd_len=196608
4942 ;;
4943
4944 osf*)
4945 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4946 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4947 # nice to cause kernel panics so lets avoid the loop below.
4948 # First set a reasonable default.
4949 lt_cv_sys_max_cmd_len=16384
4950 #
4951 if test -x /sbin/sysconfig; then
4952 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4953 *1*) lt_cv_sys_max_cmd_len=-1 ;;
4954 esac
4955 fi
4956 ;;
4957 sco3.2v5*)
4958 lt_cv_sys_max_cmd_len=102400
4959 ;;
4960 sysv5* | sco5v6* | sysv4.2uw2*)
4961 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4962 if test -n "$kargmax"; then
4963 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
4964 else
4965 lt_cv_sys_max_cmd_len=32768
4966 fi
4967 ;;
4968 *)
4969 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4970 if test -n "$lt_cv_sys_max_cmd_len"; then
4971 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4972 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4973 else
4974 # Make teststring a little bigger before we do anything with it.
4975 # a 1K string should be a reasonable start.
4976 for i in 1 2 3 4 5 6 7 8 ; do
4977 teststring=$teststring$teststring
4978 done
4979 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4980 # If test is not a shell built-in, we'll probably end up computing a
4981 # maximum length that is only half of the actual maximum length, but
4982 # we can't tell.
4983 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
4984 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
4985 test $i != 17 # 1/2 MB should be enough
4986 do
4987 i=`expr $i + 1`
4988 teststring=$teststring$teststring
4989 done
4990 # Only check the string length outside the loop.
4991 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4992 teststring=
4993 # Add a significant safety factor because C++ compilers can tack on
4994 # massive amounts of additional arguments before passing them to the
4995 # linker. It appears as though 1/2 is a usable value.
4996 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4997 fi
4998 ;;
4999 esac
5000
5001fi
5002
5003if test -n $lt_cv_sys_max_cmd_len ; then
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
5005$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
5006else
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5008$as_echo "none" >&6; }
5009fi
5010max_cmd_len=$lt_cv_sys_max_cmd_len
5011
5012
5013
5014
5015
5016
5017: ${CP="cp -f"}
5018: ${MV="mv -f"}
5019: ${RM="rm -f"}
5020
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
5022$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
5023# Try some XSI features
5024xsi_shell=no
5025( _lt_dummy="a/b/c"
5026 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5027 = c,a/b,, \
5028 && eval 'test $(( 1 + 1 )) -eq 2 \
5029 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
5030 && xsi_shell=yes
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
5032$as_echo "$xsi_shell" >&6; }
5033
5034
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
5036$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
5037lt_shell_append=no
5038( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
5039 >/dev/null 2>&1 \
5040 && lt_shell_append=yes
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
5042$as_echo "$lt_shell_append" >&6; }
5043
5044
5045if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5046 lt_unset=unset
5047else
5048 lt_unset=false
5049fi
5050
5051
5052
5053
5054
5055# test EBCDIC or ASCII
5056case `echo X|tr X '\101'` in
5057 A) # ASCII based system
5058 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
5059 lt_SP2NL='tr \040 \012'
5060 lt_NL2SP='tr \015\012 \040\040'
5061 ;;
5062 *) # EBCDIC based system
5063 lt_SP2NL='tr \100 \n'
5064 lt_NL2SP='tr \r\n \100\100'
5065 ;;
5066esac
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
5077$as_echo_n "checking for $LD option to reload object files... " >&6; }
5078if test "${lt_cv_ld_reload_flag+set}" = set; then :
5079 $as_echo_n "(cached) " >&6
5080else
5081 lt_cv_ld_reload_flag='-r'
5082fi
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
5084$as_echo "$lt_cv_ld_reload_flag" >&6; }
5085reload_flag=$lt_cv_ld_reload_flag
5086case $reload_flag in
5087"" | " "*) ;;
5088*) reload_flag=" $reload_flag" ;;
5089esac
5090reload_cmds='$LD$reload_flag -o $output$reload_objs'
5091case $host_os in
5092 darwin*)
5093 if test "$GCC" = yes; then
5094 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5095 else
5096 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5097 fi
5098 ;;
5099esac
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109if test -n "$ac_tool_prefix"; then
5110 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5111set dummy ${ac_tool_prefix}objdump; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
5115 $as_echo_n "(cached) " >&6
5116else
5117 if test -n "$OBJDUMP"; then
5118 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5119else
5120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121for as_dir in $PATH
5122do
5123 IFS=$as_save_IFS
5124 test -z "$as_dir" && as_dir=.
5125 for ac_exec_ext in '' $ac_executable_extensions; do
5126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5127 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129 break 2
5130 fi
5131done
5132 done
5133IFS=$as_save_IFS
5134
5135fi
5136fi
5137OBJDUMP=$ac_cv_prog_OBJDUMP
5138if test -n "$OBJDUMP"; then
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
5140$as_echo "$OBJDUMP" >&6; }
5141else
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5143$as_echo "no" >&6; }
5144fi
5145
5146
5147fi
5148if test -z "$ac_cv_prog_OBJDUMP"; then
5149 ac_ct_OBJDUMP=$OBJDUMP
5150 # Extract the first word of "objdump", so it can be a program name with args.
5151set dummy objdump; ac_word=$2
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5153$as_echo_n "checking for $ac_word... " >&6; }
5154if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
5155 $as_echo_n "(cached) " >&6
5156else
5157 if test -n "$ac_ct_OBJDUMP"; then
5158 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5159else
5160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5161for as_dir in $PATH
5162do
5163 IFS=$as_save_IFS
5164 test -z "$as_dir" && as_dir=.
5165 for ac_exec_ext in '' $ac_executable_extensions; do
5166 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5167 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5169 break 2
5170 fi
5171done
5172 done
5173IFS=$as_save_IFS
5174
5175fi
5176fi
5177ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5178if test -n "$ac_ct_OBJDUMP"; then
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
5180$as_echo "$ac_ct_OBJDUMP" >&6; }
5181else
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183$as_echo "no" >&6; }
5184fi
5185
5186 if test "x$ac_ct_OBJDUMP" = x; then
5187 OBJDUMP="false"
5188 else
5189 case $cross_compiling:$ac_tool_warned in
5190yes:)
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5193ac_tool_warned=yes ;;
5194esac
5195 OBJDUMP=$ac_ct_OBJDUMP
5196 fi
5197else
5198 OBJDUMP="$ac_cv_prog_OBJDUMP"
5199fi
5200
5201test -z "$OBJDUMP" && OBJDUMP=objdump
5202
5203
5204
5205
5206
5207
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
5209$as_echo_n "checking how to recognize dependent libraries... " >&6; }
5210if test "${lt_cv_deplibs_check_method+set}" = set; then :
5211 $as_echo_n "(cached) " >&6
5212else
5213 lt_cv_file_magic_cmd='$MAGIC_CMD'
5214lt_cv_file_magic_test_file=
5215lt_cv_deplibs_check_method='unknown'
5216# Need to set the preceding variable on all platforms that support
5217# interlibrary dependencies.
5218# 'none' -- dependencies not supported.
5219# `unknown' -- same as none, but documents that we really don't know.
5220# 'pass_all' -- all dependencies passed with no checks.
5221# 'test_compile' -- check by making test program.
5222# 'file_magic [[regex]]' -- check by looking for files in library path
5223# which responds to the $file_magic_cmd with a given extended regex.
5224# If you have `file' or equivalent on your system and you're not sure
5225# whether `pass_all' will *always* work, you probably want this one.
5226
5227case $host_os in
5228aix[4-9]*)
5229 lt_cv_deplibs_check_method=pass_all
5230 ;;
5231
5232beos*)
5233 lt_cv_deplibs_check_method=pass_all
5234 ;;
5235
5236bsdi[45]*)
5237 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5238 lt_cv_file_magic_cmd='/usr/bin/file -L'
5239 lt_cv_file_magic_test_file=/shlib/libc.so
5240 ;;
5241
5242cygwin*)
5243 # func_win32_libid is a shell function defined in ltmain.sh
5244 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5245 lt_cv_file_magic_cmd='func_win32_libid'
5246 ;;
5247
5248mingw* | pw32*)
5249 # Base MSYS/MinGW do not provide the 'file' command needed by
5250 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5251 # unless we find 'file', for example because we are cross-compiling.
5252 if ( file / ) >/dev/null 2>&1; then
5253 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5254 lt_cv_file_magic_cmd='func_win32_libid'
5255 else
5256 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5257 lt_cv_file_magic_cmd='$OBJDUMP -f'
5258 fi
5259 ;;
5260
5261cegcc)
5262 # use the weaker test based on 'objdump'. See mingw*.
5263 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5264 lt_cv_file_magic_cmd='$OBJDUMP -f'
5265 ;;
5266
5267darwin* | rhapsody*)
5268 lt_cv_deplibs_check_method=pass_all
5269 ;;
5270
5271freebsd* | dragonfly*)
5272 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5273 case $host_cpu in
5274 i*86 )
5275 # Not sure whether the presence of OpenBSD here was a mistake.
5276 # Let's accept both of them until this is cleared up.
5277 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5278 lt_cv_file_magic_cmd=/usr/bin/file
5279 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5280 ;;
5281 esac
5282 else
5283 lt_cv_deplibs_check_method=pass_all
5284 fi
5285 ;;
5286
5287gnu*)
5288 lt_cv_deplibs_check_method=pass_all
5289 ;;
5290
5291hpux10.20* | hpux11*)
5292 lt_cv_file_magic_cmd=/usr/bin/file
5293 case $host_cpu in
5294 ia64*)
5295 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5296 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5297 ;;
5298 hppa*64*)
5299 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
5300 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5301 ;;
5302 *)
5303 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5304 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5305 ;;
5306 esac
5307 ;;
5308
5309interix[3-9]*)
5310 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5311 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
5312 ;;
5313
5314irix5* | irix6* | nonstopux*)
5315 case $LD in
5316 *-32|*"-32 ") libmagic=32-bit;;
5317 *-n32|*"-n32 ") libmagic=N32;;
5318 *-64|*"-64 ") libmagic=64-bit;;
5319 *) libmagic=never-match;;
5320 esac
5321 lt_cv_deplibs_check_method=pass_all
5322 ;;
5323
5324# This must be Linux ELF.
5325linux* | k*bsd*-gnu | kopensolaris*-gnu)
5326 lt_cv_deplibs_check_method=pass_all
5327 ;;
5328
5329netbsd* | netbsdelf*-gnu)
5330 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5331 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5332 else
5333 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5334 fi
5335 ;;
5336
5337newos6*)
5338 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5339 lt_cv_file_magic_cmd=/usr/bin/file
5340 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5341 ;;
5342
5343*nto* | *qnx*)
5344 lt_cv_deplibs_check_method=pass_all
5345 ;;
5346
5347openbsd*)
5348 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5349 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5350 else
5351 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5352 fi
5353 ;;
5354
5355osf3* | osf4* | osf5*)
5356 lt_cv_deplibs_check_method=pass_all
5357 ;;
5358
5359rdos*)
5360 lt_cv_deplibs_check_method=pass_all
5361 ;;
5362
5363solaris*)
5364 lt_cv_deplibs_check_method=pass_all
5365 ;;
5366
5367sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5368 lt_cv_deplibs_check_method=pass_all
5369 ;;
5370
5371sysv4 | sysv4.3*)
5372 case $host_vendor in
5373 motorola)
5374 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
5375 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5376 ;;
5377 ncr)
5378 lt_cv_deplibs_check_method=pass_all
5379 ;;
5380 sequent)
5381 lt_cv_file_magic_cmd='/bin/file'
5382 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5383 ;;
5384 sni)
5385 lt_cv_file_magic_cmd='/bin/file'
5386 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5387 lt_cv_file_magic_test_file=/lib/libc.so
5388 ;;
5389 siemens)
5390 lt_cv_deplibs_check_method=pass_all
5391 ;;
5392 pc)
5393 lt_cv_deplibs_check_method=pass_all
5394 ;;
5395 esac
5396 ;;
5397
5398tpf*)
5399 lt_cv_deplibs_check_method=pass_all
5400 ;;
5401esac
5402
5403fi
5404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
5405$as_echo "$lt_cv_deplibs_check_method" >&6; }
5406file_magic_cmd=$lt_cv_file_magic_cmd
5407deplibs_check_method=$lt_cv_deplibs_check_method
5408test -z "$deplibs_check_method" && deplibs_check_method=unknown
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421if test -n "$ac_tool_prefix"; then
5422 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5423set dummy ${ac_tool_prefix}ar; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if test "${ac_cv_prog_AR+set}" = set; then :
5427 $as_echo_n "(cached) " >&6
5428else
5429 if test -n "$AR"; then
5430 ac_cv_prog_AR="$AR" # Let the user override the test.
5431else
5432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435 IFS=$as_save_IFS
5436 test -z "$as_dir" && as_dir=.
5437 for ac_exec_ext in '' $ac_executable_extensions; do
5438 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439 ac_cv_prog_AR="${ac_tool_prefix}ar"
5440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441 break 2
5442 fi
5443done
5444 done
5445IFS=$as_save_IFS
5446
5447fi
5448fi
5449AR=$ac_cv_prog_AR
5450if test -n "$AR"; then
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5452$as_echo "$AR" >&6; }
5453else
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455$as_echo "no" >&6; }
5456fi
5457
5458
5459fi
5460if test -z "$ac_cv_prog_AR"; then
5461 ac_ct_AR=$AR
5462 # Extract the first word of "ar", so it can be a program name with args.
5463set dummy ar; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5467 $as_echo_n "(cached) " >&6
5468else
5469 if test -n "$ac_ct_AR"; then
5470 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5471else
5472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5473for as_dir in $PATH
5474do
5475 IFS=$as_save_IFS
5476 test -z "$as_dir" && as_dir=.
5477 for ac_exec_ext in '' $ac_executable_extensions; do
5478 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5479 ac_cv_prog_ac_ct_AR="ar"
5480 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5481 break 2
5482 fi
5483done
5484 done
5485IFS=$as_save_IFS
5486
5487fi
5488fi
5489ac_ct_AR=$ac_cv_prog_ac_ct_AR
5490if test -n "$ac_ct_AR"; then
5491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5492$as_echo "$ac_ct_AR" >&6; }
5493else
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5495$as_echo "no" >&6; }
5496fi
5497
5498 if test "x$ac_ct_AR" = x; then
5499 AR="false"
5500 else
5501 case $cross_compiling:$ac_tool_warned in
5502yes:)
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5504$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5505ac_tool_warned=yes ;;
5506esac
5507 AR=$ac_ct_AR
5508 fi
5509else
5510 AR="$ac_cv_prog_AR"
5511fi
5512
5513test -z "$AR" && AR=ar
5514test -z "$AR_FLAGS" && AR_FLAGS=cru
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526if test -n "$ac_tool_prefix"; then
5527 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5528set dummy ${ac_tool_prefix}strip; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if test "${ac_cv_prog_STRIP+set}" = set; then :
5532 $as_echo_n "(cached) " >&6
5533else
5534 if test -n "$STRIP"; then
5535 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5536else
5537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH
5539do
5540 IFS=$as_save_IFS
5541 test -z "$as_dir" && as_dir=.
5542 for ac_exec_ext in '' $ac_executable_extensions; do
5543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5544 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546 break 2
5547 fi
5548done
5549 done
5550IFS=$as_save_IFS
5551
5552fi
5553fi
5554STRIP=$ac_cv_prog_STRIP
5555if test -n "$STRIP"; then
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5557$as_echo "$STRIP" >&6; }
5558else
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5560$as_echo "no" >&6; }
5561fi
5562
5563
5564fi
5565if test -z "$ac_cv_prog_STRIP"; then
5566 ac_ct_STRIP=$STRIP
5567 # Extract the first word of "strip", so it can be a program name with args.
5568set dummy strip; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
5572 $as_echo_n "(cached) " >&6
5573else
5574 if test -n "$ac_ct_STRIP"; then
5575 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5576else
5577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580 IFS=$as_save_IFS
5581 test -z "$as_dir" && as_dir=.
5582 for ac_exec_ext in '' $ac_executable_extensions; do
5583 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5584 ac_cv_prog_ac_ct_STRIP="strip"
5585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586 break 2
5587 fi
5588done
5589 done
5590IFS=$as_save_IFS
5591
5592fi
5593fi
5594ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5595if test -n "$ac_ct_STRIP"; then
5596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5597$as_echo "$ac_ct_STRIP" >&6; }
5598else
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600$as_echo "no" >&6; }
5601fi
5602
5603 if test "x$ac_ct_STRIP" = x; then
5604 STRIP=":"
5605 else
5606 case $cross_compiling:$ac_tool_warned in
5607yes:)
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5610ac_tool_warned=yes ;;
5611esac
5612 STRIP=$ac_ct_STRIP
5613 fi
5614else
5615 STRIP="$ac_cv_prog_STRIP"
5616fi
5617
5618test -z "$STRIP" && STRIP=:
5619
5620
5621
5622
5623
5624
5625if test -n "$ac_tool_prefix"; then
5626 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5627set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
5630if test "${ac_cv_prog_RANLIB+set}" = set; then :
5631 $as_echo_n "(cached) " >&6
5632else
5633 if test -n "$RANLIB"; then
5634 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5635else
5636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5637for as_dir in $PATH
5638do
5639 IFS=$as_save_IFS
5640 test -z "$as_dir" && as_dir=.
5641 for ac_exec_ext in '' $ac_executable_extensions; do
5642 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5643 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5645 break 2
5646 fi
5647done
5648 done
5649IFS=$as_save_IFS
5650
5651fi
5652fi
5653RANLIB=$ac_cv_prog_RANLIB
5654if test -n "$RANLIB"; then
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5656$as_echo "$RANLIB" >&6; }
5657else
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663fi
5664if test -z "$ac_cv_prog_RANLIB"; then
5665 ac_ct_RANLIB=$RANLIB
5666 # Extract the first word of "ranlib", so it can be a program name with args.
5667set dummy ranlib; ac_word=$2
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5669$as_echo_n "checking for $ac_word... " >&6; }
5670if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5671 $as_echo_n "(cached) " >&6
5672else
5673 if test -n "$ac_ct_RANLIB"; then
5674 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5675else
5676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679 IFS=$as_save_IFS
5680 test -z "$as_dir" && as_dir=.
5681 for ac_exec_ext in '' $ac_executable_extensions; do
5682 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5683 ac_cv_prog_ac_ct_RANLIB="ranlib"
5684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685 break 2
5686 fi
5687done
5688 done
5689IFS=$as_save_IFS
5690
5691fi
5692fi
5693ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5694if test -n "$ac_ct_RANLIB"; then
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5696$as_echo "$ac_ct_RANLIB" >&6; }
5697else
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
5700fi
5701
5702 if test "x$ac_ct_RANLIB" = x; then
5703 RANLIB=":"
5704 else
5705 case $cross_compiling:$ac_tool_warned in
5706yes:)
5707{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5708$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5709ac_tool_warned=yes ;;
5710esac
5711 RANLIB=$ac_ct_RANLIB
5712 fi
5713else
5714 RANLIB="$ac_cv_prog_RANLIB"
5715fi
5716
5717test -z "$RANLIB" && RANLIB=:
5718
5719
5720
5721
5722
5723
5724# Determine commands to create old-style static archives.
5725old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5726old_postinstall_cmds='chmod 644 $oldlib'
5727old_postuninstall_cmds=
5728
5729if test -n "$RANLIB"; then
5730 case $host_os in
5731 openbsd*)
5732 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
5733 ;;
5734 *)
5735 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
5736 ;;
5737 esac
5738 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5739fi
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774# If no C compiler was specified, use CC.
5775LTCC=${LTCC-"$CC"}
5776
5777# If no C compiler flags were specified, use CFLAGS.
5778LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5779
5780# Allow CC to be a program name with arguments.
5781compiler=$CC
5782
5783
5784# Check for command to grab the raw symbol name followed by C symbol from nm.
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
5786$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5787if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
5788 $as_echo_n "(cached) " >&6
5789else
5790
5791# These are sane defaults that work on at least a few old systems.
5792# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5793
5794# Character class describing NM global symbol codes.
5795symcode='[BCDEGRST]'
5796
5797# Regexp to match symbols that can be accessed directly from C.
5798sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5799
5800# Define system-specific variables.
5801case $host_os in
5802aix*)
5803 symcode='[BCDT]'
5804 ;;
5805cygwin* | mingw* | pw32* | cegcc*)
5806 symcode='[ABCDGISTW]'
5807 ;;
5808hpux*)
5809 if test "$host_cpu" = ia64; then
5810 symcode='[ABCDEGRST]'
5811 fi
5812 ;;
5813irix* | nonstopux*)
5814 symcode='[BCDEGRST]'
5815 ;;
5816osf*)
5817 symcode='[BCDEGQRST]'
5818 ;;
5819solaris*)
5820 symcode='[BDRT]'
5821 ;;
5822sco3.2v5*)
5823 symcode='[DT]'
5824 ;;
5825sysv4.2uw2*)
5826 symcode='[DT]'
5827 ;;
5828sysv5* | sco5v6* | unixware* | OpenUNIX*)
5829 symcode='[ABDT]'
5830 ;;
5831sysv4)
5832 symcode='[DFNSTU]'
5833 ;;
5834esac
5835
5836# If we're using GNU nm, then use its standard symbol codes.
5837case `$NM -V 2>&1` in
5838*GNU* | *'with BFD'*)
5839 symcode='[ABCDGIRSTW]' ;;
5840esac
5841
5842# Transform an extracted symbol line into a proper C declaration.
5843# Some systems (esp. on ia64) link data and code symbols differently,
5844# so use this general approach.
5845lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5846
5847# Transform an extracted symbol line into symbol name and symbol address
5848lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5849lt_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'"
5850
5851# Handle CRLF in mingw tool chain
5852opt_cr=
5853case $build_os in
5854mingw*)
5855 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5856 ;;
5857esac
5858
5859# Try without a prefix underscore, then with it.
5860for ac_symprfx in "" "_"; do
5861
5862 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5863 symxfrm="\\1 $ac_symprfx\\2 \\2"
5864
5865 # Write the raw and C identifiers.
5866 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5867 # Fake it for dumpbin and say T for any non-static function
5868 # and D for any global variable.
5869 # Also find C++ and __fastcall symbols from MSVC++,
5870 # which start with @ or ?.
5871 lt_cv_sys_global_symbol_pipe="$AWK '"\
5872" {last_section=section; section=\$ 3};"\
5873" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5874" \$ 0!~/External *\|/{next};"\
5875" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5876" {if(hide[section]) next};"\
5877" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5878" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5879" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5880" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5881" ' prfx=^$ac_symprfx"
5882 else
5883 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5884 fi
5885
5886 # Check to see that the pipe works correctly.
5887 pipe_works=no
5888
5889 rm -f conftest*
5890 cat > conftest.$ac_ext <<_LT_EOF
5891#ifdef __cplusplus
5892extern "C" {
5893#endif
5894char nm_test_var;
5895void nm_test_func(void);
5896void nm_test_func(void){}
5897#ifdef __cplusplus
5898}
5899#endif
5900int main(){nm_test_var='a';nm_test_func();return(0);}
5901_LT_EOF
5902
5903 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5904 (eval $ac_compile) 2>&5
5905 ac_status=$?
5906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5907 test $ac_status = 0; }; then
5908 # Now try to grab the symbols.
5909 nlist=conftest.nm
5910 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
5911 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
5912 ac_status=$?
5913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5914 test $ac_status = 0; } && test -s "$nlist"; then
5915 # Try sorting and uniquifying the output.
5916 if sort "$nlist" | uniq > "$nlist"T; then
5917 mv -f "$nlist"T "$nlist"
5918 else
5919 rm -f "$nlist"T
5920 fi
5921
5922 # Make sure that we snagged all the symbols we need.
5923 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5924 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5925 cat <<_LT_EOF > conftest.$ac_ext
5926#ifdef __cplusplus
5927extern "C" {
5928#endif
5929
5930_LT_EOF
5931 # Now generate the symbol file.
5932 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5933
5934 cat <<_LT_EOF >> conftest.$ac_ext
5935
5936/* The mapping between symbol names and symbols. */
5937const struct {
5938 const char *name;
5939 void *address;
5940}
5941lt__PROGRAM__LTX_preloaded_symbols[] =
5942{
5943 { "@PROGRAM@", (void *) 0 },
5944_LT_EOF
5945 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5946 cat <<\_LT_EOF >> conftest.$ac_ext
5947 {0, (void *) 0}
5948};
5949
5950/* This works around a problem in FreeBSD linker */
5951#ifdef FREEBSD_WORKAROUND
5952static const void *lt_preloaded_setup() {
5953 return lt__PROGRAM__LTX_preloaded_symbols;
5954}
5955#endif
5956
5957#ifdef __cplusplus
5958}
5959#endif
5960_LT_EOF
5961 # Now try linking the two files.
5962 mv conftest.$ac_objext conftstm.$ac_objext
5963 lt_save_LIBS="$LIBS"
5964 lt_save_CFLAGS="$CFLAGS"
5965 LIBS="conftstm.$ac_objext"
5966 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
5967 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
5968 (eval $ac_link) 2>&5
5969 ac_status=$?
5970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5971 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
5972 pipe_works=yes
5973 fi
5974 LIBS="$lt_save_LIBS"
5975 CFLAGS="$lt_save_CFLAGS"
5976 else
5977 echo "cannot find nm_test_func in $nlist" >&5
5978 fi
5979 else
5980 echo "cannot find nm_test_var in $nlist" >&5
5981 fi
5982 else
5983 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
5984 fi
5985 else
5986 echo "$progname: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5988 fi
5989 rm -rf conftest* conftst*
5990
5991 # Do not use the global_symbol_pipe unless it works.
5992 if test "$pipe_works" = yes; then
5993 break
5994 else
5995 lt_cv_sys_global_symbol_pipe=
5996 fi
5997done
5998
5999fi
6000
6001if test -z "$lt_cv_sys_global_symbol_pipe"; then
6002 lt_cv_sys_global_symbol_to_cdecl=
6003fi
6004if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6006$as_echo "failed" >&6; }
6007else
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6009$as_echo "ok" >&6; }
6010fi
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034# Check whether --enable-libtool-lock was given.
6035if test "${enable_libtool_lock+set}" = set; then :
6036 enableval=$enable_libtool_lock;
6037fi
6038
6039test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6040
6041# Some flags need to be propagated to the compiler or linker for good
6042# libtool support.
6043case $host in
6044ia64-*-hpux*)
6045 # Find out which ABI we are using.
6046 echo 'int i;' > conftest.$ac_ext
6047 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6048 (eval $ac_compile) 2>&5
6049 ac_status=$?
6050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6051 test $ac_status = 0; }; then
6052 case `/usr/bin/file conftest.$ac_objext` in
6053 *ELF-32*)
6054 HPUX_IA64_MODE="32"
6055 ;;
6056 *ELF-64*)
6057 HPUX_IA64_MODE="64"
6058 ;;
6059 esac
6060 fi
6061 rm -rf conftest*
6062 ;;
6063*-*-irix6*)
6064 # Find out which ABI we are using.
6065 echo '#line 6065 "configure"' > conftest.$ac_ext
6066 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6067 (eval $ac_compile) 2>&5
6068 ac_status=$?
6069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6070 test $ac_status = 0; }; then
6071 if test "$lt_cv_prog_gnu_ld" = yes; then
6072 case `/usr/bin/file conftest.$ac_objext` in
6073 *32-bit*)
6074 LD="${LD-ld} -melf32bsmip"
6075 ;;
6076 *N32*)
6077 LD="${LD-ld} -melf32bmipn32"
6078 ;;
6079 *64-bit*)
6080 LD="${LD-ld} -melf64bmip"
6081 ;;
6082 esac
6083 else
6084 case `/usr/bin/file conftest.$ac_objext` in
6085 *32-bit*)
6086 LD="${LD-ld} -32"
6087 ;;
6088 *N32*)
6089 LD="${LD-ld} -n32"
6090 ;;
6091 *64-bit*)
6092 LD="${LD-ld} -64"
6093 ;;
6094 esac
6095 fi
6096 fi
6097 rm -rf conftest*
6098 ;;
6099
6100x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6101s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
6102 # Find out which ABI we are using.
6103 echo 'int i;' > conftest.$ac_ext
6104 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6105 (eval $ac_compile) 2>&5
6106 ac_status=$?
6107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6108 test $ac_status = 0; }; then
6109 case `/usr/bin/file conftest.o` in
6110 *32-bit*)
6111 case $host in
6112 x86_64-*kfreebsd*-gnu)
6113 LD="${LD-ld} -m elf_i386_fbsd"
6114 ;;
6115 x86_64-*linux*)
6116 LD="${LD-ld} -m elf_i386"
6117 ;;
6118 ppc64-*linux*|powerpc64-*linux*)
6119 LD="${LD-ld} -m elf32ppclinux"
6120 ;;
6121 s390x-*linux*)
6122 LD="${LD-ld} -m elf_s390"
6123 ;;
6124 sparc64-*linux*)
6125 LD="${LD-ld} -m elf32_sparc"
6126 ;;
6127 esac
6128 ;;
6129 *64-bit*)
6130 case $host in
6131 x86_64-*kfreebsd*-gnu)
6132 LD="${LD-ld} -m elf_x86_64_fbsd"
6133 ;;
6134 x86_64-*linux*)
6135 LD="${LD-ld} -m elf_x86_64"
6136 ;;
6137 ppc*-*linux*|powerpc*-*linux*)
6138 LD="${LD-ld} -m elf64ppc"
6139 ;;
6140 s390*-*linux*|s390*-*tpf*)
6141 LD="${LD-ld} -m elf64_s390"
6142 ;;
6143 sparc*-*linux*)
6144 LD="${LD-ld} -m elf64_sparc"
6145 ;;
6146 esac
6147 ;;
6148 esac
6149 fi
6150 rm -rf conftest*
6151 ;;
6152
6153*-*-sco3.2v5*)
6154 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6155 SAVE_CFLAGS="$CFLAGS"
6156 CFLAGS="$CFLAGS -belf"
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6158$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6159if test "${lt_cv_cc_needs_belf+set}" = set; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 ac_ext=c
6163ac_cpp='$CPP $CPPFLAGS'
6164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6166ac_compiler_gnu=$ac_cv_c_compiler_gnu
6167
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169/* end confdefs.h. */
6170
6171int
6172main ()
6173{
6174
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179if ac_fn_c_try_link "$LINENO"; then :
6180 lt_cv_cc_needs_belf=yes
6181else
6182 lt_cv_cc_needs_belf=no
6183fi
6184rm -f core conftest.err conftest.$ac_objext \
6185 conftest$ac_exeext conftest.$ac_ext
6186 ac_ext=c
6187ac_cpp='$CPP $CPPFLAGS'
6188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6190ac_compiler_gnu=$ac_cv_c_compiler_gnu
6191
6192fi
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
6194$as_echo "$lt_cv_cc_needs_belf" >&6; }
6195 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6196 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6197 CFLAGS="$SAVE_CFLAGS"
6198 fi
6199 ;;
6200sparc*-*solaris*)
6201 # Find out which ABI we are using.
6202 echo 'int i;' > conftest.$ac_ext
6203 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6204 (eval $ac_compile) 2>&5
6205 ac_status=$?
6206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6207 test $ac_status = 0; }; then
6208 case `/usr/bin/file conftest.o` in
6209 *64-bit*)
6210 case $lt_cv_prog_gnu_ld in
6211 yes*) LD="${LD-ld} -m elf64_sparc" ;;
6212 *)
6213 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6214 LD="${LD-ld} -64"
6215 fi
6216 ;;
6217 esac
6218 ;;
6219 esac
6220 fi
6221 rm -rf conftest*
6222 ;;
6223esac
6224
6225need_locks="$enable_libtool_lock"
6226
6227
6228 case $host_os in
6229 rhapsody* | darwin*)
6230 if test -n "$ac_tool_prefix"; then
6231 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
6232set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
6236 $as_echo_n "(cached) " >&6
6237else
6238 if test -n "$DSYMUTIL"; then
6239 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
6240else
6241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244 IFS=$as_save_IFS
6245 test -z "$as_dir" && as_dir=.
6246 for ac_exec_ext in '' $ac_executable_extensions; do
6247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6248 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
6249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250 break 2
6251 fi
6252done
6253 done
6254IFS=$as_save_IFS
6255
6256fi
6257fi
6258DSYMUTIL=$ac_cv_prog_DSYMUTIL
6259if test -n "$DSYMUTIL"; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
6261$as_echo "$DSYMUTIL" >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268fi
6269if test -z "$ac_cv_prog_DSYMUTIL"; then
6270 ac_ct_DSYMUTIL=$DSYMUTIL
6271 # Extract the first word of "dsymutil", so it can be a program name with args.
6272set dummy dsymutil; ac_word=$2
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274$as_echo_n "checking for $ac_word... " >&6; }
6275if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 if test -n "$ac_ct_DSYMUTIL"; then
6279 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
6280else
6281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284 IFS=$as_save_IFS
6285 test -z "$as_dir" && as_dir=.
6286 for ac_exec_ext in '' $ac_executable_extensions; do
6287 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6288 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
6289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290 break 2
6291 fi
6292done
6293 done
6294IFS=$as_save_IFS
6295
6296fi
6297fi
6298ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
6299if test -n "$ac_ct_DSYMUTIL"; then
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
6301$as_echo "$ac_ct_DSYMUTIL" >&6; }
6302else
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304$as_echo "no" >&6; }
6305fi
6306
6307 if test "x$ac_ct_DSYMUTIL" = x; then
6308 DSYMUTIL=":"
6309 else
6310 case $cross_compiling:$ac_tool_warned in
6311yes:)
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6313$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6314ac_tool_warned=yes ;;
6315esac
6316 DSYMUTIL=$ac_ct_DSYMUTIL
6317 fi
6318else
6319 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
6320fi
6321
6322 if test -n "$ac_tool_prefix"; then
6323 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
6324set dummy ${ac_tool_prefix}nmedit; ac_word=$2
6325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6326$as_echo_n "checking for $ac_word... " >&6; }
6327if test "${ac_cv_prog_NMEDIT+set}" = set; then :
6328 $as_echo_n "(cached) " >&6
6329else
6330 if test -n "$NMEDIT"; then
6331 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
6332else
6333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334for as_dir in $PATH
6335do
6336 IFS=$as_save_IFS
6337 test -z "$as_dir" && as_dir=.
6338 for ac_exec_ext in '' $ac_executable_extensions; do
6339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6340 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
6341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6342 break 2
6343 fi
6344done
6345 done
6346IFS=$as_save_IFS
6347
6348fi
6349fi
6350NMEDIT=$ac_cv_prog_NMEDIT
6351if test -n "$NMEDIT"; then
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
6353$as_echo "$NMEDIT" >&6; }
6354else
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356$as_echo "no" >&6; }
6357fi
6358
6359
6360fi
6361if test -z "$ac_cv_prog_NMEDIT"; then
6362 ac_ct_NMEDIT=$NMEDIT
6363 # Extract the first word of "nmedit", so it can be a program name with args.
6364set dummy nmedit; ac_word=$2
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366$as_echo_n "checking for $ac_word... " >&6; }
6367if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
6368 $as_echo_n "(cached) " >&6
6369else
6370 if test -n "$ac_ct_NMEDIT"; then
6371 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
6372else
6373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374for as_dir in $PATH
6375do
6376 IFS=$as_save_IFS
6377 test -z "$as_dir" && as_dir=.
6378 for ac_exec_ext in '' $ac_executable_extensions; do
6379 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6380 ac_cv_prog_ac_ct_NMEDIT="nmedit"
6381 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6382 break 2
6383 fi
6384done
6385 done
6386IFS=$as_save_IFS
6387
6388fi
6389fi
6390ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
6391if test -n "$ac_ct_NMEDIT"; then
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
6393$as_echo "$ac_ct_NMEDIT" >&6; }
6394else
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399 if test "x$ac_ct_NMEDIT" = x; then
6400 NMEDIT=":"
6401 else
6402 case $cross_compiling:$ac_tool_warned in
6403yes:)
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6405$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6406ac_tool_warned=yes ;;
6407esac
6408 NMEDIT=$ac_ct_NMEDIT
6409 fi
6410else
6411 NMEDIT="$ac_cv_prog_NMEDIT"
6412fi
6413
6414 if test -n "$ac_tool_prefix"; then
6415 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
6416set dummy ${ac_tool_prefix}lipo; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if test "${ac_cv_prog_LIPO+set}" = set; then :
6420 $as_echo_n "(cached) " >&6
6421else
6422 if test -n "$LIPO"; then
6423 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
6424else
6425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428 IFS=$as_save_IFS
6429 test -z "$as_dir" && as_dir=.
6430 for ac_exec_ext in '' $ac_executable_extensions; do
6431 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6432 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
6433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434 break 2
6435 fi
6436done
6437 done
6438IFS=$as_save_IFS
6439
6440fi
6441fi
6442LIPO=$ac_cv_prog_LIPO
6443if test -n "$LIPO"; then
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
6445$as_echo "$LIPO" >&6; }
6446else
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448$as_echo "no" >&6; }
6449fi
6450
6451
6452fi
6453if test -z "$ac_cv_prog_LIPO"; then
6454 ac_ct_LIPO=$LIPO
6455 # Extract the first word of "lipo", so it can be a program name with args.
6456set dummy lipo; ac_word=$2
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6458$as_echo_n "checking for $ac_word... " >&6; }
6459if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
6460 $as_echo_n "(cached) " >&6
6461else
6462 if test -n "$ac_ct_LIPO"; then
6463 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
6464else
6465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468 IFS=$as_save_IFS
6469 test -z "$as_dir" && as_dir=.
6470 for ac_exec_ext in '' $ac_executable_extensions; do
6471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6472 ac_cv_prog_ac_ct_LIPO="lipo"
6473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474 break 2
6475 fi
6476done
6477 done
6478IFS=$as_save_IFS
6479
6480fi
6481fi
6482ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
6483if test -n "$ac_ct_LIPO"; then
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
6485$as_echo "$ac_ct_LIPO" >&6; }
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491 if test "x$ac_ct_LIPO" = x; then
6492 LIPO=":"
6493 else
6494 case $cross_compiling:$ac_tool_warned in
6495yes:)
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6498ac_tool_warned=yes ;;
6499esac
6500 LIPO=$ac_ct_LIPO
6501 fi
6502else
6503 LIPO="$ac_cv_prog_LIPO"
6504fi
6505
6506 if test -n "$ac_tool_prefix"; then
6507 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
6508set dummy ${ac_tool_prefix}otool; ac_word=$2
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if test "${ac_cv_prog_OTOOL+set}" = set; then :
6512 $as_echo_n "(cached) " >&6
6513else
6514 if test -n "$OTOOL"; then
6515 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
6516else
6517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518for as_dir in $PATH
6519do
6520 IFS=$as_save_IFS
6521 test -z "$as_dir" && as_dir=.
6522 for ac_exec_ext in '' $ac_executable_extensions; do
6523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6524 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
6525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526 break 2
6527 fi
6528done
6529 done
6530IFS=$as_save_IFS
6531
6532fi
6533fi
6534OTOOL=$ac_cv_prog_OTOOL
6535if test -n "$OTOOL"; then
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
6537$as_echo "$OTOOL" >&6; }
6538else
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544fi
6545if test -z "$ac_cv_prog_OTOOL"; then
6546 ac_ct_OTOOL=$OTOOL
6547 # Extract the first word of "otool", so it can be a program name with args.
6548set dummy otool; ac_word=$2
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550$as_echo_n "checking for $ac_word... " >&6; }
6551if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
6552 $as_echo_n "(cached) " >&6
6553else
6554 if test -n "$ac_ct_OTOOL"; then
6555 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
6556else
6557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6558for as_dir in $PATH
6559do
6560 IFS=$as_save_IFS
6561 test -z "$as_dir" && as_dir=.
6562 for ac_exec_ext in '' $ac_executable_extensions; do
6563 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6564 ac_cv_prog_ac_ct_OTOOL="otool"
6565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6566 break 2
6567 fi
6568done
6569 done
6570IFS=$as_save_IFS
6571
6572fi
6573fi
6574ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
6575if test -n "$ac_ct_OTOOL"; then
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
6577$as_echo "$ac_ct_OTOOL" >&6; }
6578else
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
6581fi
6582
6583 if test "x$ac_ct_OTOOL" = x; then
6584 OTOOL=":"
6585 else
6586 case $cross_compiling:$ac_tool_warned in
6587yes:)
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6590ac_tool_warned=yes ;;
6591esac
6592 OTOOL=$ac_ct_OTOOL
6593 fi
6594else
6595 OTOOL="$ac_cv_prog_OTOOL"
6596fi
6597
6598 if test -n "$ac_tool_prefix"; then
6599 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
6600set dummy ${ac_tool_prefix}otool64; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if test "${ac_cv_prog_OTOOL64+set}" = set; then :
6604 $as_echo_n "(cached) " >&6
6605else
6606 if test -n "$OTOOL64"; then
6607 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
6608else
6609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6610for as_dir in $PATH
6611do
6612 IFS=$as_save_IFS
6613 test -z "$as_dir" && as_dir=.
6614 for ac_exec_ext in '' $ac_executable_extensions; do
6615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6616 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
6617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6618 break 2
6619 fi
6620done
6621 done
6622IFS=$as_save_IFS
6623
6624fi
6625fi
6626OTOOL64=$ac_cv_prog_OTOOL64
6627if test -n "$OTOOL64"; then
6628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
6629$as_echo "$OTOOL64" >&6; }
6630else
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632$as_echo "no" >&6; }
6633fi
6634
6635
6636fi
6637if test -z "$ac_cv_prog_OTOOL64"; then
6638 ac_ct_OTOOL64=$OTOOL64
6639 # Extract the first word of "otool64", so it can be a program name with args.
6640set dummy otool64; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
6644 $as_echo_n "(cached) " >&6
6645else
6646 if test -n "$ac_ct_OTOOL64"; then
6647 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
6648else
6649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6650for as_dir in $PATH
6651do
6652 IFS=$as_save_IFS
6653 test -z "$as_dir" && as_dir=.
6654 for ac_exec_ext in '' $ac_executable_extensions; do
6655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6656 ac_cv_prog_ac_ct_OTOOL64="otool64"
6657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6658 break 2
6659 fi
6660done
6661 done
6662IFS=$as_save_IFS
6663
6664fi
6665fi
6666ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
6667if test -n "$ac_ct_OTOOL64"; then
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
6669$as_echo "$ac_ct_OTOOL64" >&6; }
6670else
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6672$as_echo "no" >&6; }
6673fi
6674
6675 if test "x$ac_ct_OTOOL64" = x; then
6676 OTOOL64=":"
6677 else
6678 case $cross_compiling:$ac_tool_warned in
6679yes:)
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6682ac_tool_warned=yes ;;
6683esac
6684 OTOOL64=$ac_ct_OTOOL64
6685 fi
6686else
6687 OTOOL64="$ac_cv_prog_OTOOL64"
6688fi
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
6717$as_echo_n "checking for -single_module linker flag... " >&6; }
6718if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
6719 $as_echo_n "(cached) " >&6
6720else
6721 lt_cv_apple_cc_single_mod=no
6722 if test -z "${LT_MULTI_MODULE}"; then
6723 # By default we will add the -single_module flag. You can override
6724 # by either setting the environment variable LT_MULTI_MODULE
6725 # non-empty at configure time, or by adding -multi_module to the
6726 # link flags.
6727 rm -rf libconftest.dylib*
6728 echo "int foo(void){return 1;}" > conftest.c
6729 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6730-dynamiclib -Wl,-single_module conftest.c" >&5
6731 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6732 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6733 _lt_result=$?
6734 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
6735 lt_cv_apple_cc_single_mod=yes
6736 else
6737 cat conftest.err >&5
6738 fi
6739 rm -rf libconftest.dylib*
6740 rm -f conftest.*
6741 fi
6742fi
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
6744$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
6746$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6747if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
6748 $as_echo_n "(cached) " >&6
6749else
6750 lt_cv_ld_exported_symbols_list=no
6751 save_LDFLAGS=$LDFLAGS
6752 echo "_main" > conftest.sym
6753 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
6754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6755/* end confdefs.h. */
6756
6757int
6758main ()
6759{
6760
6761 ;
6762 return 0;
6763}
6764_ACEOF
6765if ac_fn_c_try_link "$LINENO"; then :
6766 lt_cv_ld_exported_symbols_list=yes
6767else
6768 lt_cv_ld_exported_symbols_list=no
6769fi
6770rm -f core conftest.err conftest.$ac_objext \
6771 conftest$ac_exeext conftest.$ac_ext
6772 LDFLAGS="$save_LDFLAGS"
6773
6774fi
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
6776$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6777 case $host_os in
6778 rhapsody* | darwin1.[012])
6779 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
6780 darwin1.*)
6781 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6782 darwin*) # darwin 5.x on
6783 # if running on 10.5 or later, the deployment target defaults
6784 # to the OS version, if on x86, and 10.4, the deployment
6785 # target defaults to 10.4. Don't you love it?
6786 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
6787 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
6788 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6789 10.[012]*)
6790 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6791 10.*)
6792 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6793 esac
6794 ;;
6795 esac
6796 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
6797 _lt_dar_single_mod='$single_module'
6798 fi
6799 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
6800 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
6801 else
6802 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
6803 fi
6804 if test "$DSYMUTIL" != ":"; then
6805 _lt_dsymutil='~$DSYMUTIL $lib || :'
6806 else
6807 _lt_dsymutil=
6808 fi
6809 ;;
6810 esac
6811
6812ac_ext=c
6813ac_cpp='$CPP $CPPFLAGS'
6814ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6815ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6816ac_compiler_gnu=$ac_cv_c_compiler_gnu
6817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6818$as_echo_n "checking how to run the C preprocessor... " >&6; }
6819# On Suns, sometimes $CPP names a directory.
6820if test -n "$CPP" && test -d "$CPP"; then
6821 CPP=
6822fi
6823if test -z "$CPP"; then
6824 if test "${ac_cv_prog_CPP+set}" = set; then :
6825 $as_echo_n "(cached) " >&6
6826else
6827 # Double quotes because CPP needs to be expanded
6828 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6829 do
6830 ac_preproc_ok=false
6831for ac_c_preproc_warn_flag in '' yes
6832do
6833 # Use a header file that comes with gcc, so configuring glibc
6834 # with a fresh cross-compiler works.
6835 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6836 # <limits.h> exists even on freestanding compilers.
6837 # On the NeXT, cc -E runs the code through the compiler's parser,
6838 # not just through cpp. "Syntax error" is here to catch this case.
6839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6840/* end confdefs.h. */
6841#ifdef __STDC__
6842# include <limits.h>
6843#else
6844# include <assert.h>
6845#endif
6846 Syntax error
6847_ACEOF
6848if ac_fn_c_try_cpp "$LINENO"; then :
6849
6850else
6851 # Broken: fails on valid input.
6852continue
6853fi
6854rm -f conftest.err conftest.i conftest.$ac_ext
6855
6856 # OK, works on sane cases. Now check whether nonexistent headers
6857 # can be detected and how.
6858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6859/* end confdefs.h. */
6860#include <ac_nonexistent.h>
6861_ACEOF
6862if ac_fn_c_try_cpp "$LINENO"; then :
6863 # Broken: success on invalid input.
6864continue
6865else
6866 # Passes both tests.
6867ac_preproc_ok=:
6868break
6869fi
6870rm -f conftest.err conftest.i conftest.$ac_ext
6871
6872done
6873# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6874rm -f conftest.i conftest.err conftest.$ac_ext
6875if $ac_preproc_ok; then :
6876 break
6877fi
6878
6879 done
6880 ac_cv_prog_CPP=$CPP
6881
6882fi
6883 CPP=$ac_cv_prog_CPP
6884else
6885 ac_cv_prog_CPP=$CPP
6886fi
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6888$as_echo "$CPP" >&6; }
6889ac_preproc_ok=false
6890for ac_c_preproc_warn_flag in '' yes
6891do
6892 # Use a header file that comes with gcc, so configuring glibc
6893 # with a fresh cross-compiler works.
6894 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6895 # <limits.h> exists even on freestanding compilers.
6896 # On the NeXT, cc -E runs the code through the compiler's parser,
6897 # not just through cpp. "Syntax error" is here to catch this case.
6898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899/* end confdefs.h. */
6900#ifdef __STDC__
6901# include <limits.h>
6902#else
6903# include <assert.h>
6904#endif
6905 Syntax error
6906_ACEOF
6907if ac_fn_c_try_cpp "$LINENO"; then :
6908
6909else
6910 # Broken: fails on valid input.
6911continue
6912fi
6913rm -f conftest.err conftest.i conftest.$ac_ext
6914
6915 # OK, works on sane cases. Now check whether nonexistent headers
6916 # can be detected and how.
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918/* end confdefs.h. */
6919#include <ac_nonexistent.h>
6920_ACEOF
6921if ac_fn_c_try_cpp "$LINENO"; then :
6922 # Broken: success on invalid input.
6923continue
6924else
6925 # Passes both tests.
6926ac_preproc_ok=:
6927break
6928fi
6929rm -f conftest.err conftest.i conftest.$ac_ext
6930
6931done
6932# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6933rm -f conftest.i conftest.err conftest.$ac_ext
6934if $ac_preproc_ok; then :
6935
6936else
6937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6939as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6940See \`config.log' for more details" "$LINENO" 5 ; }
6941fi
6942
6943ac_ext=c
6944ac_cpp='$CPP $CPPFLAGS'
6945ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6946ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6947ac_compiler_gnu=$ac_cv_c_compiler_gnu
6948
6949
6950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6951$as_echo_n "checking for ANSI C header files... " >&6; }
6952if test "${ac_cv_header_stdc+set}" = set; then :
6953 $as_echo_n "(cached) " >&6
6954else
6955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6956/* end confdefs.h. */
6957#include <stdlib.h>
6958#include <stdarg.h>
6959#include <string.h>
6960#include <float.h>
6961
6962int
6963main ()
6964{
6965
6966 ;
6967 return 0;
6968}
6969_ACEOF
6970if ac_fn_c_try_compile "$LINENO"; then :
6971 ac_cv_header_stdc=yes
6972else
6973 ac_cv_header_stdc=no
6974fi
6975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6976
6977if test $ac_cv_header_stdc = yes; then
6978 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6980/* end confdefs.h. */
6981#include <string.h>
6982
6983_ACEOF
6984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6985 $EGREP "memchr" >/dev/null 2>&1; then :
6986
6987else
6988 ac_cv_header_stdc=no
6989fi
6990rm -f conftest*
6991
6992fi
6993
6994if test $ac_cv_header_stdc = yes; then
6995 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6997/* end confdefs.h. */
6998#include <stdlib.h>
6999
7000_ACEOF
7001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7002 $EGREP "free" >/dev/null 2>&1; then :
7003
7004else
7005 ac_cv_header_stdc=no
7006fi
7007rm -f conftest*
7008
7009fi
7010
7011if test $ac_cv_header_stdc = yes; then
7012 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7013 if test "$cross_compiling" = yes; then :
7014 :
7015else
7016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017/* end confdefs.h. */
7018#include <ctype.h>
7019#include <stdlib.h>
7020#if ((' ' & 0x0FF) == 0x020)
7021# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7022# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7023#else
7024# define ISLOWER(c) \
7025 (('a' <= (c) && (c) <= 'i') \
7026 || ('j' <= (c) && (c) <= 'r') \
7027 || ('s' <= (c) && (c) <= 'z'))
7028# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7029#endif
7030
7031#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7032int
7033main ()
7034{
7035 int i;
7036 for (i = 0; i < 256; i++)
7037 if (XOR (islower (i), ISLOWER (i))
7038 || toupper (i) != TOUPPER (i))
7039 return 2;
7040 return 0;
7041}
7042_ACEOF
7043if ac_fn_c_try_run "$LINENO"; then :
7044
7045else
7046 ac_cv_header_stdc=no
7047fi
7048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7049 conftest.$ac_objext conftest.beam conftest.$ac_ext
7050fi
7051
7052fi
7053fi
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7055$as_echo "$ac_cv_header_stdc" >&6; }
7056if test $ac_cv_header_stdc = yes; then
7057
7058$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7059
7060fi
7061
7062# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7063for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7064 inttypes.h stdint.h unistd.h
7065do :
7066 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7067ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7068"
7069if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7070 cat >>confdefs.h <<_ACEOF
7071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7072_ACEOF
7073
7074fi
7075
7076done
7077
7078
7079for ac_header in dlfcn.h
7080do :
7081 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
7082"
7083if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7084 cat >>confdefs.h <<_ACEOF
7085#define HAVE_DLFCN_H 1
7086_ACEOF
7087
7088fi
7089
7090done
7091
7092
7093
7094# Set options
7095
7096
7097
7098 enable_dlopen=no
7099
7100
7101
7102 # Check whether --enable-shared was given.
7103if test "${enable_shared+set}" = set; then :
7104 enableval=$enable_shared; p=${PACKAGE-default}
7105 case $enableval in
7106 yes) enable_shared=yes ;;
7107 no) enable_shared=no ;;
7108 *)
7109 enable_shared=no
7110 # Look at the argument we got. We use all the common list separators.
7111 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7112 for pkg in $enableval; do
7113 IFS="$lt_save_ifs"
7114 if test "X$pkg" = "X$p"; then
7115 enable_shared=yes
7116 fi
7117 done
7118 IFS="$lt_save_ifs"
7119 ;;
7120 esac
7121else
7122 enable_shared=yes
7123fi
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133 # Check whether --enable-static was given.
7134if test "${enable_static+set}" = set; then :
7135 enableval=$enable_static; p=${PACKAGE-default}
7136 case $enableval in
7137 yes) enable_static=yes ;;
7138 no) enable_static=no ;;
7139 *)
7140 enable_static=no
7141 # Look at the argument we got. We use all the common list separators.
7142 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7143 for pkg in $enableval; do
7144 IFS="$lt_save_ifs"
7145 if test "X$pkg" = "X$p"; then
7146 enable_static=yes
7147 fi
7148 done
7149 IFS="$lt_save_ifs"
7150 ;;
7151 esac
7152else
7153 enable_static=yes
7154fi
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165# Check whether --with-pic was given.
7166if test "${with_pic+set}" = set; then :
7167 withval=$with_pic; pic_mode="$withval"
7168else
7169 pic_mode=default
7170fi
7171
7172
7173test -z "$pic_mode" && pic_mode=default
7174
7175
7176
7177
7178
7179
7180
7181 # Check whether --enable-fast-install was given.
7182if test "${enable_fast_install+set}" = set; then :
7183 enableval=$enable_fast_install; p=${PACKAGE-default}
7184 case $enableval in
7185 yes) enable_fast_install=yes ;;
7186 no) enable_fast_install=no ;;
7187 *)
7188 enable_fast_install=no
7189 # Look at the argument we got. We use all the common list separators.
7190 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7191 for pkg in $enableval; do
7192 IFS="$lt_save_ifs"
7193 if test "X$pkg" = "X$p"; then
7194 enable_fast_install=yes
7195 fi
7196 done
7197 IFS="$lt_save_ifs"
7198 ;;
7199 esac
7200else
7201 enable_fast_install=yes
7202fi
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214# This can be used to rebuild libtool when needed
7215LIBTOOL_DEPS="$ltmain"
7216
7217# Always use our own libtool.
7218LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244test -z "$LN_S" && LN_S="ln -s"
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259if test -n "${ZSH_VERSION+set}" ; then
7260 setopt NO_GLOB_SUBST
7261fi
7262
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7264$as_echo_n "checking for objdir... " >&6; }
7265if test "${lt_cv_objdir+set}" = set; then :
7266 $as_echo_n "(cached) " >&6
7267else
7268 rm -f .libs 2>/dev/null
7269mkdir .libs 2>/dev/null
7270if test -d .libs; then
7271 lt_cv_objdir=.libs
7272else
7273 # MS-DOS does not allow filenames that begin with a dot.
7274 lt_cv_objdir=_libs
7275fi
7276rmdir .libs 2>/dev/null
7277fi
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7279$as_echo "$lt_cv_objdir" >&6; }
7280objdir=$lt_cv_objdir
7281
7282
7283
7284
7285
7286cat >>confdefs.h <<_ACEOF
7287#define LT_OBJDIR "$lt_cv_objdir/"
7288_ACEOF
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306case $host_os in
7307aix3*)
7308 # AIX sometimes has problems with the GCC collect2 program. For some
7309 # reason, if we set the COLLECT_NAMES environment variable, the problems
7310 # vanish in a puff of smoke.
7311 if test "X${COLLECT_NAMES+set}" != Xset; then
7312 COLLECT_NAMES=
7313 export COLLECT_NAMES
7314 fi
7315 ;;
7316esac
7317
7318# Sed substitution that helps us do robust quoting. It backslashifies
7319# metacharacters that are still active within double-quoted strings.
7320sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7321
7322# Same as above, but do not quote variable references.
7323double_quote_subst='s/\(["`\\]\)/\\\1/g'
7324
7325# Sed substitution to delay expansion of an escaped shell variable in a
7326# double_quote_subst'ed string.
7327delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7328
7329# Sed substitution to delay expansion of an escaped single quote.
7330delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7331
7332# Sed substitution to avoid accidental globbing in evaled expressions
7333no_glob_subst='s/\*/\\\*/g'
7334
7335# Global variables:
7336ofile=libtool
7337can_build_shared=yes
7338
7339# All known linkers require a `.a' archive for static linking (except MSVC,
7340# which needs '.lib').
7341libext=a
7342
7343with_gnu_ld="$lt_cv_prog_gnu_ld"
7344
7345old_CC="$CC"
7346old_CFLAGS="$CFLAGS"
7347
7348# Set sane defaults for various variables
7349test -z "$CC" && CC=cc
7350test -z "$LTCC" && LTCC=$CC
7351test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
7352test -z "$LD" && LD=ld
7353test -z "$ac_objext" && ac_objext=o
7354
7355for cc_temp in $compiler""; do
7356 case $cc_temp in
7357 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7358 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7359 \-*) ;;
7360 *) break;;
7361 esac
7362done
7363cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7364
7365
7366# Only perform the check for file, if the check method requires it
7367test -z "$MAGIC_CMD" && MAGIC_CMD=file
7368case $deplibs_check_method in
7369file_magic*)
7370 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
7372$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
7373if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7374 $as_echo_n "(cached) " >&6
7375else
7376 case $MAGIC_CMD in
7377[\\/*] | ?:[\\/]*)
7378 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7379 ;;
7380*)
7381 lt_save_MAGIC_CMD="$MAGIC_CMD"
7382 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7383 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7384 for ac_dir in $ac_dummy; do
7385 IFS="$lt_save_ifs"
7386 test -z "$ac_dir" && ac_dir=.
7387 if test -f $ac_dir/${ac_tool_prefix}file; then
7388 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7389 if test -n "$file_magic_test_file"; then
7390 case $deplibs_check_method in
7391 "file_magic "*)
7392 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7393 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7394 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7395 $EGREP "$file_magic_regex" > /dev/null; then
7396 :
7397 else
7398 cat <<_LT_EOF 1>&2
7399
7400*** Warning: the command libtool uses to detect shared libraries,
7401*** $file_magic_cmd, produces output that libtool cannot recognize.
7402*** The result is that libtool may fail to recognize shared libraries
7403*** as such. This will affect the creation of libtool libraries that
7404*** depend on shared libraries, but programs linked with such libtool
7405*** libraries will work regardless of this problem. Nevertheless, you
7406*** may want to report the problem to your system manager and/or to
7407*** bug-libtool@gnu.org
7408
7409_LT_EOF
7410 fi ;;
7411 esac
7412 fi
7413 break
7414 fi
7415 done
7416 IFS="$lt_save_ifs"
7417 MAGIC_CMD="$lt_save_MAGIC_CMD"
7418 ;;
7419esac
7420fi
7421
7422MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7423if test -n "$MAGIC_CMD"; then
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7425$as_echo "$MAGIC_CMD" >&6; }
7426else
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
7429fi
7430
7431
7432
7433
7434
7435if test -z "$lt_cv_path_MAGIC_CMD"; then
7436 if test -n "$ac_tool_prefix"; then
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
7438$as_echo_n "checking for file... " >&6; }
7439if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7440 $as_echo_n "(cached) " >&6
7441else
7442 case $MAGIC_CMD in
7443[\\/*] | ?:[\\/]*)
7444 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7445 ;;
7446*)
7447 lt_save_MAGIC_CMD="$MAGIC_CMD"
7448 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7449 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7450 for ac_dir in $ac_dummy; do
7451 IFS="$lt_save_ifs"
7452 test -z "$ac_dir" && ac_dir=.
7453 if test -f $ac_dir/file; then
7454 lt_cv_path_MAGIC_CMD="$ac_dir/file"
7455 if test -n "$file_magic_test_file"; then
7456 case $deplibs_check_method in
7457 "file_magic "*)
7458 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7459 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7460 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7461 $EGREP "$file_magic_regex" > /dev/null; then
7462 :
7463 else
7464 cat <<_LT_EOF 1>&2
7465
7466*** Warning: the command libtool uses to detect shared libraries,
7467*** $file_magic_cmd, produces output that libtool cannot recognize.
7468*** The result is that libtool may fail to recognize shared libraries
7469*** as such. This will affect the creation of libtool libraries that
7470*** depend on shared libraries, but programs linked with such libtool
7471*** libraries will work regardless of this problem. Nevertheless, you
7472*** may want to report the problem to your system manager and/or to
7473*** bug-libtool@gnu.org
7474
7475_LT_EOF
7476 fi ;;
7477 esac
7478 fi
7479 break
7480 fi
7481 done
7482 IFS="$lt_save_ifs"
7483 MAGIC_CMD="$lt_save_MAGIC_CMD"
7484 ;;
7485esac
7486fi
7487
7488MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7489if test -n "$MAGIC_CMD"; then
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7491$as_echo "$MAGIC_CMD" >&6; }
7492else
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7494$as_echo "no" >&6; }
7495fi
7496
7497
7498 else
7499 MAGIC_CMD=:
7500 fi
7501fi
7502
7503 fi
7504 ;;
7505esac
7506
7507# Use C for the default configuration in the libtool script
7508
7509lt_save_CC="$CC"
7510ac_ext=c
7511ac_cpp='$CPP $CPPFLAGS'
7512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7514ac_compiler_gnu=$ac_cv_c_compiler_gnu
7515
7516
7517# Source file extension for C test sources.
7518ac_ext=c
7519
7520# Object file extension for compiled C test sources.
7521objext=o
7522objext=$objext
7523
7524# Code to be used in simple compile tests
7525lt_simple_compile_test_code="int some_variable = 0;"
7526
7527# Code to be used in simple link tests
7528lt_simple_link_test_code='int main(){return(0);}'
7529
7530
7531
7532
7533
7534
7535
7536# If no C compiler was specified, use CC.
7537LTCC=${LTCC-"$CC"}
7538
7539# If no C compiler flags were specified, use CFLAGS.
7540LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7541
7542# Allow CC to be a program name with arguments.
7543compiler=$CC
7544
7545# Save the default compiler, since it gets overwritten when the other
7546# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7547compiler_DEFAULT=$CC
7548
7549# save warnings/boilerplate of simple test code
7550ac_outfile=conftest.$ac_objext
7551echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7552eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7553_lt_compiler_boilerplate=`cat conftest.err`
7554$RM conftest*
7555
7556ac_outfile=conftest.$ac_objext
7557echo "$lt_simple_link_test_code" >conftest.$ac_ext
7558eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7559_lt_linker_boilerplate=`cat conftest.err`
7560$RM -r conftest*
7561
7562
7563## CAVEAT EMPTOR:
7564## There is no encapsulation within the following macros, do not change
7565## the running order or otherwise move them around unless you know exactly
7566## what you are doing...
7567if test -n "$compiler"; then
7568
7569lt_prog_compiler_no_builtin_flag=
7570
7571if test "$GCC" = yes; then
7572 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7573
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7575$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7576if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
7577 $as_echo_n "(cached) " >&6
7578else
7579 lt_cv_prog_compiler_rtti_exceptions=no
7580 ac_outfile=conftest.$ac_objext
7581 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7582 lt_compiler_flag="-fno-rtti -fno-exceptions"
7583 # Insert the option either (1) after the last *FLAGS variable, or
7584 # (2) before a word containing "conftest.", or (3) at the end.
7585 # Note that $ac_compile itself does not contain backslashes and begins
7586 # with a dollar sign (not a hyphen), so the echo should work correctly.
7587 # The option is referenced via a variable to avoid confusing sed.
7588 lt_compile=`echo "$ac_compile" | $SED \
7589 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7590 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7591 -e 's:$: $lt_compiler_flag:'`
7592 (eval echo "\"\$as_me:7592: $lt_compile\"" >&5)
7593 (eval "$lt_compile" 2>conftest.err)
7594 ac_status=$?
7595 cat conftest.err >&5
7596 echo "$as_me:7596: \$? = $ac_status" >&5
7597 if (exit $ac_status) && test -s "$ac_outfile"; then
7598 # The compiler can only warn and ignore the option if not recognized
7599 # So say no if there are warnings other than the usual output.
7600 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7601 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7602 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7603 lt_cv_prog_compiler_rtti_exceptions=yes
7604 fi
7605 fi
7606 $RM conftest*
7607
7608fi
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7610$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7611
7612if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7613 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7614else
7615 :
7616fi
7617
7618fi
7619
7620
7621
7622
7623
7624
7625 lt_prog_compiler_wl=
7626lt_prog_compiler_pic=
7627lt_prog_compiler_static=
7628
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7630$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7631
7632 if test "$GCC" = yes; then
7633 lt_prog_compiler_wl='-Wl,'
7634 lt_prog_compiler_static='-static'
7635
7636 case $host_os in
7637 aix*)
7638 # All AIX code is PIC.
7639 if test "$host_cpu" = ia64; then
7640 # AIX 5 now supports IA64 processor
7641 lt_prog_compiler_static='-Bstatic'
7642 fi
7643 ;;
7644
7645 amigaos*)
7646 case $host_cpu in
7647 powerpc)
7648 # see comment about AmigaOS4 .so support
7649 lt_prog_compiler_pic='-fPIC'
7650 ;;
7651 m68k)
7652 # FIXME: we need at least 68020 code to build shared libraries, but
7653 # adding the `-m68020' flag to GCC prevents building anything better,
7654 # like `-m68040'.
7655 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7656 ;;
7657 esac
7658 ;;
7659
7660 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7661 # PIC is the default for these OSes.
7662 ;;
7663
7664 mingw* | cygwin* | pw32* | os2* | cegcc*)
7665 # This hack is so that the source file can tell whether it is being
7666 # built for inclusion in a dll (and should export symbols for example).
7667 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7668 # (--disable-auto-import) libraries
7669 lt_prog_compiler_pic='-DDLL_EXPORT'
7670 ;;
7671
7672 darwin* | rhapsody*)
7673 # PIC is the default on this platform
7674 # Common symbols not allowed in MH_DYLIB files
7675 lt_prog_compiler_pic='-fno-common'
7676 ;;
7677
7678 hpux*)
7679 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7680 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
7681 # sets the default TLS model and affects inlining.
7682 case $host_cpu in
7683 hppa*64*)
7684 # +Z the default
7685 ;;
7686 *)
7687 lt_prog_compiler_pic='-fPIC'
7688 ;;
7689 esac
7690 ;;
7691
7692 interix[3-9]*)
7693 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7694 # Instead, we relocate shared libraries at runtime.
7695 ;;
7696
7697 msdosdjgpp*)
7698 # Just because we use GCC doesn't mean we suddenly get shared libraries
7699 # on systems that don't support them.
7700 lt_prog_compiler_can_build_shared=no
7701 enable_shared=no
7702 ;;
7703
7704 *nto* | *qnx*)
7705 # QNX uses GNU C++, but need to define -shared option too, otherwise
7706 # it will coredump.
7707 lt_prog_compiler_pic='-fPIC -shared'
7708 ;;
7709
7710 sysv4*MP*)
7711 if test -d /usr/nec; then
7712 lt_prog_compiler_pic=-Kconform_pic
7713 fi
7714 ;;
7715
7716 *)
7717 lt_prog_compiler_pic='-fPIC'
7718 ;;
7719 esac
7720 else
7721 # PORTME Check for flag to pass linker flags through the system compiler.
7722 case $host_os in
7723 aix*)
7724 lt_prog_compiler_wl='-Wl,'
7725 if test "$host_cpu" = ia64; then
7726 # AIX 5 now supports IA64 processor
7727 lt_prog_compiler_static='-Bstatic'
7728 else
7729 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7730 fi
7731 ;;
7732
7733 mingw* | cygwin* | pw32* | os2* | cegcc*)
7734 # This hack is so that the source file can tell whether it is being
7735 # built for inclusion in a dll (and should export symbols for example).
7736 lt_prog_compiler_pic='-DDLL_EXPORT'
7737 ;;
7738
7739 hpux9* | hpux10* | hpux11*)
7740 lt_prog_compiler_wl='-Wl,'
7741 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7742 # not for PA HP-UX.
7743 case $host_cpu in
7744 hppa*64*|ia64*)
7745 # +Z the default
7746 ;;
7747 *)
7748 lt_prog_compiler_pic='+Z'
7749 ;;
7750 esac
7751 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7752 lt_prog_compiler_static='${wl}-a ${wl}archive'
7753 ;;
7754
7755 irix5* | irix6* | nonstopux*)
7756 lt_prog_compiler_wl='-Wl,'
7757 # PIC (with -KPIC) is the default.
7758 lt_prog_compiler_static='-non_shared'
7759 ;;
7760
7761 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7762 case $cc_basename in
7763 # old Intel for x86_64 which still supported -KPIC.
7764 ecc*)
7765 lt_prog_compiler_wl='-Wl,'
7766 lt_prog_compiler_pic='-KPIC'
7767 lt_prog_compiler_static='-static'
7768 ;;
7769 # icc used to be incompatible with GCC.
7770 # ICC 10 doesn't accept -KPIC any more.
7771 icc* | ifort*)
7772 lt_prog_compiler_wl='-Wl,'
7773 lt_prog_compiler_pic='-fPIC'
7774 lt_prog_compiler_static='-static'
7775 ;;
7776 # Lahey Fortran 8.1.
7777 lf95*)
7778 lt_prog_compiler_wl='-Wl,'
7779 lt_prog_compiler_pic='--shared'
7780 lt_prog_compiler_static='--static'
7781 ;;
7782 pgcc* | pgf77* | pgf90* | pgf95*)
7783 # Portland Group compilers (*not* the Pentium gcc compiler,
7784 # which looks to be a dead project)
7785 lt_prog_compiler_wl='-Wl,'
7786 lt_prog_compiler_pic='-fpic'
7787 lt_prog_compiler_static='-Bstatic'
7788 ;;
7789 ccc*)
7790 lt_prog_compiler_wl='-Wl,'
7791 # All Alpha code is PIC.
7792 lt_prog_compiler_static='-non_shared'
7793 ;;
7794 xl*)
7795 # IBM XL C 8.0/Fortran 10.1 on PPC
7796 lt_prog_compiler_wl='-Wl,'
7797 lt_prog_compiler_pic='-qpic'
7798 lt_prog_compiler_static='-qstaticlink'
7799 ;;
7800 *)
7801 case `$CC -V 2>&1 | sed 5q` in
7802 *Sun\ C*)
7803 # Sun C 5.9
7804 lt_prog_compiler_pic='-KPIC'
7805 lt_prog_compiler_static='-Bstatic'
7806 lt_prog_compiler_wl='-Wl,'
7807 ;;
7808 *Sun\ F*)
7809 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7810 lt_prog_compiler_pic='-KPIC'
7811 lt_prog_compiler_static='-Bstatic'
7812 lt_prog_compiler_wl=''
7813 ;;
7814 esac
7815 ;;
7816 esac
7817 ;;
7818
7819 newsos6)
7820 lt_prog_compiler_pic='-KPIC'
7821 lt_prog_compiler_static='-Bstatic'
7822 ;;
7823
7824 *nto* | *qnx*)
7825 # QNX uses GNU C++, but need to define -shared option too, otherwise
7826 # it will coredump.
7827 lt_prog_compiler_pic='-fPIC -shared'
7828 ;;
7829
7830 osf3* | osf4* | osf5*)
7831 lt_prog_compiler_wl='-Wl,'
7832 # All OSF/1 code is PIC.
7833 lt_prog_compiler_static='-non_shared'
7834 ;;
7835
7836 rdos*)
7837 lt_prog_compiler_static='-non_shared'
7838 ;;
7839
7840 solaris*)
7841 lt_prog_compiler_pic='-KPIC'
7842 lt_prog_compiler_static='-Bstatic'
7843 case $cc_basename in
7844 f77* | f90* | f95*)
7845 lt_prog_compiler_wl='-Qoption ld ';;
7846 *)
7847 lt_prog_compiler_wl='-Wl,';;
7848 esac
7849 ;;
7850
7851 sunos4*)
7852 lt_prog_compiler_wl='-Qoption ld '
7853 lt_prog_compiler_pic='-PIC'
7854 lt_prog_compiler_static='-Bstatic'
7855 ;;
7856
7857 sysv4 | sysv4.2uw2* | sysv4.3*)
7858 lt_prog_compiler_wl='-Wl,'
7859 lt_prog_compiler_pic='-KPIC'
7860 lt_prog_compiler_static='-Bstatic'
7861 ;;
7862
7863 sysv4*MP*)
7864 if test -d /usr/nec ;then
7865 lt_prog_compiler_pic='-Kconform_pic'
7866 lt_prog_compiler_static='-Bstatic'
7867 fi
7868 ;;
7869
7870 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7871 lt_prog_compiler_wl='-Wl,'
7872 lt_prog_compiler_pic='-KPIC'
7873 lt_prog_compiler_static='-Bstatic'
7874 ;;
7875
7876 unicos*)
7877 lt_prog_compiler_wl='-Wl,'
7878 lt_prog_compiler_can_build_shared=no
7879 ;;
7880
7881 uts4*)
7882 lt_prog_compiler_pic='-pic'
7883 lt_prog_compiler_static='-Bstatic'
7884 ;;
7885
7886 *)
7887 lt_prog_compiler_can_build_shared=no
7888 ;;
7889 esac
7890 fi
7891
7892case $host_os in
7893 # For platforms which do not support PIC, -DPIC is meaningless:
7894 *djgpp*)
7895 lt_prog_compiler_pic=
7896 ;;
7897 *)
7898 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7899 ;;
7900esac
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7902$as_echo "$lt_prog_compiler_pic" >&6; }
7903
7904
7905
7906
7907
7908
7909#
7910# Check to make sure the PIC flag actually works.
7911#
7912if test -n "$lt_prog_compiler_pic"; then
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7914$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7915if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
7916 $as_echo_n "(cached) " >&6
7917else
7918 lt_cv_prog_compiler_pic_works=no
7919 ac_outfile=conftest.$ac_objext
7920 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7921 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7922 # Insert the option either (1) after the last *FLAGS variable, or
7923 # (2) before a word containing "conftest.", or (3) at the end.
7924 # Note that $ac_compile itself does not contain backslashes and begins
7925 # with a dollar sign (not a hyphen), so the echo should work correctly.
7926 # The option is referenced via a variable to avoid confusing sed.
7927 lt_compile=`echo "$ac_compile" | $SED \
7928 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7929 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7930 -e 's:$: $lt_compiler_flag:'`
7931 (eval echo "\"\$as_me:7931: $lt_compile\"" >&5)
7932 (eval "$lt_compile" 2>conftest.err)
7933 ac_status=$?
7934 cat conftest.err >&5
7935 echo "$as_me:7935: \$? = $ac_status" >&5
7936 if (exit $ac_status) && test -s "$ac_outfile"; then
7937 # The compiler can only warn and ignore the option if not recognized
7938 # So say no if there are warnings other than the usual output.
7939 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7940 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7941 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7942 lt_cv_prog_compiler_pic_works=yes
7943 fi
7944 fi
7945 $RM conftest*
7946
7947fi
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
7949$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
7950
7951if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
7952 case $lt_prog_compiler_pic in
7953 "" | " "*) ;;
7954 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7955 esac
7956else
7957 lt_prog_compiler_pic=
7958 lt_prog_compiler_can_build_shared=no
7959fi
7960
7961fi
7962
7963
7964
7965
7966
7967
7968#
7969# Check to make sure the static flag actually works.
7970#
7971wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
7973$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
7974if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
7975 $as_echo_n "(cached) " >&6
7976else
7977 lt_cv_prog_compiler_static_works=no
7978 save_LDFLAGS="$LDFLAGS"
7979 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
7980 echo "$lt_simple_link_test_code" > conftest.$ac_ext
7981 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7982 # The linker can only warn and ignore the option if not recognized
7983 # So say no if there are warnings
7984 if test -s conftest.err; then
7985 # Append any errors to the config.log.
7986 cat conftest.err 1>&5
7987 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7988 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7989 if diff conftest.exp conftest.er2 >/dev/null; then
7990 lt_cv_prog_compiler_static_works=yes
7991 fi
7992 else
7993 lt_cv_prog_compiler_static_works=yes
7994 fi
7995 fi
7996 $RM -r conftest*
7997 LDFLAGS="$save_LDFLAGS"
7998
7999fi
8000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8001$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8002
8003if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8004 :
8005else
8006 lt_prog_compiler_static=
8007fi
8008
8009
8010
8011
8012
8013
8014
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8016$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8017if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8018 $as_echo_n "(cached) " >&6
8019else
8020 lt_cv_prog_compiler_c_o=no
8021 $RM -r conftest 2>/dev/null
8022 mkdir conftest
8023 cd conftest
8024 mkdir out
8025 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8026
8027 lt_compiler_flag="-o out/conftest2.$ac_objext"
8028 # Insert the option either (1) after the last *FLAGS variable, or
8029 # (2) before a word containing "conftest.", or (3) at the end.
8030 # Note that $ac_compile itself does not contain backslashes and begins
8031 # with a dollar sign (not a hyphen), so the echo should work correctly.
8032 lt_compile=`echo "$ac_compile" | $SED \
8033 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8034 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8035 -e 's:$: $lt_compiler_flag:'`
8036 (eval echo "\"\$as_me:8036: $lt_compile\"" >&5)
8037 (eval "$lt_compile" 2>out/conftest.err)
8038 ac_status=$?
8039 cat out/conftest.err >&5
8040 echo "$as_me:8040: \$? = $ac_status" >&5
8041 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8042 then
8043 # The compiler can only warn and ignore the option if not recognized
8044 # So say no if there are warnings
8045 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8046 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8047 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8048 lt_cv_prog_compiler_c_o=yes
8049 fi
8050 fi
8051 chmod u+w . 2>&5
8052 $RM conftest*
8053 # SGI C++ compiler will create directory out/ii_files/ for
8054 # template instantiation
8055 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8056 $RM out/* && rmdir out
8057 cd ..
8058 $RM -r conftest
8059 $RM conftest*
8060
8061fi
8062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8063$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8064
8065
8066
8067
8068
8069
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8071$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8072if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8073 $as_echo_n "(cached) " >&6
8074else
8075 lt_cv_prog_compiler_c_o=no
8076 $RM -r conftest 2>/dev/null
8077 mkdir conftest
8078 cd conftest
8079 mkdir out
8080 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8081
8082 lt_compiler_flag="-o out/conftest2.$ac_objext"
8083 # Insert the option either (1) after the last *FLAGS variable, or
8084 # (2) before a word containing "conftest.", or (3) at the end.
8085 # Note that $ac_compile itself does not contain backslashes and begins
8086 # with a dollar sign (not a hyphen), so the echo should work correctly.
8087 lt_compile=`echo "$ac_compile" | $SED \
8088 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8089 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8090 -e 's:$: $lt_compiler_flag:'`
8091 (eval echo "\"\$as_me:8091: $lt_compile\"" >&5)
8092 (eval "$lt_compile" 2>out/conftest.err)
8093 ac_status=$?
8094 cat out/conftest.err >&5
8095 echo "$as_me:8095: \$? = $ac_status" >&5
8096 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8097 then
8098 # The compiler can only warn and ignore the option if not recognized
8099 # So say no if there are warnings
8100 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8101 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8102 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8103 lt_cv_prog_compiler_c_o=yes
8104 fi
8105 fi
8106 chmod u+w . 2>&5
8107 $RM conftest*
8108 # SGI C++ compiler will create directory out/ii_files/ for
8109 # template instantiation
8110 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8111 $RM out/* && rmdir out
8112 cd ..
8113 $RM -r conftest
8114 $RM conftest*
8115
8116fi
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8118$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8119
8120
8121
8122
8123hard_links="nottested"
8124if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8125 # do not overwrite the value of need_locks provided by the user
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8127$as_echo_n "checking if we can lock with hard links... " >&6; }
8128 hard_links=yes
8129 $RM conftest*
8130 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8131 touch conftest.a
8132 ln conftest.a conftest.b 2>&5 || hard_links=no
8133 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8135$as_echo "$hard_links" >&6; }
8136 if test "$hard_links" = no; then
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8138$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8139 need_locks=warn
8140 fi
8141else
8142 need_locks=no
8143fi
8144
8145
8146
8147
8148
8149
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8151$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8152
8153 runpath_var=
8154 allow_undefined_flag=
8155 always_export_symbols=no
8156 archive_cmds=
8157 archive_expsym_cmds=
8158 compiler_needs_object=no
8159 enable_shared_with_static_runtimes=no
8160 export_dynamic_flag_spec=
8161 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8162 hardcode_automatic=no
8163 hardcode_direct=no
8164 hardcode_direct_absolute=no
8165 hardcode_libdir_flag_spec=
8166 hardcode_libdir_flag_spec_ld=
8167 hardcode_libdir_separator=
8168 hardcode_minus_L=no
8169 hardcode_shlibpath_var=unsupported
8170 inherit_rpath=no
8171 link_all_deplibs=unknown
8172 module_cmds=
8173 module_expsym_cmds=
8174 old_archive_from_new_cmds=
8175 old_archive_from_expsyms_cmds=
8176 thread_safe_flag_spec=
8177 whole_archive_flag_spec=
8178 # include_expsyms should be a list of space-separated symbols to be *always*
8179 # included in the symbol list
8180 include_expsyms=
8181 # exclude_expsyms can be an extended regexp of symbols to exclude
8182 # it will be wrapped by ` (' and `)$', so one must not match beginning or
8183 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8184 # as well as any symbol that contains `d'.
8185 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
8186 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8187 # platforms (ab)use it in PIC code, but their linkers get confused if
8188 # the symbol is explicitly referenced. Since portable code cannot
8189 # rely on this symbol name, it's probably fine to never include it in
8190 # preloaded symbol tables.
8191 # Exclude shared library initialization/finalization symbols.
8192 extract_expsyms_cmds=
8193
8194 case $host_os in
8195 cygwin* | mingw* | pw32* | cegcc*)
8196 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8197 # When not using gcc, we currently assume that we are using
8198 # Microsoft Visual C++.
8199 if test "$GCC" != yes; then
8200 with_gnu_ld=no
8201 fi
8202 ;;
8203 interix*)
8204 # we just hope/assume this is gcc and not c89 (= MSVC++)
8205 with_gnu_ld=yes
8206 ;;
8207 openbsd*)
8208 with_gnu_ld=no
8209 ;;
8210 linux* | k*bsd*-gnu)
8211 link_all_deplibs=no
8212 ;;
8213 esac
8214
8215 ld_shlibs=yes
8216 if test "$with_gnu_ld" = yes; then
8217 # If archive_cmds runs LD, not CC, wlarc should be empty
8218 wlarc='${wl}'
8219
8220 # Set some defaults for GNU ld with shared library support. These
8221 # are reset later if shared libraries are not supported. Putting them
8222 # here allows them to be overridden if necessary.
8223 runpath_var=LD_RUN_PATH
8224 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8225 export_dynamic_flag_spec='${wl}--export-dynamic'
8226 # ancient GNU ld didn't support --whole-archive et. al.
8227 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8228 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8229 else
8230 whole_archive_flag_spec=
8231 fi
8232 supports_anon_versioning=no
8233 case `$LD -v 2>&1` in
8234 *GNU\ gold*) supports_anon_versioning=yes ;;
8235 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8236 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8237 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8238 *\ 2.11.*) ;; # other 2.11 versions
8239 *) supports_anon_versioning=yes ;;
8240 esac
8241
8242 # See if GNU ld supports shared libraries.
8243 case $host_os in
8244 aix[3-9]*)
8245 # On AIX/PPC, the GNU linker is very broken
8246 if test "$host_cpu" != ia64; then
8247 ld_shlibs=no
8248 cat <<_LT_EOF 1>&2
8249
8250*** Warning: the GNU linker, at least up to release 2.9.1, is reported
8251*** to be unable to reliably create shared libraries on AIX.
8252*** Therefore, libtool is disabling shared libraries support. If you
8253*** really care for shared libraries, you may want to modify your PATH
8254*** so that a non-GNU linker is found, and then restart.
8255
8256_LT_EOF
8257 fi
8258 ;;
8259
8260 amigaos*)
8261 case $host_cpu in
8262 powerpc)
8263 # see comment about AmigaOS4 .so support
8264 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8265 archive_expsym_cmds=''
8266 ;;
8267 m68k)
8268 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)'
8269 hardcode_libdir_flag_spec='-L$libdir'
8270 hardcode_minus_L=yes
8271 ;;
8272 esac
8273 ;;
8274
8275 beos*)
8276 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8277 allow_undefined_flag=unsupported
8278 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8279 # support --undefined. This deserves some investigation. FIXME
8280 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8281 else
8282 ld_shlibs=no
8283 fi
8284 ;;
8285
8286 cygwin* | mingw* | pw32* | cegcc*)
8287 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8288 # as there is no search path for DLLs.
8289 hardcode_libdir_flag_spec='-L$libdir'
8290 allow_undefined_flag=unsupported
8291 always_export_symbols=no
8292 enable_shared_with_static_runtimes=yes
8293 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8294
8295 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8296 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8297 # If the export-symbols file already is a .def file (1st line
8298 # is EXPORTS), use it as is; otherwise, prepend...
8299 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8300 cp $export_symbols $output_objdir/$soname.def;
8301 else
8302 echo EXPORTS > $output_objdir/$soname.def;
8303 cat $export_symbols >> $output_objdir/$soname.def;
8304 fi~
8305 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8306 else
8307 ld_shlibs=no
8308 fi
8309 ;;
8310
8311 interix[3-9]*)
8312 hardcode_direct=no
8313 hardcode_shlibpath_var=no
8314 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8315 export_dynamic_flag_spec='${wl}-E'
8316 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8317 # Instead, shared libraries are loaded at an image base (0x10000000 by
8318 # default) and relocated if they conflict, which is a slow very memory
8319 # consuming and fragmenting process. To avoid this, we pick a random,
8320 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8321 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8322 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8323 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'
8324 ;;
8325
8326 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8327 tmp_diet=no
8328 if test "$host_os" = linux-dietlibc; then
8329 case $cc_basename in
8330 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
8331 esac
8332 fi
8333 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8334 && test "$tmp_diet" = no
8335 then
8336 tmp_addflag=
8337 tmp_sharedflag='-shared'
8338 case $cc_basename,$host_cpu in
8339 pgcc*) # Portland Group C compiler
8340 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'
8341 tmp_addflag=' $pic_flag'
8342 ;;
8343 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8344 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'
8345 tmp_addflag=' $pic_flag -Mnomain' ;;
8346 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8347 tmp_addflag=' -i_dynamic' ;;
8348 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8349 tmp_addflag=' -i_dynamic -nofor_main' ;;
8350 ifc* | ifort*) # Intel Fortran compiler
8351 tmp_addflag=' -nofor_main' ;;
8352 lf95*) # Lahey Fortran 8.1
8353 whole_archive_flag_spec=
8354 tmp_sharedflag='--shared' ;;
8355 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8356 tmp_sharedflag='-qmkshrobj'
8357 tmp_addflag= ;;
8358 esac
8359 case `$CC -V 2>&1 | sed 5q` in
8360 *Sun\ C*) # Sun C 5.9
8361 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'
8362 compiler_needs_object=yes
8363 tmp_sharedflag='-G' ;;
8364 *Sun\ F*) # Sun Fortran 8.3
8365 tmp_sharedflag='-G' ;;
8366 esac
8367 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8368
8369 if test "x$supports_anon_versioning" = xyes; then
8370 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8371 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8372 echo "local: *; };" >> $output_objdir/$libname.ver~
8373 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8374 fi
8375
8376 case $cc_basename in
8377 xlf*)
8378 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8379 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
8380 hardcode_libdir_flag_spec=
8381 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8382 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
8383 if test "x$supports_anon_versioning" = xyes; then
8384 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8385 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8386 echo "local: *; };" >> $output_objdir/$libname.ver~
8387 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8388 fi
8389 ;;
8390 esac
8391 else
8392 ld_shlibs=no
8393 fi
8394 ;;
8395
8396 netbsd* | netbsdelf*-gnu)
8397 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8398 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8399 wlarc=
8400 else
8401 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8402 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8403 fi
8404 ;;
8405
8406 solaris*)
8407 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8408 ld_shlibs=no
8409 cat <<_LT_EOF 1>&2
8410
8411*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8412*** create shared libraries on Solaris systems. Therefore, libtool
8413*** is disabling shared libraries support. We urge you to upgrade GNU
8414*** binutils to release 2.9.1 or newer. Another option is to modify
8415*** your PATH or compiler configuration so that the native linker is
8416*** used, and then restart.
8417
8418_LT_EOF
8419 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8420 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8421 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8422 else
8423 ld_shlibs=no
8424 fi
8425 ;;
8426
8427 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8428 case `$LD -v 2>&1` in
8429 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8430 ld_shlibs=no
8431 cat <<_LT_EOF 1>&2
8432
8433*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8434*** reliably create shared libraries on SCO systems. Therefore, libtool
8435*** is disabling shared libraries support. We urge you to upgrade GNU
8436*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8437*** your PATH or compiler configuration so that the native linker is
8438*** used, and then restart.
8439
8440_LT_EOF
8441 ;;
8442 *)
8443 # For security reasons, it is highly recommended that you always
8444 # use absolute paths for naming shared libraries, and exclude the
8445 # DT_RUNPATH tag from executables and libraries. But doing so
8446 # requires that you compile everything twice, which is a pain.
8447 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8448 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8449 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8450 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8451 else
8452 ld_shlibs=no
8453 fi
8454 ;;
8455 esac
8456 ;;
8457
8458 sunos4*)
8459 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8460 wlarc=
8461 hardcode_direct=yes
8462 hardcode_shlibpath_var=no
8463 ;;
8464
8465 *)
8466 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8467 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8468 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8469 else
8470 ld_shlibs=no
8471 fi
8472 ;;
8473 esac
8474
8475 if test "$ld_shlibs" = no; then
8476 runpath_var=
8477 hardcode_libdir_flag_spec=
8478 export_dynamic_flag_spec=
8479 whole_archive_flag_spec=
8480 fi
8481 else
8482 # PORTME fill in a description of your system's linker (not GNU ld)
8483 case $host_os in
8484 aix3*)
8485 allow_undefined_flag=unsupported
8486 always_export_symbols=yes
8487 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8488 # Note: this linker hardcodes the directories in LIBPATH if there
8489 # are no directories specified by -L.
8490 hardcode_minus_L=yes
8491 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8492 # Neither direct hardcoding nor static linking is supported with a
8493 # broken collect2.
8494 hardcode_direct=unsupported
8495 fi
8496 ;;
8497
8498 aix[4-9]*)
8499 if test "$host_cpu" = ia64; then
8500 # On IA64, the linker does run time linking by default, so we don't
8501 # have to do anything special.
8502 aix_use_runtimelinking=no
8503 exp_sym_flag='-Bexport'
8504 no_entry_flag=""
8505 else
8506 # If we're using GNU nm, then we don't want the "-C" option.
8507 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8508 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8509 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'
8510 else
8511 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'
8512 fi
8513 aix_use_runtimelinking=no
8514
8515 # Test if we are trying to use run time linking or normal
8516 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8517 # need to do runtime linking.
8518 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8519 for ld_flag in $LDFLAGS; do
8520 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8521 aix_use_runtimelinking=yes
8522 break
8523 fi
8524 done
8525 ;;
8526 esac
8527
8528 exp_sym_flag='-bexport'
8529 no_entry_flag='-bnoentry'
8530 fi
8531
8532 # When large executables or shared objects are built, AIX ld can
8533 # have problems creating the table of contents. If linking a library
8534 # or program results in "error TOC overflow" add -mminimal-toc to
8535 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8536 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8537
8538 archive_cmds=''
8539 hardcode_direct=yes
8540 hardcode_direct_absolute=yes
8541 hardcode_libdir_separator=':'
8542 link_all_deplibs=yes
8543 file_list_spec='${wl}-f,'
8544
8545 if test "$GCC" = yes; then
8546 case $host_os in aix4.[012]|aix4.[012].*)
8547 # We only want to do this on AIX 4.2 and lower, the check
8548 # below for broken collect2 doesn't work under 4.3+
8549 collect2name=`${CC} -print-prog-name=collect2`
8550 if test -f "$collect2name" &&
8551 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8552 then
8553 # We have reworked collect2
8554 :
8555 else
8556 # We have old collect2
8557 hardcode_direct=unsupported
8558 # It fails to find uninstalled libraries when the uninstalled
8559 # path is not listed in the libpath. Setting hardcode_minus_L
8560 # to unsupported forces relinking
8561 hardcode_minus_L=yes
8562 hardcode_libdir_flag_spec='-L$libdir'
8563 hardcode_libdir_separator=
8564 fi
8565 ;;
8566 esac
8567 shared_flag='-shared'
8568 if test "$aix_use_runtimelinking" = yes; then
8569 shared_flag="$shared_flag "'${wl}-G'
8570 fi
8571 link_all_deplibs=no
8572 else
8573 # not using gcc
8574 if test "$host_cpu" = ia64; then
8575 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8576 # chokes on -Wl,-G. The following line is correct:
8577 shared_flag='-G'
8578 else
8579 if test "$aix_use_runtimelinking" = yes; then
8580 shared_flag='${wl}-G'
8581 else
8582 shared_flag='${wl}-bM:SRE'
8583 fi
8584 fi
8585 fi
8586
8587 export_dynamic_flag_spec='${wl}-bexpall'
8588 # It seems that -bexpall does not export symbols beginning with
8589 # underscore (_), so it is better to generate a list of symbols to export.
8590 always_export_symbols=yes
8591 if test "$aix_use_runtimelinking" = yes; then
8592 # Warning - without using the other runtime loading flags (-brtl),
8593 # -berok will link without error, but may produce a broken library.
8594 allow_undefined_flag='-berok'
8595 # Determine the default libpath from the value encoded in an
8596 # empty executable.
8597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598/* end confdefs.h. */
8599
8600int
8601main ()
8602{
8603
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608if ac_fn_c_try_link "$LINENO"; then :
8609
8610lt_aix_libpath_sed='
8611 /Import File Strings/,/^$/ {
8612 /^0/ {
8613 s/^0 *\(.*\)$/\1/
8614 p
8615 }
8616 }'
8617aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8618# Check for a 64-bit object if we didn't find anything.
8619if test -z "$aix_libpath"; then
8620 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8621fi
8622fi
8623rm -f core conftest.err conftest.$ac_objext \
8624 conftest$ac_exeext conftest.$ac_ext
8625if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8626
8627 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8628 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"
8629 else
8630 if test "$host_cpu" = ia64; then
8631 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8632 allow_undefined_flag="-z nodefs"
8633 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"
8634 else
8635 # Determine the default libpath from the value encoded in an
8636 # empty executable.
8637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8638/* end confdefs.h. */
8639
8640int
8641main ()
8642{
8643
8644 ;
8645 return 0;
8646}
8647_ACEOF
8648if ac_fn_c_try_link "$LINENO"; then :
8649
8650lt_aix_libpath_sed='
8651 /Import File Strings/,/^$/ {
8652 /^0/ {
8653 s/^0 *\(.*\)$/\1/
8654 p
8655 }
8656 }'
8657aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8658# Check for a 64-bit object if we didn't find anything.
8659if test -z "$aix_libpath"; then
8660 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8661fi
8662fi
8663rm -f core conftest.err conftest.$ac_objext \
8664 conftest$ac_exeext conftest.$ac_ext
8665if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8666
8667 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8668 # Warning - without using the other run time loading flags,
8669 # -berok will link without error, but may produce a broken library.
8670 no_undefined_flag=' ${wl}-bernotok'
8671 allow_undefined_flag=' ${wl}-berok'
8672 # Exported symbols can be pulled into shared objects from archives
8673 whole_archive_flag_spec='$convenience'
8674 archive_cmds_need_lc=yes
8675 # This is similar to how AIX traditionally builds its shared libraries.
8676 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8677 fi
8678 fi
8679 ;;
8680
8681 amigaos*)
8682 case $host_cpu in
8683 powerpc)
8684 # see comment about AmigaOS4 .so support
8685 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8686 archive_expsym_cmds=''
8687 ;;
8688 m68k)
8689 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)'
8690 hardcode_libdir_flag_spec='-L$libdir'
8691 hardcode_minus_L=yes
8692 ;;
8693 esac
8694 ;;
8695
8696 bsdi[45]*)
8697 export_dynamic_flag_spec=-rdynamic
8698 ;;
8699
8700 cygwin* | mingw* | pw32* | cegcc*)
8701 # When not using gcc, we currently assume that we are using
8702 # Microsoft Visual C++.
8703 # hardcode_libdir_flag_spec is actually meaningless, as there is
8704 # no search path for DLLs.
8705 hardcode_libdir_flag_spec=' '
8706 allow_undefined_flag=unsupported
8707 # Tell ltmain to make .lib files, not .a files.
8708 libext=lib
8709 # Tell ltmain to make .dll files, not .so files.
8710 shrext_cmds=".dll"
8711 # FIXME: Setting linknames here is a bad hack.
8712 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
8713 # The linker will automatically build a .lib file if we build a DLL.
8714 old_archive_from_new_cmds='true'
8715 # FIXME: Should let the user specify the lib program.
8716 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8717 fix_srcfile_path='`cygpath -w "$srcfile"`'
8718 enable_shared_with_static_runtimes=yes
8719 ;;
8720
8721 darwin* | rhapsody*)
8722
8723
8724 archive_cmds_need_lc=no
8725 hardcode_direct=no
8726 hardcode_automatic=yes
8727 hardcode_shlibpath_var=unsupported
8728 whole_archive_flag_spec=''
8729 link_all_deplibs=yes
8730 allow_undefined_flag="$_lt_dar_allow_undefined"
8731 case $cc_basename in
8732 ifort*) _lt_dar_can_shared=yes ;;
8733 *) _lt_dar_can_shared=$GCC ;;
8734 esac
8735 if test "$_lt_dar_can_shared" = "yes"; then
8736 output_verbose_link_cmd=echo
8737 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8738 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8739 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}"
8740 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}"
8741
8742 else
8743 ld_shlibs=no
8744 fi
8745
8746 ;;
8747
8748 dgux*)
8749 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8750 hardcode_libdir_flag_spec='-L$libdir'
8751 hardcode_shlibpath_var=no
8752 ;;
8753
8754 freebsd1*)
8755 ld_shlibs=no
8756 ;;
8757
8758 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8759 # support. Future versions do this automatically, but an explicit c++rt0.o
8760 # does not break anything, and helps significantly (at the cost of a little
8761 # extra space).
8762 freebsd2.2*)
8763 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8764 hardcode_libdir_flag_spec='-R$libdir'
8765 hardcode_direct=yes
8766 hardcode_shlibpath_var=no
8767 ;;
8768
8769 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8770 freebsd2*)
8771 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8772 hardcode_direct=yes
8773 hardcode_minus_L=yes
8774 hardcode_shlibpath_var=no
8775 ;;
8776
8777 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8778 freebsd* | dragonfly*)
8779 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8780 hardcode_libdir_flag_spec='-R$libdir'
8781 hardcode_direct=yes
8782 hardcode_shlibpath_var=no
8783 ;;
8784
8785 hpux9*)
8786 if test "$GCC" = yes; then
8787 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'
8788 else
8789 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'
8790 fi
8791 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8792 hardcode_libdir_separator=:
8793 hardcode_direct=yes
8794
8795 # hardcode_minus_L: Not really in the search PATH,
8796 # but as the default location of the library.
8797 hardcode_minus_L=yes
8798 export_dynamic_flag_spec='${wl}-E'
8799 ;;
8800
8801 hpux10*)
8802 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8803 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8804 else
8805 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8806 fi
8807 if test "$with_gnu_ld" = no; then
8808 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8809 hardcode_libdir_flag_spec_ld='+b $libdir'
8810 hardcode_libdir_separator=:
8811 hardcode_direct=yes
8812 hardcode_direct_absolute=yes
8813 export_dynamic_flag_spec='${wl}-E'
8814 # hardcode_minus_L: Not really in the search PATH,
8815 # but as the default location of the library.
8816 hardcode_minus_L=yes
8817 fi
8818 ;;
8819
8820 hpux11*)
8821 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8822 case $host_cpu in
8823 hppa*64*)
8824 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8825 ;;
8826 ia64*)
8827 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8828 ;;
8829 *)
8830 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8831 ;;
8832 esac
8833 else
8834 case $host_cpu in
8835 hppa*64*)
8836 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8837 ;;
8838 ia64*)
8839 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8840 ;;
8841 *)
8842 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8843 ;;
8844 esac
8845 fi
8846 if test "$with_gnu_ld" = no; then
8847 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8848 hardcode_libdir_separator=:
8849
8850 case $host_cpu in
8851 hppa*64*|ia64*)
8852 hardcode_direct=no
8853 hardcode_shlibpath_var=no
8854 ;;
8855 *)
8856 hardcode_direct=yes
8857 hardcode_direct_absolute=yes
8858 export_dynamic_flag_spec='${wl}-E'
8859
8860 # hardcode_minus_L: Not really in the search PATH,
8861 # but as the default location of the library.
8862 hardcode_minus_L=yes
8863 ;;
8864 esac
8865 fi
8866 ;;
8867
8868 irix5* | irix6* | nonstopux*)
8869 if test "$GCC" = yes; then
8870 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'
8871 # Try to use the -exported_symbol ld option, if it does not
8872 # work, assume that -exports_file does not work either and
8873 # implicitly export all symbols.
8874 save_LDFLAGS="$LDFLAGS"
8875 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8877/* end confdefs.h. */
8878int foo(void) {}
8879_ACEOF
8880if ac_fn_c_try_link "$LINENO"; then :
8881 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'
8882
8883fi
8884rm -f core conftest.err conftest.$ac_objext \
8885 conftest$ac_exeext conftest.$ac_ext
8886 LDFLAGS="$save_LDFLAGS"
8887 else
8888 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'
8889 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'
8890 fi
8891 archive_cmds_need_lc='no'
8892 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8893 hardcode_libdir_separator=:
8894 inherit_rpath=yes
8895 link_all_deplibs=yes
8896 ;;
8897
8898 netbsd* | netbsdelf*-gnu)
8899 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8900 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8901 else
8902 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8903 fi
8904 hardcode_libdir_flag_spec='-R$libdir'
8905 hardcode_direct=yes
8906 hardcode_shlibpath_var=no
8907 ;;
8908
8909 newsos6)
8910 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8911 hardcode_direct=yes
8912 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8913 hardcode_libdir_separator=:
8914 hardcode_shlibpath_var=no
8915 ;;
8916
8917 *nto* | *qnx*)
8918 ;;
8919
8920 openbsd*)
8921 if test -f /usr/libexec/ld.so; then
8922 hardcode_direct=yes
8923 hardcode_shlibpath_var=no
8924 hardcode_direct_absolute=yes
8925 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8926 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8927 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8928 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8929 export_dynamic_flag_spec='${wl}-E'
8930 else
8931 case $host_os in
8932 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8933 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8934 hardcode_libdir_flag_spec='-R$libdir'
8935 ;;
8936 *)
8937 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8938 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8939 ;;
8940 esac
8941 fi
8942 else
8943 ld_shlibs=no
8944 fi
8945 ;;
8946
8947 os2*)
8948 hardcode_libdir_flag_spec='-L$libdir'
8949 hardcode_minus_L=yes
8950 allow_undefined_flag=unsupported
8951 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'
8952 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8953 ;;
8954
8955 osf3*)
8956 if test "$GCC" = yes; then
8957 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8958 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'
8959 else
8960 allow_undefined_flag=' -expect_unresolved \*'
8961 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'
8962 fi
8963 archive_cmds_need_lc='no'
8964 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8965 hardcode_libdir_separator=:
8966 ;;
8967
8968 osf4* | osf5*) # as osf3* with the addition of -msym flag
8969 if test "$GCC" = yes; then
8970 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8971 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'
8972 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8973 else
8974 allow_undefined_flag=' -expect_unresolved \*'
8975 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'
8976 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~
8977 $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'
8978
8979 # Both c and cxx compiler support -rpath directly
8980 hardcode_libdir_flag_spec='-rpath $libdir'
8981 fi
8982 archive_cmds_need_lc='no'
8983 hardcode_libdir_separator=:
8984 ;;
8985
8986 solaris*)
8987 no_undefined_flag=' -z defs'
8988 if test "$GCC" = yes; then
8989 wlarc='${wl}'
8990 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8991 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8992 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8993 else
8994 case `$CC -V 2>&1` in
8995 *"Compilers 5.0"*)
8996 wlarc=''
8997 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8998 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8999 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9000 ;;
9001 *)
9002 wlarc='${wl}'
9003 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9004 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9005 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9006 ;;
9007 esac
9008 fi
9009 hardcode_libdir_flag_spec='-R$libdir'
9010 hardcode_shlibpath_var=no
9011 case $host_os in
9012 solaris2.[0-5] | solaris2.[0-5].*) ;;
9013 *)
9014 # The compiler driver will combine and reorder linker options,
9015 # but understands `-z linker_flag'. GCC discards it without `$wl',
9016 # but is careful enough not to reorder.
9017 # Supported since Solaris 2.6 (maybe 2.5.1?)
9018 if test "$GCC" = yes; then
9019 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9020 else
9021 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9022 fi
9023 ;;
9024 esac
9025 link_all_deplibs=yes
9026 ;;
9027
9028 sunos4*)
9029 if test "x$host_vendor" = xsequent; then
9030 # Use $CC to link under sequent, because it throws in some extra .o
9031 # files that make .init and .fini sections work.
9032 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9033 else
9034 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9035 fi
9036 hardcode_libdir_flag_spec='-L$libdir'
9037 hardcode_direct=yes
9038 hardcode_minus_L=yes
9039 hardcode_shlibpath_var=no
9040 ;;
9041
9042 sysv4)
9043 case $host_vendor in
9044 sni)
9045 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9046 hardcode_direct=yes # is this really true???
9047 ;;
9048 siemens)
9049 ## LD is ld it makes a PLAMLIB
9050 ## CC just makes a GrossModule.
9051 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9052 reload_cmds='$CC -r -o $output$reload_objs'
9053 hardcode_direct=no
9054 ;;
9055 motorola)
9056 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9057 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9058 ;;
9059 esac
9060 runpath_var='LD_RUN_PATH'
9061 hardcode_shlibpath_var=no
9062 ;;
9063
9064 sysv4.3*)
9065 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9066 hardcode_shlibpath_var=no
9067 export_dynamic_flag_spec='-Bexport'
9068 ;;
9069
9070 sysv4*MP*)
9071 if test -d /usr/nec; then
9072 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9073 hardcode_shlibpath_var=no
9074 runpath_var=LD_RUN_PATH
9075 hardcode_runpath_var=yes
9076 ld_shlibs=yes
9077 fi
9078 ;;
9079
9080 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
9081 no_undefined_flag='${wl}-z,text'
9082 archive_cmds_need_lc=no
9083 hardcode_shlibpath_var=no
9084 runpath_var='LD_RUN_PATH'
9085
9086 if test "$GCC" = yes; then
9087 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9088 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9089 else
9090 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9091 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9092 fi
9093 ;;
9094
9095 sysv5* | sco3.2v5* | sco5v6*)
9096 # Note: We can NOT use -z defs as we might desire, because we do not
9097 # link with -lc, and that would cause any symbols used from libc to
9098 # always be unresolved, which means just about no library would
9099 # ever link correctly. If we're not using GNU ld we use -z text
9100 # though, which does catch some bad symbols but isn't as heavy-handed
9101 # as -z defs.
9102 no_undefined_flag='${wl}-z,text'
9103 allow_undefined_flag='${wl}-z,nodefs'
9104 archive_cmds_need_lc=no
9105 hardcode_shlibpath_var=no
9106 hardcode_libdir_flag_spec='${wl}-R,$libdir'
9107 hardcode_libdir_separator=':'
9108 link_all_deplibs=yes
9109 export_dynamic_flag_spec='${wl}-Bexport'
9110 runpath_var='LD_RUN_PATH'
9111
9112 if test "$GCC" = yes; then
9113 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9114 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9115 else
9116 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9117 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9118 fi
9119 ;;
9120
9121 uts4*)
9122 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9123 hardcode_libdir_flag_spec='-L$libdir'
9124 hardcode_shlibpath_var=no
9125 ;;
9126
9127 *)
9128 ld_shlibs=no
9129 ;;
9130 esac
9131
9132 if test x$host_vendor = xsni; then
9133 case $host in
9134 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9135 export_dynamic_flag_spec='${wl}-Blargedynsym'
9136 ;;
9137 esac
9138 fi
9139 fi
9140
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9142$as_echo "$ld_shlibs" >&6; }
9143test "$ld_shlibs" = no && can_build_shared=no
9144
9145with_gnu_ld=$with_gnu_ld
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161#
9162# Do we need to explicitly link libc?
9163#
9164case "x$archive_cmds_need_lc" in
9165x|xyes)
9166 # Assume -lc should be added
9167 archive_cmds_need_lc=yes
9168
9169 if test "$enable_shared" = yes && test "$GCC" = yes; then
9170 case $archive_cmds in
9171 *'~'*)
9172 # FIXME: we may have to deal with multi-command sequences.
9173 ;;
9174 '$CC '*)
9175 # Test whether the compiler implicitly links with -lc since on some
9176 # systems, -lgcc has to come before -lc. If gcc already passes -lc
9177 # to ld, don't add -lc before -lgcc.
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9179$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9180 $RM conftest*
9181 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9182
9183 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9184 (eval $ac_compile) 2>&5
9185 ac_status=$?
9186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9187 test $ac_status = 0; } 2>conftest.err; then
9188 soname=conftest
9189 lib=conftest
9190 libobjs=conftest.$ac_objext
9191 deplibs=
9192 wl=$lt_prog_compiler_wl
9193 pic_flag=$lt_prog_compiler_pic
9194 compiler_flags=-v
9195 linker_flags=-v
9196 verstring=
9197 output_objdir=.
9198 libname=conftest
9199 lt_save_allow_undefined_flag=$allow_undefined_flag
9200 allow_undefined_flag=
9201 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9202 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
9203 ac_status=$?
9204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9205 test $ac_status = 0; }
9206 then
9207 archive_cmds_need_lc=no
9208 else
9209 archive_cmds_need_lc=yes
9210 fi
9211 allow_undefined_flag=$lt_save_allow_undefined_flag
9212 else
9213 cat conftest.err 1>&5
9214 fi
9215 $RM conftest*
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9217$as_echo "$archive_cmds_need_lc" >&6; }
9218 ;;
9219 esac
9220 fi
9221 ;;
9222esac
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9381$as_echo_n "checking dynamic linker characteristics... " >&6; }
9382
9383if test "$GCC" = yes; then
9384 case $host_os in
9385 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
9386 *) lt_awk_arg="/^libraries:/" ;;
9387 esac
9388 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9389 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
9390 # if the path contains ";" then we assume it to be the separator
9391 # otherwise default to the standard path separator (i.e. ":") - it is
9392 # assumed that no part of a normal pathname contains ";" but that should
9393 # okay in the real world where ";" in dirpaths is itself problematic.
9394 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
9395 else
9396 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9397 fi
9398 # Ok, now we have the path, separated by spaces, we can step through it
9399 # and add multilib dir if necessary.
9400 lt_tmp_lt_search_path_spec=
9401 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
9402 for lt_sys_path in $lt_search_path_spec; do
9403 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
9404 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
9405 else
9406 test -d "$lt_sys_path" && \
9407 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9408 fi
9409 done
9410 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
9411BEGIN {RS=" "; FS="/|\n";} {
9412 lt_foo="";
9413 lt_count=0;
9414 for (lt_i = NF; lt_i > 0; lt_i--) {
9415 if ($lt_i != "" && $lt_i != ".") {
9416 if ($lt_i == "..") {
9417 lt_count++;
9418 } else {
9419 if (lt_count == 0) {
9420 lt_foo="/" $lt_i lt_foo;
9421 } else {
9422 lt_count--;
9423 }
9424 }
9425 }
9426 }
9427 if (lt_foo != "") { lt_freq[lt_foo]++; }
9428 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9429}'`
9430 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
9431else
9432 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9433fi
9434library_names_spec=
9435libname_spec='lib$name'
9436soname_spec=
9437shrext_cmds=".so"
9438postinstall_cmds=
9439postuninstall_cmds=
9440finish_cmds=
9441finish_eval=
9442shlibpath_var=
9443shlibpath_overrides_runpath=unknown
9444version_type=none
9445dynamic_linker="$host_os ld.so"
9446sys_lib_dlsearch_path_spec="/lib /usr/lib"
9447need_lib_prefix=unknown
9448hardcode_into_libs=no
9449
9450# when you set need_version to no, make sure it does not cause -set_version
9451# flags to be left without arguments
9452need_version=unknown
9453
9454case $host_os in
9455aix3*)
9456 version_type=linux
9457 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9458 shlibpath_var=LIBPATH
9459
9460 # AIX 3 has no versioning support, so we append a major version to the name.
9461 soname_spec='${libname}${release}${shared_ext}$major'
9462 ;;
9463
9464aix[4-9]*)
9465 version_type=linux
9466 need_lib_prefix=no
9467 need_version=no
9468 hardcode_into_libs=yes
9469 if test "$host_cpu" = ia64; then
9470 # AIX 5 supports IA64
9471 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9472 shlibpath_var=LD_LIBRARY_PATH
9473 else
9474 # With GCC up to 2.95.x, collect2 would create an import file
9475 # for dependence libraries. The import file would start with
9476 # the line `#! .'. This would cause the generated library to
9477 # depend on `.', always an invalid library. This was fixed in
9478 # development snapshots of GCC prior to 3.0.
9479 case $host_os in
9480 aix4 | aix4.[01] | aix4.[01].*)
9481 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9482 echo ' yes '
9483 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
9484 :
9485 else
9486 can_build_shared=no
9487 fi
9488 ;;
9489 esac
9490 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9491 # soname into executable. Probably we can add versioning support to
9492 # collect2, so additional links can be useful in future.
9493 if test "$aix_use_runtimelinking" = yes; then
9494 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9495 # instead of lib<name>.a to let people know that these are not
9496 # typical AIX shared libraries.
9497 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9498 else
9499 # We preserve .a as extension for shared libraries through AIX4.2
9500 # and later when we are not doing run time linking.
9501 library_names_spec='${libname}${release}.a $libname.a'
9502 soname_spec='${libname}${release}${shared_ext}$major'
9503 fi
9504 shlibpath_var=LIBPATH
9505 fi
9506 ;;
9507
9508amigaos*)
9509 case $host_cpu in
9510 powerpc)
9511 # Since July 2007 AmigaOS4 officially supports .so libraries.
9512 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
9513 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9514 ;;
9515 m68k)
9516 library_names_spec='$libname.ixlibrary $libname.a'
9517 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9518 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'
9519 ;;
9520 esac
9521 ;;
9522
9523beos*)
9524 library_names_spec='${libname}${shared_ext}'
9525 dynamic_linker="$host_os ld.so"
9526 shlibpath_var=LIBRARY_PATH
9527 ;;
9528
9529bsdi[45]*)
9530 version_type=linux
9531 need_version=no
9532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9533 soname_spec='${libname}${release}${shared_ext}$major'
9534 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9535 shlibpath_var=LD_LIBRARY_PATH
9536 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9537 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9538 # the default ld.so.conf also contains /usr/contrib/lib and
9539 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9540 # libtool to hard-code these into programs
9541 ;;
9542
9543cygwin* | mingw* | pw32* | cegcc*)
9544 version_type=windows
9545 shrext_cmds=".dll"
9546 need_version=no
9547 need_lib_prefix=no
9548
9549 case $GCC,$host_os in
9550 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
9551 library_names_spec='$libname.dll.a'
9552 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9553 postinstall_cmds='base_file=`basename \${file}`~
9554 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
9555 dldir=$destdir/`dirname \$dlpath`~
9556 test -d \$dldir || mkdir -p \$dldir~
9557 $install_prog $dir/$dlname \$dldir/$dlname~
9558 chmod a+x \$dldir/$dlname~
9559 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
9560 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
9561 fi'
9562 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9563 dlpath=$dir/\$dldll~
9564 $RM \$dlpath'
9565 shlibpath_overrides_runpath=yes
9566
9567 case $host_os in
9568 cygwin*)
9569 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9570 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9571 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9572 ;;
9573 mingw* | cegcc*)
9574 # MinGW DLLs use traditional 'lib' prefix
9575 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9576 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9577 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
9578 # It is most probably a Windows format PATH printed by
9579 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9580 # path with ; separators, and with drive letters. We can handle the
9581 # drive letters (cygwin fileutils understands them), so leave them,
9582 # especially as we might pass files found there to a mingw objdump,
9583 # which wouldn't understand a cygwinified path. Ahh.
9584 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9585 else
9586 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9587 fi
9588 ;;
9589 pw32*)
9590 # pw32 DLLs use 'pw' prefix rather than 'lib'
9591 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9592 ;;
9593 esac
9594 ;;
9595
9596 *)
9597 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9598 ;;
9599 esac
9600 dynamic_linker='Win32 ld.exe'
9601 # FIXME: first we should search . and the directory the executable is in
9602 shlibpath_var=PATH
9603 ;;
9604
9605darwin* | rhapsody*)
9606 dynamic_linker="$host_os dyld"
9607 version_type=darwin
9608 need_lib_prefix=no
9609 need_version=no
9610 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9611 soname_spec='${libname}${release}${major}$shared_ext'
9612 shlibpath_overrides_runpath=yes
9613 shlibpath_var=DYLD_LIBRARY_PATH
9614 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9615
9616 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
9617 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9618 ;;
9619
9620dgux*)
9621 version_type=linux
9622 need_lib_prefix=no
9623 need_version=no
9624 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9625 soname_spec='${libname}${release}${shared_ext}$major'
9626 shlibpath_var=LD_LIBRARY_PATH
9627 ;;
9628
9629freebsd1*)
9630 dynamic_linker=no
9631 ;;
9632
9633freebsd* | dragonfly*)
9634 # DragonFly does not have aout. When/if they implement a new
9635 # versioning mechanism, adjust this.
9636 if test -x /usr/bin/objformat; then
9637 objformat=`/usr/bin/objformat`
9638 else
9639 case $host_os in
9640 freebsd[123]*) objformat=aout ;;
9641 *) objformat=elf ;;
9642 esac
9643 fi
9644 version_type=freebsd-$objformat
9645 case $version_type in
9646 freebsd-elf*)
9647 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9648 need_version=no
9649 need_lib_prefix=no
9650 ;;
9651 freebsd-*)
9652 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9653 need_version=yes
9654 ;;
9655 esac
9656 shlibpath_var=LD_LIBRARY_PATH
9657 case $host_os in
9658 freebsd2*)
9659 shlibpath_overrides_runpath=yes
9660 ;;
9661 freebsd3.[01]* | freebsdelf3.[01]*)
9662 shlibpath_overrides_runpath=yes
9663 hardcode_into_libs=yes
9664 ;;
9665 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
9666 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
9667 shlibpath_overrides_runpath=no
9668 hardcode_into_libs=yes
9669 ;;
9670 *) # from 4.6 on, and DragonFly
9671 shlibpath_overrides_runpath=yes
9672 hardcode_into_libs=yes
9673 ;;
9674 esac
9675 ;;
9676
9677gnu*)
9678 version_type=linux
9679 need_lib_prefix=no
9680 need_version=no
9681 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9682 soname_spec='${libname}${release}${shared_ext}$major'
9683 shlibpath_var=LD_LIBRARY_PATH
9684 hardcode_into_libs=yes
9685 ;;
9686
9687hpux9* | hpux10* | hpux11*)
9688 # Give a soname corresponding to the major version so that dld.sl refuses to
9689 # link against other versions.
9690 version_type=sunos
9691 need_lib_prefix=no
9692 need_version=no
9693 case $host_cpu in
9694 ia64*)
9695 shrext_cmds='.so'
9696 hardcode_into_libs=yes
9697 dynamic_linker="$host_os dld.so"
9698 shlibpath_var=LD_LIBRARY_PATH
9699 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9701 soname_spec='${libname}${release}${shared_ext}$major'
9702 if test "X$HPUX_IA64_MODE" = X32; then
9703 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9704 else
9705 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9706 fi
9707 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9708 ;;
9709 hppa*64*)
9710 shrext_cmds='.sl'
9711 hardcode_into_libs=yes
9712 dynamic_linker="$host_os dld.sl"
9713 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9714 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9715 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9716 soname_spec='${libname}${release}${shared_ext}$major'
9717 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9718 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9719 ;;
9720 *)
9721 shrext_cmds='.sl'
9722 dynamic_linker="$host_os dld.sl"
9723 shlibpath_var=SHLIB_PATH
9724 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9726 soname_spec='${libname}${release}${shared_ext}$major'
9727 ;;
9728 esac
9729 # HP-UX runs *really* slowly unless shared libraries are mode 555.
9730 postinstall_cmds='chmod 555 $lib'
9731 ;;
9732
9733interix[3-9]*)
9734 version_type=linux
9735 need_lib_prefix=no
9736 need_version=no
9737 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9738 soname_spec='${libname}${release}${shared_ext}$major'
9739 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
9740 shlibpath_var=LD_LIBRARY_PATH
9741 shlibpath_overrides_runpath=no
9742 hardcode_into_libs=yes
9743 ;;
9744
9745irix5* | irix6* | nonstopux*)
9746 case $host_os in
9747 nonstopux*) version_type=nonstopux ;;
9748 *)
9749 if test "$lt_cv_prog_gnu_ld" = yes; then
9750 version_type=linux
9751 else
9752 version_type=irix
9753 fi ;;
9754 esac
9755 need_lib_prefix=no
9756 need_version=no
9757 soname_spec='${libname}${release}${shared_ext}$major'
9758 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9759 case $host_os in
9760 irix5* | nonstopux*)
9761 libsuff= shlibsuff=
9762 ;;
9763 *)
9764 case $LD in # libtool.m4 will add one of these switches to LD
9765 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9766 libsuff= shlibsuff= libmagic=32-bit;;
9767 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9768 libsuff=32 shlibsuff=N32 libmagic=N32;;
9769 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9770 libsuff=64 shlibsuff=64 libmagic=64-bit;;
9771 *) libsuff= shlibsuff= libmagic=never-match;;
9772 esac
9773 ;;
9774 esac
9775 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9776 shlibpath_overrides_runpath=no
9777 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9778 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9779 hardcode_into_libs=yes
9780 ;;
9781
9782# No shared lib support for Linux oldld, aout, or coff.
9783linux*oldld* | linux*aout* | linux*coff*)
9784 dynamic_linker=no
9785 ;;
9786
9787# This must be Linux ELF.
9788linux* | k*bsd*-gnu | kopensolaris*-gnu)
9789 version_type=linux
9790 need_lib_prefix=no
9791 need_version=no
9792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9793 soname_spec='${libname}${release}${shared_ext}$major'
9794 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9795 shlibpath_var=LD_LIBRARY_PATH
9796 shlibpath_overrides_runpath=no
9797 # Some binutils ld are patched to set DT_RUNPATH
9798 save_LDFLAGS=$LDFLAGS
9799 save_libdir=$libdir
9800 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
9801 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9803/* end confdefs.h. */
9804
9805int
9806main ()
9807{
9808
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813if ac_fn_c_try_link "$LINENO"; then :
9814 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
9815 shlibpath_overrides_runpath=yes
9816fi
9817fi
9818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
9820 LDFLAGS=$save_LDFLAGS
9821 libdir=$save_libdir
9822
9823 # This implies no fast_install, which is unacceptable.
9824 # Some rework will be needed to allow for fast_install
9825 # before this can be enabled.
9826 hardcode_into_libs=yes
9827
9828 # Append ld.so.conf contents to the search path
9829 if test -f /etc/ld.so.conf; then
9830 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' ' '`
9831 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9832 fi
9833
9834 # We used to test for /lib/ld.so.1 and disable shared libraries on
9835 # powerpc, because MkLinux only supported shared libraries with the
9836 # GNU dynamic linker. Since this was broken with cross compilers,
9837 # most powerpc-linux boxes support dynamic linking these days and
9838 # people can always --disable-shared, the test was removed, and we
9839 # assume the GNU/Linux dynamic linker is in use.
9840 dynamic_linker='GNU/Linux ld.so'
9841 ;;
9842
9843netbsdelf*-gnu)
9844 version_type=linux
9845 need_lib_prefix=no
9846 need_version=no
9847 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9848 soname_spec='${libname}${release}${shared_ext}$major'
9849 shlibpath_var=LD_LIBRARY_PATH
9850 shlibpath_overrides_runpath=no
9851 hardcode_into_libs=yes
9852 dynamic_linker='NetBSD ld.elf_so'
9853 ;;
9854
9855netbsd*)
9856 version_type=sunos
9857 need_lib_prefix=no
9858 need_version=no
9859 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9860 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9861 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9862 dynamic_linker='NetBSD (a.out) ld.so'
9863 else
9864 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9865 soname_spec='${libname}${release}${shared_ext}$major'
9866 dynamic_linker='NetBSD ld.elf_so'
9867 fi
9868 shlibpath_var=LD_LIBRARY_PATH
9869 shlibpath_overrides_runpath=yes
9870 hardcode_into_libs=yes
9871 ;;
9872
9873newsos6)
9874 version_type=linux
9875 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9876 shlibpath_var=LD_LIBRARY_PATH
9877 shlibpath_overrides_runpath=yes
9878 ;;
9879
9880*nto* | *qnx*)
9881 version_type=qnx
9882 need_lib_prefix=no
9883 need_version=no
9884 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9885 soname_spec='${libname}${release}${shared_ext}$major'
9886 shlibpath_var=LD_LIBRARY_PATH
9887 shlibpath_overrides_runpath=no
9888 hardcode_into_libs=yes
9889 dynamic_linker='ldqnx.so'
9890 ;;
9891
9892openbsd*)
9893 version_type=sunos
9894 sys_lib_dlsearch_path_spec="/usr/lib"
9895 need_lib_prefix=no
9896 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9897 case $host_os in
9898 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9899 *) need_version=no ;;
9900 esac
9901 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9902 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9903 shlibpath_var=LD_LIBRARY_PATH
9904 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9905 case $host_os in
9906 openbsd2.[89] | openbsd2.[89].*)
9907 shlibpath_overrides_runpath=no
9908 ;;
9909 *)
9910 shlibpath_overrides_runpath=yes
9911 ;;
9912 esac
9913 else
9914 shlibpath_overrides_runpath=yes
9915 fi
9916 ;;
9917
9918os2*)
9919 libname_spec='$name'
9920 shrext_cmds=".dll"
9921 need_lib_prefix=no
9922 library_names_spec='$libname${shared_ext} $libname.a'
9923 dynamic_linker='OS/2 ld.exe'
9924 shlibpath_var=LIBPATH
9925 ;;
9926
9927osf3* | osf4* | osf5*)
9928 version_type=osf
9929 need_lib_prefix=no
9930 need_version=no
9931 soname_spec='${libname}${release}${shared_ext}$major'
9932 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9933 shlibpath_var=LD_LIBRARY_PATH
9934 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9935 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9936 ;;
9937
9938rdos*)
9939 dynamic_linker=no
9940 ;;
9941
9942solaris*)
9943 version_type=linux
9944 need_lib_prefix=no
9945 need_version=no
9946 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9947 soname_spec='${libname}${release}${shared_ext}$major'
9948 shlibpath_var=LD_LIBRARY_PATH
9949 shlibpath_overrides_runpath=yes
9950 hardcode_into_libs=yes
9951 # ldd complains unless libraries are executable
9952 postinstall_cmds='chmod +x $lib'
9953 ;;
9954
9955sunos4*)
9956 version_type=sunos
9957 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9958 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9959 shlibpath_var=LD_LIBRARY_PATH
9960 shlibpath_overrides_runpath=yes
9961 if test "$with_gnu_ld" = yes; then
9962 need_lib_prefix=no
9963 fi
9964 need_version=yes
9965 ;;
9966
9967sysv4 | sysv4.3*)
9968 version_type=linux
9969 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9970 soname_spec='${libname}${release}${shared_ext}$major'
9971 shlibpath_var=LD_LIBRARY_PATH
9972 case $host_vendor in
9973 sni)
9974 shlibpath_overrides_runpath=no
9975 need_lib_prefix=no
9976 runpath_var=LD_RUN_PATH
9977 ;;
9978 siemens)
9979 need_lib_prefix=no
9980 ;;
9981 motorola)
9982 need_lib_prefix=no
9983 need_version=no
9984 shlibpath_overrides_runpath=no
9985 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9986 ;;
9987 esac
9988 ;;
9989
9990sysv4*MP*)
9991 if test -d /usr/nec ;then
9992 version_type=linux
9993 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9994 soname_spec='$libname${shared_ext}.$major'
9995 shlibpath_var=LD_LIBRARY_PATH
9996 fi
9997 ;;
9998
9999sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10000 version_type=freebsd-elf
10001 need_lib_prefix=no
10002 need_version=no
10003 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10004 soname_spec='${libname}${release}${shared_ext}$major'
10005 shlibpath_var=LD_LIBRARY_PATH
10006 shlibpath_overrides_runpath=yes
10007 hardcode_into_libs=yes
10008 if test "$with_gnu_ld" = yes; then
10009 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10010 else
10011 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10012 case $host_os in
10013 sco3.2v5*)
10014 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10015 ;;
10016 esac
10017 fi
10018 sys_lib_dlsearch_path_spec='/usr/lib'
10019 ;;
10020
10021tpf*)
10022 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
10023 version_type=linux
10024 need_lib_prefix=no
10025 need_version=no
10026 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10027 shlibpath_var=LD_LIBRARY_PATH
10028 shlibpath_overrides_runpath=no
10029 hardcode_into_libs=yes
10030 ;;
10031
10032uts4*)
10033 version_type=linux
10034 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10035 soname_spec='${libname}${release}${shared_ext}$major'
10036 shlibpath_var=LD_LIBRARY_PATH
10037 ;;
10038
10039*)
10040 dynamic_linker=no
10041 ;;
10042esac
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10044$as_echo "$dynamic_linker" >&6; }
10045test "$dynamic_linker" = no && can_build_shared=no
10046
10047variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10048if test "$GCC" = yes; then
10049 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10050fi
10051
10052if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
10053 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
10054fi
10055if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
10056 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
10057fi
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10146$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10147hardcode_action=
10148if test -n "$hardcode_libdir_flag_spec" ||
10149 test -n "$runpath_var" ||
10150 test "X$hardcode_automatic" = "Xyes" ; then
10151
10152 # We can hardcode non-existent directories.
10153 if test "$hardcode_direct" != no &&
10154 # If the only mechanism to avoid hardcoding is shlibpath_var, we
10155 # have to relink, otherwise we might link with an installed library
10156 # when we should be linking with a yet-to-be-installed one
10157 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
10158 test "$hardcode_minus_L" != no; then
10159 # Linking always hardcodes the temporary library directory.
10160 hardcode_action=relink
10161 else
10162 # We can link without hardcoding, and we can hardcode nonexisting dirs.
10163 hardcode_action=immediate
10164 fi
10165else
10166 # We cannot hardcode anything, or else we can only hardcode existing
10167 # directories.
10168 hardcode_action=unsupported
10169fi
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10171$as_echo "$hardcode_action" >&6; }
10172
10173if test "$hardcode_action" = relink ||
10174 test "$inherit_rpath" = yes; then
10175 # Fast installation is not supported
10176 enable_fast_install=no
10177elif test "$shlibpath_overrides_runpath" = yes ||
10178 test "$enable_shared" = no; then
10179 # Fast installation is not necessary
10180 enable_fast_install=needless
10181fi
10182
10183
10184
10185
10186
10187
10188 if test "x$enable_dlopen" != xyes; then
10189 enable_dlopen=unknown
10190 enable_dlopen_self=unknown
10191 enable_dlopen_self_static=unknown
10192else
10193 lt_cv_dlopen=no
10194 lt_cv_dlopen_libs=
10195
10196 case $host_os in
10197 beos*)
10198 lt_cv_dlopen="load_add_on"
10199 lt_cv_dlopen_libs=
10200 lt_cv_dlopen_self=yes
10201 ;;
10202
10203 mingw* | pw32* | cegcc*)
10204 lt_cv_dlopen="LoadLibrary"
10205 lt_cv_dlopen_libs=
10206 ;;
10207
10208 cygwin*)
10209 lt_cv_dlopen="dlopen"
10210 lt_cv_dlopen_libs=
10211 ;;
10212
10213 darwin*)
10214 # if libdl is installed we need to link against it
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10216$as_echo_n "checking for dlopen in -ldl... " >&6; }
10217if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10218 $as_echo_n "(cached) " >&6
10219else
10220 ac_check_lib_save_LIBS=$LIBS
10221LIBS="-ldl $LIBS"
10222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10223/* end confdefs.h. */
10224
10225/* Override any GCC internal prototype to avoid an error.
10226 Use char because int might match the return type of a GCC
10227 builtin and then its argument prototype would still apply. */
10228#ifdef __cplusplus
10229extern "C"
10230#endif
10231char dlopen ();
10232int
10233main ()
10234{
10235return dlopen ();
10236 ;
10237 return 0;
10238}
10239_ACEOF
10240if ac_fn_c_try_link "$LINENO"; then :
10241 ac_cv_lib_dl_dlopen=yes
10242else
10243 ac_cv_lib_dl_dlopen=no
10244fi
10245rm -f core conftest.err conftest.$ac_objext \
10246 conftest$ac_exeext conftest.$ac_ext
10247LIBS=$ac_check_lib_save_LIBS
10248fi
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10250$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10251if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10252 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10253else
10254
10255 lt_cv_dlopen="dyld"
10256 lt_cv_dlopen_libs=
10257 lt_cv_dlopen_self=yes
10258
10259fi
10260
10261 ;;
10262
10263 *)
10264 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10265if test "x$ac_cv_func_shl_load" = x""yes; then :
10266 lt_cv_dlopen="shl_load"
10267else
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10269$as_echo_n "checking for shl_load in -ldld... " >&6; }
10270if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10271 $as_echo_n "(cached) " >&6
10272else
10273 ac_check_lib_save_LIBS=$LIBS
10274LIBS="-ldld $LIBS"
10275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276/* end confdefs.h. */
10277
10278/* Override any GCC internal prototype to avoid an error.
10279 Use char because int might match the return type of a GCC
10280 builtin and then its argument prototype would still apply. */
10281#ifdef __cplusplus
10282extern "C"
10283#endif
10284char shl_load ();
10285int
10286main ()
10287{
10288return shl_load ();
10289 ;
10290 return 0;
10291}
10292_ACEOF
10293if ac_fn_c_try_link "$LINENO"; then :
10294 ac_cv_lib_dld_shl_load=yes
10295else
10296 ac_cv_lib_dld_shl_load=no
10297fi
10298rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext conftest.$ac_ext
10300LIBS=$ac_check_lib_save_LIBS
10301fi
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10303$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10304if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10305 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
10306else
10307 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10308if test "x$ac_cv_func_dlopen" = x""yes; then :
10309 lt_cv_dlopen="dlopen"
10310else
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10312$as_echo_n "checking for dlopen in -ldl... " >&6; }
10313if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10314 $as_echo_n "(cached) " >&6
10315else
10316 ac_check_lib_save_LIBS=$LIBS
10317LIBS="-ldl $LIBS"
10318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319/* end confdefs.h. */
10320
10321/* Override any GCC internal prototype to avoid an error.
10322 Use char because int might match the return type of a GCC
10323 builtin and then its argument prototype would still apply. */
10324#ifdef __cplusplus
10325extern "C"
10326#endif
10327char dlopen ();
10328int
10329main ()
10330{
10331return dlopen ();
10332 ;
10333 return 0;
10334}
10335_ACEOF
10336if ac_fn_c_try_link "$LINENO"; then :
10337 ac_cv_lib_dl_dlopen=yes
10338else
10339 ac_cv_lib_dl_dlopen=no
10340fi
10341rm -f core conftest.err conftest.$ac_objext \
10342 conftest$ac_exeext conftest.$ac_ext
10343LIBS=$ac_check_lib_save_LIBS
10344fi
10345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10346$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10347if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10348 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10349else
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10351$as_echo_n "checking for dlopen in -lsvld... " >&6; }
10352if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10353 $as_echo_n "(cached) " >&6
10354else
10355 ac_check_lib_save_LIBS=$LIBS
10356LIBS="-lsvld $LIBS"
10357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10358/* end confdefs.h. */
10359
10360/* Override any GCC internal prototype to avoid an error.
10361 Use char because int might match the return type of a GCC
10362 builtin and then its argument prototype would still apply. */
10363#ifdef __cplusplus
10364extern "C"
10365#endif
10366char dlopen ();
10367int
10368main ()
10369{
10370return dlopen ();
10371 ;
10372 return 0;
10373}
10374_ACEOF
10375if ac_fn_c_try_link "$LINENO"; then :
10376 ac_cv_lib_svld_dlopen=yes
10377else
10378 ac_cv_lib_svld_dlopen=no
10379fi
10380rm -f core conftest.err conftest.$ac_objext \
10381 conftest$ac_exeext conftest.$ac_ext
10382LIBS=$ac_check_lib_save_LIBS
10383fi
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10385$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10386if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10387 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10388else
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10390$as_echo_n "checking for dld_link in -ldld... " >&6; }
10391if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10392 $as_echo_n "(cached) " >&6
10393else
10394 ac_check_lib_save_LIBS=$LIBS
10395LIBS="-ldld $LIBS"
10396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10397/* end confdefs.h. */
10398
10399/* Override any GCC internal prototype to avoid an error.
10400 Use char because int might match the return type of a GCC
10401 builtin and then its argument prototype would still apply. */
10402#ifdef __cplusplus
10403extern "C"
10404#endif
10405char dld_link ();
10406int
10407main ()
10408{
10409return dld_link ();
10410 ;
10411 return 0;
10412}
10413_ACEOF
10414if ac_fn_c_try_link "$LINENO"; then :
10415 ac_cv_lib_dld_dld_link=yes
10416else
10417 ac_cv_lib_dld_dld_link=no
10418fi
10419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
10421LIBS=$ac_check_lib_save_LIBS
10422fi
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10424$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10425if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10426 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
10427fi
10428
10429
10430fi
10431
10432
10433fi
10434
10435
10436fi
10437
10438
10439fi
10440
10441
10442fi
10443
10444 ;;
10445 esac
10446
10447 if test "x$lt_cv_dlopen" != xno; then
10448 enable_dlopen=yes
10449 else
10450 enable_dlopen=no
10451 fi
10452
10453 case $lt_cv_dlopen in
10454 dlopen)
10455 save_CPPFLAGS="$CPPFLAGS"
10456 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10457
10458 save_LDFLAGS="$LDFLAGS"
10459 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10460
10461 save_LIBS="$LIBS"
10462 LIBS="$lt_cv_dlopen_libs $LIBS"
10463
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10465$as_echo_n "checking whether a program can dlopen itself... " >&6; }
10466if test "${lt_cv_dlopen_self+set}" = set; then :
10467 $as_echo_n "(cached) " >&6
10468else
10469 if test "$cross_compiling" = yes; then :
10470 lt_cv_dlopen_self=cross
10471else
10472 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10473 lt_status=$lt_dlunknown
10474 cat > conftest.$ac_ext <<_LT_EOF
10475#line 10475 "configure"
10476#include "confdefs.h"
10477
10478#if HAVE_DLFCN_H
10479#include <dlfcn.h>
10480#endif
10481
10482#include <stdio.h>
10483
10484#ifdef RTLD_GLOBAL
10485# define LT_DLGLOBAL RTLD_GLOBAL
10486#else
10487# ifdef DL_GLOBAL
10488# define LT_DLGLOBAL DL_GLOBAL
10489# else
10490# define LT_DLGLOBAL 0
10491# endif
10492#endif
10493
10494/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10495 find out it does not work in some platform. */
10496#ifndef LT_DLLAZY_OR_NOW
10497# ifdef RTLD_LAZY
10498# define LT_DLLAZY_OR_NOW RTLD_LAZY
10499# else
10500# ifdef DL_LAZY
10501# define LT_DLLAZY_OR_NOW DL_LAZY
10502# else
10503# ifdef RTLD_NOW
10504# define LT_DLLAZY_OR_NOW RTLD_NOW
10505# else
10506# ifdef DL_NOW
10507# define LT_DLLAZY_OR_NOW DL_NOW
10508# else
10509# define LT_DLLAZY_OR_NOW 0
10510# endif
10511# endif
10512# endif
10513# endif
10514#endif
10515
10516void fnord() { int i=42;}
10517int main ()
10518{
10519 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10520 int status = $lt_dlunknown;
10521
10522 if (self)
10523 {
10524 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10525 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10526 /* dlclose (self); */
10527 }
10528 else
10529 puts (dlerror ());
10530
10531 return status;
10532}
10533_LT_EOF
10534 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10535 (eval $ac_link) 2>&5
10536 ac_status=$?
10537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10538 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10539 (./conftest; exit; ) >&5 2>/dev/null
10540 lt_status=$?
10541 case x$lt_status in
10542 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10543 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10544 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
10545 esac
10546 else :
10547 # compilation failed
10548 lt_cv_dlopen_self=no
10549 fi
10550fi
10551rm -fr conftest*
10552
10553
10554fi
10555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10556$as_echo "$lt_cv_dlopen_self" >&6; }
10557
10558 if test "x$lt_cv_dlopen_self" = xyes; then
10559 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10561$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10562if test "${lt_cv_dlopen_self_static+set}" = set; then :
10563 $as_echo_n "(cached) " >&6
10564else
10565 if test "$cross_compiling" = yes; then :
10566 lt_cv_dlopen_self_static=cross
10567else
10568 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10569 lt_status=$lt_dlunknown
10570 cat > conftest.$ac_ext <<_LT_EOF
10571#line 10571 "configure"
10572#include "confdefs.h"
10573
10574#if HAVE_DLFCN_H
10575#include <dlfcn.h>
10576#endif
10577
10578#include <stdio.h>
10579
10580#ifdef RTLD_GLOBAL
10581# define LT_DLGLOBAL RTLD_GLOBAL
10582#else
10583# ifdef DL_GLOBAL
10584# define LT_DLGLOBAL DL_GLOBAL
10585# else
10586# define LT_DLGLOBAL 0
10587# endif
10588#endif
10589
10590/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10591 find out it does not work in some platform. */
10592#ifndef LT_DLLAZY_OR_NOW
10593# ifdef RTLD_LAZY
10594# define LT_DLLAZY_OR_NOW RTLD_LAZY
10595# else
10596# ifdef DL_LAZY
10597# define LT_DLLAZY_OR_NOW DL_LAZY
10598# else
10599# ifdef RTLD_NOW
10600# define LT_DLLAZY_OR_NOW RTLD_NOW
10601# else
10602# ifdef DL_NOW
10603# define LT_DLLAZY_OR_NOW DL_NOW
10604# else
10605# define LT_DLLAZY_OR_NOW 0
10606# endif
10607# endif
10608# endif
10609# endif
10610#endif
10611
10612void fnord() { int i=42;}
10613int main ()
10614{
10615 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10616 int status = $lt_dlunknown;
10617
10618 if (self)
10619 {
10620 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10621 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10622 /* dlclose (self); */
10623 }
10624 else
10625 puts (dlerror ());
10626
10627 return status;
10628}
10629_LT_EOF
10630 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10631 (eval $ac_link) 2>&5
10632 ac_status=$?
10633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10634 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10635 (./conftest; exit; ) >&5 2>/dev/null
10636 lt_status=$?
10637 case x$lt_status in
10638 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10639 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10640 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
10641 esac
10642 else :
10643 # compilation failed
10644 lt_cv_dlopen_self_static=no
10645 fi
10646fi
10647rm -fr conftest*
10648
10649
10650fi
10651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10652$as_echo "$lt_cv_dlopen_self_static" >&6; }
10653 fi
10654
10655 CPPFLAGS="$save_CPPFLAGS"
10656 LDFLAGS="$save_LDFLAGS"
10657 LIBS="$save_LIBS"
10658 ;;
10659 esac
10660
10661 case $lt_cv_dlopen_self in
10662 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10663 *) enable_dlopen_self=unknown ;;
10664 esac
10665
10666 case $lt_cv_dlopen_self_static in
10667 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10668 *) enable_dlopen_self_static=unknown ;;
10669 esac
10670fi
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688striplib=
10689old_striplib=
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10691$as_echo_n "checking whether stripping libraries is possible... " >&6; }
10692if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
10693 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10694 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10696$as_echo "yes" >&6; }
10697else
10698# FIXME - insert some real tests, host_os isn't really good enough
10699 case $host_os in
10700 darwin*)
10701 if test -n "$STRIP" ; then
10702 striplib="$STRIP -x"
10703 old_striplib="$STRIP -S"
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
10706 else
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709 fi
10710 ;;
10711 *)
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714 ;;
10715 esac
10716fi
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729 # Report which library types will actually be built
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10731$as_echo_n "checking if libtool supports shared libraries... " >&6; }
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10733$as_echo "$can_build_shared" >&6; }
10734
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10736$as_echo_n "checking whether to build shared libraries... " >&6; }
10737 test "$can_build_shared" = "no" && enable_shared=no
10738
10739 # On AIX, shared libraries and static libraries use the same namespace, and
10740 # are all built from PIC.
10741 case $host_os in
10742 aix3*)
10743 test "$enable_shared" = yes && enable_static=no
10744 if test -n "$RANLIB"; then
10745 archive_cmds="$archive_cmds~\$RANLIB \$lib"
10746 postinstall_cmds='$RANLIB $lib'
10747 fi
10748 ;;
10749
10750 aix[4-9]*)
10751 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10752 test "$enable_shared" = yes && enable_static=no
10753 fi
10754 ;;
10755 esac
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
10757$as_echo "$enable_shared" >&6; }
10758
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
10760$as_echo_n "checking whether to build static libraries... " >&6; }
10761 # Make sure either enable_shared or enable_static is yes.
10762 test "$enable_shared" = yes || enable_static=yes
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
10764$as_echo "$enable_static" >&6; }
10765
10766
10767
10768
10769fi
10770ac_ext=c
10771ac_cpp='$CPP $CPPFLAGS'
10772ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10773ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10774ac_compiler_gnu=$ac_cv_c_compiler_gnu
10775
10776CC="$lt_save_CC"
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790 ac_config_commands="$ac_config_commands libtool"
10791
10792
10793
10794
10795# Only expand once:
10796
10797
10798
10799##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10800##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10801
10802
10803
10804cat >>confdefs.h <<_ACEOF
10805#define VMAJ 1
10806_ACEOF
10807
10808
10809cat >>confdefs.h <<_ACEOF
10810#define VMIN 2
10811_ACEOF
10812
10813
10814cat >>confdefs.h <<_ACEOF
10815#define VMIC 0
10816_ACEOF
10817
10818
10819cat >>confdefs.h <<_ACEOF
10820#define VREV 0
10821_ACEOF
10822
10823version_info="3:0:2"
10824release_info=""
10825
10826
10827##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10828##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10829VMAJ=1
10830
10831
10832### Default options with respect to host
10833
10834
10835
10836
10837requirement_embryo=""
10838embryoincludedir="${datadir}/include"
10839
10840
10841### Additional options to configure
10842
10843
10844
10845
10846have_embryo_cc="yes"
10847
10848
10849# Check whether --enable-embryo-cc was given.
10850if test "${enable_embryo_cc+set}" = set; then :
10851 enableval=$enable_embryo_cc;
10852 if test "x${enableval}" = "xyes" ; then
10853 have_embryo_cc="yes"
10854 else
10855 have_embryo_cc="no"
10856 fi
10857
10858fi
10859
10860
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build embryo_cc binary" >&5
10862$as_echo_n "checking whether to build embryo_cc binary... " >&6; }
10863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_embryo_cc" >&5
10864$as_echo "$have_embryo_cc" >&6; }
10865
10866if test "x$have_embryo_cc" = "xyes"; then
10867 EMBRYO_CC_PRG=embryo_cc${EXEEXT}
10868fi
10869
10870
10871
10872 if test "x$have_embryo_cc" = "xyes"; then
10873 BUILD_EMBRYO_CC_TRUE=
10874 BUILD_EMBRYO_CC_FALSE='#'
10875else
10876 BUILD_EMBRYO_CC_TRUE='#'
10877 BUILD_EMBRYO_CC_FALSE=
10878fi
10879
10880
10881if test "x$have_embryo_cc" = "xyes"; then :
10882
10883fi
10884
10885
10886
10887
10888### Checks for programs
10889ac_ext=c
10890ac_cpp='$CPP $CPPFLAGS'
10891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10893ac_compiler_gnu=$ac_cv_c_compiler_gnu
10894if test -n "$ac_tool_prefix"; then
10895 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
10896set dummy ${ac_tool_prefix}gcc; ac_word=$2
10897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10898$as_echo_n "checking for $ac_word... " >&6; }
10899if test "${ac_cv_prog_CC+set}" = set; then :
10900 $as_echo_n "(cached) " >&6
10901else
10902 if test -n "$CC"; then
10903 ac_cv_prog_CC="$CC" # Let the user override the test.
10904else
10905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10906for as_dir in $PATH
10907do
10908 IFS=$as_save_IFS
10909 test -z "$as_dir" && as_dir=.
10910 for ac_exec_ext in '' $ac_executable_extensions; do
10911 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10912 ac_cv_prog_CC="${ac_tool_prefix}gcc"
10913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10914 break 2
10915 fi
10916done
10917 done
10918IFS=$as_save_IFS
10919
10920fi
10921fi
10922CC=$ac_cv_prog_CC
10923if test -n "$CC"; then
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10925$as_echo "$CC" >&6; }
10926else
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10928$as_echo "no" >&6; }
10929fi
10930
10931
10932fi
10933if test -z "$ac_cv_prog_CC"; then
10934 ac_ct_CC=$CC
10935 # Extract the first word of "gcc", so it can be a program name with args.
10936set dummy gcc; ac_word=$2
10937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10938$as_echo_n "checking for $ac_word... " >&6; }
10939if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
10940 $as_echo_n "(cached) " >&6
10941else
10942 if test -n "$ac_ct_CC"; then
10943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
10944else
10945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10946for as_dir in $PATH
10947do
10948 IFS=$as_save_IFS
10949 test -z "$as_dir" && as_dir=.
10950 for ac_exec_ext in '' $ac_executable_extensions; do
10951 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10952 ac_cv_prog_ac_ct_CC="gcc"
10953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10954 break 2
10955 fi
10956done
10957 done
10958IFS=$as_save_IFS
10959
10960fi
10961fi
10962ac_ct_CC=$ac_cv_prog_ac_ct_CC
10963if test -n "$ac_ct_CC"; then
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
10965$as_echo "$ac_ct_CC" >&6; }
10966else
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968$as_echo "no" >&6; }
10969fi
10970
10971 if test "x$ac_ct_CC" = x; then
10972 CC=""
10973 else
10974 case $cross_compiling:$ac_tool_warned in
10975yes:)
10976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10978ac_tool_warned=yes ;;
10979esac
10980 CC=$ac_ct_CC
10981 fi
10982else
10983 CC="$ac_cv_prog_CC"
10984fi
10985
10986if test -z "$CC"; then
10987 if test -n "$ac_tool_prefix"; then
10988 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
10989set dummy ${ac_tool_prefix}cc; ac_word=$2
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991$as_echo_n "checking for $ac_word... " >&6; }
10992if test "${ac_cv_prog_CC+set}" = set; then :
10993 $as_echo_n "(cached) " >&6
10994else
10995 if test -n "$CC"; then
10996 ac_cv_prog_CC="$CC" # Let the user override the test.
10997else
10998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10999for as_dir in $PATH
11000do
11001 IFS=$as_save_IFS
11002 test -z "$as_dir" && as_dir=.
11003 for ac_exec_ext in '' $ac_executable_extensions; do
11004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11005 ac_cv_prog_CC="${ac_tool_prefix}cc"
11006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11007 break 2
11008 fi
11009done
11010 done
11011IFS=$as_save_IFS
11012
11013fi
11014fi
11015CC=$ac_cv_prog_CC
11016if test -n "$CC"; then
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11018$as_echo "$CC" >&6; }
11019else
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
11022fi
11023
11024
11025 fi
11026fi
11027if test -z "$CC"; then
11028 # Extract the first word of "cc", so it can be a program name with args.
11029set dummy cc; ac_word=$2
11030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11031$as_echo_n "checking for $ac_word... " >&6; }
11032if test "${ac_cv_prog_CC+set}" = set; then :
11033 $as_echo_n "(cached) " >&6
11034else
11035 if test -n "$CC"; then
11036 ac_cv_prog_CC="$CC" # Let the user override the test.
11037else
11038 ac_prog_rejected=no
11039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042 IFS=$as_save_IFS
11043 test -z "$as_dir" && as_dir=.
11044 for ac_exec_ext in '' $ac_executable_extensions; do
11045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11046 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
11047 ac_prog_rejected=yes
11048 continue
11049 fi
11050 ac_cv_prog_CC="cc"
11051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11052 break 2
11053 fi
11054done
11055 done
11056IFS=$as_save_IFS
11057
11058if test $ac_prog_rejected = yes; then
11059 # We found a bogon in the path, so make sure we never use it.
11060 set dummy $ac_cv_prog_CC
11061 shift
11062 if test $# != 0; then
11063 # We chose a different compiler from the bogus one.
11064 # However, it has the same basename, so the bogon will be chosen
11065 # first if we set CC to just the basename; use the full file name.
11066 shift
11067 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
11068 fi
11069fi
11070fi
11071fi
11072CC=$ac_cv_prog_CC
11073if test -n "$CC"; then
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11075$as_echo "$CC" >&6; }
11076else
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11078$as_echo "no" >&6; }
11079fi
11080
11081
11082fi
11083if test -z "$CC"; then
11084 if test -n "$ac_tool_prefix"; then
11085 for ac_prog in cl.exe
11086 do
11087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11090$as_echo_n "checking for $ac_word... " >&6; }
11091if test "${ac_cv_prog_CC+set}" = set; then :
11092 $as_echo_n "(cached) " >&6
11093else
11094 if test -n "$CC"; then
11095 ac_cv_prog_CC="$CC" # Let the user override the test.
11096else
11097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100 IFS=$as_save_IFS
11101 test -z "$as_dir" && as_dir=.
11102 for ac_exec_ext in '' $ac_executable_extensions; do
11103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11104 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
11105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11106 break 2
11107 fi
11108done
11109 done
11110IFS=$as_save_IFS
11111
11112fi
11113fi
11114CC=$ac_cv_prog_CC
11115if test -n "$CC"; then
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11117$as_echo "$CC" >&6; }
11118else
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120$as_echo "no" >&6; }
11121fi
11122
11123
11124 test -n "$CC" && break
11125 done
11126fi
11127if test -z "$CC"; then
11128 ac_ct_CC=$CC
11129 for ac_prog in cl.exe
11130do
11131 # Extract the first word of "$ac_prog", so it can be a program name with args.
11132set dummy $ac_prog; ac_word=$2
11133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11134$as_echo_n "checking for $ac_word... " >&6; }
11135if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
11136 $as_echo_n "(cached) " >&6
11137else
11138 if test -n "$ac_ct_CC"; then
11139 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11140else
11141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142for as_dir in $PATH
11143do
11144 IFS=$as_save_IFS
11145 test -z "$as_dir" && as_dir=.
11146 for ac_exec_ext in '' $ac_executable_extensions; do
11147 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11148 ac_cv_prog_ac_ct_CC="$ac_prog"
11149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150 break 2
11151 fi
11152done
11153 done
11154IFS=$as_save_IFS
11155
11156fi
11157fi
11158ac_ct_CC=$ac_cv_prog_ac_ct_CC
11159if test -n "$ac_ct_CC"; then
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11161$as_echo "$ac_ct_CC" >&6; }
11162else
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11164$as_echo "no" >&6; }
11165fi
11166
11167
11168 test -n "$ac_ct_CC" && break
11169done
11170
11171 if test "x$ac_ct_CC" = x; then
11172 CC=""
11173 else
11174 case $cross_compiling:$ac_tool_warned in
11175yes:)
11176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11178ac_tool_warned=yes ;;
11179esac
11180 CC=$ac_ct_CC
11181 fi
11182fi
11183
11184fi
11185
11186
11187test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11189as_fn_error $? "no acceptable C compiler found in \$PATH
11190See \`config.log' for more details" "$LINENO" 5 ; }
11191
11192# Provide some information about the compiler.
11193$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
11194set X $ac_compile
11195ac_compiler=$2
11196for ac_option in --version -v -V -qversion; do
11197 { { ac_try="$ac_compiler $ac_option >&5"
11198case "(($ac_try" in
11199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11200 *) ac_try_echo=$ac_try;;
11201esac
11202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11203$as_echo "$ac_try_echo"; } >&5
11204 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
11205 ac_status=$?
11206 if test -s conftest.err; then
11207 sed '10a\
11208... rest of stderr output deleted ...
11209 10q' conftest.err >conftest.er1
11210 cat conftest.er1 >&5
11211 fi
11212 rm -f conftest.er1 conftest.err
11213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11214 test $ac_status = 0; }
11215done
11216
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
11218$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
11219if test "${ac_cv_c_compiler_gnu+set}" = set; then :
11220 $as_echo_n "(cached) " >&6
11221else
11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11223/* end confdefs.h. */
11224
11225int
11226main ()
11227{
11228#ifndef __GNUC__
11229 choke me
11230#endif
11231
11232 ;
11233 return 0;
11234}
11235_ACEOF
11236if ac_fn_c_try_compile "$LINENO"; then :
11237 ac_compiler_gnu=yes
11238else
11239 ac_compiler_gnu=no
11240fi
11241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11242ac_cv_c_compiler_gnu=$ac_compiler_gnu
11243
11244fi
11245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
11246$as_echo "$ac_cv_c_compiler_gnu" >&6; }
11247if test $ac_compiler_gnu = yes; then
11248 GCC=yes
11249else
11250 GCC=
11251fi
11252ac_test_CFLAGS=${CFLAGS+set}
11253ac_save_CFLAGS=$CFLAGS
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
11255$as_echo_n "checking whether $CC accepts -g... " >&6; }
11256if test "${ac_cv_prog_cc_g+set}" = set; then :
11257 $as_echo_n "(cached) " >&6
11258else
11259 ac_save_c_werror_flag=$ac_c_werror_flag
11260 ac_c_werror_flag=yes
11261 ac_cv_prog_cc_g=no
11262 CFLAGS="-g"
11263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h. */
11265
11266int
11267main ()
11268{
11269
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274if ac_fn_c_try_compile "$LINENO"; then :
11275 ac_cv_prog_cc_g=yes
11276else
11277 CFLAGS=""
11278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11279/* end confdefs.h. */
11280
11281int
11282main ()
11283{
11284
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289if ac_fn_c_try_compile "$LINENO"; then :
11290
11291else
11292 ac_c_werror_flag=$ac_save_c_werror_flag
11293 CFLAGS="-g"
11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295/* end confdefs.h. */
11296
11297int
11298main ()
11299{
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305if ac_fn_c_try_compile "$LINENO"; then :
11306 ac_cv_prog_cc_g=yes
11307fi
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11309fi
11310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11311fi
11312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11313 ac_c_werror_flag=$ac_save_c_werror_flag
11314fi
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
11316$as_echo "$ac_cv_prog_cc_g" >&6; }
11317if test "$ac_test_CFLAGS" = set; then
11318 CFLAGS=$ac_save_CFLAGS
11319elif test $ac_cv_prog_cc_g = yes; then
11320 if test "$GCC" = yes; then
11321 CFLAGS="-g -O2"
11322 else
11323 CFLAGS="-g"
11324 fi
11325else
11326 if test "$GCC" = yes; then
11327 CFLAGS="-O2"
11328 else
11329 CFLAGS=
11330 fi
11331fi
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
11333$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
11334if test "${ac_cv_prog_cc_c89+set}" = set; then :
11335 $as_echo_n "(cached) " >&6
11336else
11337 ac_cv_prog_cc_c89=no
11338ac_save_CC=$CC
11339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h. */
11341#include <stdarg.h>
11342#include <stdio.h>
11343#include <sys/types.h>
11344#include <sys/stat.h>
11345/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
11346struct buf { int x; };
11347FILE * (*rcsopen) (struct buf *, struct stat *, int);
11348static char *e (p, i)
11349 char **p;
11350 int i;
11351{
11352 return p[i];
11353}
11354static char *f (char * (*g) (char **, int), char **p, ...)
11355{
11356 char *s;
11357 va_list v;
11358 va_start (v,p);
11359 s = g (p, va_arg (v,int));
11360 va_end (v);
11361 return s;
11362}
11363
11364/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
11365 function prototypes and stuff, but not '\xHH' hex character constants.
11366 These don't provoke an error unfortunately, instead are silently treated
11367 as 'x'. The following induces an error, until -std is added to get
11368 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
11369 array size at least. It's necessary to write '\x00'==0 to get something
11370 that's true only with -std. */
11371int osf4_cc_array ['\x00' == 0 ? 1 : -1];
11372
11373/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
11374 inside strings and character constants. */
11375#define FOO(x) 'x'
11376int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
11377
11378int test (int i, double x);
11379struct s1 {int (*f) (int a);};
11380struct s2 {int (*f) (double a);};
11381int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11382int argc;
11383char **argv;
11384int
11385main ()
11386{
11387return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
11388 ;
11389 return 0;
11390}
11391_ACEOF
11392for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
11393 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11394do
11395 CC="$ac_save_CC $ac_arg"
11396 if ac_fn_c_try_compile "$LINENO"; then :
11397 ac_cv_prog_cc_c89=$ac_arg
11398fi
11399rm -f core conftest.err conftest.$ac_objext
11400 test "x$ac_cv_prog_cc_c89" != "xno" && break
11401done
11402rm -f conftest.$ac_ext
11403CC=$ac_save_CC
11404
11405fi
11406# AC_CACHE_VAL
11407case "x$ac_cv_prog_cc_c89" in
11408 x)
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
11410$as_echo "none needed" >&6; } ;;
11411 xno)
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
11413$as_echo "unsupported" >&6; } ;;
11414 *)
11415 CC="$CC $ac_cv_prog_cc_c89"
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
11417$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
11418esac
11419if test "x$ac_cv_prog_cc_c89" != xno; then :
11420
11421fi
11422
11423ac_ext=c
11424ac_cpp='$CPP $CPPFLAGS'
11425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11427ac_compiler_gnu=$ac_cv_c_compiler_gnu
11428
11429depcc="$CC" am_compiler_list=
11430
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11432$as_echo_n "checking dependency style of $depcc... " >&6; }
11433if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
11434 $as_echo_n "(cached) " >&6
11435else
11436 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11437 # We make a subdir and do the tests there. Otherwise we can end up
11438 # making bogus files that we don't know about and never remove. For
11439 # instance it was reported that on HP-UX the gcc test will end up
11440 # making a dummy file named `D' -- because `-MD' means `put the output
11441 # in D'.
11442 mkdir conftest.dir
11443 # Copy depcomp to subdir because otherwise we won't find it if we're
11444 # using a relative directory.
11445 cp "$am_depcomp" conftest.dir
11446 cd conftest.dir
11447 # We will build objects and dependencies in a subdirectory because
11448 # it helps to detect inapplicable dependency modes. For instance
11449 # both Tru64's cc and ICC support -MD to output dependencies as a
11450 # side effect of compilation, but ICC will put the dependencies in
11451 # the current directory while Tru64 will put them in the object
11452 # directory.
11453 mkdir sub
11454
11455 am_cv_CC_dependencies_compiler_type=none
11456 if test "$am_compiler_list" = ""; then
11457 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11458 fi
11459 am__universal=false
11460 case " $depcc " in #(
11461 *\ -arch\ *\ -arch\ *) am__universal=true ;;
11462 esac
11463
11464 for depmode in $am_compiler_list; do
11465 # Setup a source with many dependencies, because some compilers
11466 # like to wrap large dependency lists on column 80 (with \), and
11467 # we should not choose a depcomp mode which is confused by this.
11468 #
11469 # We need to recreate these files for each test, as the compiler may
11470 # overwrite some of them when testing with obscure command lines.
11471 # This happens at least with the AIX C compiler.
11472 : > sub/conftest.c
11473 for i in 1 2 3 4 5 6; do
11474 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11475 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
11476 # Solaris 8's {/usr,}/bin/sh.
11477 touch sub/conftst$i.h
11478 done
11479 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11480
11481 # We check with `-c' and `-o' for the sake of the "dashmstdout"
11482 # mode. It turns out that the SunPro C++ compiler does not properly
11483 # handle `-M -o', and we need to detect this. Also, some Intel
11484 # versions had trouble with output in subdirs
11485 am__obj=sub/conftest.${OBJEXT-o}
11486 am__minus_obj="-o $am__obj"
11487 case $depmode in
11488 gcc)
11489 # This depmode causes a compiler race in universal mode.
11490 test "$am__universal" = false || continue
11491 ;;
11492 nosideeffect)
11493 # after this tag, mechanisms are not by side-effect, so they'll
11494 # only be used when explicitly requested
11495 if test "x$enable_dependency_tracking" = xyes; then
11496 continue
11497 else
11498 break
11499 fi
11500 ;;
11501 msvisualcpp | msvcmsys)
11502 # This compiler won't grok `-c -o', but also, the minuso test has
11503 # not run yet. These depmodes are late enough in the game, and
11504 # so weak that their functioning should not be impacted.
11505 am__obj=conftest.${OBJEXT-o}
11506 am__minus_obj=
11507 ;;
11508 none) break ;;
11509 esac
11510 if depmode=$depmode \
11511 source=sub/conftest.c object=$am__obj \
11512 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11513 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11514 >/dev/null 2>conftest.err &&
11515 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11516 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11517 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11518 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11519 # icc doesn't choke on unknown options, it will just issue warnings
11520 # or remarks (even with -Werror). So we grep stderr for any message
11521 # that says an option was ignored or not supported.
11522 # When given -MP, icc 7.0 and 7.1 complain thusly:
11523 # icc: Command line warning: ignoring option '-M'; no argument required
11524 # The diagnosis changed in icc 8.0:
11525 # icc: Command line remark: option '-MP' not supported
11526 if (grep 'ignoring option' conftest.err ||
11527 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11528 am_cv_CC_dependencies_compiler_type=$depmode
11529 break
11530 fi
11531 fi
11532 done
11533
11534 cd ..
11535 rm -rf conftest.dir
11536else
11537 am_cv_CC_dependencies_compiler_type=none
11538fi
11539
11540fi
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
11542$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
11543CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
11544
11545 if
11546 test "x$enable_dependency_tracking" != xno \
11547 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
11548 am__fastdepCC_TRUE=
11549 am__fastdepCC_FALSE='#'
11550else
11551 am__fastdepCC_TRUE='#'
11552 am__fastdepCC_FALSE=
11553fi
11554
11555
11556
11557# doxygen program for documentation building
11558
11559
11560
11561# Check whether --enable-doc was given.
11562if test "${enable_doc+set}" = set; then :
11563 enableval=$enable_doc;
11564 if test "x${enableval}" = "xyes" ; then
11565 efl_enable_doc="yes"
11566 else
11567 efl_enable_doc="no"
11568 fi
11569
11570else
11571 efl_enable_doc="yes"
11572fi
11573
11574
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
11576$as_echo_n "checking whether to build documentation... " >&6; }
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${efl_enable_doc}" >&5
11578$as_echo "${efl_enable_doc}" >&6; }
11579
11580if test "x${efl_enable_doc}" = "xyes" ; then
11581
11582
11583 efl_doxygen="doxygen"
11584
11585
11586# Check whether --with-doxygen was given.
11587if test "${with_doxygen+set}" = set; then :
11588 withval=$with_doxygen;
11589 efl_doxygen=${withval}
11590 # Extract the first word of "${efl_doxygen}", so it can be a program name with args.
11591set dummy ${efl_doxygen}; ac_word=$2
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11593$as_echo_n "checking for $ac_word... " >&6; }
11594if test "${ac_cv_prog_efl_have_doxygen+set}" = set; then :
11595 $as_echo_n "(cached) " >&6
11596else
11597 if test -n "$efl_have_doxygen"; then
11598 ac_cv_prog_efl_have_doxygen="$efl_have_doxygen" # Let the user override the test.
11599else
11600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11601for as_dir in $PATH
11602do
11603 IFS=$as_save_IFS
11604 test -z "$as_dir" && as_dir=.
11605 for ac_exec_ext in '' $ac_executable_extensions; do
11606 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11607 ac_cv_prog_efl_have_doxygen="yes"
11608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11609 break 2
11610 fi
11611done
11612 done
11613IFS=$as_save_IFS
11614
11615 test -z "$ac_cv_prog_efl_have_doxygen" && ac_cv_prog_efl_have_doxygen="no"
11616fi
11617fi
11618efl_have_doxygen=$ac_cv_prog_efl_have_doxygen
11619if test -n "$efl_have_doxygen"; then
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $efl_have_doxygen" >&5
11621$as_echo "$efl_have_doxygen" >&6; }
11622else
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
11625fi
11626
11627
11628 if test "x${efl_have_doxygen}" = "xno" ; then
11629 echo "WARNING:"
11630 echo "The doxygen program you specified:"
11631 echo "${efl_doxygen}"
11632 echo "was not found. Please check the path and make sure "
11633 echo "the program exists and is executable."
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no doxygen detected. Documentation will not be built" >&5
11635$as_echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
11636 fi
11637
11638else
11639 # Extract the first word of "${efl_doxygen}", so it can be a program name with args.
11640set dummy ${efl_doxygen}; ac_word=$2
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11642$as_echo_n "checking for $ac_word... " >&6; }
11643if test "${ac_cv_prog_efl_have_doxygen+set}" = set; then :
11644 $as_echo_n "(cached) " >&6
11645else
11646 if test -n "$efl_have_doxygen"; then
11647 ac_cv_prog_efl_have_doxygen="$efl_have_doxygen" # Let the user override the test.
11648else
11649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11650for as_dir in $PATH
11651do
11652 IFS=$as_save_IFS
11653 test -z "$as_dir" && as_dir=.
11654 for ac_exec_ext in '' $ac_executable_extensions; do
11655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11656 ac_cv_prog_efl_have_doxygen="yes"
11657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11658 break 2
11659 fi
11660done
11661 done
11662IFS=$as_save_IFS
11663
11664 test -z "$ac_cv_prog_efl_have_doxygen" && ac_cv_prog_efl_have_doxygen="no"
11665fi
11666fi
11667efl_have_doxygen=$ac_cv_prog_efl_have_doxygen
11668if test -n "$efl_have_doxygen"; then
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $efl_have_doxygen" >&5
11670$as_echo "$efl_have_doxygen" >&6; }
11671else
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673$as_echo "no" >&6; }
11674fi
11675
11676
11677 if test "x${efl_have_doxygen}" = "xno" ; then
11678 echo "WARNING:"
11679 echo "The doxygen program was not found in your execute path."
11680 echo "You may have doxygen installed somewhere not covered by your path."
11681 echo ""
11682 echo "If this is the case make sure you have the packages installed, AND"
11683 echo "that the doxygen program is in your execute path (see your"
11684 echo "shell manual page on setting the \$PATH environment variable), OR"
11685 echo "alternatively, specify the program to use with --with-doxygen."
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no doxygen detected. Documentation will not be built" >&5
11687$as_echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
11688 fi
11689
11690fi
11691
11692fi
11693
11694
11695
11696if ! test "x${efl_have_doxygen}" = "xyes" ; then
11697 efl_enable_doc="no"
11698fi
11699
11700 if test "x${efl_enable_doc}" = "xyes"; then
11701 EFL_BUILD_DOC_TRUE=
11702 EFL_BUILD_DOC_FALSE='#'
11703else
11704 EFL_BUILD_DOC_TRUE='#'
11705 EFL_BUILD_DOC_FALSE=
11706fi
11707
11708
11709if test "x${efl_enable_doc}" = "xyes" ; then
11710 build_doc="yes"
11711else
11712 build_doc="no"
11713fi
11714
11715
11716
11717# pkg-config
11718
11719
11720
11721
11722
11723
11724
11725if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11726 if test -n "$ac_tool_prefix"; then
11727 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11728set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11730$as_echo_n "checking for $ac_word... " >&6; }
11731if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11732 $as_echo_n "(cached) " >&6
11733else
11734 case $PKG_CONFIG in
11735 [\\/]* | ?:[\\/]*)
11736 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11737 ;;
11738 *)
11739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11740for as_dir in $PATH
11741do
11742 IFS=$as_save_IFS
11743 test -z "$as_dir" && as_dir=.
11744 for ac_exec_ext in '' $ac_executable_extensions; do
11745 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11746 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11748 break 2
11749 fi
11750done
11751 done
11752IFS=$as_save_IFS
11753
11754 ;;
11755esac
11756fi
11757PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11758if test -n "$PKG_CONFIG"; then
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11760$as_echo "$PKG_CONFIG" >&6; }
11761else
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
11764fi
11765
11766
11767fi
11768if test -z "$ac_cv_path_PKG_CONFIG"; then
11769 ac_pt_PKG_CONFIG=$PKG_CONFIG
11770 # Extract the first word of "pkg-config", so it can be a program name with args.
11771set dummy pkg-config; ac_word=$2
11772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11773$as_echo_n "checking for $ac_word... " >&6; }
11774if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
11775 $as_echo_n "(cached) " >&6
11776else
11777 case $ac_pt_PKG_CONFIG in
11778 [\\/]* | ?:[\\/]*)
11779 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11780 ;;
11781 *)
11782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11783for as_dir in $PATH
11784do
11785 IFS=$as_save_IFS
11786 test -z "$as_dir" && as_dir=.
11787 for ac_exec_ext in '' $ac_executable_extensions; do
11788 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11789 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11791 break 2
11792 fi
11793done
11794 done
11795IFS=$as_save_IFS
11796
11797 ;;
11798esac
11799fi
11800ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11801if test -n "$ac_pt_PKG_CONFIG"; then
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11803$as_echo "$ac_pt_PKG_CONFIG" >&6; }
11804else
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807fi
11808
11809 if test "x$ac_pt_PKG_CONFIG" = x; then
11810 PKG_CONFIG=""
11811 else
11812 case $cross_compiling:$ac_tool_warned in
11813yes:)
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11815$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11816ac_tool_warned=yes ;;
11817esac
11818 PKG_CONFIG=$ac_pt_PKG_CONFIG
11819 fi
11820else
11821 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11822fi
11823
11824fi
11825if test -n "$PKG_CONFIG"; then
11826 _pkg_min_version=0.9.0
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11828$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
11829 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11831$as_echo "yes" >&6; }
11832 else
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11834$as_echo "no" >&6; }
11835 PKG_CONFIG=""
11836 fi
11837fi
11838
11839# Check whether pkg-config supports Requires.private
11840if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
11841 pkgconfig_requires_private="Requires.private"
11842else
11843 pkgconfig_requires_private="Requires"
11844fi
11845
11846
11847
11848### Checks for libraries
11849
11850# Evil library for compilation on Windows
11851
11852EFL_EMBRYO_BUILD=""
11853case "$host_os" in
11854 mingw*)
11855
11856pkg_failed=no
11857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5
11858$as_echo_n "checking for EVIL... " >&6; }
11859
11860if test -n "$EVIL_CFLAGS"; then
11861 pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS"
11862 elif test -n "$PKG_CONFIG"; then
11863 if test -n "$PKG_CONFIG" && \
11864 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
11865 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
11866 ac_status=$?
11867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11868 test $ac_status = 0; }; then
11869 pkg_cv_EVIL_CFLAGS=`$PKG_CONFIG --cflags "evil >= 1.0.0" 2>/dev/null`
11870else
11871 pkg_failed=yes
11872fi
11873 else
11874 pkg_failed=untried
11875fi
11876if test -n "$EVIL_LIBS"; then
11877 pkg_cv_EVIL_LIBS="$EVIL_LIBS"
11878 elif test -n "$PKG_CONFIG"; then
11879 if test -n "$PKG_CONFIG" && \
11880 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
11881 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
11882 ac_status=$?
11883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11884 test $ac_status = 0; }; then
11885 pkg_cv_EVIL_LIBS=`$PKG_CONFIG --libs "evil >= 1.0.0" 2>/dev/null`
11886else
11887 pkg_failed=yes
11888fi
11889 else
11890 pkg_failed=untried
11891fi
11892
11893
11894
11895if test $pkg_failed = yes; then
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11897$as_echo "no" >&6; }
11898
11899if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11900 _pkg_short_errors_supported=yes
11901else
11902 _pkg_short_errors_supported=no
11903fi
11904 if test $_pkg_short_errors_supported = yes; then
11905 EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1`
11906 else
11907 EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1`
11908 fi
11909 # Put the nasty error message in config.log where it belongs
11910 echo "$EVIL_PKG_ERRORS" >&5
11911
11912 as_fn_error $? "Package requirements (evil >= 1.0.0) were not met:
11913
11914$EVIL_PKG_ERRORS
11915
11916Consider adjusting the PKG_CONFIG_PATH environment variable if you
11917installed software in a non-standard prefix.
11918
11919Alternatively, you may set the environment variables EVIL_CFLAGS
11920and EVIL_LIBS to avoid the need to call pkg-config.
11921See the pkg-config man page for more details." "$LINENO" 5
11922elif test $pkg_failed = untried; then
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11924$as_echo "no" >&6; }
11925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11927as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
11928is in your PATH or set the PKG_CONFIG environment variable to the full
11929path to pkg-config.
11930
11931Alternatively, you may set the environment variables EVIL_CFLAGS
11932and EVIL_LIBS to avoid the need to call pkg-config.
11933See the pkg-config man page for more details.
11934
11935To get pkg-config, see <http://pkg-config.freedesktop.org/>.
11936See \`config.log' for more details" "$LINENO" 5 ; }
11937else
11938 EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS
11939 EVIL_LIBS=$pkg_cv_EVIL_LIBS
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11941$as_echo "yes" >&6; }
11942
11943fi
11944
11945$as_echo "#define HAVE_EVIL 1" >>confdefs.h
11946
11947 requirement_embryo="evil ${requirement_embryo}"
11948 EFL_EMBRYO_BUILD="-DEFL_EMBRYO_BUILD"
11949 ;;
11950esac
11951
11952
11953# For embryo_cc_prefix.c
11954
11955pkg_failed=no
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5
11957$as_echo_n "checking for EINA... " >&6; }
11958
11959if test -n "$EINA_CFLAGS"; then
11960 pkg_cv_EINA_CFLAGS="$EINA_CFLAGS"
11961 elif test -n "$PKG_CONFIG"; then
11962 if test -n "$PKG_CONFIG" && \
11963 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.2.0\""; } >&5
11964 ($PKG_CONFIG --exists --print-errors "eina >= 1.2.0") 2>&5
11965 ac_status=$?
11966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11967 test $ac_status = 0; }; then
11968 pkg_cv_EINA_CFLAGS=`$PKG_CONFIG --cflags "eina >= 1.2.0" 2>/dev/null`
11969else
11970 pkg_failed=yes
11971fi
11972 else
11973 pkg_failed=untried
11974fi
11975if test -n "$EINA_LIBS"; then
11976 pkg_cv_EINA_LIBS="$EINA_LIBS"
11977 elif test -n "$PKG_CONFIG"; then
11978 if test -n "$PKG_CONFIG" && \
11979 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.2.0\""; } >&5
11980 ($PKG_CONFIG --exists --print-errors "eina >= 1.2.0") 2>&5
11981 ac_status=$?
11982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11983 test $ac_status = 0; }; then
11984 pkg_cv_EINA_LIBS=`$PKG_CONFIG --libs "eina >= 1.2.0" 2>/dev/null`
11985else
11986 pkg_failed=yes
11987fi
11988 else
11989 pkg_failed=untried
11990fi
11991
11992
11993
11994if test $pkg_failed = yes; then
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
11997
11998if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11999 _pkg_short_errors_supported=yes
12000else
12001 _pkg_short_errors_supported=no
12002fi
12003 if test $_pkg_short_errors_supported = yes; then
12004 EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.2.0" 2>&1`
12005 else
12006 EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.2.0" 2>&1`
12007 fi
12008 # Put the nasty error message in config.log where it belongs
12009 echo "$EINA_PKG_ERRORS" >&5
12010
12011 as_fn_error $? "Package requirements (eina >= 1.2.0) were not met:
12012
12013$EINA_PKG_ERRORS
12014
12015Consider adjusting the PKG_CONFIG_PATH environment variable if you
12016installed software in a non-standard prefix.
12017
12018Alternatively, you may set the environment variables EINA_CFLAGS
12019and EINA_LIBS to avoid the need to call pkg-config.
12020See the pkg-config man page for more details." "$LINENO" 5
12021elif test $pkg_failed = untried; then
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12023$as_echo "no" >&6; }
12024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12026as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12027is in your PATH or set the PKG_CONFIG environment variable to the full
12028path to pkg-config.
12029
12030Alternatively, you may set the environment variables EINA_CFLAGS
12031and EINA_LIBS to avoid the need to call pkg-config.
12032See the pkg-config man page for more details.
12033
12034To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12035See \`config.log' for more details" "$LINENO" 5 ; }
12036else
12037 EINA_CFLAGS=$pkg_cv_EINA_CFLAGS
12038 EINA_LIBS=$pkg_cv_EINA_LIBS
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12040$as_echo "yes" >&6; }
12041
12042fi
12043
12044### Checks for portability layer
12045
12046
12047pkg_failed=no
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXOTIC" >&5
12049$as_echo_n "checking for EXOTIC... " >&6; }
12050
12051if test -n "$EXOTIC_CFLAGS"; then
12052 pkg_cv_EXOTIC_CFLAGS="$EXOTIC_CFLAGS"
12053 elif test -n "$PKG_CONFIG"; then
12054 if test -n "$PKG_CONFIG" && \
12055 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"exotic\""; } >&5
12056 ($PKG_CONFIG --exists --print-errors "exotic") 2>&5
12057 ac_status=$?
12058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12059 test $ac_status = 0; }; then
12060 pkg_cv_EXOTIC_CFLAGS=`$PKG_CONFIG --cflags "exotic" 2>/dev/null`
12061else
12062 pkg_failed=yes
12063fi
12064 else
12065 pkg_failed=untried
12066fi
12067if test -n "$EXOTIC_LIBS"; then
12068 pkg_cv_EXOTIC_LIBS="$EXOTIC_LIBS"
12069 elif test -n "$PKG_CONFIG"; then
12070 if test -n "$PKG_CONFIG" && \
12071 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"exotic\""; } >&5
12072 ($PKG_CONFIG --exists --print-errors "exotic") 2>&5
12073 ac_status=$?
12074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12075 test $ac_status = 0; }; then
12076 pkg_cv_EXOTIC_LIBS=`$PKG_CONFIG --libs "exotic" 2>/dev/null`
12077else
12078 pkg_failed=yes
12079fi
12080 else
12081 pkg_failed=untried
12082fi
12083
12084
12085
12086if test $pkg_failed = yes; then
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12088$as_echo "no" >&6; }
12089
12090if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12091 _pkg_short_errors_supported=yes
12092else
12093 _pkg_short_errors_supported=no
12094fi
12095 if test $_pkg_short_errors_supported = yes; then
12096 EXOTIC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "exotic" 2>&1`
12097 else
12098 EXOTIC_PKG_ERRORS=`$PKG_CONFIG --print-errors "exotic" 2>&1`
12099 fi
12100 # Put the nasty error message in config.log where it belongs
12101 echo "$EXOTIC_PKG_ERRORS" >&5
12102
12103 enable_exotic="no"
12104elif test $pkg_failed = untried; then
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12106$as_echo "no" >&6; }
12107 enable_exotic="no"
12108else
12109 EXOTIC_CFLAGS=$pkg_cv_EXOTIC_CFLAGS
12110 EXOTIC_LIBS=$pkg_cv_EXOTIC_LIBS
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12112$as_echo "yes" >&6; }
12113 enable_exotic="yes"
12114fi
12115
12116if test "x${enable_exotic}" = "xyes"; then
12117 requirement_embryo="exotic ${requirement_embryo}"
12118
12119
12120$as_echo "#define HAVE_EXOTIC 1" >>confdefs.h
12121
12122fi
12123
12124### Checks for header files
12125
12126for ac_header in unistd.h
12127do :
12128 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
12129if test "x$ac_cv_header_unistd_h" = x""yes; then :
12130 cat >>confdefs.h <<_ACEOF
12131#define HAVE_UNISTD_H 1
12132_ACEOF
12133
12134fi
12135
12136done
12137
12138
12139
12140default_max="4096"
12141ac_ext=c
12142ac_cpp='$CPP $CPPFLAGS'
12143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12145ac_compiler_gnu=$ac_cv_c_compiler_gnu
12146
12147
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5
12149$as_echo_n "checking for PATH_MAX in limits.h... " >&6; }
12150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151/* end confdefs.h. */
12152
12153#include <limits.h>
12154
12155int
12156main ()
12157{
12158
12159int i = PATH_MAX;
12160
12161 ;
12162 return 0;
12163}
12164_ACEOF
12165if ac_fn_c_try_compile "$LINENO"; then :
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12167$as_echo "yes" >&6; }
12168else
12169
12170
12171cat >>confdefs.h <<_ACEOF
12172#define PATH_MAX ${default_max}
12173_ACEOF
12174
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5
12176$as_echo "no: using ${default_max}" >&6; }
12177
12178fi
12179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12180
12181ac_ext=c
12182ac_cpp='$CPP $CPPFLAGS'
12183ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12184ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12185ac_compiler_gnu=$ac_cv_c_compiler_gnu
12186
12187
12188
12189
12190
12191### Checks for types
12192
12193
12194### Checks for structures
12195
12196
12197### Checks for compiler characteristics
12198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12199$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12200if test "${ac_cv_c_bigendian+set}" = set; then :
12201 $as_echo_n "(cached) " >&6
12202else
12203 ac_cv_c_bigendian=unknown
12204 # See if we're dealing with a universal compiler.
12205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12206/* end confdefs.h. */
12207#ifndef __APPLE_CC__
12208 not a universal capable compiler
12209 #endif
12210 typedef int dummy;
12211
12212_ACEOF
12213if ac_fn_c_try_compile "$LINENO"; then :
12214
12215 # Check for potential -arch flags. It is not universal unless
12216 # there are at least two -arch flags with different values.
12217 ac_arch=
12218 ac_prev=
12219 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12220 if test -n "$ac_prev"; then
12221 case $ac_word in
12222 i?86 | x86_64 | ppc | ppc64)
12223 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12224 ac_arch=$ac_word
12225 else
12226 ac_cv_c_bigendian=universal
12227 break
12228 fi
12229 ;;
12230 esac
12231 ac_prev=
12232 elif test "x$ac_word" = "x-arch"; then
12233 ac_prev=arch
12234 fi
12235 done
12236fi
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12238 if test $ac_cv_c_bigendian = unknown; then
12239 # See if sys/param.h defines the BYTE_ORDER macro.
12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241/* end confdefs.h. */
12242#include <sys/types.h>
12243 #include <sys/param.h>
12244
12245int
12246main ()
12247{
12248#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12249 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12250 && LITTLE_ENDIAN)
12251 bogus endian macros
12252 #endif
12253
12254 ;
12255 return 0;
12256}
12257_ACEOF
12258if ac_fn_c_try_compile "$LINENO"; then :
12259 # It does; now see whether it defined to BIG_ENDIAN or not.
12260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12261/* end confdefs.h. */
12262#include <sys/types.h>
12263 #include <sys/param.h>
12264
12265int
12266main ()
12267{
12268#if BYTE_ORDER != BIG_ENDIAN
12269 not big endian
12270 #endif
12271
12272 ;
12273 return 0;
12274}
12275_ACEOF
12276if ac_fn_c_try_compile "$LINENO"; then :
12277 ac_cv_c_bigendian=yes
12278else
12279 ac_cv_c_bigendian=no
12280fi
12281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12282fi
12283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12284 fi
12285 if test $ac_cv_c_bigendian = unknown; then
12286 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288/* end confdefs.h. */
12289#include <limits.h>
12290
12291int
12292main ()
12293{
12294#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12295 bogus endian macros
12296 #endif
12297
12298 ;
12299 return 0;
12300}
12301_ACEOF
12302if ac_fn_c_try_compile "$LINENO"; then :
12303 # It does; now see whether it defined to _BIG_ENDIAN or not.
12304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12305/* end confdefs.h. */
12306#include <limits.h>
12307
12308int
12309main ()
12310{
12311#ifndef _BIG_ENDIAN
12312 not big endian
12313 #endif
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319if ac_fn_c_try_compile "$LINENO"; then :
12320 ac_cv_c_bigendian=yes
12321else
12322 ac_cv_c_bigendian=no
12323fi
12324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12325fi
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12327 fi
12328 if test $ac_cv_c_bigendian = unknown; then
12329 # Compile a test program.
12330 if test "$cross_compiling" = yes; then :
12331 # Try to guess by grepping values from an object file.
12332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12333/* end confdefs.h. */
12334short int ascii_mm[] =
12335 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12336 short int ascii_ii[] =
12337 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12338 int use_ascii (int i) {
12339 return ascii_mm[i] + ascii_ii[i];
12340 }
12341 short int ebcdic_ii[] =
12342 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12343 short int ebcdic_mm[] =
12344 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12345 int use_ebcdic (int i) {
12346 return ebcdic_mm[i] + ebcdic_ii[i];
12347 }
12348 extern int foo;
12349
12350int
12351main ()
12352{
12353return use_ascii (foo) == use_ebcdic (foo);
12354 ;
12355 return 0;
12356}
12357_ACEOF
12358if ac_fn_c_try_compile "$LINENO"; then :
12359 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12360 ac_cv_c_bigendian=yes
12361 fi
12362 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12363 if test "$ac_cv_c_bigendian" = unknown; then
12364 ac_cv_c_bigendian=no
12365 else
12366 # finding both strings is unlikely to happen, but who knows?
12367 ac_cv_c_bigendian=unknown
12368 fi
12369 fi
12370fi
12371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12372else
12373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12374/* end confdefs.h. */
12375$ac_includes_default
12376int
12377main ()
12378{
12379
12380 /* Are we little or big endian? From Harbison&Steele. */
12381 union
12382 {
12383 long int l;
12384 char c[sizeof (long int)];
12385 } u;
12386 u.l = 1;
12387 return u.c[sizeof (long int) - 1] == 1;
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393if ac_fn_c_try_run "$LINENO"; then :
12394 ac_cv_c_bigendian=no
12395else
12396 ac_cv_c_bigendian=yes
12397fi
12398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12399 conftest.$ac_objext conftest.beam conftest.$ac_ext
12400fi
12401
12402 fi
12403fi
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12405$as_echo "$ac_cv_c_bigendian" >&6; }
12406 case $ac_cv_c_bigendian in #(
12407 yes)
12408 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12409;; #(
12410 no)
12411 ;; #(
12412 universal)
12413
12414$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12415
12416 ;; #(
12417 *)
12418 as_fn_error $? "unknown endianness
12419 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12420 esac
12421
12422if test "x$CC" != xcc; then
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
12424$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
12425else
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
12427$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
12428fi
12429set dummy $CC; ac_cc=`$as_echo "$2" |
12430 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
12431if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
12432 $as_echo_n "(cached) " >&6
12433else
12434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435/* end confdefs.h. */
12436
12437int
12438main ()
12439{
12440
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445# Make sure it works both with $CC and with simple cc.
12446# We do the test twice because some compilers refuse to overwrite an
12447# existing .o file with -o, though they will create one.
12448ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
12449rm -f conftest2.*
12450if { { case "(($ac_try" in
12451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12452 *) ac_try_echo=$ac_try;;
12453esac
12454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12455$as_echo "$ac_try_echo"; } >&5
12456 (eval "$ac_try") 2>&5
12457 ac_status=$?
12458 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12459 test $ac_status = 0; } &&
12460 test -f conftest2.$ac_objext && { { case "(($ac_try" in
12461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12462 *) ac_try_echo=$ac_try;;
12463esac
12464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12465$as_echo "$ac_try_echo"; } >&5
12466 (eval "$ac_try") 2>&5
12467 ac_status=$?
12468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12469 test $ac_status = 0; };
12470then
12471 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
12472 if test "x$CC" != xcc; then
12473 # Test first that cc exists at all.
12474 if { ac_try='cc -c conftest.$ac_ext >&5'
12475 { { case "(($ac_try" in
12476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12477 *) ac_try_echo=$ac_try;;
12478esac
12479eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12480$as_echo "$ac_try_echo"; } >&5
12481 (eval "$ac_try") 2>&5
12482 ac_status=$?
12483 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12484 test $ac_status = 0; }; }; then
12485 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
12486 rm -f conftest2.*
12487 if { { case "(($ac_try" in
12488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12489 *) ac_try_echo=$ac_try;;
12490esac
12491eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12492$as_echo "$ac_try_echo"; } >&5
12493 (eval "$ac_try") 2>&5
12494 ac_status=$?
12495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12496 test $ac_status = 0; } &&
12497 test -f conftest2.$ac_objext && { { case "(($ac_try" in
12498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12499 *) ac_try_echo=$ac_try;;
12500esac
12501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12502$as_echo "$ac_try_echo"; } >&5
12503 (eval "$ac_try") 2>&5
12504 ac_status=$?
12505 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12506 test $ac_status = 0; };
12507 then
12508 # cc works too.
12509 :
12510 else
12511 # cc exists but doesn't like -o.
12512 eval ac_cv_prog_cc_${ac_cc}_c_o=no
12513 fi
12514 fi
12515 fi
12516else
12517 eval ac_cv_prog_cc_${ac_cc}_c_o=no
12518fi
12519rm -f core conftest*
12520
12521fi
12522if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
12523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12524$as_echo "yes" >&6; }
12525else
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527$as_echo "no" >&6; }
12528
12529$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
12530
12531fi
12532
12533# FIXME: we rely on the cache variable name because
12534# there is no other way.
12535set dummy $CC
12536am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
12537eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
12538if test "$am_t" != yes; then
12539 # Losing compiler, so override with the script.
12540 # FIXME: It is wrong to rewrite CC.
12541 # But if we don't then we get into trouble of one sort or another.
12542 # A longer-term fix would be to have automake use am__CC in this case,
12543 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12544 CC="$am_aux_dir/compile $CC"
12545fi
12546
12547
12548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12549$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12550if test "${ac_cv_c_const+set}" = set; then :
12551 $as_echo_n "(cached) " >&6
12552else
12553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12554/* end confdefs.h. */
12555
12556int
12557main ()
12558{
12559/* FIXME: Include the comments suggested by Paul. */
12560#ifndef __cplusplus
12561 /* Ultrix mips cc rejects this. */
12562 typedef int charset[2];
12563 const charset cs;
12564 /* SunOS 4.1.1 cc rejects this. */
12565 char const *const *pcpcc;
12566 char **ppc;
12567 /* NEC SVR4.0.2 mips cc rejects this. */
12568 struct point {int x, y;};
12569 static struct point const zero = {0,0};
12570 /* AIX XL C 1.02.0.0 rejects this.
12571 It does not let you subtract one const X* pointer from another in
12572 an arm of an if-expression whose if-part is not a constant
12573 expression */
12574 const char *g = "string";
12575 pcpcc = &g + (g ? g-g : 0);
12576 /* HPUX 7.0 cc rejects these. */
12577 ++pcpcc;
12578 ppc = (char**) pcpcc;
12579 pcpcc = (char const *const *) ppc;
12580 { /* SCO 3.2v4 cc rejects this. */
12581 char *t;
12582 char const *s = 0 ? (char *) 0 : (char const *) 0;
12583
12584 *t++ = 0;
12585 if (s) return 0;
12586 }
12587 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12588 int x[] = {25, 17};
12589 const int *foo = &x[0];
12590 ++foo;
12591 }
12592 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12593 typedef const int *iptr;
12594 iptr p = 0;
12595 ++p;
12596 }
12597 { /* AIX XL C 1.02.0.0 rejects this saying
12598 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12599 struct s { int j; const int *ap[3]; };
12600 struct s *b; b->j = 5;
12601 }
12602 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12603 const int foo = 10;
12604 if (!foo) return 0;
12605 }
12606 return !cs[0] && !zero.x;
12607#endif
12608
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613if ac_fn_c_try_compile "$LINENO"; then :
12614 ac_cv_c_const=yes
12615else
12616 ac_cv_c_const=no
12617fi
12618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12619fi
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12621$as_echo "$ac_cv_c_const" >&6; }
12622if test $ac_cv_c_const = no; then
12623
12624$as_echo "#define const /**/" >>confdefs.h
12625
12626fi
12627
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12629$as_echo_n "checking for inline... " >&6; }
12630if test "${ac_cv_c_inline+set}" = set; then :
12631 $as_echo_n "(cached) " >&6
12632else
12633 ac_cv_c_inline=no
12634for ac_kw in inline __inline__ __inline; do
12635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12636/* end confdefs.h. */
12637#ifndef __cplusplus
12638typedef int foo_t;
12639static $ac_kw foo_t static_foo () {return 0; }
12640$ac_kw foo_t foo () {return 0; }
12641#endif
12642
12643_ACEOF
12644if ac_fn_c_try_compile "$LINENO"; then :
12645 ac_cv_c_inline=$ac_kw
12646fi
12647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12648 test "$ac_cv_c_inline" != no && break
12649done
12650
12651fi
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12653$as_echo "$ac_cv_c_inline" >&6; }
12654
12655case $ac_cv_c_inline in
12656 inline | yes) ;;
12657 *)
12658 case $ac_cv_c_inline in
12659 no) ac_val=;;
12660 *) ac_val=$ac_cv_c_inline;;
12661 esac
12662 cat >>confdefs.h <<_ACEOF
12663#ifndef __cplusplus
12664#define inline $ac_val
12665#endif
12666_ACEOF
12667 ;;
12668esac
12669
12670 case $ac_cv_prog_cc_stdc in #(
12671 no) :
12672 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
12673 *) :
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
12675$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
12676if test "${ac_cv_prog_cc_c99+set}" = set; then :
12677 $as_echo_n "(cached) " >&6
12678else
12679 ac_cv_prog_cc_c99=no
12680ac_save_CC=$CC
12681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682/* end confdefs.h. */
12683#include <stdarg.h>
12684#include <stdbool.h>
12685#include <stdlib.h>
12686#include <wchar.h>
12687#include <stdio.h>
12688
12689// Check varargs macros. These examples are taken from C99 6.10.3.5.
12690#define debug(...) fprintf (stderr, __VA_ARGS__)
12691#define showlist(...) puts (#__VA_ARGS__)
12692#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
12693static void
12694test_varargs_macros (void)
12695{
12696 int x = 1234;
12697 int y = 5678;
12698 debug ("Flag");
12699 debug ("X = %d\n", x);
12700 showlist (The first, second, and third items.);
12701 report (x>y, "x is %d but y is %d", x, y);
12702}
12703
12704// Check long long types.
12705#define BIG64 18446744073709551615ull
12706#define BIG32 4294967295ul
12707#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
12708#if !BIG_OK
12709 your preprocessor is broken;
12710#endif
12711#if BIG_OK
12712#else
12713 your preprocessor is broken;
12714#endif
12715static long long int bignum = -9223372036854775807LL;
12716static unsigned long long int ubignum = BIG64;
12717
12718struct incomplete_array
12719{
12720 int datasize;
12721 double data[];
12722};
12723
12724struct named_init {
12725 int number;
12726 const wchar_t *name;
12727 double average;
12728};
12729
12730typedef const char *ccp;
12731
12732static inline int
12733test_restrict (ccp restrict text)
12734{
12735 // See if C++-style comments work.
12736 // Iterate through items via the restricted pointer.
12737 // Also check for declarations in for loops.
12738 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
12739 continue;
12740 return 0;
12741}
12742
12743// Check varargs and va_copy.
12744static void
12745test_varargs (const char *format, ...)
12746{
12747 va_list args;
12748 va_start (args, format);
12749 va_list args_copy;
12750 va_copy (args_copy, args);
12751
12752 const char *str;
12753 int number;
12754 float fnumber;
12755
12756 while (*format)
12757 {
12758 switch (*format++)
12759 {
12760 case 's': // string
12761 str = va_arg (args_copy, const char *);
12762 break;
12763 case 'd': // int
12764 number = va_arg (args_copy, int);
12765 break;
12766 case 'f': // float
12767 fnumber = va_arg (args_copy, double);
12768 break;
12769 default:
12770 break;
12771 }
12772 }
12773 va_end (args_copy);
12774 va_end (args);
12775}
12776
12777int
12778main ()
12779{
12780
12781 // Check bool.
12782 _Bool success = false;
12783
12784 // Check restrict.
12785 if (test_restrict ("String literal") == 0)
12786 success = true;
12787 char *restrict newvar = "Another string";
12788
12789 // Check varargs.
12790 test_varargs ("s, d' f .", "string", 65, 34.234);
12791 test_varargs_macros ();
12792
12793 // Check flexible array members.
12794 struct incomplete_array *ia =
12795 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
12796 ia->datasize = 10;
12797 for (int i = 0; i < ia->datasize; ++i)
12798 ia->data[i] = i * 1.234;
12799
12800 // Check named initializers.
12801 struct named_init ni = {
12802 .number = 34,
12803 .name = L"Test wide string",
12804 .average = 543.34343,
12805 };
12806
12807 ni.number = 58;
12808
12809 int dynamic_array[ni.number];
12810 dynamic_array[ni.number - 1] = 543;
12811
12812 // work around unused variable warnings
12813 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
12814 || dynamic_array[ni.number - 1] != 543);
12815
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
12821do
12822 CC="$ac_save_CC $ac_arg"
12823 if ac_fn_c_try_compile "$LINENO"; then :
12824 ac_cv_prog_cc_c99=$ac_arg
12825fi
12826rm -f core conftest.err conftest.$ac_objext
12827 test "x$ac_cv_prog_cc_c99" != "xno" && break
12828done
12829rm -f conftest.$ac_ext
12830CC=$ac_save_CC
12831
12832fi
12833# AC_CACHE_VAL
12834case "x$ac_cv_prog_cc_c99" in
12835 x)
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12837$as_echo "none needed" >&6; } ;;
12838 xno)
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12840$as_echo "unsupported" >&6; } ;;
12841 *)
12842 CC="$CC $ac_cv_prog_cc_c99"
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
12844$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
12845esac
12846if test "x$ac_cv_prog_cc_c99" != xno; then :
12847 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
12848else
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12850$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12851if test "${ac_cv_prog_cc_c89+set}" = set; then :
12852 $as_echo_n "(cached) " >&6
12853else
12854 ac_cv_prog_cc_c89=no
12855ac_save_CC=$CC
12856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
12858#include <stdarg.h>
12859#include <stdio.h>
12860#include <sys/types.h>
12861#include <sys/stat.h>
12862/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
12863struct buf { int x; };
12864FILE * (*rcsopen) (struct buf *, struct stat *, int);
12865static char *e (p, i)
12866 char **p;
12867 int i;
12868{
12869 return p[i];
12870}
12871static char *f (char * (*g) (char **, int), char **p, ...)
12872{
12873 char *s;
12874 va_list v;
12875 va_start (v,p);
12876 s = g (p, va_arg (v,int));
12877 va_end (v);
12878 return s;
12879}
12880
12881/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
12882 function prototypes and stuff, but not '\xHH' hex character constants.
12883 These don't provoke an error unfortunately, instead are silently treated
12884 as 'x'. The following induces an error, until -std is added to get
12885 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
12886 array size at least. It's necessary to write '\x00'==0 to get something
12887 that's true only with -std. */
12888int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12889
12890/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12891 inside strings and character constants. */
12892#define FOO(x) 'x'
12893int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12894
12895int test (int i, double x);
12896struct s1 {int (*f) (int a);};
12897struct s2 {int (*f) (double a);};
12898int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12899int argc;
12900char **argv;
12901int
12902main ()
12903{
12904return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
12905 ;
12906 return 0;
12907}
12908_ACEOF
12909for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12910 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12911do
12912 CC="$ac_save_CC $ac_arg"
12913 if ac_fn_c_try_compile "$LINENO"; then :
12914 ac_cv_prog_cc_c89=$ac_arg
12915fi
12916rm -f core conftest.err conftest.$ac_objext
12917 test "x$ac_cv_prog_cc_c89" != "xno" && break
12918done
12919rm -f conftest.$ac_ext
12920CC=$ac_save_CC
12921
12922fi
12923# AC_CACHE_VAL
12924case "x$ac_cv_prog_cc_c89" in
12925 x)
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12927$as_echo "none needed" >&6; } ;;
12928 xno)
12929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12930$as_echo "unsupported" >&6; } ;;
12931 *)
12932 CC="$CC $ac_cv_prog_cc_c89"
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12934$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12935esac
12936if test "x$ac_cv_prog_cc_c89" != xno; then :
12937 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
12938else
12939 ac_cv_prog_cc_stdc=no
12940fi
12941
12942fi
12943 ;;
12944esac
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
12946$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
12947 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
12948 $as_echo_n "(cached) " >&6
12949fi
12950
12951 case $ac_cv_prog_cc_stdc in #(
12952 no) :
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12954$as_echo "unsupported" >&6; } ;; #(
12955 '') :
12956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12957$as_echo "none needed" >&6; } ;; #(
12958 *) :
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
12960$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
12961esac
12962
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12964$as_echo_n "checking for ANSI C header files... " >&6; }
12965if test "${ac_cv_header_stdc+set}" = set; then :
12966 $as_echo_n "(cached) " >&6
12967else
12968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12969/* end confdefs.h. */
12970#include <stdlib.h>
12971#include <stdarg.h>
12972#include <string.h>
12973#include <float.h>
12974
12975int
12976main ()
12977{
12978
12979 ;
12980 return 0;
12981}
12982_ACEOF
12983if ac_fn_c_try_compile "$LINENO"; then :
12984 ac_cv_header_stdc=yes
12985else
12986 ac_cv_header_stdc=no
12987fi
12988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12989
12990if test $ac_cv_header_stdc = yes; then
12991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12993/* end confdefs.h. */
12994#include <string.h>
12995
12996_ACEOF
12997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12998 $EGREP "memchr" >/dev/null 2>&1; then :
12999
13000else
13001 ac_cv_header_stdc=no
13002fi
13003rm -f conftest*
13004
13005fi
13006
13007if test $ac_cv_header_stdc = yes; then
13008 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13010/* end confdefs.h. */
13011#include <stdlib.h>
13012
13013_ACEOF
13014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13015 $EGREP "free" >/dev/null 2>&1; then :
13016
13017else
13018 ac_cv_header_stdc=no
13019fi
13020rm -f conftest*
13021
13022fi
13023
13024if test $ac_cv_header_stdc = yes; then
13025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13026 if test "$cross_compiling" = yes; then :
13027 :
13028else
13029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030/* end confdefs.h. */
13031#include <ctype.h>
13032#include <stdlib.h>
13033#if ((' ' & 0x0FF) == 0x020)
13034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13036#else
13037# define ISLOWER(c) \
13038 (('a' <= (c) && (c) <= 'i') \
13039 || ('j' <= (c) && (c) <= 'r') \
13040 || ('s' <= (c) && (c) <= 'z'))
13041# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13042#endif
13043
13044#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13045int
13046main ()
13047{
13048 int i;
13049 for (i = 0; i < 256; i++)
13050 if (XOR (islower (i), ISLOWER (i))
13051 || toupper (i) != TOUPPER (i))
13052 return 2;
13053 return 0;
13054}
13055_ACEOF
13056if ac_fn_c_try_run "$LINENO"; then :
13057
13058else
13059 ac_cv_header_stdc=no
13060fi
13061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13062 conftest.$ac_objext conftest.beam conftest.$ac_ext
13063fi
13064
13065fi
13066fi
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13068$as_echo "$ac_cv_header_stdc" >&6; }
13069if test $ac_cv_header_stdc = yes; then
13070
13071$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13072
13073fi
13074
13075
13076
13077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
13078$as_echo_n "checking for __attribute__... " >&6; }
13079
13080if test "${ac_cv___attribute__+set}" = set; then :
13081 $as_echo_n "(cached) " >&6
13082else
13083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13084/* end confdefs.h. */
13085
13086#include <stdlib.h>
13087
13088int func(int x);
13089int foo(int x __attribute__ ((unused)))
13090{
13091 exit(1);
13092}
13093
13094int
13095main ()
13096{
13097
13098 ;
13099 return 0;
13100}
13101_ACEOF
13102if ac_fn_c_try_compile "$LINENO"; then :
13103 ac_cv___attribute__="yes"
13104else
13105 ac_cv___attribute__="no"
13106
13107fi
13108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13109fi
13110
13111
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
13113$as_echo "$ac_cv___attribute__" >&6; }
13114
13115if test "x${ac_cv___attribute__}" = "xyes" ; then
13116
13117$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
13118
13119
13120$as_echo "#define __UNUSED__ __attribute__((unused))" >>confdefs.h
13121
13122 else
13123
13124$as_echo "#define __UNUSED__ /**/" >>confdefs.h
13125
13126fi
13127
13128
13129
13130EMBRYO_CPPFLAGS=""
13131EMBRYO_CFLAGS=""
13132case "$host_os" in
13133 mingw32ce*)
13134 EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
13135 ;;
13136esac
13137
13138
13139
13140
13141### Checks for linker characteristics
13142
13143lt_enable_auto_import=""
13144case "$host_os" in
13145 mingw*)
13146 lt_enable_auto_import="-Wl,--enable-auto-import"
13147 ;;
13148esac
13149
13150
13151
13152### Checks for library functions
13153
13154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
13155$as_echo_n "checking for library containing strerror... " >&6; }
13156if test "${ac_cv_search_strerror+set}" = set; then :
13157 $as_echo_n "(cached) " >&6
13158else
13159 ac_func_search_save_LIBS=$LIBS
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161/* end confdefs.h. */
13162
13163/* Override any GCC internal prototype to avoid an error.
13164 Use char because int might match the return type of a GCC
13165 builtin and then its argument prototype would still apply. */
13166#ifdef __cplusplus
13167extern "C"
13168#endif
13169char strerror ();
13170int
13171main ()
13172{
13173return strerror ();
13174 ;
13175 return 0;
13176}
13177_ACEOF
13178for ac_lib in '' cposix; do
13179 if test -z "$ac_lib"; then
13180 ac_res="none required"
13181 else
13182 ac_res=-l$ac_lib
13183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13184 fi
13185 if ac_fn_c_try_link "$LINENO"; then :
13186 ac_cv_search_strerror=$ac_res
13187fi
13188rm -f core conftest.err conftest.$ac_objext \
13189 conftest$ac_exeext
13190 if test "${ac_cv_search_strerror+set}" = set; then :
13191 break
13192fi
13193done
13194if test "${ac_cv_search_strerror+set}" = set; then :
13195
13196else
13197 ac_cv_search_strerror=no
13198fi
13199rm conftest.$ac_ext
13200LIBS=$ac_func_search_save_LIBS
13201fi
13202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
13203$as_echo "$ac_cv_search_strerror" >&6; }
13204ac_res=$ac_cv_search_strerror
13205if test "$ac_res" != no; then :
13206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13207
13208fi
13209
13210
13211# alloca
13212# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13213# for constant arguments. Useless!
13214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13215$as_echo_n "checking for working alloca.h... " >&6; }
13216if test "${ac_cv_working_alloca_h+set}" = set; then :
13217 $as_echo_n "(cached) " >&6
13218else
13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13220/* end confdefs.h. */
13221#include <alloca.h>
13222int
13223main ()
13224{
13225char *p = (char *) alloca (2 * sizeof (int));
13226 if (p) return 0;
13227 ;
13228 return 0;
13229}
13230_ACEOF
13231if ac_fn_c_try_link "$LINENO"; then :
13232 ac_cv_working_alloca_h=yes
13233else
13234 ac_cv_working_alloca_h=no
13235fi
13236rm -f core conftest.err conftest.$ac_objext \
13237 conftest$ac_exeext conftest.$ac_ext
13238fi
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13240$as_echo "$ac_cv_working_alloca_h" >&6; }
13241if test $ac_cv_working_alloca_h = yes; then
13242
13243$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13244
13245fi
13246
13247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13248$as_echo_n "checking for alloca... " >&6; }
13249if test "${ac_cv_func_alloca_works+set}" = set; then :
13250 $as_echo_n "(cached) " >&6
13251else
13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13253/* end confdefs.h. */
13254#ifdef __GNUC__
13255# define alloca __builtin_alloca
13256#else
13257# ifdef _MSC_VER
13258# include <malloc.h>
13259# define alloca _alloca
13260# else
13261# ifdef HAVE_ALLOCA_H
13262# include <alloca.h>
13263# else
13264# ifdef _AIX
13265 #pragma alloca
13266# else
13267# ifndef alloca /* predefined by HP cc +Olibcalls */
13268char *alloca ();
13269# endif
13270# endif
13271# endif
13272# endif
13273#endif
13274
13275int
13276main ()
13277{
13278char *p = (char *) alloca (1);
13279 if (p) return 0;
13280 ;
13281 return 0;
13282}
13283_ACEOF
13284if ac_fn_c_try_link "$LINENO"; then :
13285 ac_cv_func_alloca_works=yes
13286else
13287 ac_cv_func_alloca_works=no
13288fi
13289rm -f core conftest.err conftest.$ac_objext \
13290 conftest$ac_exeext conftest.$ac_ext
13291fi
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13293$as_echo "$ac_cv_func_alloca_works" >&6; }
13294
13295if test $ac_cv_func_alloca_works = yes; then
13296
13297$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13298
13299else
13300 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13301# that cause trouble. Some versions do not even contain alloca or
13302# contain a buggy version. If you still want to use their alloca,
13303# use ar to extract alloca.o from them instead of compiling alloca.c.
13304
13305ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13306
13307$as_echo "#define C_ALLOCA 1" >>confdefs.h
13308
13309
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13311$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13312if test "${ac_cv_os_cray+set}" = set; then :
13313 $as_echo_n "(cached) " >&6
13314else
13315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13316/* end confdefs.h. */
13317#if defined CRAY && ! defined CRAY2
13318webecray
13319#else
13320wenotbecray
13321#endif
13322
13323_ACEOF
13324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13325 $EGREP "webecray" >/dev/null 2>&1; then :
13326 ac_cv_os_cray=yes
13327else
13328 ac_cv_os_cray=no
13329fi
13330rm -f conftest*
13331
13332fi
13333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13334$as_echo "$ac_cv_os_cray" >&6; }
13335if test $ac_cv_os_cray = yes; then
13336 for ac_func in _getb67 GETB67 getb67; do
13337 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13338ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13339if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13340
13341cat >>confdefs.h <<_ACEOF
13342#define CRAY_STACKSEG_END $ac_func
13343_ACEOF
13344
13345 break
13346fi
13347
13348 done
13349fi
13350
13351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13352$as_echo_n "checking stack direction for C alloca... " >&6; }
13353if test "${ac_cv_c_stack_direction+set}" = set; then :
13354 $as_echo_n "(cached) " >&6
13355else
13356 if test "$cross_compiling" = yes; then :
13357 ac_cv_c_stack_direction=0
13358else
13359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360/* end confdefs.h. */
13361$ac_includes_default
13362int
13363find_stack_direction ()
13364{
13365 static char *addr = 0;
13366 auto char dummy;
13367 if (addr == 0)
13368 {
13369 addr = &dummy;
13370 return find_stack_direction ();
13371 }
13372 else
13373 return (&dummy > addr) ? 1 : -1;
13374}
13375
13376int
13377main ()
13378{
13379 return find_stack_direction () < 0;
13380}
13381_ACEOF
13382if ac_fn_c_try_run "$LINENO"; then :
13383 ac_cv_c_stack_direction=1
13384else
13385 ac_cv_c_stack_direction=-1
13386fi
13387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13388 conftest.$ac_objext conftest.beam conftest.$ac_ext
13389fi
13390
13391fi
13392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13393$as_echo "$ac_cv_c_stack_direction" >&6; }
13394cat >>confdefs.h <<_ACEOF
13395#define STACK_DIRECTION $ac_cv_c_stack_direction
13396_ACEOF
13397
13398
13399fi
13400
13401
13402# fnmatch
13403
13404
13405ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
13406if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
13407 _efl_have_fnmatch="yes"
13408else
13409 _efl_have_fnmatch="no"
13410fi
13411
13412
13413
13414if test "x${_efl_have_fnmatch}" = "xyes" ; then
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fnmatch" >&5
13416$as_echo_n "checking for library containing fnmatch... " >&6; }
13417if test "${ac_cv_search_fnmatch+set}" = set; then :
13418 $as_echo_n "(cached) " >&6
13419else
13420 ac_func_search_save_LIBS=$LIBS
13421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13422/* end confdefs.h. */
13423
13424/* Override any GCC internal prototype to avoid an error.
13425 Use char because int might match the return type of a GCC
13426 builtin and then its argument prototype would still apply. */
13427#ifdef __cplusplus
13428extern "C"
13429#endif
13430char fnmatch ();
13431int
13432main ()
13433{
13434return fnmatch ();
13435 ;
13436 return 0;
13437}
13438_ACEOF
13439for ac_lib in '' fnmatch evil exotic iberty; do
13440 if test -z "$ac_lib"; then
13441 ac_res="none required"
13442 else
13443 ac_res=-l$ac_lib
13444 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13445 fi
13446 if ac_fn_c_try_link "$LINENO"; then :
13447 ac_cv_search_fnmatch=$ac_res
13448fi
13449rm -f core conftest.err conftest.$ac_objext \
13450 conftest$ac_exeext
13451 if test "${ac_cv_search_fnmatch+set}" = set; then :
13452 break
13453fi
13454done
13455if test "${ac_cv_search_fnmatch+set}" = set; then :
13456
13457else
13458 ac_cv_search_fnmatch=no
13459fi
13460rm conftest.$ac_ext
13461LIBS=$ac_func_search_save_LIBS
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fnmatch" >&5
13464$as_echo "$ac_cv_search_fnmatch" >&6; }
13465ac_res=$ac_cv_search_fnmatch
13466if test "$ac_res" != no; then :
13467 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13468 _efl_have_fnmatch="yes"
13469else
13470 _efl_have_fnmatch="no"
13471fi
13472
13473fi
13474
13475EFL_FNMATCH_LIBS=""
13476
13477if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
13478 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
13479fi
13480
13481
13482
13483if test "x$_efl_have_fnmatch" = "xyes"; then :
13484
13485else
13486 as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5
13487fi
13488
13489
13490
13491# gettimeofday
13492
13493
13494_efl_have_gettimeofday="no"
13495
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497/* end confdefs.h. */
13498
13499#include <stdlib.h>
13500#include <sys/time.h>
13501
13502int
13503main ()
13504{
13505
13506int res;
13507res = gettimeofday(NULL, NULL);
13508
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513if ac_fn_c_try_link "$LINENO"; then :
13514 _efl_have_gettimeofday="yes"
13515else
13516 _efl_have_gettimeofday="no"
13517fi
13518rm -f core conftest.err conftest.$ac_objext \
13519 conftest$ac_exeext conftest.$ac_ext
13520
13521if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then
13522 SAVE_LIBS="${LIBS}"
13523 SAVE_CFLAGS="${CFLAGS}"
13524 LIBS="${LIBS} ${EXOTIC_LIBS}"
13525 CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}"
13526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13527/* end confdefs.h. */
13528
13529#include <Exotic.h>
13530
13531int
13532main ()
13533{
13534
13535int res;
13536res = gettimeofday(NULL, NULL);
13537
13538 ;
13539 return 0;
13540}
13541_ACEOF
13542if ac_fn_c_try_link "$LINENO"; then :
13543 _efl_have_gettimeofday="yes"
13544else
13545 _efl_have_gettimeofday="no"
13546fi
13547rm -f core conftest.err conftest.$ac_objext \
13548 conftest$ac_exeext conftest.$ac_ext
13549fi
13550
13551if test "x${_efl_have_gettimeofday}" = "xyes"; then
13552
13553$as_echo "#define EFL_HAVE_GETTIMEOFDAY 1" >>confdefs.h
13554
13555fi
13556
13557if test "x${_efl_have_gettimeofday}" = "xyes"; then :
13558
13559else
13560 as_fn_error $? "Cannot find gettimeofday()" "$LINENO" 5
13561fi
13562
13563
13564
13565
13566
13567
13568ac_config_files="$ac_config_files Makefile doc/Makefile doc/Doxyfile doc/embryo.dox embryo.pc include/Makefile src/Makefile src/lib/Makefile src/bin/Makefile embryo.spec"
13569
13570cat >confcache <<\_ACEOF
13571# This file is a shell script that caches the results of configure
13572# tests run on this system so they can be shared between configure
13573# scripts and configure runs, see configure's option --config-cache.
13574# It is not useful on other systems. If it contains results you don't
13575# want to keep, you may remove or edit it.
13576#
13577# config.status only pays attention to the cache file if you give it
13578# the --recheck option to rerun configure.
13579#
13580# `ac_cv_env_foo' variables (set or unset) will be overridden when
13581# loading this file, other *unset* `ac_cv_foo' will be assigned the
13582# following values.
13583
13584_ACEOF
13585
13586# The following way of writing the cache mishandles newlines in values,
13587# but we know of no workaround that is simple, portable, and efficient.
13588# So, we kill variables containing newlines.
13589# Ultrix sh set writes to stderr and can't be redirected directly,
13590# and sets the high bit in the cache file unless we assign to the vars.
13591(
13592 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13593 eval ac_val=\$$ac_var
13594 case $ac_val in #(
13595 *${as_nl}*)
13596 case $ac_var in #(
13597 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13598$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13599 esac
13600 case $ac_var in #(
13601 _ | IFS | as_nl) ;; #(
13602 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13603 *) { eval $ac_var=; unset $ac_var;} ;;
13604 esac ;;
13605 esac
13606 done
13607
13608 (set) 2>&1 |
13609 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13610 *${as_nl}ac_space=\ *)
13611 # `set' does not quote correctly, so add quotes: double-quote
13612 # substitution turns \\\\ into \\, and sed turns \\ into \.
13613 sed -n \
13614 "s/'/'\\\\''/g;
13615 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13616 ;; #(
13617 *)
13618 # `set' quotes correctly as required by POSIX, so do not add quotes.
13619 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13620 ;;
13621 esac |
13622 sort
13623) |
13624 sed '
13625 /^ac_cv_env_/b end
13626 t clear
13627 :clear
13628 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13629 t end
13630 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13631 :end' >>confcache
13632if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13633 if test -w "$cache_file"; then
13634 test "x$cache_file" != "x/dev/null" &&
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13636$as_echo "$as_me: updating cache $cache_file" >&6;}
13637 cat confcache >$cache_file
13638 else
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13640$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
13641 fi
13642fi
13643rm -f confcache
13644
13645test "x$prefix" = xNONE && prefix=$ac_default_prefix
13646# Let make expand exec_prefix.
13647test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13648
13649DEFS=-DHAVE_CONFIG_H
13650
13651ac_libobjs=
13652ac_ltlibobjs=
13653U=
13654for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13655 # 1. Remove the extension, and $U if already installed.
13656 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13657 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13658 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13659 # will be set to the directory where LIBOBJS objects are built.
13660 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13661 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
13662done
13663LIBOBJS=$ac_libobjs
13664
13665LTLIBOBJS=$ac_ltlibobjs
13666
13667
13668 if test -n "$EXEEXT"; then
13669 am__EXEEXT_TRUE=
13670 am__EXEEXT_FALSE='#'
13671else
13672 am__EXEEXT_TRUE='#'
13673 am__EXEEXT_FALSE=
13674fi
13675
13676if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
13677 as_fn_error $? "conditional \"AMDEP\" was never defined.
13678Usually this means the macro was only invoked conditionally." "$LINENO" 5
13679fi
13680if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
13681 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
13682Usually this means the macro was only invoked conditionally." "$LINENO" 5
13683fi
13684if test -z "${BUILD_EMBRYO_CC_TRUE}" && test -z "${BUILD_EMBRYO_CC_FALSE}"; then
13685 as_fn_error $? "conditional \"BUILD_EMBRYO_CC\" was never defined.
13686Usually this means the macro was only invoked conditionally." "$LINENO" 5
13687fi
13688if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
13689 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
13690Usually this means the macro was only invoked conditionally." "$LINENO" 5
13691fi
13692if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then
13693 as_fn_error $? "conditional \"EFL_BUILD_DOC\" was never defined.
13694Usually this means the macro was only invoked conditionally." "$LINENO" 5
13695fi
13696
13697
13698: ${CONFIG_STATUS=./config.status}
13699ac_write_fail=0
13700ac_clean_files_save=$ac_clean_files
13701ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13703$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13704as_write_fail=0
13705cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
13706#! $SHELL
13707# Generated by $as_me.
13708# Run this file to recreate the current configuration.
13709# Compiler output produced by configure, useful for debugging
13710# configure, is in config.log if it exists.
13711
13712debug=false
13713ac_cs_recheck=false
13714ac_cs_silent=false
13715
13716SHELL=\${CONFIG_SHELL-$SHELL}
13717export SHELL
13718_ASEOF
13719cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13720## -------------------- ##
13721## M4sh Initialization. ##
13722## -------------------- ##
13723
13724# Be more Bourne compatible
13725DUALCASE=1; export DUALCASE # for MKS sh
13726if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
13727 emulate sh
13728 NULLCMD=:
13729 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
13730 # is contrary to our usage. Disable this feature.
13731 alias -g '${1+"$@"}'='"$@"'
13732 setopt NO_GLOB_SUBST
13733else
13734 case `(set -o) 2>/dev/null` in #(
13735 *posix*) :
13736 set -o posix ;; #(
13737 *) :
13738 ;;
13739esac
13740fi
13741
13742
13743as_nl='
13744'
13745export as_nl
13746# Printing a long string crashes Solaris 7 /usr/bin/printf.
13747as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13748as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13749as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13750# Prefer a ksh shell builtin over an external printf program on Solaris,
13751# but without wasting forks for bash or zsh.
13752if test -z "$BASH_VERSION$ZSH_VERSION" \
13753 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13754 as_echo='print -r --'
13755 as_echo_n='print -rn --'
13756elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13757 as_echo='printf %s\n'
13758 as_echo_n='printf %s'
13759else
13760 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13761 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13762 as_echo_n='/usr/ucb/echo -n'
13763 else
13764 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13765 as_echo_n_body='eval
13766 arg=$1;
13767 case $arg in #(
13768 *"$as_nl"*)
13769 expr "X$arg" : "X\\(.*\\)$as_nl";
13770 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13771 esac;
13772 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13773 '
13774 export as_echo_n_body
13775 as_echo_n='sh -c $as_echo_n_body as_echo'
13776 fi
13777 export as_echo_body
13778 as_echo='sh -c $as_echo_body as_echo'
13779fi
13780
13781# The user is always right.
13782if test "${PATH_SEPARATOR+set}" != set; then
13783 PATH_SEPARATOR=:
13784 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13785 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13786 PATH_SEPARATOR=';'
13787 }
13788fi
13789
13790
13791# IFS
13792# We need space, tab and new line, in precisely that order. Quoting is
13793# there to prevent editors from complaining about space-tab.
13794# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13795# splitting by setting IFS to empty value.)
13796IFS=" "" $as_nl"
13797
13798# Find who we are. Look in the path if we contain no directory separator.
13799case $0 in #((
13800 *[\\/]* ) as_myself=$0 ;;
13801 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13802for as_dir in $PATH
13803do
13804 IFS=$as_save_IFS
13805 test -z "$as_dir" && as_dir=.
13806 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13807 done
13808IFS=$as_save_IFS
13809
13810 ;;
13811esac
13812# We did not find ourselves, most probably we were run as `sh COMMAND'
13813# in which case we are not to be found in the path.
13814if test "x$as_myself" = x; then
13815 as_myself=$0
13816fi
13817if test ! -f "$as_myself"; then
13818 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13819 exit 1
13820fi
13821
13822# Unset variables that we do not need and which cause bugs (e.g. in
13823# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13824# suppresses any "Segmentation fault" message there. '((' could
13825# trigger a bug in pdksh 5.2.14.
13826for as_var in BASH_ENV ENV MAIL MAILPATH
13827do eval test x\${$as_var+set} = xset \
13828 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13829done
13830PS1='$ '
13831PS2='> '
13832PS4='+ '
13833
13834# NLS nuisances.
13835LC_ALL=C
13836export LC_ALL
13837LANGUAGE=C
13838export LANGUAGE
13839
13840# CDPATH.
13841(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13842
13843
13844# as_fn_error STATUS ERROR [LINENO LOG_FD]
13845# ----------------------------------------
13846# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13847# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13848# script with STATUS, using 1 if that was 0.
13849as_fn_error ()
13850{
13851 as_status=$1; test $as_status -eq 0 && as_status=1
13852 if test "$4"; then
13853 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13854 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
13855 fi
13856 $as_echo "$as_me: error: $2" >&2
13857 as_fn_exit $as_status
13858} # as_fn_error
13859
13860
13861# as_fn_set_status STATUS
13862# -----------------------
13863# Set $? to STATUS, without forking.
13864as_fn_set_status ()
13865{
13866 return $1
13867} # as_fn_set_status
13868
13869# as_fn_exit STATUS
13870# -----------------
13871# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13872as_fn_exit ()
13873{
13874 set +e
13875 as_fn_set_status $1
13876 exit $1
13877} # as_fn_exit
13878
13879# as_fn_unset VAR
13880# ---------------
13881# Portably unset VAR.
13882as_fn_unset ()
13883{
13884 { eval $1=; unset $1;}
13885}
13886as_unset=as_fn_unset
13887# as_fn_append VAR VALUE
13888# ----------------------
13889# Append the text in VALUE to the end of the definition contained in VAR. Take
13890# advantage of any shell optimizations that allow amortized linear growth over
13891# repeated appends, instead of the typical quadratic growth present in naive
13892# implementations.
13893if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13894 eval 'as_fn_append ()
13895 {
13896 eval $1+=\$2
13897 }'
13898else
13899 as_fn_append ()
13900 {
13901 eval $1=\$$1\$2
13902 }
13903fi # as_fn_append
13904
13905# as_fn_arith ARG...
13906# ------------------
13907# Perform arithmetic evaluation on the ARGs, and store the result in the
13908# global $as_val. Take advantage of shells that can avoid forks. The arguments
13909# must be portable across $(()) and expr.
13910if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13911 eval 'as_fn_arith ()
13912 {
13913 as_val=$(( $* ))
13914 }'
13915else
13916 as_fn_arith ()
13917 {
13918 as_val=`expr "$@" || test $? -eq 1`
13919 }
13920fi # as_fn_arith
13921
13922
13923if expr a : '\(a\)' >/dev/null 2>&1 &&
13924 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13925 as_expr=expr
13926else
13927 as_expr=false
13928fi
13929
13930if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13931 as_basename=basename
13932else
13933 as_basename=false
13934fi
13935
13936if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13937 as_dirname=dirname
13938else
13939 as_dirname=false
13940fi
13941
13942as_me=`$as_basename -- "$0" ||
13943$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13944 X"$0" : 'X\(//\)$' \| \
13945 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13946$as_echo X/"$0" |
13947 sed '/^.*\/\([^/][^/]*\)\/*$/{
13948 s//\1/
13949 q
13950 }
13951 /^X\/\(\/\/\)$/{
13952 s//\1/
13953 q
13954 }
13955 /^X\/\(\/\).*/{
13956 s//\1/
13957 q
13958 }
13959 s/.*/./; q'`
13960
13961# Avoid depending upon Character Ranges.
13962as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13963as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13964as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13965as_cr_digits='0123456789'
13966as_cr_alnum=$as_cr_Letters$as_cr_digits
13967
13968ECHO_C= ECHO_N= ECHO_T=
13969case `echo -n x` in #(((((
13970-n*)
13971 case `echo 'xy\c'` in
13972 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13973 xy) ECHO_C='\c';;
13974 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13975 ECHO_T=' ';;
13976 esac;;
13977*)
13978 ECHO_N='-n';;
13979esac
13980
13981rm -f conf$$ conf$$.exe conf$$.file
13982if test -d conf$$.dir; then
13983 rm -f conf$$.dir/conf$$.file
13984else
13985 rm -f conf$$.dir
13986 mkdir conf$$.dir 2>/dev/null
13987fi
13988if (echo >conf$$.file) 2>/dev/null; then
13989 if ln -s conf$$.file conf$$ 2>/dev/null; then
13990 as_ln_s='ln -s'
13991 # ... but there are two gotchas:
13992 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13993 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13994 # In both cases, we have to default to `cp -p'.
13995 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13996 as_ln_s='cp -p'
13997 elif ln conf$$.file conf$$ 2>/dev/null; then
13998 as_ln_s=ln
13999 else
14000 as_ln_s='cp -p'
14001 fi
14002else
14003 as_ln_s='cp -p'
14004fi
14005rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14006rmdir conf$$.dir 2>/dev/null
14007
14008
14009# as_fn_mkdir_p
14010# -------------
14011# Create "$as_dir" as a directory, including parents if necessary.
14012as_fn_mkdir_p ()
14013{
14014
14015 case $as_dir in #(
14016 -*) as_dir=./$as_dir;;
14017 esac
14018 test -d "$as_dir" || eval $as_mkdir_p || {
14019 as_dirs=
14020 while :; do
14021 case $as_dir in #(
14022 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14023 *) as_qdir=$as_dir;;
14024 esac
14025 as_dirs="'$as_qdir' $as_dirs"
14026 as_dir=`$as_dirname -- "$as_dir" ||
14027$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14028 X"$as_dir" : 'X\(//\)[^/]' \| \
14029 X"$as_dir" : 'X\(//\)$' \| \
14030 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14031$as_echo X"$as_dir" |
14032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14033 s//\1/
14034 q
14035 }
14036 /^X\(\/\/\)[^/].*/{
14037 s//\1/
14038 q
14039 }
14040 /^X\(\/\/\)$/{
14041 s//\1/
14042 q
14043 }
14044 /^X\(\/\).*/{
14045 s//\1/
14046 q
14047 }
14048 s/.*/./; q'`
14049 test -d "$as_dir" && break
14050 done
14051 test -z "$as_dirs" || eval "mkdir $as_dirs"
14052 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14053
14054
14055} # as_fn_mkdir_p
14056if mkdir -p . 2>/dev/null; then
14057 as_mkdir_p='mkdir -p "$as_dir"'
14058else
14059 test -d ./-p && rmdir ./-p
14060 as_mkdir_p=false
14061fi
14062
14063if test -x / >/dev/null 2>&1; then
14064 as_test_x='test -x'
14065else
14066 if ls -dL / >/dev/null 2>&1; then
14067 as_ls_L_option=L
14068 else
14069 as_ls_L_option=
14070 fi
14071 as_test_x='
14072 eval sh -c '\''
14073 if test -d "$1"; then
14074 test -d "$1/.";
14075 else
14076 case $1 in #(
14077 -*)set "./$1";;
14078 esac;
14079 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14080 ???[sx]*):;;*)false;;esac;fi
14081 '\'' sh
14082 '
14083fi
14084as_executable_p=$as_test_x
14085
14086# Sed expression to map a string onto a valid CPP name.
14087as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14088
14089# Sed expression to map a string onto a valid variable name.
14090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14091
14092
14093exec 6>&1
14094## ----------------------------------- ##
14095## Main body of $CONFIG_STATUS script. ##
14096## ----------------------------------- ##
14097_ASEOF
14098test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14099
14100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14101# Save the log message, to keep $0 and so on meaningful, and to
14102# report actual input values of CONFIG_FILES etc. instead of their
14103# values after options handling.
14104ac_log="
14105This file was extended by embryo $as_me 1.2.0-alpha, which was
14106generated by GNU Autoconf 2.67. Invocation command line was
14107
14108 CONFIG_FILES = $CONFIG_FILES
14109 CONFIG_HEADERS = $CONFIG_HEADERS
14110 CONFIG_LINKS = $CONFIG_LINKS
14111 CONFIG_COMMANDS = $CONFIG_COMMANDS
14112 $ $0 $@
14113
14114on `(hostname || uname -n) 2>/dev/null | sed 1q`
14115"
14116
14117_ACEOF
14118
14119case $ac_config_files in *"
14120"*) set x $ac_config_files; shift; ac_config_files=$*;;
14121esac
14122
14123case $ac_config_headers in *"
14124"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14125esac
14126
14127
14128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14129# Files that config.status was made for.
14130config_files="$ac_config_files"
14131config_headers="$ac_config_headers"
14132config_commands="$ac_config_commands"
14133
14134_ACEOF
14135
14136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14137ac_cs_usage="\
14138\`$as_me' instantiates files and other configuration actions
14139from templates according to the current configuration. Unless the files
14140and actions are specified as TAGs, all are instantiated by default.
14141
14142Usage: $0 [OPTION]... [TAG]...
14143
14144 -h, --help print this help, then exit
14145 -V, --version print version number and configuration settings, then exit
14146 --config print configuration, then exit
14147 -q, --quiet, --silent
14148 do not print progress messages
14149 -d, --debug don't remove temporary files
14150 --recheck update $as_me by reconfiguring in the same conditions
14151 --file=FILE[:TEMPLATE]
14152 instantiate the configuration file FILE
14153 --header=FILE[:TEMPLATE]
14154 instantiate the configuration header FILE
14155
14156Configuration files:
14157$config_files
14158
14159Configuration headers:
14160$config_headers
14161
14162Configuration commands:
14163$config_commands
14164
14165Report bugs to <enlightenment-devel@lists.sourceforge.net>."
14166
14167_ACEOF
14168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14169ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14170ac_cs_version="\\
14171embryo config.status 1.2.0-alpha
14172configured by $0, generated by GNU Autoconf 2.67,
14173 with options \\"\$ac_cs_config\\"
14174
14175Copyright (C) 2010 Free Software Foundation, Inc.
14176This config.status script is free software; the Free Software Foundation
14177gives unlimited permission to copy, distribute and modify it."
14178
14179ac_pwd='$ac_pwd'
14180srcdir='$srcdir'
14181INSTALL='$INSTALL'
14182MKDIR_P='$MKDIR_P'
14183AWK='$AWK'
14184test -n "\$AWK" || AWK=awk
14185_ACEOF
14186
14187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14188# The default lists apply if the user does not specify any file.
14189ac_need_defaults=:
14190while test $# != 0
14191do
14192 case $1 in
14193 --*=?*)
14194 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14195 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14196 ac_shift=:
14197 ;;
14198 --*=)
14199 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14200 ac_optarg=
14201 ac_shift=:
14202 ;;
14203 *)
14204 ac_option=$1
14205 ac_optarg=$2
14206 ac_shift=shift
14207 ;;
14208 esac
14209
14210 case $ac_option in
14211 # Handling of the options.
14212 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14213 ac_cs_recheck=: ;;
14214 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14215 $as_echo "$ac_cs_version"; exit ;;
14216 --config | --confi | --conf | --con | --co | --c )
14217 $as_echo "$ac_cs_config"; exit ;;
14218 --debug | --debu | --deb | --de | --d | -d )
14219 debug=: ;;
14220 --file | --fil | --fi | --f )
14221 $ac_shift
14222 case $ac_optarg in
14223 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14224 '') as_fn_error $? "missing file argument" ;;
14225 esac
14226 as_fn_append CONFIG_FILES " '$ac_optarg'"
14227 ac_need_defaults=false;;
14228 --header | --heade | --head | --hea )
14229 $ac_shift
14230 case $ac_optarg in
14231 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14232 esac
14233 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14234 ac_need_defaults=false;;
14235 --he | --h)
14236 # Conflict between --help and --header
14237 as_fn_error $? "ambiguous option: \`$1'
14238Try \`$0 --help' for more information.";;
14239 --help | --hel | -h )
14240 $as_echo "$ac_cs_usage"; exit ;;
14241 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14242 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14243 ac_cs_silent=: ;;
14244
14245 # This is an error.
14246 -*) as_fn_error $? "unrecognized option: \`$1'
14247Try \`$0 --help' for more information." ;;
14248
14249 *) as_fn_append ac_config_targets " $1"
14250 ac_need_defaults=false ;;
14251
14252 esac
14253 shift
14254done
14255
14256ac_configure_extra_args=
14257
14258if $ac_cs_silent; then
14259 exec 6>/dev/null
14260 ac_configure_extra_args="$ac_configure_extra_args --silent"
14261fi
14262
14263_ACEOF
14264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14265if \$ac_cs_recheck; then
14266 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14267 shift
14268 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14269 CONFIG_SHELL='$SHELL'
14270 export CONFIG_SHELL
14271 exec "\$@"
14272fi
14273
14274_ACEOF
14275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14276exec 5>>config.log
14277{
14278 echo
14279 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14280## Running $as_me. ##
14281_ASBOX
14282 $as_echo "$ac_log"
14283} >&5
14284
14285_ACEOF
14286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14287#
14288# INIT-COMMANDS
14289#
14290AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
14291
14292
14293# The HP-UX ksh and POSIX shell print the target directory to stdout
14294# if CDPATH is set.
14295(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14296
14297sed_quote_subst='$sed_quote_subst'
14298double_quote_subst='$double_quote_subst'
14299delay_variable_subst='$delay_variable_subst'
14300AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
14301DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
14302OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
14303macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
14304macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
14305enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
14306enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
14307pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
14308enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
14309host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
14310host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
14311host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
14312build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
14313build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
14314build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
14315SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
14316Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
14317GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
14318EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
14319FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
14320LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
14321NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
14322LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
14323max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
14324ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
14325exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
14326lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
14327lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
14328lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
14329reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
14330reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14331deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
14332file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
14333AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
14334AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
14335STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
14336RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
14337old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14338old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14339old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14340CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
14341CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
14342compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
14343GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
14344lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
14345lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
14346lt_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"`'
14347lt_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"`'
14348objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
14349SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
14350ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
14351MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
14352lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
14353lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
14354lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
14355lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
14356lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
14357need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
14358DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
14359NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
14360LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
14361OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
14362OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
14363libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
14364shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14365extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14366archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
14367enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
14368export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
14369whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
14370compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
14371old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14372old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14373archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14374archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14375module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14376module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14377with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
14378allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
14379no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
14380hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
14381hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
14382hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
14383hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
14384hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
14385hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
14386hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
14387hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
14388inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
14389link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
14390fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
14391always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
14392export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14393exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
14394include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
14395prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14396file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
14397variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
14398need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
14399need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
14400version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
14401runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
14402shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
14403shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
14404libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
14405library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
14406soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
14407postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14408postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14409finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14410finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
14411hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
14412sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
14413sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
14414hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
14415enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
14416enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
14417enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
14418old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
14419striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
14420
14421LTCC='$LTCC'
14422LTCFLAGS='$LTCFLAGS'
14423compiler='$compiler_DEFAULT'
14424
14425# Quote evaled strings.
14426for var in SED \
14427GREP \
14428EGREP \
14429FGREP \
14430LD \
14431NM \
14432LN_S \
14433lt_SP2NL \
14434lt_NL2SP \
14435reload_flag \
14436deplibs_check_method \
14437file_magic_cmd \
14438AR \
14439AR_FLAGS \
14440STRIP \
14441RANLIB \
14442CC \
14443CFLAGS \
14444compiler \
14445lt_cv_sys_global_symbol_pipe \
14446lt_cv_sys_global_symbol_to_cdecl \
14447lt_cv_sys_global_symbol_to_c_name_address \
14448lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
14449SHELL \
14450ECHO \
14451lt_prog_compiler_no_builtin_flag \
14452lt_prog_compiler_wl \
14453lt_prog_compiler_pic \
14454lt_prog_compiler_static \
14455lt_cv_prog_compiler_c_o \
14456need_locks \
14457DSYMUTIL \
14458NMEDIT \
14459LIPO \
14460OTOOL \
14461OTOOL64 \
14462shrext_cmds \
14463export_dynamic_flag_spec \
14464whole_archive_flag_spec \
14465compiler_needs_object \
14466with_gnu_ld \
14467allow_undefined_flag \
14468no_undefined_flag \
14469hardcode_libdir_flag_spec \
14470hardcode_libdir_flag_spec_ld \
14471hardcode_libdir_separator \
14472fix_srcfile_path \
14473exclude_expsyms \
14474include_expsyms \
14475file_list_spec \
14476variables_saved_for_relink \
14477libname_spec \
14478library_names_spec \
14479soname_spec \
14480finish_eval \
14481old_striplib \
14482striplib; do
14483 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
14484 *[\\\\\\\`\\"\\\$]*)
14485 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
14486 ;;
14487 *)
14488 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
14489 ;;
14490 esac
14491done
14492
14493# Double-quote double-evaled strings.
14494for var in reload_cmds \
14495old_postinstall_cmds \
14496old_postuninstall_cmds \
14497old_archive_cmds \
14498extract_expsyms_cmds \
14499old_archive_from_new_cmds \
14500old_archive_from_expsyms_cmds \
14501archive_cmds \
14502archive_expsym_cmds \
14503module_cmds \
14504module_expsym_cmds \
14505export_symbols_cmds \
14506prelink_cmds \
14507postinstall_cmds \
14508postuninstall_cmds \
14509finish_cmds \
14510sys_lib_search_path_spec \
14511sys_lib_dlsearch_path_spec; do
14512 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
14513 *[\\\\\\\`\\"\\\$]*)
14514 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
14515 ;;
14516 *)
14517 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
14518 ;;
14519 esac
14520done
14521
14522# Fix-up fallback echo if it was mangled by the above quoting rules.
14523case \$lt_ECHO in
14524*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
14525 ;;
14526esac
14527
14528ac_aux_dir='$ac_aux_dir'
14529xsi_shell='$xsi_shell'
14530lt_shell_append='$lt_shell_append'
14531
14532# See if we are running on zsh, and set the options which allow our
14533# commands through without removal of \ escapes INIT.
14534if test -n "\${ZSH_VERSION+set}" ; then
14535 setopt NO_GLOB_SUBST
14536fi
14537
14538
14539 PACKAGE='$PACKAGE'
14540 VERSION='$VERSION'
14541 TIMESTAMP='$TIMESTAMP'
14542 RM='$RM'
14543 ofile='$ofile'
14544
14545
14546
14547
14548_ACEOF
14549
14550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14551
14552# Handling of arguments.
14553for ac_config_target in $ac_config_targets
14554do
14555 case $ac_config_target in
14556 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
14557 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
14558 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
14559 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14560 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
14561 "doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;;
14562 "doc/embryo.dox") CONFIG_FILES="$CONFIG_FILES doc/embryo.dox" ;;
14563 "embryo.pc") CONFIG_FILES="$CONFIG_FILES embryo.pc" ;;
14564 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
14565 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
14566 "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;;
14567 "src/bin/Makefile") CONFIG_FILES="$CONFIG_FILES src/bin/Makefile" ;;
14568 "embryo.spec") CONFIG_FILES="$CONFIG_FILES embryo.spec" ;;
14569
14570 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
14571 esac
14572done
14573
14574
14575# If the user did not use the arguments to specify the items to instantiate,
14576# then the envvar interface is used. Set only those that are not.
14577# We use the long form for the default assignment because of an extremely
14578# bizarre bug on SunOS 4.1.3.
14579if $ac_need_defaults; then
14580 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14581 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14582 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14583fi
14584
14585# Have a temporary directory for convenience. Make it in the build tree
14586# simply because there is no reason against having it here, and in addition,
14587# creating and moving files from /tmp can sometimes cause problems.
14588# Hook for its removal unless debugging.
14589# Note that there is a small window in which the directory will not be cleaned:
14590# after its creation but before its name has been assigned to `$tmp'.
14591$debug ||
14592{
14593 tmp=
14594 trap 'exit_status=$?
14595 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14596' 0
14597 trap 'as_fn_exit 1' 1 2 13 15
14598}
14599# Create a (secure) tmp directory for tmp files.
14600
14601{
14602 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14603 test -n "$tmp" && test -d "$tmp"
14604} ||
14605{
14606 tmp=./conf$$-$RANDOM
14607 (umask 077 && mkdir "$tmp")
14608} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14609
14610# Set up the scripts for CONFIG_FILES section.
14611# No need to generate them if there are no CONFIG_FILES.
14612# This happens for instance with `./config.status config.h'.
14613if test -n "$CONFIG_FILES"; then
14614
14615
14616ac_cr=`echo X | tr X '\015'`
14617# On cygwin, bash can eat \r inside `` if the user requested igncr.
14618# But we know of no other shell where ac_cr would be empty at this
14619# point, so we can use a bashism as a fallback.
14620if test "x$ac_cr" = x; then
14621 eval ac_cr=\$\'\\r\'
14622fi
14623ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14624if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14625 ac_cs_awk_cr='\\r'
14626else
14627 ac_cs_awk_cr=$ac_cr
14628fi
14629
14630echo 'BEGIN {' >"$tmp/subs1.awk" &&
14631_ACEOF
14632
14633
14634{
14635 echo "cat >conf$$subs.awk <<_ACEOF" &&
14636 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14637 echo "_ACEOF"
14638} >conf$$subs.sh ||
14639 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14640ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14641ac_delim='%!_!# '
14642for ac_last_try in false false false false false :; do
14643 . ./conf$$subs.sh ||
14644 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14645
14646 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14647 if test $ac_delim_n = $ac_delim_num; then
14648 break
14649 elif $ac_last_try; then
14650 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14651 else
14652 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14653 fi
14654done
14655rm -f conf$$subs.sh
14656
14657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14658cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14659_ACEOF
14660sed -n '
14661h
14662s/^/S["/; s/!.*/"]=/
14663p
14664g
14665s/^[^!]*!//
14666:repl
14667t repl
14668s/'"$ac_delim"'$//
14669t delim
14670:nl
14671h
14672s/\(.\{148\}\)..*/\1/
14673t more1
14674s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14675p
14676n
14677b repl
14678:more1
14679s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14680p
14681g
14682s/.\{148\}//
14683t nl
14684:delim
14685h
14686s/\(.\{148\}\)..*/\1/
14687t more2
14688s/["\\]/\\&/g; s/^/"/; s/$/"/
14689p
14690b
14691:more2
14692s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14693p
14694g
14695s/.\{148\}//
14696t delim
14697' <conf$$subs.awk | sed '
14698/^[^""]/{
14699 N
14700 s/\n//
14701}
14702' >>$CONFIG_STATUS || ac_write_fail=1
14703rm -f conf$$subs.awk
14704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14705_ACAWK
14706cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14707 for (key in S) S_is_set[key] = 1
14708 FS = ""
14709
14710}
14711{
14712 line = $ 0
14713 nfields = split(line, field, "@")
14714 substed = 0
14715 len = length(field[1])
14716 for (i = 2; i < nfields; i++) {
14717 key = field[i]
14718 keylen = length(key)
14719 if (S_is_set[key]) {
14720 value = S[key]
14721 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14722 len += length(value) + length(field[++i])
14723 substed = 1
14724 } else
14725 len += 1 + keylen
14726 }
14727
14728 print line
14729}
14730
14731_ACAWK
14732_ACEOF
14733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14734if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14735 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14736else
14737 cat
14738fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14739 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14740_ACEOF
14741
14742# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14743# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14744# trailing colons and then remove the whole line if VPATH becomes empty
14745# (actually we leave an empty line to preserve line numbers).
14746if test "x$srcdir" = x.; then
14747 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14748h
14749s///
14750s/^/:/
14751s/[ ]*$/:/
14752s/:\$(srcdir):/:/g
14753s/:\${srcdir}:/:/g
14754s/:@srcdir@:/:/g
14755s/^:*//
14756s/:*$//
14757x
14758s/\(=[ ]*\).*/\1/
14759G
14760s/\n//
14761s/^[^=]*=[ ]*$//
14762}'
14763fi
14764
14765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14766fi # test -n "$CONFIG_FILES"
14767
14768# Set up the scripts for CONFIG_HEADERS section.
14769# No need to generate them if there are no CONFIG_HEADERS.
14770# This happens for instance with `./config.status Makefile'.
14771if test -n "$CONFIG_HEADERS"; then
14772cat >"$tmp/defines.awk" <<\_ACAWK ||
14773BEGIN {
14774_ACEOF
14775
14776# Transform confdefs.h into an awk script `defines.awk', embedded as
14777# here-document in config.status, that substitutes the proper values into
14778# config.h.in to produce config.h.
14779
14780# Create a delimiter string that does not exist in confdefs.h, to ease
14781# handling of long lines.
14782ac_delim='%!_!# '
14783for ac_last_try in false false :; do
14784 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14785 if test -z "$ac_t"; then
14786 break
14787 elif $ac_last_try; then
14788 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14789 else
14790 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14791 fi
14792done
14793
14794# For the awk script, D is an array of macro values keyed by name,
14795# likewise P contains macro parameters if any. Preserve backslash
14796# newline sequences.
14797
14798ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14799sed -n '
14800s/.\{148\}/&'"$ac_delim"'/g
14801t rset
14802:rset
14803s/^[ ]*#[ ]*define[ ][ ]*/ /
14804t def
14805d
14806:def
14807s/\\$//
14808t bsnl
14809s/["\\]/\\&/g
14810s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14811D["\1"]=" \3"/p
14812s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14813d
14814:bsnl
14815s/["\\]/\\&/g
14816s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14817D["\1"]=" \3\\\\\\n"\\/p
14818t cont
14819s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14820t cont
14821d
14822:cont
14823n
14824s/.\{148\}/&'"$ac_delim"'/g
14825t clear
14826:clear
14827s/\\$//
14828t bsnlc
14829s/["\\]/\\&/g; s/^/"/; s/$/"/p
14830d
14831:bsnlc
14832s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14833b cont
14834' <confdefs.h | sed '
14835s/'"$ac_delim"'/"\\\
14836"/g' >>$CONFIG_STATUS || ac_write_fail=1
14837
14838cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14839 for (key in D) D_is_set[key] = 1
14840 FS = ""
14841}
14842/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14843 line = \$ 0
14844 split(line, arg, " ")
14845 if (arg[1] == "#") {
14846 defundef = arg[2]
14847 mac1 = arg[3]
14848 } else {
14849 defundef = substr(arg[1], 2)
14850 mac1 = arg[2]
14851 }
14852 split(mac1, mac2, "(") #)
14853 macro = mac2[1]
14854 prefix = substr(line, 1, index(line, defundef) - 1)
14855 if (D_is_set[macro]) {
14856 # Preserve the white space surrounding the "#".
14857 print prefix "define", macro P[macro] D[macro]
14858 next
14859 } else {
14860 # Replace #undef with comments. This is necessary, for example,
14861 # in the case of _POSIX_SOURCE, which is predefined and required
14862 # on some systems where configure will not decide to define it.
14863 if (defundef == "undef") {
14864 print "/*", prefix defundef, macro, "*/"
14865 next
14866 }
14867 }
14868}
14869{ print }
14870_ACAWK
14871_ACEOF
14872cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14873 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14874fi # test -n "$CONFIG_HEADERS"
14875
14876
14877eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14878shift
14879for ac_tag
14880do
14881 case $ac_tag in
14882 :[FHLC]) ac_mode=$ac_tag; continue;;
14883 esac
14884 case $ac_mode$ac_tag in
14885 :[FHL]*:*);;
14886 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
14887 :[FH]-) ac_tag=-:-;;
14888 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14889 esac
14890 ac_save_IFS=$IFS
14891 IFS=:
14892 set x $ac_tag
14893 IFS=$ac_save_IFS
14894 shift
14895 ac_file=$1
14896 shift
14897
14898 case $ac_mode in
14899 :L) ac_source=$1;;
14900 :[FH])
14901 ac_file_inputs=
14902 for ac_f
14903 do
14904 case $ac_f in
14905 -) ac_f="$tmp/stdin";;
14906 *) # Look for the file first in the build tree, then in the source tree
14907 # (if the path is not absolute). The absolute path cannot be DOS-style,
14908 # because $ac_f cannot contain `:'.
14909 test -f "$ac_f" ||
14910 case $ac_f in
14911 [\\/$]*) false;;
14912 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14913 esac ||
14914 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
14915 esac
14916 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14917 as_fn_append ac_file_inputs " '$ac_f'"
14918 done
14919
14920 # Let's still pretend it is `configure' which instantiates (i.e., don't
14921 # use $as_me), people would be surprised to read:
14922 # /* config.h. Generated by config.status. */
14923 configure_input='Generated from '`
14924 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14925 `' by configure.'
14926 if test x"$ac_file" != x-; then
14927 configure_input="$ac_file. $configure_input"
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14929$as_echo "$as_me: creating $ac_file" >&6;}
14930 fi
14931 # Neutralize special characters interpreted by sed in replacement strings.
14932 case $configure_input in #(
14933 *\&* | *\|* | *\\* )
14934 ac_sed_conf_input=`$as_echo "$configure_input" |
14935 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14936 *) ac_sed_conf_input=$configure_input;;
14937 esac
14938
14939 case $ac_tag in
14940 *:-:* | *:-) cat >"$tmp/stdin" \
14941 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
14942 esac
14943 ;;
14944 esac
14945
14946 ac_dir=`$as_dirname -- "$ac_file" ||
14947$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14948 X"$ac_file" : 'X\(//\)[^/]' \| \
14949 X"$ac_file" : 'X\(//\)$' \| \
14950 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14951$as_echo X"$ac_file" |
14952 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14953 s//\1/
14954 q
14955 }
14956 /^X\(\/\/\)[^/].*/{
14957 s//\1/
14958 q
14959 }
14960 /^X\(\/\/\)$/{
14961 s//\1/
14962 q
14963 }
14964 /^X\(\/\).*/{
14965 s//\1/
14966 q
14967 }
14968 s/.*/./; q'`
14969 as_dir="$ac_dir"; as_fn_mkdir_p
14970 ac_builddir=.
14971
14972case "$ac_dir" in
14973.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14974*)
14975 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14976 # A ".." for each directory in $ac_dir_suffix.
14977 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14978 case $ac_top_builddir_sub in
14979 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14980 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14981 esac ;;
14982esac
14983ac_abs_top_builddir=$ac_pwd
14984ac_abs_builddir=$ac_pwd$ac_dir_suffix
14985# for backward compatibility:
14986ac_top_builddir=$ac_top_build_prefix
14987
14988case $srcdir in
14989 .) # We are building in place.
14990 ac_srcdir=.
14991 ac_top_srcdir=$ac_top_builddir_sub
14992 ac_abs_top_srcdir=$ac_pwd ;;
14993 [\\/]* | ?:[\\/]* ) # Absolute name.
14994 ac_srcdir=$srcdir$ac_dir_suffix;
14995 ac_top_srcdir=$srcdir
14996 ac_abs_top_srcdir=$srcdir ;;
14997 *) # Relative name.
14998 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14999 ac_top_srcdir=$ac_top_build_prefix$srcdir
15000 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15001esac
15002ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15003
15004
15005 case $ac_mode in
15006 :F)
15007 #
15008 # CONFIG_FILE
15009 #
15010
15011 case $INSTALL in
15012 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15013 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15014 esac
15015 ac_MKDIR_P=$MKDIR_P
15016 case $MKDIR_P in
15017 [\\/$]* | ?:[\\/]* ) ;;
15018 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15019 esac
15020_ACEOF
15021
15022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15023# If the template does not know about datarootdir, expand it.
15024# FIXME: This hack should be removed a few years after 2.60.
15025ac_datarootdir_hack=; ac_datarootdir_seen=
15026ac_sed_dataroot='
15027/datarootdir/ {
15028 p
15029 q
15030}
15031/@datadir@/p
15032/@docdir@/p
15033/@infodir@/p
15034/@localedir@/p
15035/@mandir@/p'
15036case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15037*datarootdir*) ac_datarootdir_seen=yes;;
15038*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15040$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15041_ACEOF
15042cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15043 ac_datarootdir_hack='
15044 s&@datadir@&$datadir&g
15045 s&@docdir@&$docdir&g
15046 s&@infodir@&$infodir&g
15047 s&@localedir@&$localedir&g
15048 s&@mandir@&$mandir&g
15049 s&\\\${datarootdir}&$datarootdir&g' ;;
15050esac
15051_ACEOF
15052
15053# Neutralize VPATH when `$srcdir' = `.'.
15054# Shell code in configure.ac might set extrasub.
15055# FIXME: do we really want to maintain this feature?
15056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15057ac_sed_extra="$ac_vpsub
15058$extrasub
15059_ACEOF
15060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15061:t
15062/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15063s|@configure_input@|$ac_sed_conf_input|;t t
15064s&@top_builddir@&$ac_top_builddir_sub&;t t
15065s&@top_build_prefix@&$ac_top_build_prefix&;t t
15066s&@srcdir@&$ac_srcdir&;t t
15067s&@abs_srcdir@&$ac_abs_srcdir&;t t
15068s&@top_srcdir@&$ac_top_srcdir&;t t
15069s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15070s&@builddir@&$ac_builddir&;t t
15071s&@abs_builddir@&$ac_abs_builddir&;t t
15072s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15073s&@INSTALL@&$ac_INSTALL&;t t
15074s&@MKDIR_P@&$ac_MKDIR_P&;t t
15075$ac_datarootdir_hack
15076"
15077eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15078 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15079
15080test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15081 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15082 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15084which seems to be undefined. Please make sure it is defined" >&5
15085$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15086which seems to be undefined. Please make sure it is defined" >&2;}
15087
15088 rm -f "$tmp/stdin"
15089 case $ac_file in
15090 -) cat "$tmp/out" && rm -f "$tmp/out";;
15091 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15092 esac \
15093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15094 ;;
15095 :H)
15096 #
15097 # CONFIG_HEADER
15098 #
15099 if test x"$ac_file" != x-; then
15100 {
15101 $as_echo "/* $configure_input */" \
15102 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15103 } >"$tmp/config.h" \
15104 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15105 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15106 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15107$as_echo "$as_me: $ac_file is unchanged" >&6;}
15108 else
15109 rm -f "$ac_file"
15110 mv "$tmp/config.h" "$ac_file" \
15111 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15112 fi
15113 else
15114 $as_echo "/* $configure_input */" \
15115 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15116 || as_fn_error $? "could not create -" "$LINENO" 5
15117 fi
15118# Compute "$ac_file"'s index in $config_headers.
15119_am_arg="$ac_file"
15120_am_stamp_count=1
15121for _am_header in $config_headers :; do
15122 case $_am_header in
15123 $_am_arg | $_am_arg:* )
15124 break ;;
15125 * )
15126 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15127 esac
15128done
15129echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15130$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15131 X"$_am_arg" : 'X\(//\)[^/]' \| \
15132 X"$_am_arg" : 'X\(//\)$' \| \
15133 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15134$as_echo X"$_am_arg" |
15135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15136 s//\1/
15137 q
15138 }
15139 /^X\(\/\/\)[^/].*/{
15140 s//\1/
15141 q
15142 }
15143 /^X\(\/\/\)$/{
15144 s//\1/
15145 q
15146 }
15147 /^X\(\/\).*/{
15148 s//\1/
15149 q
15150 }
15151 s/.*/./; q'`/stamp-h$_am_stamp_count
15152 ;;
15153
15154 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15155$as_echo "$as_me: executing $ac_file commands" >&6;}
15156 ;;
15157 esac
15158
15159
15160 case $ac_file$ac_mode in
15161 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15162 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15163 # are listed without --file. Let's play safe and only enable the eval
15164 # if we detect the quoting.
15165 case $CONFIG_FILES in
15166 *\'*) eval set x "$CONFIG_FILES" ;;
15167 *) set x $CONFIG_FILES ;;
15168 esac
15169 shift
15170 for mf
15171 do
15172 # Strip MF so we end up with the name of the file.
15173 mf=`echo "$mf" | sed -e 's/:.*$//'`
15174 # Check whether this is an Automake generated Makefile or not.
15175 # We used to match only the files named `Makefile.in', but
15176 # some people rename them; so instead we look at the file content.
15177 # Grep'ing the first line is not enough: some people post-process
15178 # each Makefile.in and add a new line on top of each file to say so.
15179 # Grep'ing the whole file is not good either: AIX grep has a line
15180 # limit of 2048, but all sed's we know have understand at least 4000.
15181 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15182 dirpart=`$as_dirname -- "$mf" ||
15183$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15184 X"$mf" : 'X\(//\)[^/]' \| \
15185 X"$mf" : 'X\(//\)$' \| \
15186 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15187$as_echo X"$mf" |
15188 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15189 s//\1/
15190 q
15191 }
15192 /^X\(\/\/\)[^/].*/{
15193 s//\1/
15194 q
15195 }
15196 /^X\(\/\/\)$/{
15197 s//\1/
15198 q
15199 }
15200 /^X\(\/\).*/{
15201 s//\1/
15202 q
15203 }
15204 s/.*/./; q'`
15205 else
15206 continue
15207 fi
15208 # Extract the definition of DEPDIR, am__include, and am__quote
15209 # from the Makefile without running `make'.
15210 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15211 test -z "$DEPDIR" && continue
15212 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15213 test -z "am__include" && continue
15214 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15215 # When using ansi2knr, U may be empty or an underscore; expand it
15216 U=`sed -n 's/^U = //p' < "$mf"`
15217 # Find all dependency output files, they are included files with
15218 # $(DEPDIR) in their names. We invoke sed twice because it is the
15219 # simplest approach to changing $(DEPDIR) to its actual value in the
15220 # expansion.
15221 for file in `sed -n "
15222 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
15223 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15224 # Make sure the directory exists.
15225 test -f "$dirpart/$file" && continue
15226 fdir=`$as_dirname -- "$file" ||
15227$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15228 X"$file" : 'X\(//\)[^/]' \| \
15229 X"$file" : 'X\(//\)$' \| \
15230 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
15231$as_echo X"$file" |
15232 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15233 s//\1/
15234 q
15235 }
15236 /^X\(\/\/\)[^/].*/{
15237 s//\1/
15238 q
15239 }
15240 /^X\(\/\/\)$/{
15241 s//\1/
15242 q
15243 }
15244 /^X\(\/\).*/{
15245 s//\1/
15246 q
15247 }
15248 s/.*/./; q'`
15249 as_dir=$dirpart/$fdir; as_fn_mkdir_p
15250 # echo "creating $dirpart/$file"
15251 echo '# dummy' > "$dirpart/$file"
15252 done
15253 done
15254}
15255 ;;
15256 "libtool":C)
15257
15258 # See if we are running on zsh, and set the options which allow our
15259 # commands through without removal of \ escapes.
15260 if test -n "${ZSH_VERSION+set}" ; then
15261 setopt NO_GLOB_SUBST
15262 fi
15263
15264 cfgfile="${ofile}T"
15265 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
15266 $RM "$cfgfile"
15267
15268 cat <<_LT_EOF >> "$cfgfile"
15269#! $SHELL
15270
15271# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
15272# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
15273# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15274# NOTE: Changes made to this file will be lost: look at ltmain.sh.
15275#
15276# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15277# 2006, 2007, 2008 Free Software Foundation, Inc.
15278# Written by Gordon Matzigkeit, 1996
15279#
15280# This file is part of GNU Libtool.
15281#
15282# GNU Libtool is free software; you can redistribute it and/or
15283# modify it under the terms of the GNU General Public License as
15284# published by the Free Software Foundation; either version 2 of
15285# the License, or (at your option) any later version.
15286#
15287# As a special exception to the GNU General Public License,
15288# if you distribute this file as part of a program or library that
15289# is built using GNU Libtool, you may include this file under the
15290# same distribution terms that you use for the rest of that program.
15291#
15292# GNU Libtool is distributed in the hope that it will be useful,
15293# but WITHOUT ANY WARRANTY; without even the implied warranty of
15294# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15295# GNU General Public License for more details.
15296#
15297# You should have received a copy of the GNU General Public License
15298# along with GNU Libtool; see the file COPYING. If not, a copy
15299# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
15300# obtained by writing to the Free Software Foundation, Inc.,
15301# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15302
15303
15304# The names of the tagged configurations supported by this script.
15305available_tags=""
15306
15307# ### BEGIN LIBTOOL CONFIG
15308
15309# Assembler program.
15310AS=$AS
15311
15312# DLL creation program.
15313DLLTOOL=$DLLTOOL
15314
15315# Object dumper program.
15316OBJDUMP=$OBJDUMP
15317
15318# Which release of libtool.m4 was used?
15319macro_version=$macro_version
15320macro_revision=$macro_revision
15321
15322# Whether or not to build shared libraries.
15323build_libtool_libs=$enable_shared
15324
15325# Whether or not to build static libraries.
15326build_old_libs=$enable_static
15327
15328# What type of objects to build.
15329pic_mode=$pic_mode
15330
15331# Whether or not to optimize for fast installation.
15332fast_install=$enable_fast_install
15333
15334# The host system.
15335host_alias=$host_alias
15336host=$host
15337host_os=$host_os
15338
15339# The build system.
15340build_alias=$build_alias
15341build=$build
15342build_os=$build_os
15343
15344# A sed program that does not truncate output.
15345SED=$lt_SED
15346
15347# Sed that helps us avoid accidentally triggering echo(1) options like -n.
15348Xsed="\$SED -e 1s/^X//"
15349
15350# A grep program that handles long lines.
15351GREP=$lt_GREP
15352
15353# An ERE matcher.
15354EGREP=$lt_EGREP
15355
15356# A literal string matcher.
15357FGREP=$lt_FGREP
15358
15359# A BSD- or MS-compatible name lister.
15360NM=$lt_NM
15361
15362# Whether we need soft or hard links.
15363LN_S=$lt_LN_S
15364
15365# What is the maximum length of a command?
15366max_cmd_len=$max_cmd_len
15367
15368# Object file suffix (normally "o").
15369objext=$ac_objext
15370
15371# Executable file suffix (normally "").
15372exeext=$exeext
15373
15374# whether the shell understands "unset".
15375lt_unset=$lt_unset
15376
15377# turn spaces into newlines.
15378SP2NL=$lt_lt_SP2NL
15379
15380# turn newlines into spaces.
15381NL2SP=$lt_lt_NL2SP
15382
15383# How to create reloadable object files.
15384reload_flag=$lt_reload_flag
15385reload_cmds=$lt_reload_cmds
15386
15387# Method to check whether dependent libraries are shared objects.
15388deplibs_check_method=$lt_deplibs_check_method
15389
15390# Command to use when deplibs_check_method == "file_magic".
15391file_magic_cmd=$lt_file_magic_cmd
15392
15393# The archiver.
15394AR=$lt_AR
15395AR_FLAGS=$lt_AR_FLAGS
15396
15397# A symbol stripping program.
15398STRIP=$lt_STRIP
15399
15400# Commands used to install an old-style archive.
15401RANLIB=$lt_RANLIB
15402old_postinstall_cmds=$lt_old_postinstall_cmds
15403old_postuninstall_cmds=$lt_old_postuninstall_cmds
15404
15405# A C compiler.
15406LTCC=$lt_CC
15407
15408# LTCC compiler flags.
15409LTCFLAGS=$lt_CFLAGS
15410
15411# Take the output of nm and produce a listing of raw symbols and C names.
15412global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
15413
15414# Transform the output of nm in a proper C declaration.
15415global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
15416
15417# Transform the output of nm in a C name address pair.
15418global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
15419
15420# Transform the output of nm in a C name address pair when lib prefix is needed.
15421global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
15422
15423# The name of the directory that contains temporary libtool files.
15424objdir=$objdir
15425
15426# Shell to use when invoking shell scripts.
15427SHELL=$lt_SHELL
15428
15429# An echo program that does not interpret backslashes.
15430ECHO=$lt_ECHO
15431
15432# Used to examine libraries when file_magic_cmd begins with "file".
15433MAGIC_CMD=$MAGIC_CMD
15434
15435# Must we lock files when doing compilation?
15436need_locks=$lt_need_locks
15437
15438# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
15439DSYMUTIL=$lt_DSYMUTIL
15440
15441# Tool to change global to local symbols on Mac OS X.
15442NMEDIT=$lt_NMEDIT
15443
15444# Tool to manipulate fat objects and archives on Mac OS X.
15445LIPO=$lt_LIPO
15446
15447# ldd/readelf like tool for Mach-O binaries on Mac OS X.
15448OTOOL=$lt_OTOOL
15449
15450# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
15451OTOOL64=$lt_OTOOL64
15452
15453# Old archive suffix (normally "a").
15454libext=$libext
15455
15456# Shared library suffix (normally ".so").
15457shrext_cmds=$lt_shrext_cmds
15458
15459# The commands to extract the exported symbol list from a shared archive.
15460extract_expsyms_cmds=$lt_extract_expsyms_cmds
15461
15462# Variables whose values should be saved in libtool wrapper scripts and
15463# restored at link time.
15464variables_saved_for_relink=$lt_variables_saved_for_relink
15465
15466# Do we need the "lib" prefix for modules?
15467need_lib_prefix=$need_lib_prefix
15468
15469# Do we need a version for libraries?
15470need_version=$need_version
15471
15472# Library versioning type.
15473version_type=$version_type
15474
15475# Shared library runtime path variable.
15476runpath_var=$runpath_var
15477
15478# Shared library path variable.
15479shlibpath_var=$shlibpath_var
15480
15481# Is shlibpath searched before the hard-coded library search path?
15482shlibpath_overrides_runpath=$shlibpath_overrides_runpath
15483
15484# Format of library name prefix.
15485libname_spec=$lt_libname_spec
15486
15487# List of archive names. First name is the real one, the rest are links.
15488# The last name is the one that the linker finds with -lNAME
15489library_names_spec=$lt_library_names_spec
15490
15491# The coded name of the library, if different from the real name.
15492soname_spec=$lt_soname_spec
15493
15494# Command to use after installation of a shared archive.
15495postinstall_cmds=$lt_postinstall_cmds
15496
15497# Command to use after uninstallation of a shared archive.
15498postuninstall_cmds=$lt_postuninstall_cmds
15499
15500# Commands used to finish a libtool library installation in a directory.
15501finish_cmds=$lt_finish_cmds
15502
15503# As "finish_cmds", except a single script fragment to be evaled but
15504# not shown.
15505finish_eval=$lt_finish_eval
15506
15507# Whether we should hardcode library paths into libraries.
15508hardcode_into_libs=$hardcode_into_libs
15509
15510# Compile-time system search path for libraries.
15511sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
15512
15513# Run-time system search path for libraries.
15514sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
15515
15516# Whether dlopen is supported.
15517dlopen_support=$enable_dlopen
15518
15519# Whether dlopen of programs is supported.
15520dlopen_self=$enable_dlopen_self
15521
15522# Whether dlopen of statically linked programs is supported.
15523dlopen_self_static=$enable_dlopen_self_static
15524
15525# Commands to strip libraries.
15526old_striplib=$lt_old_striplib
15527striplib=$lt_striplib
15528
15529
15530# The linker used to build libraries.
15531LD=$lt_LD
15532
15533# Commands used to build an old-style archive.
15534old_archive_cmds=$lt_old_archive_cmds
15535
15536# A language specific compiler.
15537CC=$lt_compiler
15538
15539# Is the compiler the GNU compiler?
15540with_gcc=$GCC
15541
15542# Compiler flag to turn off builtin functions.
15543no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
15544
15545# How to pass a linker flag through the compiler.
15546wl=$lt_lt_prog_compiler_wl
15547
15548# Additional compiler flags for building library objects.
15549pic_flag=$lt_lt_prog_compiler_pic
15550
15551# Compiler flag to prevent dynamic linking.
15552link_static_flag=$lt_lt_prog_compiler_static
15553
15554# Does compiler simultaneously support -c and -o options?
15555compiler_c_o=$lt_lt_cv_prog_compiler_c_o
15556
15557# Whether or not to add -lc for building shared libraries.
15558build_libtool_need_lc=$archive_cmds_need_lc
15559
15560# Whether or not to disallow shared libs when runtime libs are static.
15561allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
15562
15563# Compiler flag to allow reflexive dlopens.
15564export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
15565
15566# Compiler flag to generate shared objects directly from archives.
15567whole_archive_flag_spec=$lt_whole_archive_flag_spec
15568
15569# Whether the compiler copes with passing no objects directly.
15570compiler_needs_object=$lt_compiler_needs_object
15571
15572# Create an old-style archive from a shared archive.
15573old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
15574
15575# Create a temporary old-style archive to link instead of a shared archive.
15576old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
15577
15578# Commands used to build a shared archive.
15579archive_cmds=$lt_archive_cmds
15580archive_expsym_cmds=$lt_archive_expsym_cmds
15581
15582# Commands used to build a loadable module if different from building
15583# a shared archive.
15584module_cmds=$lt_module_cmds
15585module_expsym_cmds=$lt_module_expsym_cmds
15586
15587# Whether we are building with GNU ld or not.
15588with_gnu_ld=$lt_with_gnu_ld
15589
15590# Flag that allows shared libraries with undefined symbols to be built.
15591allow_undefined_flag=$lt_allow_undefined_flag
15592
15593# Flag that enforces no undefined symbols.
15594no_undefined_flag=$lt_no_undefined_flag
15595
15596# Flag to hardcode \$libdir into a binary during linking.
15597# This must work even if \$libdir does not exist
15598hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
15599
15600# If ld is used when linking, flag to hardcode \$libdir into a binary
15601# during linking. This must work even if \$libdir does not exist.
15602hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
15603
15604# Whether we need a single "-rpath" flag with a separated argument.
15605hardcode_libdir_separator=$lt_hardcode_libdir_separator
15606
15607# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
15608# DIR into the resulting binary.
15609hardcode_direct=$hardcode_direct
15610
15611# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
15612# DIR into the resulting binary and the resulting library dependency is
15613# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
15614# library is relocated.
15615hardcode_direct_absolute=$hardcode_direct_absolute
15616
15617# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
15618# into the resulting binary.
15619hardcode_minus_L=$hardcode_minus_L
15620
15621# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
15622# into the resulting binary.
15623hardcode_shlibpath_var=$hardcode_shlibpath_var
15624
15625# Set to "yes" if building a shared library automatically hardcodes DIR
15626# into the library and all subsequent libraries and executables linked
15627# against it.
15628hardcode_automatic=$hardcode_automatic
15629
15630# Set to yes if linker adds runtime paths of dependent libraries
15631# to runtime path list.
15632inherit_rpath=$inherit_rpath
15633
15634# Whether libtool must link a program against all its dependency libraries.
15635link_all_deplibs=$link_all_deplibs
15636
15637# Fix the shell variable \$srcfile for the compiler.
15638fix_srcfile_path=$lt_fix_srcfile_path
15639
15640# Set to "yes" if exported symbols are required.
15641always_export_symbols=$always_export_symbols
15642
15643# The commands to list exported symbols.
15644export_symbols_cmds=$lt_export_symbols_cmds
15645
15646# Symbols that should not be listed in the preloaded symbols.
15647exclude_expsyms=$lt_exclude_expsyms
15648
15649# Symbols that must always be exported.
15650include_expsyms=$lt_include_expsyms
15651
15652# Commands necessary for linking programs (against libraries) with templates.
15653prelink_cmds=$lt_prelink_cmds
15654
15655# Specify filename containing input files.
15656file_list_spec=$lt_file_list_spec
15657
15658# How to hardcode a shared library path into an executable.
15659hardcode_action=$hardcode_action
15660
15661# ### END LIBTOOL CONFIG
15662
15663_LT_EOF
15664
15665 case $host_os in
15666 aix3*)
15667 cat <<\_LT_EOF >> "$cfgfile"
15668# AIX sometimes has problems with the GCC collect2 program. For some
15669# reason, if we set the COLLECT_NAMES environment variable, the problems
15670# vanish in a puff of smoke.
15671if test "X${COLLECT_NAMES+set}" != Xset; then
15672 COLLECT_NAMES=
15673 export COLLECT_NAMES
15674fi
15675_LT_EOF
15676 ;;
15677 esac
15678
15679
15680ltmain="$ac_aux_dir/ltmain.sh"
15681
15682
15683 # We use sed instead of cat because bash on DJGPP gets confused if
15684 # if finds mixed CR/LF and LF-only lines. Since sed operates in
15685 # text mode, it properly converts lines to CR/LF. This bash problem
15686 # is reportedly fixed, but why not run on old versions too?
15687 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
15688 || (rm -f "$cfgfile"; exit 1)
15689
15690 case $xsi_shell in
15691 yes)
15692 cat << \_LT_EOF >> "$cfgfile"
15693
15694# func_dirname file append nondir_replacement
15695# Compute the dirname of FILE. If nonempty, add APPEND to the result,
15696# otherwise set result to NONDIR_REPLACEMENT.
15697func_dirname ()
15698{
15699 case ${1} in
15700 */*) func_dirname_result="${1%/*}${2}" ;;
15701 * ) func_dirname_result="${3}" ;;
15702 esac
15703}
15704
15705# func_basename file
15706func_basename ()
15707{
15708 func_basename_result="${1##*/}"
15709}
15710
15711# func_dirname_and_basename file append nondir_replacement
15712# perform func_basename and func_dirname in a single function
15713# call:
15714# dirname: Compute the dirname of FILE. If nonempty,
15715# add APPEND to the result, otherwise set result
15716# to NONDIR_REPLACEMENT.
15717# value returned in "$func_dirname_result"
15718# basename: Compute filename of FILE.
15719# value retuned in "$func_basename_result"
15720# Implementation must be kept synchronized with func_dirname
15721# and func_basename. For efficiency, we do not delegate to
15722# those functions but instead duplicate the functionality here.
15723func_dirname_and_basename ()
15724{
15725 case ${1} in
15726 */*) func_dirname_result="${1%/*}${2}" ;;
15727 * ) func_dirname_result="${3}" ;;
15728 esac
15729 func_basename_result="${1##*/}"
15730}
15731
15732# func_stripname prefix suffix name
15733# strip PREFIX and SUFFIX off of NAME.
15734# PREFIX and SUFFIX must not contain globbing or regex special
15735# characters, hashes, percent signs, but SUFFIX may contain a leading
15736# dot (in which case that matches only a dot).
15737func_stripname ()
15738{
15739 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
15740 # positional parameters, so assign one to ordinary parameter first.
15741 func_stripname_result=${3}
15742 func_stripname_result=${func_stripname_result#"${1}"}
15743 func_stripname_result=${func_stripname_result%"${2}"}
15744}
15745
15746# func_opt_split
15747func_opt_split ()
15748{
15749 func_opt_split_opt=${1%%=*}
15750 func_opt_split_arg=${1#*=}
15751}
15752
15753# func_lo2o object
15754func_lo2o ()
15755{
15756 case ${1} in
15757 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
15758 *) func_lo2o_result=${1} ;;
15759 esac
15760}
15761
15762# func_xform libobj-or-source
15763func_xform ()
15764{
15765 func_xform_result=${1%.*}.lo
15766}
15767
15768# func_arith arithmetic-term...
15769func_arith ()
15770{
15771 func_arith_result=$(( $* ))
15772}
15773
15774# func_len string
15775# STRING may not start with a hyphen.
15776func_len ()
15777{
15778 func_len_result=${#1}
15779}
15780
15781_LT_EOF
15782 ;;
15783 *) # Bourne compatible functions.
15784 cat << \_LT_EOF >> "$cfgfile"
15785
15786# func_dirname file append nondir_replacement
15787# Compute the dirname of FILE. If nonempty, add APPEND to the result,
15788# otherwise set result to NONDIR_REPLACEMENT.
15789func_dirname ()
15790{
15791 # Extract subdirectory from the argument.
15792 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
15793 if test "X$func_dirname_result" = "X${1}"; then
15794 func_dirname_result="${3}"
15795 else
15796 func_dirname_result="$func_dirname_result${2}"
15797 fi
15798}
15799
15800# func_basename file
15801func_basename ()
15802{
15803 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
15804}
15805
15806
15807# func_stripname prefix suffix name
15808# strip PREFIX and SUFFIX off of NAME.
15809# PREFIX and SUFFIX must not contain globbing or regex special
15810# characters, hashes, percent signs, but SUFFIX may contain a leading
15811# dot (in which case that matches only a dot).
15812# func_strip_suffix prefix name
15813func_stripname ()
15814{
15815 case ${2} in
15816 .*) func_stripname_result=`$ECHO "X${3}" \
15817 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
15818 *) func_stripname_result=`$ECHO "X${3}" \
15819 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
15820 esac
15821}
15822
15823# sed scripts:
15824my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
15825my_sed_long_arg='1s/^-[^=]*=//'
15826
15827# func_opt_split
15828func_opt_split ()
15829{
15830 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
15831 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
15832}
15833
15834# func_lo2o object
15835func_lo2o ()
15836{
15837 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
15838}
15839
15840# func_xform libobj-or-source
15841func_xform ()
15842{
15843 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
15844}
15845
15846# func_arith arithmetic-term...
15847func_arith ()
15848{
15849 func_arith_result=`expr "$@"`
15850}
15851
15852# func_len string
15853# STRING may not start with a hyphen.
15854func_len ()
15855{
15856 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
15857}
15858
15859_LT_EOF
15860esac
15861
15862case $lt_shell_append in
15863 yes)
15864 cat << \_LT_EOF >> "$cfgfile"
15865
15866# func_append var value
15867# Append VALUE to the end of shell variable VAR.
15868func_append ()
15869{
15870 eval "$1+=\$2"
15871}
15872_LT_EOF
15873 ;;
15874 *)
15875 cat << \_LT_EOF >> "$cfgfile"
15876
15877# func_append var value
15878# Append VALUE to the end of shell variable VAR.
15879func_append ()
15880{
15881 eval "$1=\$$1\$2"
15882}
15883
15884_LT_EOF
15885 ;;
15886 esac
15887
15888
15889 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
15890 || (rm -f "$cfgfile"; exit 1)
15891
15892 mv -f "$cfgfile" "$ofile" ||
15893 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
15894 chmod +x "$ofile"
15895
15896 ;;
15897
15898 esac
15899done # for ac_tag
15900
15901
15902as_fn_exit 0
15903_ACEOF
15904ac_clean_files=$ac_clean_files_save
15905
15906test $ac_write_fail = 0 ||
15907 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15908
15909
15910# configure is writing to config.log, and then calls config.status.
15911# config.status does its own redirection, appending to config.log.
15912# Unfortunately, on DOS this fails, as config.log is still kept open
15913# by configure, so config.status won't be able to write to it; its
15914# output is simply discarded. So we exec the FD to /dev/null,
15915# effectively closing config.log, so it can be properly (re)opened and
15916# appended to by config.status. When coming back to configure, we
15917# need to make the FD available again.
15918if test "$no_create" != yes; then
15919 ac_cs_success=:
15920 ac_config_status_args=
15921 test "$silent" = yes &&
15922 ac_config_status_args="$ac_config_status_args --quiet"
15923 exec 5>/dev/null
15924 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15925 exec 5>>config.log
15926 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15927 # would make configure fail if this is the last instruction.
15928 $ac_cs_success || as_fn_exit 1
15929fi
15930if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15932$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15933fi
15934
15935
15936
15937#####################################################################
15938## Info
15939
15940echo
15941echo
15942echo
15943echo "------------------------------------------------------------------------"
15944echo "$PACKAGE $VERSION"
15945echo "------------------------------------------------------------------------"
15946echo
15947echo "Configuration Options Summary:"
15948echo
15949echo " Build embryo_cc......: $have_embryo_cc"
15950echo
15951echo " Documentation........: ${build_doc}"
15952echo
15953echo "Compilation............: make (or gmake)"
15954echo " CPPFLAGS.............: $CPPFLAGS"
15955echo " CFLAGS...............: $CFLAGS"
15956echo " LDFLAGS..............: $LDFLAGS"
15957echo
15958echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
15959echo " prefix...............: $prefix"
15960echo
diff --git a/libraries/embryo/configure.ac b/libraries/embryo/configure.ac
deleted file mode 100644
index 09bd04e..0000000
--- a/libraries/embryo/configure.ac
+++ /dev/null
@@ -1,222 +0,0 @@
1##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [2])
5m4_define([v_mic], [0])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev])
10##-- When doing snapshots - change soname. remove dnl on below line
11dnl m4_define([relname], [ver-pre-svn-07])
12dnl m4_define([v_rel], [-release ver-pre-svn-07])
13##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15m4_define([lt_cur], m4_eval(v_maj + v_min))
16m4_define([lt_rev], v_mic)
17m4_define([lt_age], v_min)
18##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21AC_INIT([embryo], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net])
22AC_PREREQ([2.52])
23AC_CONFIG_SRCDIR([configure.ac])
24AC_CONFIG_MACRO_DIR([m4])
25
26AC_CONFIG_HEADERS([config.h])
27AH_TOP([
28#ifndef EFL_CONFIG_H__
29#define EFL_CONFIG_H__
30])
31AH_BOTTOM([
32#endif /* EFL_CONFIG_H__ */
33])
34
35AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38AC_LIBTOOL_WIN32_DLL
39define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
41AC_PROG_LIBTOOL
42
43##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
44##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
46m4_ifdef([v_rel], , [m4_define([v_rel], [])])
47AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
48AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
49AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
50AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
51version_info="lt_cur:lt_rev:lt_age"
52release_info="v_rel"
53AC_SUBST(version_info)
54AC_SUBST(release_info)
55##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
57VMAJ=v_maj
58AC_SUBST(VMAJ)
59
60### Default options with respect to host
61
62AC_CANONICAL_BUILD
63AC_CANONICAL_HOST
64
65requirement_embryo=""
66embryoincludedir="${datadir}/include"
67
68
69### Additional options to configure
70
71EFL_ENABLE_BIN([embryo-cc])
72
73
74### Checks for programs
75AC_PROG_CC
76
77# doxygen program for documentation building
78
79EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
80
81# pkg-config
82
83PKG_PROG_PKG_CONFIG
84
85# Check whether pkg-config supports Requires.private
86if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
87 pkgconfig_requires_private="Requires.private"
88else
89 pkgconfig_requires_private="Requires"
90fi
91AC_SUBST(pkgconfig_requires_private)
92
93
94### Checks for libraries
95
96# Evil library for compilation on Windows
97
98EFL_EMBRYO_BUILD=""
99case "$host_os" in
100 mingw*)
101 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
102 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
103 requirement_embryo="evil ${requirement_embryo}"
104 EFL_EMBRYO_BUILD="-DEFL_EMBRYO_BUILD"
105 ;;
106esac
107AC_SUBST(EFL_EMBRYO_BUILD)
108
109# For embryo_cc_prefix.c
110PKG_CHECK_MODULES([EINA], [eina >= 1.2.0])
111
112### Checks for portability layer
113
114PKG_CHECK_MODULES([EXOTIC],
115 [exotic],
116 [enable_exotic="yes"],
117 [enable_exotic="no"])
118
119if test "x${enable_exotic}" = "xyes"; then
120 requirement_embryo="exotic ${requirement_embryo}"
121
122 AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.])
123fi
124
125### Checks for header files
126
127AC_CHECK_HEADERS([unistd.h])
128EFL_CHECK_PATH_MAX
129
130
131### Checks for types
132
133
134### Checks for structures
135
136
137### Checks for compiler characteristics
138AC_C_BIGENDIAN
139AM_PROG_CC_C_O
140AC_C_CONST
141AC_C_INLINE
142AC_PROG_CC_STDC
143AC_HEADER_STDC
144AC_C___ATTRIBUTE__
145
146EMBRYO_CPPFLAGS=""
147EMBRYO_CFLAGS=""
148case "$host_os" in
149 mingw32ce*)
150 EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
151 ;;
152esac
153AC_SUBST(EMBRYO_CPPFLAGS)
154AC_SUBST(EMBRYO_CFLAGS)
155
156
157### Checks for linker characteristics
158
159lt_enable_auto_import=""
160case "$host_os" in
161 mingw*)
162 lt_enable_auto_import="-Wl,--enable-auto-import"
163 ;;
164esac
165AC_SUBST(lt_enable_auto_import)
166
167
168### Checks for library functions
169
170AC_ISC_POSIX
171
172# alloca
173AC_FUNC_ALLOCA
174
175# fnmatch
176EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
177
178# gettimeofday
179EFL_CHECK_GETTIMEOFDAY([], [AC_MSG_ERROR([Cannot find gettimeofday()])])
180
181
182AC_SUBST(requirement_embryo)
183AC_SUBST(embryoincludedir)
184
185AC_OUTPUT([
186Makefile
187doc/Makefile
188doc/Doxyfile
189doc/embryo.dox
190embryo.pc
191include/Makefile
192src/Makefile
193src/lib/Makefile
194src/bin/Makefile
195embryo.spec
196])
197
198
199#####################################################################
200## Info
201
202echo
203echo
204echo
205echo "------------------------------------------------------------------------"
206echo "$PACKAGE $VERSION"
207echo "------------------------------------------------------------------------"
208echo
209echo "Configuration Options Summary:"
210echo
211echo " Build embryo_cc......: $have_embryo_cc"
212echo
213echo " Documentation........: ${build_doc}"
214echo
215echo "Compilation............: make (or gmake)"
216echo " CPPFLAGS.............: $CPPFLAGS"
217echo " CFLAGS...............: $CFLAGS"
218echo " LDFLAGS..............: $LDFLAGS"
219echo
220echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
221echo " prefix...............: $prefix"
222echo
diff --git a/libraries/embryo/depcomp b/libraries/embryo/depcomp
deleted file mode 100755
index df8eea7..0000000
--- a/libraries/embryo/depcomp
+++ /dev/null
@@ -1,630 +0,0 @@
1#! /bin/sh
2# depcomp - compile a program generating dependencies as side-effects
3
4scriptversion=2009-04-28.21; # UTC
5
6# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
7# Software Foundation, Inc.
8
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2, or (at your option)
12# any later version.
13
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
28
29case $1 in
30 '')
31 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
32 exit 1;
33 ;;
34 -h | --h*)
35 cat <<\EOF
36Usage: depcomp [--help] [--version] PROGRAM [ARGS]
37
38Run PROGRAMS ARGS to compile a file, generating dependencies
39as side-effects.
40
41Environment variables:
42 depmode Dependency tracking mode.
43 source Source file read by `PROGRAMS ARGS'.
44 object Object file output by `PROGRAMS ARGS'.
45 DEPDIR directory where to store dependencies.
46 depfile Dependency file to output.
47 tmpdepfile Temporary file to use when outputing dependencies.
48 libtool Whether libtool is used (yes/no).
49
50Report bugs to <bug-automake@gnu.org>.
51EOF
52 exit $?
53 ;;
54 -v | --v*)
55 echo "depcomp $scriptversion"
56 exit $?
57 ;;
58esac
59
60if test -z "$depmode" || test -z "$source" || test -z "$object"; then
61 echo "depcomp: Variables source, object and depmode must be set" 1>&2
62 exit 1
63fi
64
65# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
66depfile=${depfile-`echo "$object" |
67 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
68tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
69
70rm -f "$tmpdepfile"
71
72# Some modes work just like other modes, but use different flags. We
73# parameterize here, but still list the modes in the big case below,
74# to make depend.m4 easier to write. Note that we *cannot* use a case
75# here, because this file can only contain one case statement.
76if test "$depmode" = hp; then
77 # HP compiler uses -M and no extra arg.
78 gccflag=-M
79 depmode=gcc
80fi
81
82if test "$depmode" = dashXmstdout; then
83 # This is just like dashmstdout with a different argument.
84 dashmflag=-xM
85 depmode=dashmstdout
86fi
87
88cygpath_u="cygpath -u -f -"
89if test "$depmode" = msvcmsys; then
90 # This is just like msvisualcpp but w/o cygpath translation.
91 # Just convert the backslash-escaped backslashes to single forward
92 # slashes to satisfy depend.m4
93 cygpath_u="sed s,\\\\\\\\,/,g"
94 depmode=msvisualcpp
95fi
96
97case "$depmode" in
98gcc3)
99## gcc 3 implements dependency tracking that does exactly what
100## we want. Yay! Note: for some reason libtool 1.4 doesn't like
101## it if -MD -MP comes after the -MF stuff. Hmm.
102## Unfortunately, FreeBSD c89 acceptance of flags depends upon
103## the command line argument order; so add the flags where they
104## appear in depend2.am. Note that the slowdown incurred here
105## affects only configure: in makefiles, %FASTDEP% shortcuts this.
106 for arg
107 do
108 case $arg in
109 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
110 *) set fnord "$@" "$arg" ;;
111 esac
112 shift # fnord
113 shift # $arg
114 done
115 "$@"
116 stat=$?
117 if test $stat -eq 0; then :
118 else
119 rm -f "$tmpdepfile"
120 exit $stat
121 fi
122 mv "$tmpdepfile" "$depfile"
123 ;;
124
125gcc)
126## There are various ways to get dependency output from gcc. Here's
127## why we pick this rather obscure method:
128## - Don't want to use -MD because we'd like the dependencies to end
129## up in a subdir. Having to rename by hand is ugly.
130## (We might end up doing this anyway to support other compilers.)
131## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
132## -MM, not -M (despite what the docs say).
133## - Using -M directly means running the compiler twice (even worse
134## than renaming).
135 if test -z "$gccflag"; then
136 gccflag=-MD,
137 fi
138 "$@" -Wp,"$gccflag$tmpdepfile"
139 stat=$?
140 if test $stat -eq 0; then :
141 else
142 rm -f "$tmpdepfile"
143 exit $stat
144 fi
145 rm -f "$depfile"
146 echo "$object : \\" > "$depfile"
147 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
148## The second -e expression handles DOS-style file names with drive letters.
149 sed -e 's/^[^:]*: / /' \
150 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
151## This next piece of magic avoids the `deleted header file' problem.
152## The problem is that when a header file which appears in a .P file
153## is deleted, the dependency causes make to die (because there is
154## typically no way to rebuild the header). We avoid this by adding
155## dummy dependencies for each header file. Too bad gcc doesn't do
156## this for us directly.
157 tr ' ' '
158' < "$tmpdepfile" |
159## Some versions of gcc put a space before the `:'. On the theory
160## that the space means something, we add a space to the output as
161## well.
162## Some versions of the HPUX 10.20 sed can't process this invocation
163## correctly. Breaking it into two sed invocations is a workaround.
164 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
165 rm -f "$tmpdepfile"
166 ;;
167
168hp)
169 # This case exists only to let depend.m4 do its work. It works by
170 # looking at the text of this script. This case will never be run,
171 # since it is checked for above.
172 exit 1
173 ;;
174
175sgi)
176 if test "$libtool" = yes; then
177 "$@" "-Wp,-MDupdate,$tmpdepfile"
178 else
179 "$@" -MDupdate "$tmpdepfile"
180 fi
181 stat=$?
182 if test $stat -eq 0; then :
183 else
184 rm -f "$tmpdepfile"
185 exit $stat
186 fi
187 rm -f "$depfile"
188
189 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
190 echo "$object : \\" > "$depfile"
191
192 # Clip off the initial element (the dependent). Don't try to be
193 # clever and replace this with sed code, as IRIX sed won't handle
194 # lines with more than a fixed number of characters (4096 in
195 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
196 # the IRIX cc adds comments like `#:fec' to the end of the
197 # dependency line.
198 tr ' ' '
199' < "$tmpdepfile" \
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
201 tr '
202' ' ' >> "$depfile"
203 echo >> "$depfile"
204
205 # The second pass generates a dummy entry for each header file.
206 tr ' ' '
207' < "$tmpdepfile" \
208 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
209 >> "$depfile"
210 else
211 # The sourcefile does not contain any dependencies, so just
212 # store a dummy comment line, to avoid errors with the Makefile
213 # "include basename.Plo" scheme.
214 echo "#dummy" > "$depfile"
215 fi
216 rm -f "$tmpdepfile"
217 ;;
218
219aix)
220 # The C for AIX Compiler uses -M and outputs the dependencies
221 # in a .u file. In older versions, this file always lives in the
222 # current directory. Also, the AIX compiler puts `$object:' at the
223 # start of each line; $object doesn't have directory information.
224 # Version 6 uses the directory in both cases.
225 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
226 test "x$dir" = "x$object" && dir=
227 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
228 if test "$libtool" = yes; then
229 tmpdepfile1=$dir$base.u
230 tmpdepfile2=$base.u
231 tmpdepfile3=$dir.libs/$base.u
232 "$@" -Wc,-M
233 else
234 tmpdepfile1=$dir$base.u
235 tmpdepfile2=$dir$base.u
236 tmpdepfile3=$dir$base.u
237 "$@" -M
238 fi
239 stat=$?
240
241 if test $stat -eq 0; then :
242 else
243 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
244 exit $stat
245 fi
246
247 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
248 do
249 test -f "$tmpdepfile" && break
250 done
251 if test -f "$tmpdepfile"; then
252 # Each line is of the form `foo.o: dependent.h'.
253 # Do two passes, one to just change these to
254 # `$object: dependent.h' and one to simply `dependent.h:'.
255 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
256 # That's a tab and a space in the [].
257 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
258 else
259 # The sourcefile does not contain any dependencies, so just
260 # store a dummy comment line, to avoid errors with the Makefile
261 # "include basename.Plo" scheme.
262 echo "#dummy" > "$depfile"
263 fi
264 rm -f "$tmpdepfile"
265 ;;
266
267icc)
268 # Intel's C compiler understands `-MD -MF file'. However on
269 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
270 # ICC 7.0 will fill foo.d with something like
271 # foo.o: sub/foo.c
272 # foo.o: sub/foo.h
273 # which is wrong. We want:
274 # sub/foo.o: sub/foo.c
275 # sub/foo.o: sub/foo.h
276 # sub/foo.c:
277 # sub/foo.h:
278 # ICC 7.1 will output
279 # foo.o: sub/foo.c sub/foo.h
280 # and will wrap long lines using \ :
281 # foo.o: sub/foo.c ... \
282 # sub/foo.h ... \
283 # ...
284
285 "$@" -MD -MF "$tmpdepfile"
286 stat=$?
287 if test $stat -eq 0; then :
288 else
289 rm -f "$tmpdepfile"
290 exit $stat
291 fi
292 rm -f "$depfile"
293 # Each line is of the form `foo.o: dependent.h',
294 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
295 # Do two passes, one to just change these to
296 # `$object: dependent.h' and one to simply `dependent.h:'.
297 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
298 # Some versions of the HPUX 10.20 sed can't process this invocation
299 # correctly. Breaking it into two sed invocations is a workaround.
300 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
301 sed -e 's/$/ :/' >> "$depfile"
302 rm -f "$tmpdepfile"
303 ;;
304
305hp2)
306 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
307 # compilers, which have integrated preprocessors. The correct option
308 # to use with these is +Maked; it writes dependencies to a file named
309 # 'foo.d', which lands next to the object file, wherever that
310 # happens to be.
311 # Much of this is similar to the tru64 case; see comments there.
312 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
313 test "x$dir" = "x$object" && dir=
314 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
315 if test "$libtool" = yes; then
316 tmpdepfile1=$dir$base.d
317 tmpdepfile2=$dir.libs/$base.d
318 "$@" -Wc,+Maked
319 else
320 tmpdepfile1=$dir$base.d
321 tmpdepfile2=$dir$base.d
322 "$@" +Maked
323 fi
324 stat=$?
325 if test $stat -eq 0; then :
326 else
327 rm -f "$tmpdepfile1" "$tmpdepfile2"
328 exit $stat
329 fi
330
331 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
332 do
333 test -f "$tmpdepfile" && break
334 done
335 if test -f "$tmpdepfile"; then
336 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
337 # Add `dependent.h:' lines.
338 sed -ne '2,${
339 s/^ *//
340 s/ \\*$//
341 s/$/:/
342 p
343 }' "$tmpdepfile" >> "$depfile"
344 else
345 echo "#dummy" > "$depfile"
346 fi
347 rm -f "$tmpdepfile" "$tmpdepfile2"
348 ;;
349
350tru64)
351 # The Tru64 compiler uses -MD to generate dependencies as a side
352 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
353 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
354 # dependencies in `foo.d' instead, so we check for that too.
355 # Subdirectories are respected.
356 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
357 test "x$dir" = "x$object" && dir=
358 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
359
360 if test "$libtool" = yes; then
361 # With Tru64 cc, shared objects can also be used to make a
362 # static library. This mechanism is used in libtool 1.4 series to
363 # handle both shared and static libraries in a single compilation.
364 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
365 #
366 # With libtool 1.5 this exception was removed, and libtool now
367 # generates 2 separate objects for the 2 libraries. These two
368 # compilations output dependencies in $dir.libs/$base.o.d and
369 # in $dir$base.o.d. We have to check for both files, because
370 # one of the two compilations can be disabled. We should prefer
371 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
372 # automatically cleaned when .libs/ is deleted, while ignoring
373 # the former would cause a distcleancheck panic.
374 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
375 tmpdepfile2=$dir$base.o.d # libtool 1.5
376 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
377 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
378 "$@" -Wc,-MD
379 else
380 tmpdepfile1=$dir$base.o.d
381 tmpdepfile2=$dir$base.d
382 tmpdepfile3=$dir$base.d
383 tmpdepfile4=$dir$base.d
384 "$@" -MD
385 fi
386
387 stat=$?
388 if test $stat -eq 0; then :
389 else
390 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
391 exit $stat
392 fi
393
394 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
395 do
396 test -f "$tmpdepfile" && break
397 done
398 if test -f "$tmpdepfile"; then
399 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
400 # That's a tab and a space in the [].
401 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
402 else
403 echo "#dummy" > "$depfile"
404 fi
405 rm -f "$tmpdepfile"
406 ;;
407
408#nosideeffect)
409 # This comment above is used by automake to tell side-effect
410 # dependency tracking mechanisms from slower ones.
411
412dashmstdout)
413 # Important note: in order to support this mode, a compiler *must*
414 # always write the preprocessed file to stdout, regardless of -o.
415 "$@" || exit $?
416
417 # Remove the call to Libtool.
418 if test "$libtool" = yes; then
419 while test "X$1" != 'X--mode=compile'; do
420 shift
421 done
422 shift
423 fi
424
425 # Remove `-o $object'.
426 IFS=" "
427 for arg
428 do
429 case $arg in
430 -o)
431 shift
432 ;;
433 $object)
434 shift
435 ;;
436 *)
437 set fnord "$@" "$arg"
438 shift # fnord
439 shift # $arg
440 ;;
441 esac
442 done
443
444 test -z "$dashmflag" && dashmflag=-M
445 # Require at least two characters before searching for `:'
446 # in the target name. This is to cope with DOS-style filenames:
447 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
448 "$@" $dashmflag |
449 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
450 rm -f "$depfile"
451 cat < "$tmpdepfile" > "$depfile"
452 tr ' ' '
453' < "$tmpdepfile" | \
454## Some versions of the HPUX 10.20 sed can't process this invocation
455## correctly. Breaking it into two sed invocations is a workaround.
456 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
457 rm -f "$tmpdepfile"
458 ;;
459
460dashXmstdout)
461 # This case only exists to satisfy depend.m4. It is never actually
462 # run, as this mode is specially recognized in the preamble.
463 exit 1
464 ;;
465
466makedepend)
467 "$@" || exit $?
468 # Remove any Libtool call
469 if test "$libtool" = yes; then
470 while test "X$1" != 'X--mode=compile'; do
471 shift
472 done
473 shift
474 fi
475 # X makedepend
476 shift
477 cleared=no eat=no
478 for arg
479 do
480 case $cleared in
481 no)
482 set ""; shift
483 cleared=yes ;;
484 esac
485 if test $eat = yes; then
486 eat=no
487 continue
488 fi
489 case "$arg" in
490 -D*|-I*)
491 set fnord "$@" "$arg"; shift ;;
492 # Strip any option that makedepend may not understand. Remove
493 # the object too, otherwise makedepend will parse it as a source file.
494 -arch)
495 eat=yes ;;
496 -*|$object)
497 ;;
498 *)
499 set fnord "$@" "$arg"; shift ;;
500 esac
501 done
502 obj_suffix=`echo "$object" | sed 's/^.*\././'`
503 touch "$tmpdepfile"
504 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
505 rm -f "$depfile"
506 cat < "$tmpdepfile" > "$depfile"
507 sed '1,2d' "$tmpdepfile" | tr ' ' '
508' | \
509## Some versions of the HPUX 10.20 sed can't process this invocation
510## correctly. Breaking it into two sed invocations is a workaround.
511 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
512 rm -f "$tmpdepfile" "$tmpdepfile".bak
513 ;;
514
515cpp)
516 # Important note: in order to support this mode, a compiler *must*
517 # always write the preprocessed file to stdout.
518 "$@" || exit $?
519
520 # Remove the call to Libtool.
521 if test "$libtool" = yes; then
522 while test "X$1" != 'X--mode=compile'; do
523 shift
524 done
525 shift
526 fi
527
528 # Remove `-o $object'.
529 IFS=" "
530 for arg
531 do
532 case $arg in
533 -o)
534 shift
535 ;;
536 $object)
537 shift
538 ;;
539 *)
540 set fnord "$@" "$arg"
541 shift # fnord
542 shift # $arg
543 ;;
544 esac
545 done
546
547 "$@" -E |
548 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
549 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
550 sed '$ s: \\$::' > "$tmpdepfile"
551 rm -f "$depfile"
552 echo "$object : \\" > "$depfile"
553 cat < "$tmpdepfile" >> "$depfile"
554 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
555 rm -f "$tmpdepfile"
556 ;;
557
558msvisualcpp)
559 # Important note: in order to support this mode, a compiler *must*
560 # always write the preprocessed file to stdout.
561 "$@" || exit $?
562
563 # Remove the call to Libtool.
564 if test "$libtool" = yes; then
565 while test "X$1" != 'X--mode=compile'; do
566 shift
567 done
568 shift
569 fi
570
571 IFS=" "
572 for arg
573 do
574 case "$arg" in
575 -o)
576 shift
577 ;;
578 $object)
579 shift
580 ;;
581 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
582 set fnord "$@"
583 shift
584 shift
585 ;;
586 *)
587 set fnord "$@" "$arg"
588 shift
589 shift
590 ;;
591 esac
592 done
593 "$@" -E 2>/dev/null |
594 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
595 rm -f "$depfile"
596 echo "$object : \\" > "$depfile"
597 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
598 echo " " >> "$depfile"
599 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
600 rm -f "$tmpdepfile"
601 ;;
602
603msvcmsys)
604 # This case exists only to let depend.m4 do its work. It works by
605 # looking at the text of this script. This case will never be run,
606 # since it is checked for above.
607 exit 1
608 ;;
609
610none)
611 exec "$@"
612 ;;
613
614*)
615 echo "Unknown depmode $depmode" 1>&2
616 exit 1
617 ;;
618esac
619
620exit 0
621
622# Local Variables:
623# mode: shell-script
624# sh-indentation: 2
625# eval: (add-hook 'write-file-hooks 'time-stamp)
626# time-stamp-start: "scriptversion="
627# time-stamp-format: "%:y-%02m-%02d.%02H"
628# time-stamp-time-zone: "UTC"
629# time-stamp-end: "; # UTC"
630# End:
diff --git a/libraries/embryo/doc/Doxyfile b/libraries/embryo/doc/Doxyfile
deleted file mode 100644
index 8b66dc9..0000000
--- a/libraries/embryo/doc/Doxyfile
+++ /dev/null
@@ -1,139 +0,0 @@
1PROJECT_NAME = Embryo
2PROJECT_NUMBER =
3OUTPUT_DIRECTORY = .
4INPUT = ./embryo.dox ../src/lib/
5IMAGE_PATH = img
6OUTPUT_LANGUAGE = English
7GENERATE_HTML = YES
8HTML_OUTPUT = html
9HTML_FILE_EXTENSION = .html
10HTML_HEADER = ./head.html
11HTML_FOOTER = ./foot.html
12HTML_STYLESHEET = ./e.css
13HTML_ALIGN_MEMBERS = YES
14ENUM_VALUES_PER_LINE = 1
15GENERATE_HTMLHELP = NO
16CHM_FILE =
17HHC_LOCATION =
18GENERATE_CHI = NO
19BINARY_TOC = NO
20TOC_EXPAND = NO
21DISABLE_INDEX = YES
22EXTRACT_ALL = NO
23EXTRACT_PRIVATE = NO
24EXTRACT_STATIC = NO
25EXTRACT_LOCAL_CLASSES = NO
26HIDE_UNDOC_MEMBERS = YES
27HIDE_UNDOC_CLASSES = YES
28HIDE_FRIEND_COMPOUNDS = YES
29BRIEF_MEMBER_DESC = YES
30REPEAT_BRIEF = YES
31ALWAYS_DETAILED_SEC = NO
32INLINE_INHERITED_MEMB = NO
33FULL_PATH_NAMES = NO
34STRIP_FROM_PATH =
35INTERNAL_DOCS = NO
36STRIP_CODE_COMMENTS = YES
37CASE_SENSE_NAMES = YES
38SHORT_NAMES = NO
39HIDE_SCOPE_NAMES = NO
40VERBATIM_HEADERS = NO
41SHOW_INCLUDE_FILES = NO
42JAVADOC_AUTOBRIEF = YES
43MULTILINE_CPP_IS_BRIEF = NO
44DETAILS_AT_TOP = NO
45INHERIT_DOCS = YES
46INLINE_INFO = YES
47SORT_MEMBER_DOCS = YES
48DISTRIBUTE_GROUP_DOC = NO
49TAB_SIZE = 2
50GENERATE_TODOLIST = YES
51GENERATE_TESTLIST = YES
52GENERATE_BUGLIST = YES
53GENERATE_DEPRECATEDLIST= YES
54ALIASES =
55ENABLED_SECTIONS =
56MAX_INITIALIZER_LINES = 30
57OPTIMIZE_OUTPUT_FOR_C = YES
58OPTIMIZE_OUTPUT_JAVA = NO
59SHOW_USED_FILES = NO
60QUIET = YES
61WARNINGS = YES
62WARN_IF_UNDOCUMENTED = YES
63WARN_FORMAT = "$file:$line: $text"
64WARN_LOGFILE =
65FILE_PATTERNS =
66RECURSIVE = NO
67EXCLUDE =
68EXCLUDE_SYMLINKS = NO
69EXCLUDE_PATTERNS =
70EXAMPLE_PATH = ../src/examples
71EXAMPLE_PATTERNS =
72EXAMPLE_RECURSIVE = NO
73INPUT_FILTER =
74FILTER_SOURCE_FILES = NO
75SOURCE_BROWSER = NO
76INLINE_SOURCES = NO
77REFERENCED_BY_RELATION = YES
78REFERENCES_RELATION = YES
79ALPHABETICAL_INDEX = YES
80COLS_IN_ALPHA_INDEX = 2
81IGNORE_PREFIX =
82GENERATE_TREEVIEW = NO
83TREEVIEW_WIDTH = 250
84GENERATE_LATEX = YES
85LATEX_OUTPUT = latex
86LATEX_CMD_NAME = latex
87MAKEINDEX_CMD_NAME = makeindex
88COMPACT_LATEX = NO
89PAPER_TYPE = a4wide
90EXTRA_PACKAGES =
91LATEX_HEADER =
92PDF_HYPERLINKS = YES
93USE_PDFLATEX = NO
94LATEX_BATCHMODE = NO
95GENERATE_RTF = NO
96RTF_OUTPUT = rtf
97COMPACT_RTF = NO
98RTF_HYPERLINKS = NO
99RTF_STYLESHEET_FILE =
100RTF_EXTENSIONS_FILE =
101GENERATE_MAN = YES
102MAN_OUTPUT = man
103MAN_EXTENSION = .3
104MAN_LINKS = YES
105GENERATE_XML = NO
106XML_SCHEMA =
107XML_DTD =
108GENERATE_AUTOGEN_DEF = NO
109ENABLE_PREPROCESSING = YES
110MACRO_EXPANSION = NO
111EXPAND_ONLY_PREDEF = NO
112SEARCH_INCLUDES = NO
113INCLUDE_PATH =
114INCLUDE_FILE_PATTERNS =
115PREDEFINED =
116EXPAND_AS_DEFINED =
117SKIP_FUNCTION_MACROS = YES
118TAGFILES =
119GENERATE_TAGFILE =
120ALLEXTERNALS = NO
121EXTERNAL_GROUPS = YES
122PERL_PATH = /usr/bin/perl
123CLASS_DIAGRAMS = NO
124HIDE_UNDOC_RELATIONS = YES
125HAVE_DOT = NO
126CLASS_GRAPH = NO
127COLLABORATION_GRAPH = NO
128TEMPLATE_RELATIONS = NO
129INCLUDE_GRAPH = NO
130INCLUDED_BY_GRAPH = NO
131GRAPHICAL_HIERARCHY = NO
132DOT_IMAGE_FORMAT = png
133DOT_PATH =
134DOTFILE_DIRS =
135MAX_DOT_GRAPH_WIDTH = 512
136MAX_DOT_GRAPH_HEIGHT = 512
137GENERATE_LEGEND = YES
138DOT_CLEANUP = YES
139SEARCHENGINE = NO
diff --git a/libraries/embryo/doc/Doxyfile.in b/libraries/embryo/doc/Doxyfile.in
deleted file mode 100644
index 6659a7d..0000000
--- a/libraries/embryo/doc/Doxyfile.in
+++ /dev/null
@@ -1,139 +0,0 @@
1PROJECT_NAME = Embryo
2PROJECT_NUMBER =
3OUTPUT_DIRECTORY = .
4INPUT = @srcdir@/embryo.dox @top_srcdir@/src/lib/
5IMAGE_PATH = img
6OUTPUT_LANGUAGE = English
7GENERATE_HTML = YES
8HTML_OUTPUT = html
9HTML_FILE_EXTENSION = .html
10HTML_HEADER = @srcdir@/head.html
11HTML_FOOTER = @srcdir@/foot.html
12HTML_STYLESHEET = @srcdir@/e.css
13HTML_ALIGN_MEMBERS = YES
14ENUM_VALUES_PER_LINE = 1
15GENERATE_HTMLHELP = NO
16CHM_FILE =
17HHC_LOCATION =
18GENERATE_CHI = NO
19BINARY_TOC = NO
20TOC_EXPAND = NO
21DISABLE_INDEX = YES
22EXTRACT_ALL = NO
23EXTRACT_PRIVATE = NO
24EXTRACT_STATIC = NO
25EXTRACT_LOCAL_CLASSES = NO
26HIDE_UNDOC_MEMBERS = YES
27HIDE_UNDOC_CLASSES = YES
28HIDE_FRIEND_COMPOUNDS = YES
29BRIEF_MEMBER_DESC = YES
30REPEAT_BRIEF = YES
31ALWAYS_DETAILED_SEC = NO
32INLINE_INHERITED_MEMB = NO
33FULL_PATH_NAMES = NO
34STRIP_FROM_PATH =
35INTERNAL_DOCS = NO
36STRIP_CODE_COMMENTS = YES
37CASE_SENSE_NAMES = YES
38SHORT_NAMES = NO
39HIDE_SCOPE_NAMES = NO
40VERBATIM_HEADERS = NO
41SHOW_INCLUDE_FILES = NO
42JAVADOC_AUTOBRIEF = YES
43MULTILINE_CPP_IS_BRIEF = NO
44DETAILS_AT_TOP = NO
45INHERIT_DOCS = YES
46INLINE_INFO = YES
47SORT_MEMBER_DOCS = YES
48DISTRIBUTE_GROUP_DOC = NO
49TAB_SIZE = 2
50GENERATE_TODOLIST = YES
51GENERATE_TESTLIST = YES
52GENERATE_BUGLIST = YES
53GENERATE_DEPRECATEDLIST= YES
54ALIASES =
55ENABLED_SECTIONS =
56MAX_INITIALIZER_LINES = 30
57OPTIMIZE_OUTPUT_FOR_C = YES
58OPTIMIZE_OUTPUT_JAVA = NO
59SHOW_USED_FILES = NO
60QUIET = YES
61WARNINGS = YES
62WARN_IF_UNDOCUMENTED = YES
63WARN_FORMAT = "$file:$line: $text"
64WARN_LOGFILE =
65FILE_PATTERNS =
66RECURSIVE = NO
67EXCLUDE =
68EXCLUDE_SYMLINKS = NO
69EXCLUDE_PATTERNS =
70EXAMPLE_PATH = @top_srcdir@/src/examples
71EXAMPLE_PATTERNS =
72EXAMPLE_RECURSIVE = NO
73INPUT_FILTER =
74FILTER_SOURCE_FILES = NO
75SOURCE_BROWSER = NO
76INLINE_SOURCES = NO
77REFERENCED_BY_RELATION = YES
78REFERENCES_RELATION = YES
79ALPHABETICAL_INDEX = YES
80COLS_IN_ALPHA_INDEX = 2
81IGNORE_PREFIX =
82GENERATE_TREEVIEW = NO
83TREEVIEW_WIDTH = 250
84GENERATE_LATEX = YES
85LATEX_OUTPUT = latex
86LATEX_CMD_NAME = latex
87MAKEINDEX_CMD_NAME = makeindex
88COMPACT_LATEX = NO
89PAPER_TYPE = a4wide
90EXTRA_PACKAGES =
91LATEX_HEADER =
92PDF_HYPERLINKS = YES
93USE_PDFLATEX = NO
94LATEX_BATCHMODE = NO
95GENERATE_RTF = NO
96RTF_OUTPUT = rtf
97COMPACT_RTF = NO
98RTF_HYPERLINKS = NO
99RTF_STYLESHEET_FILE =
100RTF_EXTENSIONS_FILE =
101GENERATE_MAN = YES
102MAN_OUTPUT = man
103MAN_EXTENSION = .3
104MAN_LINKS = YES
105GENERATE_XML = NO
106XML_SCHEMA =
107XML_DTD =
108GENERATE_AUTOGEN_DEF = NO
109ENABLE_PREPROCESSING = YES
110MACRO_EXPANSION = NO
111EXPAND_ONLY_PREDEF = NO
112SEARCH_INCLUDES = NO
113INCLUDE_PATH =
114INCLUDE_FILE_PATTERNS =
115PREDEFINED =
116EXPAND_AS_DEFINED =
117SKIP_FUNCTION_MACROS = YES
118TAGFILES =
119GENERATE_TAGFILE =
120ALLEXTERNALS = NO
121EXTERNAL_GROUPS = YES
122PERL_PATH = /usr/bin/perl
123CLASS_DIAGRAMS = NO
124HIDE_UNDOC_RELATIONS = YES
125HAVE_DOT = NO
126CLASS_GRAPH = NO
127COLLABORATION_GRAPH = NO
128TEMPLATE_RELATIONS = NO
129INCLUDE_GRAPH = NO
130INCLUDED_BY_GRAPH = NO
131GRAPHICAL_HIERARCHY = NO
132DOT_IMAGE_FORMAT = png
133DOT_PATH =
134DOTFILE_DIRS =
135MAX_DOT_GRAPH_WIDTH = 512
136MAX_DOT_GRAPH_HEIGHT = 512
137GENERATE_LEGEND = YES
138DOT_CLEANUP = YES
139SEARCHENGINE = NO
diff --git a/libraries/embryo/doc/Makefile.am b/libraries/embryo/doc/Makefile.am
deleted file mode 100644
index 91c79f3..0000000
--- a/libraries/embryo/doc/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
1
2MAINTAINERCLEANFILES = Makefile.in embryo.dox
3
4.PHONY: doc
5
6PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
7
8if EFL_BUILD_DOC
9
10doc-clean:
11 rm -rf html/ latex/ man/ xml/ $(top_builddir)/$(PACKAGE_DOCNAME).tar*
12
13doc: all doc-clean
14 $(efl_doxygen)
15 cp $(srcdir)/img/* html/
16 rm -rf $(PACKAGE_DOCNAME).tar*
17 mkdir -p $(PACKAGE_DOCNAME)/doc
18 cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
19 tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
20 bzip2 -9 $(PACKAGE_DOCNAME).tar
21 rm -rf $(PACKAGE_DOCNAME)/
22 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
23
24clean-local: doc-clean
25
26else
27
28doc:
29 @echo "Documentation not built. Run ./configure --help"
30
31endif
32
33EXTRA_DIST = Doxyfile e.css foot.html head.html $(wildcard img/*.*) embryo.dox.in
diff --git a/libraries/embryo/doc/Makefile.in b/libraries/embryo/doc/Makefile.in
deleted file mode 100644
index 744e789..0000000
--- a/libraries/embryo/doc/Makefile.in
+++ /dev/null
@@ -1,419 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = doc
37DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \
38 $(srcdir)/Makefile.in $(srcdir)/embryo.dox.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
41 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_gettimeofday.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
45 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
46 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
47 $(top_srcdir)/configure.ac
48am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
49 $(ACLOCAL_M4)
50mkinstalldirs = $(install_sh) -d
51CONFIG_HEADER = $(top_builddir)/config.h
52CONFIG_CLEAN_FILES = Doxyfile embryo.dox
53CONFIG_CLEAN_VPATH_FILES =
54AM_V_GEN = $(am__v_GEN_$(V))
55am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
56am__v_GEN_0 = @echo " GEN " $@;
57AM_V_at = $(am__v_at_$(V))
58am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
59am__v_at_0 = @
60SOURCES =
61DIST_SOURCES =
62DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
63ACLOCAL = @ACLOCAL@
64ALLOCA = @ALLOCA@
65AMTAR = @AMTAR@
66AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
67AR = @AR@
68AS = @AS@
69AUTOCONF = @AUTOCONF@
70AUTOHEADER = @AUTOHEADER@
71AUTOMAKE = @AUTOMAKE@
72AWK = @AWK@
73CC = @CC@
74CCDEPMODE = @CCDEPMODE@
75CFLAGS = @CFLAGS@
76CPP = @CPP@
77CPPFLAGS = @CPPFLAGS@
78CYGPATH_W = @CYGPATH_W@
79DEFS = @DEFS@
80DEPDIR = @DEPDIR@
81DLLTOOL = @DLLTOOL@
82DSYMUTIL = @DSYMUTIL@
83DUMPBIN = @DUMPBIN@
84ECHO_C = @ECHO_C@
85ECHO_N = @ECHO_N@
86ECHO_T = @ECHO_T@
87EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
88EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
89EGREP = @EGREP@
90EINA_CFLAGS = @EINA_CFLAGS@
91EINA_LIBS = @EINA_LIBS@
92EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
93EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
94EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
95EVIL_CFLAGS = @EVIL_CFLAGS@
96EVIL_LIBS = @EVIL_LIBS@
97EXEEXT = @EXEEXT@
98EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
99EXOTIC_LIBS = @EXOTIC_LIBS@
100FGREP = @FGREP@
101GREP = @GREP@
102INSTALL = @INSTALL@
103INSTALL_DATA = @INSTALL_DATA@
104INSTALL_PROGRAM = @INSTALL_PROGRAM@
105INSTALL_SCRIPT = @INSTALL_SCRIPT@
106INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
107LD = @LD@
108LDFLAGS = @LDFLAGS@
109LIBOBJS = @LIBOBJS@
110LIBS = @LIBS@
111LIBTOOL = @LIBTOOL@
112LIPO = @LIPO@
113LN_S = @LN_S@
114LTLIBOBJS = @LTLIBOBJS@
115MAKEINFO = @MAKEINFO@
116MKDIR_P = @MKDIR_P@
117NM = @NM@
118NMEDIT = @NMEDIT@
119OBJDUMP = @OBJDUMP@
120OBJEXT = @OBJEXT@
121OTOOL = @OTOOL@
122OTOOL64 = @OTOOL64@
123PACKAGE = @PACKAGE@
124PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
125PACKAGE_NAME = @PACKAGE_NAME@
126PACKAGE_STRING = @PACKAGE_STRING@
127PACKAGE_TARNAME = @PACKAGE_TARNAME@
128PACKAGE_URL = @PACKAGE_URL@
129PACKAGE_VERSION = @PACKAGE_VERSION@
130PATH_SEPARATOR = @PATH_SEPARATOR@
131PKG_CONFIG = @PKG_CONFIG@
132PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
133PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
134RANLIB = @RANLIB@
135SED = @SED@
136SET_MAKE = @SET_MAKE@
137SHELL = @SHELL@
138STRIP = @STRIP@
139VERSION = @VERSION@
140VMAJ = @VMAJ@
141abs_builddir = @abs_builddir@
142abs_srcdir = @abs_srcdir@
143abs_top_builddir = @abs_top_builddir@
144abs_top_srcdir = @abs_top_srcdir@
145ac_ct_CC = @ac_ct_CC@
146ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
147am__include = @am__include@
148am__leading_dot = @am__leading_dot@
149am__quote = @am__quote@
150am__tar = @am__tar@
151am__untar = @am__untar@
152bindir = @bindir@
153build = @build@
154build_alias = @build_alias@
155build_cpu = @build_cpu@
156build_os = @build_os@
157build_vendor = @build_vendor@
158builddir = @builddir@
159datadir = @datadir@
160datarootdir = @datarootdir@
161docdir = @docdir@
162dvidir = @dvidir@
163efl_doxygen = @efl_doxygen@
164efl_have_doxygen = @efl_have_doxygen@
165embryoincludedir = @embryoincludedir@
166exec_prefix = @exec_prefix@
167host = @host@
168host_alias = @host_alias@
169host_cpu = @host_cpu@
170host_os = @host_os@
171host_vendor = @host_vendor@
172htmldir = @htmldir@
173includedir = @includedir@
174infodir = @infodir@
175install_sh = @install_sh@
176libdir = @libdir@
177libexecdir = @libexecdir@
178localedir = @localedir@
179localstatedir = @localstatedir@
180lt_ECHO = @lt_ECHO@
181lt_enable_auto_import = @lt_enable_auto_import@
182mandir = @mandir@
183mkdir_p = @mkdir_p@
184oldincludedir = @oldincludedir@
185pdfdir = @pdfdir@
186pkgconfig_requires_private = @pkgconfig_requires_private@
187prefix = @prefix@
188program_transform_name = @program_transform_name@
189psdir = @psdir@
190release_info = @release_info@
191requirement_embryo = @requirement_embryo@
192sbindir = @sbindir@
193sharedstatedir = @sharedstatedir@
194srcdir = @srcdir@
195sysconfdir = @sysconfdir@
196target_alias = @target_alias@
197top_build_prefix = @top_build_prefix@
198top_builddir = @top_builddir@
199top_srcdir = @top_srcdir@
200version_info = @version_info@
201MAINTAINERCLEANFILES = Makefile.in embryo.dox
202PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
203EXTRA_DIST = Doxyfile e.css foot.html head.html $(wildcard img/*.*) embryo.dox.in
204all: all-am
205
206.SUFFIXES:
207$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
208 @for dep in $?; do \
209 case '$(am__configure_deps)' in \
210 *$$dep*) \
211 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
212 && { if test -f $@; then exit 0; else break; fi; }; \
213 exit 1;; \
214 esac; \
215 done; \
216 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
217 $(am__cd) $(top_srcdir) && \
218 $(AUTOMAKE) --gnu doc/Makefile
219.PRECIOUS: Makefile
220Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
221 @case '$?' in \
222 *config.status*) \
223 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
224 *) \
225 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
226 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
227 esac;
228
229$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
230 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
231
232$(top_srcdir)/configure: $(am__configure_deps)
233 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
234$(ACLOCAL_M4): $(am__aclocal_m4_deps)
235 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
236$(am__aclocal_m4_deps):
237Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
238 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
239embryo.dox: $(top_builddir)/config.status $(srcdir)/embryo.dox.in
240 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
241
242mostlyclean-libtool:
243 -rm -f *.lo
244
245clean-libtool:
246 -rm -rf .libs _libs
247tags: TAGS
248TAGS:
249
250ctags: CTAGS
251CTAGS:
252
253
254distdir: $(DISTFILES)
255 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
256 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
257 list='$(DISTFILES)'; \
258 dist_files=`for file in $$list; do echo $$file; done | \
259 sed -e "s|^$$srcdirstrip/||;t" \
260 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
261 case $$dist_files in \
262 */*) $(MKDIR_P) `echo "$$dist_files" | \
263 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
264 sort -u` ;; \
265 esac; \
266 for file in $$dist_files; do \
267 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
268 if test -d $$d/$$file; then \
269 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
270 if test -d "$(distdir)/$$file"; then \
271 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
272 fi; \
273 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
274 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
275 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
276 fi; \
277 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
278 else \
279 test -f "$(distdir)/$$file" \
280 || cp -p $$d/$$file "$(distdir)/$$file" \
281 || exit 1; \
282 fi; \
283 done
284check-am: all-am
285check: check-am
286all-am: Makefile
287installdirs:
288install: install-am
289install-exec: install-exec-am
290install-data: install-data-am
291uninstall: uninstall-am
292
293install-am: all-am
294 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
295
296installcheck: installcheck-am
297install-strip:
298 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
299 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
300 `test -z '$(STRIP)' || \
301 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
302mostlyclean-generic:
303
304clean-generic:
305
306distclean-generic:
307 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
308 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
309
310maintainer-clean-generic:
311 @echo "This command is intended for maintainers to use"
312 @echo "it deletes files that may require special tools to rebuild."
313 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
314@EFL_BUILD_DOC_FALSE@clean-local:
315clean: clean-am
316
317clean-am: clean-generic clean-libtool clean-local mostlyclean-am
318
319distclean: distclean-am
320 -rm -f Makefile
321distclean-am: clean-am distclean-generic
322
323dvi: dvi-am
324
325dvi-am:
326
327html: html-am
328
329html-am:
330
331info: info-am
332
333info-am:
334
335install-data-am:
336
337install-dvi: install-dvi-am
338
339install-dvi-am:
340
341install-exec-am:
342
343install-html: install-html-am
344
345install-html-am:
346
347install-info: install-info-am
348
349install-info-am:
350
351install-man:
352
353install-pdf: install-pdf-am
354
355install-pdf-am:
356
357install-ps: install-ps-am
358
359install-ps-am:
360
361installcheck-am:
362
363maintainer-clean: maintainer-clean-am
364 -rm -f Makefile
365maintainer-clean-am: distclean-am maintainer-clean-generic
366
367mostlyclean: mostlyclean-am
368
369mostlyclean-am: mostlyclean-generic mostlyclean-libtool
370
371pdf: pdf-am
372
373pdf-am:
374
375ps: ps-am
376
377ps-am:
378
379uninstall-am:
380
381.MAKE: install-am install-strip
382
383.PHONY: all all-am check check-am clean clean-generic clean-libtool \
384 clean-local distclean distclean-generic distclean-libtool \
385 distdir dvi dvi-am html html-am info info-am install \
386 install-am install-data install-data-am install-dvi \
387 install-dvi-am install-exec install-exec-am install-html \
388 install-html-am install-info install-info-am install-man \
389 install-pdf install-pdf-am install-ps install-ps-am \
390 install-strip installcheck installcheck-am installdirs \
391 maintainer-clean maintainer-clean-generic mostlyclean \
392 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
393 uninstall uninstall-am
394
395
396.PHONY: doc
397
398@EFL_BUILD_DOC_TRUE@doc-clean:
399@EFL_BUILD_DOC_TRUE@ rm -rf html/ latex/ man/ xml/ $(top_builddir)/$(PACKAGE_DOCNAME).tar*
400
401@EFL_BUILD_DOC_TRUE@doc: all doc-clean
402@EFL_BUILD_DOC_TRUE@ $(efl_doxygen)
403@EFL_BUILD_DOC_TRUE@ cp $(srcdir)/img/* html/
404@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME).tar*
405@EFL_BUILD_DOC_TRUE@ mkdir -p $(PACKAGE_DOCNAME)/doc
406@EFL_BUILD_DOC_TRUE@ cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
407@EFL_BUILD_DOC_TRUE@ tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
408@EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar
409@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/
410@EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
411
412@EFL_BUILD_DOC_TRUE@clean-local: doc-clean
413
414@EFL_BUILD_DOC_FALSE@doc:
415@EFL_BUILD_DOC_FALSE@ @echo "Documentation not built. Run ./configure --help"
416
417# Tell versions [3.59,3.63) of GNU make to not export all variables.
418# Otherwise a system limit (for SysV at least) may be exceeded.
419.NOEXPORT:
diff --git a/libraries/embryo/doc/e.css b/libraries/embryo/doc/e.css
deleted file mode 100644
index 07ebd1e..0000000
--- a/libraries/embryo/doc/e.css
+++ /dev/null
@@ -1,436 +0,0 @@
1/*
2 Author:
3 Andres Blanc <andresblanc@gmail.com>
4 DaveMDS Andreoli <dave@gurumeditation.it>
5
6 Supported Browsers:
7 ie7, opera9, konqueror4 and firefox3
8
9 Please use a different file for ie6, ie5, etc. hacks.
10*/
11
12
13/* Necessary to place the footer at the bottom of the page */
14html, body {
15 height: 100%;
16 margin: 0px;
17 padding: 0px;
18}
19
20#container {
21 min-height: 100%;
22 height: auto !important;
23 height: 100%;
24 margin: 0 auto -53px;
25}
26
27#footer, #push {
28 height: 53px;
29}
30
31
32* html #container {
33 height: 100%;
34}
35
36/* Prevent floating elements overflowing containers */
37.clear {
38 clear: both;
39 width: 0px;
40 height: 0px;
41}
42
43/* Flexible & centered layout from 750 to 960 pixels */
44.layout {
45 max-width: 960px;
46 min-width: 760px;
47 margin-left: auto;
48 margin-right: auto;
49}
50
51body {
52 /*font-family: Lucida Grande, Helvetica, sans-serif;*/
53 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif
54}
55
56/* Prevent design overflowing the viewport in small resolutions */
57#container {
58 padding-right: 17px;
59 padding-left: 17px;
60 background-image: url(head_bg.png);
61 background-repeat: repeat-x;
62}
63
64#header {
65 width: 100%;
66 height: 102px;
67}
68
69#header h1 {
70 width: 63px;
71 height: 63px;
72 background-image: url(e.png);
73 background-repeat: no-repeat;
74 position: absolute;
75 margin: 0px;
76}
77
78#header h1 span {
79 display: none;
80}
81
82#header h2 {
83 display: none;
84}
85
86/* .menu-container is used to set properties common to .menu and .submenu */
87#header .menu-container {
88}
89
90#header .menu-container ul {
91 list-style-type: none;
92 list-style-position: inside;
93 margin: 0;
94}
95
96#header .menu-container li {
97 display: block;
98 float: right;
99}
100
101#header .menu {
102 height: 63px;
103 display: block;
104 background-image: url(menu_bg.png);
105 background-repeat: repeat-x;
106}
107
108#header .menu ul {
109 height: 100%;
110 display: block;
111 background-image: url(menu_bg_last.png);
112 background-repeat: no-repeat;
113 background-position: top right;
114 padding-right: 17px;
115}
116
117#header .menu li {
118 height: 100%;
119 text-align: center;
120 background-image: url(menu_bg_unsel.png);
121 background-repeat: no-repeat;
122}
123
124#header .menu a {
125 height: 100%;
126 display: block;
127 color: #cdcdcd;
128 text-decoration: none;
129 font-size: 10pt;
130 line-height: 59px;
131 text-align: center;
132 padding: 0px 15px 0px 15px;
133}
134
135#header .menu li:hover {
136 background-image: url(menu_bg_hover.png);
137 background-repeat: no-repeat;
138}
139
140#header .menu li:hover a {
141 color: #FFFFFF;
142}
143
144#header .menu li.current {
145 background-image: url(menu_bg_current.png);
146 background-repeat: no-repeat;
147}
148
149#header .menu li.current a {
150 color: #646464;
151}
152
153
154/* Hide all the submenus but the current */
155#header .submenu ul {
156 display: none;
157}
158
159#header .submenu .current {
160 display: block;
161}
162
163#header .submenu {
164 font: bold 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
165 margin-top: 10px;
166}
167
168#header .submenu a {
169 color: #888888;
170 text-decoration: none;
171 font-size: 0.9em;
172 line-height: 15px;
173 padding:0px 5px 0px 5px;
174}
175
176#header .submenu a:hover {
177 color: #444444;
178}
179
180#header .submenu li {
181 border-left: 1px solid #DDDDDD;
182}
183
184#header .submenu li:last-child {
185 border-left: 0;
186}
187
188#header .doxytitle {
189 position: absolute;
190 font-size: 1.8em;
191 font-weight: bold;
192 color: #444444;
193 line-height: 35px;
194}
195
196#header small {
197 font-size: 0.4em;
198}
199
200#footer {
201 background-image: url(foot_bg.png);
202 width: 100%;
203}
204
205#footer table {
206 width: 100%;
207 text-align: center;
208 white-space: nowrap;
209 padding: 5px 30px 5px 30px;
210 font-size: 0.8em;
211 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
212 color: #888888;
213}
214
215#footer td.copyright {
216 width: 100%;
217}
218
219/*
220 Author:
221 Andres Blanc <andresblanc@gmail.com>
222 DaveMDS Andreoli <dave@gurumeditation.it>
223
224 Supported Browsers:
225 ie7, opera9, konqueror4 and firefox3
226
227 Please use a different file for ie6, ie5, etc. hacks.
228*/
229
230
231/* Necessary to place the footer at the bottom of the page */
232html, body {
233 height: 100%;
234 margin: 0px;
235 padding: 0px;
236}
237
238#container {
239 min-height: 100%;
240 height: auto !important;
241 height: 100%;
242 margin: 0 auto -53px;
243}
244
245#footer, #push {
246 height: 53px;
247}
248
249
250* html #container {
251 height: 100%;
252}
253
254/* Prevent floating elements overflowing containers */
255.clear {
256 clear: both;
257 width: 0px;
258 height: 0px;
259}
260
261/* Flexible & centered layout from 750 to 960 pixels */
262.layout {
263 max-width: 960px;
264 min-width: 760px;
265 margin-left: auto;
266 margin-right: auto;
267}
268
269body {
270 /*font-family: Lucida Grande, Helvetica, sans-serif;*/
271 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif
272}
273
274/* Prevent design overflowing the viewport in small resolutions */
275#container {
276 padding-right: 17px;
277 padding-left: 17px;
278 background-image: url(head_bg.png);
279 background-repeat: repeat-x;
280}
281
282#header {
283 width: 100%;
284 height: 102px;
285}
286
287#header h1 {
288 width: 63px;
289 height: 63px;
290 background-image: url(e.png);
291 background-repeat: no-repeat;
292 position: absolute;
293 margin: 0px;
294}
295
296#header h1 span {
297 display: none;
298}
299
300#header h2 {
301 display: none;
302}
303
304/* .menu-container is used to set properties common to .menu and .submenu */
305#header .menu-container {
306}
307
308#header .menu-container ul {
309 list-style-type: none;
310 list-style-position: inside;
311 margin: 0;
312}
313
314#header .menu-container li {
315 display: block;
316 float: right;
317}
318
319#header .menu {
320 height: 63px;
321 display: block;
322 background-image: url(menu_bg.png);
323 background-repeat: repeat-x;
324}
325
326#header .menu ul {
327 height: 100%;
328 display: block;
329 background-image: url(menu_bg_last.png);
330 background-repeat: no-repeat;
331 background-position: top right;
332 padding-right: 17px;
333}
334
335#header .menu li {
336 height: 100%;
337 text-align: center;
338 background-image: url(menu_bg_unsel.png);
339 background-repeat: no-repeat;
340}
341
342#header .menu a {
343 height: 100%;
344 display: block;
345 color: #cdcdcd;
346 text-decoration: none;
347 font-size: 10pt;
348 line-height: 59px;
349 text-align: center;
350 padding: 0px 15px 0px 15px;
351}
352
353#header .menu li:hover {
354 background-image: url(menu_bg_hover.png);
355 background-repeat: no-repeat;
356}
357
358#header .menu li:hover a {
359 color: #FFFFFF;
360}
361
362#header .menu li.current {
363 background-image: url(menu_bg_current.png);
364 background-repeat: no-repeat;
365}
366
367#header .menu li.current a {
368 color: #646464;
369}
370
371
372/* Hide all the submenus but the current */
373#header .submenu ul {
374 display: none;
375}
376
377#header .submenu .current {
378 display: block;
379}
380
381#header .submenu {
382 font: bold 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
383 margin-top: 10px;
384}
385
386#header .submenu a {
387 color: #888888;
388 text-decoration: none;
389 font-size: 0.9em;
390 line-height: 15px;
391 padding:0px 5px 0px 5px;
392}
393
394#header .submenu a:hover {
395 color: #444444;
396}
397
398#header .submenu li {
399 border-left: 1px solid #DDDDDD;
400}
401
402#header .submenu li:last-child {
403 border-left: 0;
404}
405
406#header .doxytitle {
407 position: absolute;
408 font-size: 1.8em;
409 font-weight: bold;
410 color: #444444;
411 line-height: 35px;
412}
413
414#header small {
415 font-size: 0.4em;
416}
417
418#footer {
419 background-image: url(foot_bg.png);
420 width: 100%;
421}
422
423#footer table {
424 width: 100%;
425 text-align: center;
426 white-space: nowrap;
427 padding: 5px 30px 5px 30px;
428 font-size: 0.8em;
429 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
430 color: #888888;
431}
432
433#footer td.copyright {
434 width: 100%;
435}
436
diff --git a/libraries/embryo/doc/embryo.dox.in b/libraries/embryo/doc/embryo.dox.in
deleted file mode 100644
index e69de29..0000000
--- a/libraries/embryo/doc/embryo.dox.in
+++ /dev/null
diff --git a/libraries/embryo/doc/foot.html b/libraries/embryo/doc/foot.html
deleted file mode 100644
index 78ef911..0000000
--- a/libraries/embryo/doc/foot.html
+++ /dev/null
@@ -1,19 +0,0 @@
1
2 <div id="push"></div>
3 </div> <!-- #content -->
4 </div> <!-- .layout -->
5
6 </div> <!-- #container -->
7
8
9 <div id="footer">
10 <table><tr>
11 <td class="poweredby"><img src="doxygen.png"></td>
12 <td class="copyright">Copyright &copy;$year Enlightenment</td>
13 <td class="generated">Docs generated $datetime</td>
14 </tr></table>
15 </div>
16
17
18</body>
19</html>
diff --git a/libraries/embryo/doc/head.html b/libraries/embryo/doc/head.html
deleted file mode 100644
index 48032d9..0000000
--- a/libraries/embryo/doc/head.html
+++ /dev/null
@@ -1,66 +0,0 @@
1<html>
2<head>
3 <title>$title</title>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <meta name="author" content="Andres Blanc" >
6
7 <link rel="icon" href="img/favicon.png" type="image/x-icon">
8 <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
9 <link rel="icon" href="img/favicon.png" type="image/ico">
10 <link rel="shortcut icon" href="img/favicon.png" type="image/ico">
11
12 <link rel="stylesheet" type="text/css" media="screen" href="e.css">
13 <link rel="stylesheet" type="text/css" media="screen" href="edoxy.css">
14</head>
15
16<body>
17
18<div id="container">
19
20<div id="header">
21<div class="layout">
22
23 <h1><span>Enlightenment</span></h1>
24 <h2><span>Beauty at your fingertips</span></h2>
25
26 <div class="menu-container">
27 <div class="menu">
28 <ul>
29 <li class="current"><a href="http://web.enlightenment.org/p.php?p=docs">Docs</a></li>
30 <li><a href="http://trac.enlightenment.org/e">Tracker</a></li>
31 <li><a href="http://www.enlightenment.org/p.php?p=contact">Contact</a></li>
32 <li><a href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></li>
33 <li><a href="http://www.enlightenment.org/p.php?p=support">Support</a></li>
34 <li><a href="http://www.enlightenment.org/p.php?p=download">Download</a></li>
35 <li><a href="http://www.enlightenment.org/p.php?p=about">About</a></li>
36 <li><a href="http://www.enlightenment.org/p.php?p=news">News</a></li>
37 <li><a href="http://www.enlightenment.org/">Home</a></li>
38 </ul>
39 </div>
40 </div>
41
42 <div class="doxytitle">
43 $projectname Documentation <small>at $date</small>
44 </div>
45
46 <div class="menu-container">
47 <div class="submenu">
48 <ul class="current">
49 <li><a href="todo.html">Todo</a></li>
50 <li><a href="files.html">Files</a></li>
51 <li><a href="annotated.html">Data Structures</a></li>
52 <li><a href="globals.html">Globals</a></li>
53 <li><a href="modules.html">Modules</a></li>
54 <li><a href="pages.html">Related Pages</a></li>
55 <li class="current"><a href="index.html">Main Page</a></li>
56 </ul>
57 </div>
58 </div>
59
60
61 <div class="clear"></div>
62</div>
63</div>
64
65<div id="content">
66<div class="layout">
diff --git a/libraries/embryo/doc/img/e.png b/libraries/embryo/doc/img/e.png
deleted file mode 100644
index b3884a5..0000000
--- a/libraries/embryo/doc/img/e.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/e_big.png b/libraries/embryo/doc/img/e_big.png
deleted file mode 100644
index d42aeb4..0000000
--- a/libraries/embryo/doc/img/e_big.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/edoxy.css b/libraries/embryo/doc/img/edoxy.css
deleted file mode 100644
index 616a0c5..0000000
--- a/libraries/embryo/doc/img/edoxy.css
+++ /dev/null
@@ -1,966 +0,0 @@
1/*
2 * This file contain a custom doxygen style to match e.org graphics
3 */
4
5
6
7/* BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
8 font-family: Geneva, Arial, Helvetica, sans-serif;
9}*/
10BODY, TD {
11 font-size: 12px;
12}
13H1 {
14 text-align: center;
15 font-size: 160%;
16}
17H2 {
18 font-size: 120%;
19}
20H3 {
21 font-size: 100%;
22}
23CAPTION {
24 font-weight: bold
25}
26DIV.qindex {
27 width: 100%;
28 background-color: #e8eef2;
29 border: 1px solid #84b0c7;
30 text-align: center;
31 margin: 2px;
32 padding: 2px;
33 line-height: 140%;
34}
35DIV.navpath {
36 width: 100%;
37 background-color: #e8eef2;
38 border: 1px solid #84b0c7;
39 text-align: center;
40 margin: 2px;
41 padding: 2px;
42 line-height: 140%;
43}
44DIV.navtab {
45 background-color: #e8eef2;
46 border: 1px solid #84b0c7;
47 text-align: center;
48 margin: 2px;
49 margin-right: 15px;
50 padding: 2px;
51}
52TD.navtab {
53 font-size: 70%;
54}
55A.qindex {
56 text-decoration: none;
57 font-weight: bold;
58 color: #1A419D;
59}
60A.qindex:visited {
61 text-decoration: none;
62 font-weight: bold;
63 color: #1A419D
64}
65A.qindex:hover {
66 text-decoration: none;
67 background-color: #ddddff;
68}
69A.qindexHL {
70 text-decoration: none;
71 font-weight: bold;
72 background-color: #6666cc;
73 color: #ffffff;
74 border: 1px double #9295C2;
75}
76A.qindexHL:hover {
77 text-decoration: none;
78 background-color: #6666cc;
79 color: #ffffff;
80}
81A.qindexHL:visited {
82 text-decoration: none;
83 background-color: #6666cc;
84 color: #ffffff
85}
86A.el {
87 text-decoration: none;
88 font-weight: bold
89}
90A.elRef {
91 font-weight: bold
92}
93A.code:link {
94 text-decoration: none;
95 font-weight: normal;
96 color: #0000FF
97}
98A.code:visited {
99 text-decoration: none;
100 font-weight: normal;
101 color: #0000FF
102}
103A.codeRef:link {
104 font-weight: normal;
105 color: #0000FF
106}
107A.codeRef:visited {
108 font-weight: normal;
109 color: #0000FF
110}
111A:hover, A:visited:hover {
112 text-decoration: none;
113 /* background-color: #f2f2ff; */
114 color: #000055;
115}
116A.anchor {
117 color: #000;
118}
119DL.el {
120 margin-left: -1cm
121}
122.fragment {
123 font-family: monospace, fixed;
124 font-size: 95%;
125}
126PRE.fragment {
127 border: 1px solid #CCCCCC;
128 background-color: #f5f5f5;
129 margin-top: 4px;
130 margin-bottom: 4px;
131 margin-left: 2px;
132 margin-right: 8px;
133 padding-left: 6px;
134 padding-right: 6px;
135 padding-top: 4px;
136 padding-bottom: 4px;
137}
138DIV.ah {
139 background-color: black;
140 font-weight: bold;
141 color: #ffffff;
142 margin-bottom: 3px;
143 margin-top: 3px
144}
145
146DIV.groupHeader {
147 margin-left: 16px;
148 margin-top: 12px;
149 margin-bottom: 6px;
150 font-weight: bold;
151}
152DIV.groupText {
153 margin-left: 16px;
154 font-style: italic;
155 font-size: 90%
156}
157/*BODY {
158 background: white;
159 color: black;
160 margin-right: 20px;
161 margin-left: 20px;
162}*/
163TD.indexkey {
164 background-color: #e8eef2;
165 font-weight: bold;
166 padding-right : 10px;
167 padding-top : 2px;
168 padding-left : 10px;
169 padding-bottom : 2px;
170 margin-left : 0px;
171 margin-right : 0px;
172 margin-top : 2px;
173 margin-bottom : 2px;
174 border: 1px solid #CCCCCC;
175}
176TD.indexvalue {
177 background-color: #e8eef2;
178 font-style: italic;
179 padding-right : 10px;
180 padding-top : 2px;
181 padding-left : 10px;
182 padding-bottom : 2px;
183 margin-left : 0px;
184 margin-right : 0px;
185 margin-top : 2px;
186 margin-bottom : 2px;
187 border: 1px solid #CCCCCC;
188}
189TR.memlist {
190 background-color: #f0f0f0;
191}
192P.formulaDsp {
193 text-align: center;
194}
195IMG.formulaDsp {
196}
197IMG.formulaInl {
198 vertical-align: middle;
199}
200SPAN.keyword { color: #008000 }
201SPAN.keywordtype { color: #604020 }
202SPAN.keywordflow { color: #e08000 }
203SPAN.comment { color: #800000 }
204SPAN.preprocessor { color: #806020 }
205SPAN.stringliteral { color: #002080 }
206SPAN.charliteral { color: #008080 }
207SPAN.vhdldigit { color: #ff00ff }
208SPAN.vhdlchar { color: #000000 }
209SPAN.vhdlkeyword { color: #700070 }
210SPAN.vhdllogic { color: #ff0000 }
211
212.mdescLeft {
213 padding: 0px 8px 4px 8px;
214 font-size: 80%;
215 font-style: italic;
216 background-color: #FAFAFA;
217 border-top: 1px none #E0E0E0;
218 border-right: 1px none #E0E0E0;
219 border-bottom: 1px none #E0E0E0;
220 border-left: 1px none #E0E0E0;
221 margin: 0px;
222}
223.mdescRight {
224 padding: 0px 8px 4px 8px;
225 font-size: 80%;
226 font-style: italic;
227 background-color: #FAFAFA;
228 border-top: 1px none #E0E0E0;
229 border-right: 1px none #E0E0E0;
230 border-bottom: 1px none #E0E0E0;
231 border-left: 1px none #E0E0E0;
232 margin: 0px;
233}
234.memItemLeft {
235 padding: 1px 0px 0px 8px;
236 margin: 4px;
237 border-top-width: 1px;
238 border-right-width: 1px;
239 border-bottom-width: 1px;
240 border-left-width: 1px;
241 border-top-color: #E0E0E0;
242 border-right-color: #E0E0E0;
243 border-bottom-color: #E0E0E0;
244 border-left-color: #E0E0E0;
245 border-top-style: solid;
246 border-right-style: none;
247 border-bottom-style: none;
248 border-left-style: none;
249 background-color: #FAFAFA;
250 font-size: 80%;
251}
252.memItemRight {
253 padding: 1px 8px 0px 8px;
254 margin: 4px;
255 border-top-width: 1px;
256 border-right-width: 1px;
257 border-bottom-width: 1px;
258 border-left-width: 1px;
259 border-top-color: #E0E0E0;
260 border-right-color: #E0E0E0;
261 border-bottom-color: #E0E0E0;
262 border-left-color: #E0E0E0;
263 border-top-style: solid;
264 border-right-style: none;
265 border-bottom-style: none;
266 border-left-style: none;
267 background-color: #FAFAFA;
268 font-size: 80%;
269}
270.memTemplItemLeft {
271 padding: 1px 0px 0px 8px;
272 margin: 4px;
273 border-top-width: 1px;
274 border-right-width: 1px;
275 border-bottom-width: 1px;
276 border-left-width: 1px;
277 border-top-color: #E0E0E0;
278 border-right-color: #E0E0E0;
279 border-bottom-color: #E0E0E0;
280 border-left-color: #E0E0E0;
281 border-top-style: none;
282 border-right-style: none;
283 border-bottom-style: none;
284 border-left-style: none;
285 background-color: #FAFAFA;
286 font-size: 80%;
287}
288.memTemplItemRight {
289 padding: 1px 8px 0px 8px;
290 margin: 4px;
291 border-top-width: 1px;
292 border-right-width: 1px;
293 border-bottom-width: 1px;
294 border-left-width: 1px;
295 border-top-color: #E0E0E0;
296 border-right-color: #E0E0E0;
297 border-bottom-color: #E0E0E0;
298 border-left-color: #E0E0E0;
299 border-top-style: none;
300 border-right-style: none;
301 border-bottom-style: none;
302 border-left-style: none;
303 background-color: #FAFAFA;
304 font-size: 80%;
305}
306.memTemplParams {
307 padding: 1px 0px 0px 8px;
308 margin: 4px;
309 border-top-width: 1px;
310 border-right-width: 1px;
311 border-bottom-width: 1px;
312 border-left-width: 1px;
313 border-top-color: #E0E0E0;
314 border-right-color: #E0E0E0;
315 border-bottom-color: #E0E0E0;
316 border-left-color: #E0E0E0;
317 border-top-style: solid;
318 border-right-style: none;
319 border-bottom-style: none;
320 border-left-style: none;
321 color: #606060;
322 background-color: #FAFAFA;
323 font-size: 80%;
324}
325.search {
326 color: #003399;
327 font-weight: bold;
328}
329FORM.search {
330 margin-bottom: 0px;
331 margin-top: 0px;
332}
333INPUT.search {
334 font-size: 75%;
335 color: #000080;
336 font-weight: normal;
337 background-color: #e8eef2;
338}
339TD.tiny {
340 font-size: 75%;
341}
342a {
343 color: #1A41A8;
344}
345a:visited {
346 color: #2A3798;
347}
348.dirtab {
349 padding: 4px;
350 border-collapse: collapse;
351 border: 1px solid #84b0c7;
352}
353TH.dirtab {
354 background: #e8eef2;
355 font-weight: bold;
356}
357HR {
358 height: 1px;
359 border: none;
360 border-top: 1px solid black;
361}
362
363/* Style for detailed member documentation */
364.memtemplate {
365 font-size: 80%;
366 color: #606060;
367 font-weight: normal;
368 margin-left: 3px;
369}
370.memnav {
371 background-color: #e8eef2;
372 border: 1px solid #84b0c7;
373 text-align: center;
374 margin: 2px;
375 margin-right: 15px;
376 padding: 2px;
377}
378.memitem {
379 padding: 4px;
380 background-color: #eef3f5;
381 border-width: 1px;
382 border-style: solid;
383 border-color: #dedeee;
384 -moz-border-radius: 8px 8px 8px 8px;
385}
386.memname {
387 white-space: nowrap;
388 font-weight: bold;
389}
390.memdoc{
391 padding-left: 10px;
392}
393.memproto {
394 background-color: #d5e1e8;
395 width: 100%;
396 border-width: 1px;
397 border-style: solid;
398 border-color: #84b0c7;
399 font-weight: bold;
400 -moz-border-radius: 8px 8px 8px 8px;
401}
402.paramkey {
403 text-align: right;
404}
405.paramtype {
406 white-space: nowrap;
407}
408.paramname {
409 color: #602020;
410 font-style: italic;
411 white-space: nowrap;
412}
413/* End Styling for detailed member documentation */
414
415/* for the tree view */
416.ftvtree {
417 font-family: sans-serif;
418 margin:0.5em;
419}
420/* these are for tree view when used as main index */
421.directory {
422 font-size: 9pt;
423 font-weight: bold;
424}
425.directory h3 {
426 margin: 0px;
427 margin-top: 1em;
428 font-size: 11pt;
429}
430
431/* The following two styles can be used to replace the root node title */
432/* with an image of your choice. Simply uncomment the next two styles, */
433/* specify the name of your image and be sure to set 'height' to the */
434/* proper pixel height of your image. */
435
436/* .directory h3.swap { */
437/* height: 61px; */
438/* background-repeat: no-repeat; */
439/* background-image: url("yourimage.gif"); */
440/* } */
441/* .directory h3.swap span { */
442/* display: none; */
443/* } */
444
445.directory > h3 {
446 margin-top: 0;
447}
448.directory p {
449 margin: 0px;
450 white-space: nowrap;
451}
452.directory div {
453 display: none;
454 margin: 0px;
455}
456.directory img {
457 vertical-align: -30%;
458}
459/* these are for tree view when not used as main index */
460.directory-alt {
461 font-size: 100%;
462 font-weight: bold;
463}
464.directory-alt h3 {
465 margin: 0px;
466 margin-top: 1em;
467 font-size: 11pt;
468}
469.directory-alt > h3 {
470 margin-top: 0;
471}
472.directory-alt p {
473 margin: 0px;
474 white-space: nowrap;
475}
476.directory-alt div {
477 display: none;
478 margin: 0px;
479}
480.directory-alt img {
481 vertical-align: -30%;
482}
483
484/*
485 * This file contain a custom doxygen style to match e.org graphics
486 */
487
488
489
490/* BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
491 font-family: Geneva, Arial, Helvetica, sans-serif;
492}*/
493BODY, TD {
494 font-size: 12px;
495}
496H1 {
497 text-align: center;
498 font-size: 160%;
499}
500H2 {
501 font-size: 120%;
502}
503H3 {
504 font-size: 100%;
505}
506CAPTION {
507 font-weight: bold
508}
509DIV.qindex {
510 width: 100%;
511 background-color: #e8eef2;
512 border: 1px solid #84b0c7;
513 text-align: center;
514 margin: 2px;
515 padding: 2px;
516 line-height: 140%;
517}
518DIV.navpath {
519 width: 100%;
520 background-color: #e8eef2;
521 border: 1px solid #84b0c7;
522 text-align: center;
523 margin: 2px;
524 padding: 2px;
525 line-height: 140%;
526}
527DIV.navtab {
528 background-color: #e8eef2;
529 border: 1px solid #84b0c7;
530 text-align: center;
531 margin: 2px;
532 margin-right: 15px;
533 padding: 2px;
534}
535TD.navtab {
536 font-size: 70%;
537}
538A.qindex {
539 text-decoration: none;
540 font-weight: bold;
541 color: #1A419D;
542}
543A.qindex:visited {
544 text-decoration: none;
545 font-weight: bold;
546 color: #1A419D
547}
548A.qindex:hover {
549 text-decoration: none;
550 background-color: #ddddff;
551}
552A.qindexHL {
553 text-decoration: none;
554 font-weight: bold;
555 background-color: #6666cc;
556 color: #ffffff;
557 border: 1px double #9295C2;
558}
559A.qindexHL:hover {
560 text-decoration: none;
561 background-color: #6666cc;
562 color: #ffffff;
563}
564A.qindexHL:visited {
565 text-decoration: none;
566 background-color: #6666cc;
567 color: #ffffff
568}
569A.el {
570 text-decoration: none;
571 font-weight: bold
572}
573A.elRef {
574 font-weight: bold
575}
576A.code:link {
577 text-decoration: none;
578 font-weight: normal;
579 color: #0000FF
580}
581A.code:visited {
582 text-decoration: none;
583 font-weight: normal;
584 color: #0000FF
585}
586A.codeRef:link {
587 font-weight: normal;
588 color: #0000FF
589}
590A.codeRef:visited {
591 font-weight: normal;
592 color: #0000FF
593}
594A:hover, A:visited:hover {
595 text-decoration: none;
596 /* background-color: #f2f2ff; */
597 color: #000055;
598}
599A.anchor {
600 color: #000;
601}
602DL.el {
603 margin-left: -1cm
604}
605.fragment {
606 font-family: monospace, fixed;
607 font-size: 95%;
608}
609PRE.fragment {
610 border: 1px solid #CCCCCC;
611 background-color: #f5f5f5;
612 margin-top: 4px;
613 margin-bottom: 4px;
614 margin-left: 2px;
615 margin-right: 8px;
616 padding-left: 6px;
617 padding-right: 6px;
618 padding-top: 4px;
619 padding-bottom: 4px;
620}
621DIV.ah {
622 background-color: black;
623 font-weight: bold;
624 color: #ffffff;
625 margin-bottom: 3px;
626 margin-top: 3px
627}
628
629DIV.groupHeader {
630 margin-left: 16px;
631 margin-top: 12px;
632 margin-bottom: 6px;
633 font-weight: bold;
634}
635DIV.groupText {
636 margin-left: 16px;
637 font-style: italic;
638 font-size: 90%
639}
640/*BODY {
641 background: white;
642 color: black;
643 margin-right: 20px;
644 margin-left: 20px;
645}*/
646TD.indexkey {
647 background-color: #e8eef2;
648 font-weight: bold;
649 padding-right : 10px;
650 padding-top : 2px;
651 padding-left : 10px;
652 padding-bottom : 2px;
653 margin-left : 0px;
654 margin-right : 0px;
655 margin-top : 2px;
656 margin-bottom : 2px;
657 border: 1px solid #CCCCCC;
658}
659TD.indexvalue {
660 background-color: #e8eef2;
661 font-style: italic;
662 padding-right : 10px;
663 padding-top : 2px;
664 padding-left : 10px;
665 padding-bottom : 2px;
666 margin-left : 0px;
667 margin-right : 0px;
668 margin-top : 2px;
669 margin-bottom : 2px;
670 border: 1px solid #CCCCCC;
671}
672TR.memlist {
673 background-color: #f0f0f0;
674}
675P.formulaDsp {
676 text-align: center;
677}
678IMG.formulaDsp {
679}
680IMG.formulaInl {
681 vertical-align: middle;
682}
683SPAN.keyword { color: #008000 }
684SPAN.keywordtype { color: #604020 }
685SPAN.keywordflow { color: #e08000 }
686SPAN.comment { color: #800000 }
687SPAN.preprocessor { color: #806020 }
688SPAN.stringliteral { color: #002080 }
689SPAN.charliteral { color: #008080 }
690SPAN.vhdldigit { color: #ff00ff }
691SPAN.vhdlchar { color: #000000 }
692SPAN.vhdlkeyword { color: #700070 }
693SPAN.vhdllogic { color: #ff0000 }
694
695.mdescLeft {
696 padding: 0px 8px 4px 8px;
697 font-size: 80%;
698 font-style: italic;
699 background-color: #FAFAFA;
700 border-top: 1px none #E0E0E0;
701 border-right: 1px none #E0E0E0;
702 border-bottom: 1px none #E0E0E0;
703 border-left: 1px none #E0E0E0;
704 margin: 0px;
705}
706.mdescRight {
707 padding: 0px 8px 4px 8px;
708 font-size: 80%;
709 font-style: italic;
710 background-color: #FAFAFA;
711 border-top: 1px none #E0E0E0;
712 border-right: 1px none #E0E0E0;
713 border-bottom: 1px none #E0E0E0;
714 border-left: 1px none #E0E0E0;
715 margin: 0px;
716}
717.memItemLeft {
718 padding: 1px 0px 0px 8px;
719 margin: 4px;
720 border-top-width: 1px;
721 border-right-width: 1px;
722 border-bottom-width: 1px;
723 border-left-width: 1px;
724 border-top-color: #E0E0E0;
725 border-right-color: #E0E0E0;
726 border-bottom-color: #E0E0E0;
727 border-left-color: #E0E0E0;
728 border-top-style: solid;
729 border-right-style: none;
730 border-bottom-style: none;
731 border-left-style: none;
732 background-color: #FAFAFA;
733 font-size: 80%;
734}
735.memItemRight {
736 padding: 1px 8px 0px 8px;
737 margin: 4px;
738 border-top-width: 1px;
739 border-right-width: 1px;
740 border-bottom-width: 1px;
741 border-left-width: 1px;
742 border-top-color: #E0E0E0;
743 border-right-color: #E0E0E0;
744 border-bottom-color: #E0E0E0;
745 border-left-color: #E0E0E0;
746 border-top-style: solid;
747 border-right-style: none;
748 border-bottom-style: none;
749 border-left-style: none;
750 background-color: #FAFAFA;
751 font-size: 80%;
752}
753.memTemplItemLeft {
754 padding: 1px 0px 0px 8px;
755 margin: 4px;
756 border-top-width: 1px;
757 border-right-width: 1px;
758 border-bottom-width: 1px;
759 border-left-width: 1px;
760 border-top-color: #E0E0E0;
761 border-right-color: #E0E0E0;
762 border-bottom-color: #E0E0E0;
763 border-left-color: #E0E0E0;
764 border-top-style: none;
765 border-right-style: none;
766 border-bottom-style: none;
767 border-left-style: none;
768 background-color: #FAFAFA;
769 font-size: 80%;
770}
771.memTemplItemRight {
772 padding: 1px 8px 0px 8px;
773 margin: 4px;
774 border-top-width: 1px;
775 border-right-width: 1px;
776 border-bottom-width: 1px;
777 border-left-width: 1px;
778 border-top-color: #E0E0E0;
779 border-right-color: #E0E0E0;
780 border-bottom-color: #E0E0E0;
781 border-left-color: #E0E0E0;
782 border-top-style: none;
783 border-right-style: none;
784 border-bottom-style: none;
785 border-left-style: none;
786 background-color: #FAFAFA;
787 font-size: 80%;
788}
789.memTemplParams {
790 padding: 1px 0px 0px 8px;
791 margin: 4px;
792 border-top-width: 1px;
793 border-right-width: 1px;
794 border-bottom-width: 1px;
795 border-left-width: 1px;
796 border-top-color: #E0E0E0;
797 border-right-color: #E0E0E0;
798 border-bottom-color: #E0E0E0;
799 border-left-color: #E0E0E0;
800 border-top-style: solid;
801 border-right-style: none;
802 border-bottom-style: none;
803 border-left-style: none;
804 color: #606060;
805 background-color: #FAFAFA;
806 font-size: 80%;
807}
808.search {
809 color: #003399;
810 font-weight: bold;
811}
812FORM.search {
813 margin-bottom: 0px;
814 margin-top: 0px;
815}
816INPUT.search {
817 font-size: 75%;
818 color: #000080;
819 font-weight: normal;
820 background-color: #e8eef2;
821}
822TD.tiny {
823 font-size: 75%;
824}
825a {
826 color: #1A41A8;
827}
828a:visited {
829 color: #2A3798;
830}
831.dirtab {
832 padding: 4px;
833 border-collapse: collapse;
834 border: 1px solid #84b0c7;
835}
836TH.dirtab {
837 background: #e8eef2;
838 font-weight: bold;
839}
840HR {
841 height: 1px;
842 border: none;
843 border-top: 1px solid black;
844}
845
846/* Style for detailed member documentation */
847.memtemplate {
848 font-size: 80%;
849 color: #606060;
850 font-weight: normal;
851 margin-left: 3px;
852}
853.memnav {
854 background-color: #e8eef2;
855 border: 1px solid #84b0c7;
856 text-align: center;
857 margin: 2px;
858 margin-right: 15px;
859 padding: 2px;
860}
861.memitem {
862 padding: 4px;
863 background-color: #eef3f5;
864 border-width: 1px;
865 border-style: solid;
866 border-color: #dedeee;
867 -moz-border-radius: 8px 8px 8px 8px;
868}
869.memname {
870 white-space: nowrap;
871 font-weight: bold;
872}
873.memdoc{
874 padding-left: 10px;
875}
876.memproto {
877 background-color: #d5e1e8;
878 width: 100%;
879 border-width: 1px;
880 border-style: solid;
881 border-color: #84b0c7;
882 font-weight: bold;
883 -moz-border-radius: 8px 8px 8px 8px;
884}
885.paramkey {
886 text-align: right;
887}
888.paramtype {
889 white-space: nowrap;
890}
891.paramname {
892 color: #602020;
893 font-style: italic;
894 white-space: nowrap;
895}
896/* End Styling for detailed member documentation */
897
898/* for the tree view */
899.ftvtree {
900 font-family: sans-serif;
901 margin:0.5em;
902}
903/* these are for tree view when used as main index */
904.directory {
905 font-size: 9pt;
906 font-weight: bold;
907}
908.directory h3 {
909 margin: 0px;
910 margin-top: 1em;
911 font-size: 11pt;
912}
913
914/* The following two styles can be used to replace the root node title */
915/* with an image of your choice. Simply uncomment the next two styles, */
916/* specify the name of your image and be sure to set 'height' to the */
917/* proper pixel height of your image. */
918
919/* .directory h3.swap { */
920/* height: 61px; */
921/* background-repeat: no-repeat; */
922/* background-image: url("yourimage.gif"); */
923/* } */
924/* .directory h3.swap span { */
925/* display: none; */
926/* } */
927
928.directory > h3 {
929 margin-top: 0;
930}
931.directory p {
932 margin: 0px;
933 white-space: nowrap;
934}
935.directory div {
936 display: none;
937 margin: 0px;
938}
939.directory img {
940 vertical-align: -30%;
941}
942/* these are for tree view when not used as main index */
943.directory-alt {
944 font-size: 100%;
945 font-weight: bold;
946}
947.directory-alt h3 {
948 margin: 0px;
949 margin-top: 1em;
950 font-size: 11pt;
951}
952.directory-alt > h3 {
953 margin-top: 0;
954}
955.directory-alt p {
956 margin: 0px;
957 white-space: nowrap;
958}
959.directory-alt div {
960 display: none;
961 margin: 0px;
962}
963.directory-alt img {
964 vertical-align: -30%;
965}
966
diff --git a/libraries/embryo/doc/img/foot_bg.png b/libraries/embryo/doc/img/foot_bg.png
deleted file mode 100644
index b24f3a4..0000000
--- a/libraries/embryo/doc/img/foot_bg.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/head_bg.png b/libraries/embryo/doc/img/head_bg.png
deleted file mode 100644
index 081dc13..0000000
--- a/libraries/embryo/doc/img/head_bg.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/hilite.png b/libraries/embryo/doc/img/hilite.png
deleted file mode 100644
index 88a4381..0000000
--- a/libraries/embryo/doc/img/hilite.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/menu_bg.png b/libraries/embryo/doc/img/menu_bg.png
deleted file mode 100644
index e978743..0000000
--- a/libraries/embryo/doc/img/menu_bg.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/menu_bg_current.png b/libraries/embryo/doc/img/menu_bg_current.png
deleted file mode 100644
index de97c92..0000000
--- a/libraries/embryo/doc/img/menu_bg_current.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/menu_bg_hover.png b/libraries/embryo/doc/img/menu_bg_hover.png
deleted file mode 100644
index 3fd851d..0000000
--- a/libraries/embryo/doc/img/menu_bg_hover.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/menu_bg_last.png b/libraries/embryo/doc/img/menu_bg_last.png
deleted file mode 100644
index 88c116c..0000000
--- a/libraries/embryo/doc/img/menu_bg_last.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/doc/img/menu_bg_unsel.png b/libraries/embryo/doc/img/menu_bg_unsel.png
deleted file mode 100644
index 50e5fd8..0000000
--- a/libraries/embryo/doc/img/menu_bg_unsel.png
+++ /dev/null
Binary files differ
diff --git a/libraries/embryo/embryo.pc.in b/libraries/embryo/embryo.pc.in
deleted file mode 100644
index 540f27c..0000000
--- a/libraries/embryo/embryo.pc.in
+++ /dev/null
@@ -1,15 +0,0 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5datarootdir=@datarootdir@
6datadir=@datadir@/@PACKAGE@
7embryoincludedir=@embryoincludedir@
8
9Name: embryo
10Description: A small virtual machine engine and bytecode compiler
11@pkgconfig_requires_private@: @requirement_embryo@
12Version: @VERSION@
13Libs: -L${libdir} -lembryo
14Libs.private: @EFL_FNMATCH_LIBS@ -lm
15Cflags: -I${includedir}/embryo-@VMAJ@
diff --git a/libraries/embryo/embryo.spec b/libraries/embryo/embryo.spec
deleted file mode 100644
index 73de4de..0000000
--- a/libraries/embryo/embryo.spec
+++ /dev/null
@@ -1,77 +0,0 @@
1%define _missing_doc_files_terminate_build 0
2
3%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
4
5Summary: A small virtual machine engine (in a library) and bytecode compiler
6Name: embryo
7Version: 1.2.0-alpha
8Release: %{_rel}
9License: BSD
10Group: System Environment/Libraries
11Source: %{name}-%{version}.tar.gz
12Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
13Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
14Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
15URL: http://www.enlightenment.org/
16BuildRoot: %{_tmppath}/%{name}-%{version}-root
17
18%description
19Embryo is a tiny library designed as a virtual machine to interpret a
20limited set of small compiled programs.
21
22%package devel
23Summary: Embryo headers, static libraries, documentation and test programs
24Group: System Environment/Libraries
25Requires: %{name} = %{version}
26
27%description devel
28Headers, static libraries, test programs and documentation for Embryo
29
30%package bin
31Summary: Embryo bytecode compiler and needed data files
32Group: System Environment/Libraries
33Requires: %{name} = %{version}
34
35%description bin
36The embryo bytecode compiler and its files
37
38%prep
39%setup -q
40
41%build
42%{configure} --prefix=%{_prefix}
43### use this if you have build problems
44#./configure --prefix=%{_prefix}
45%{__make} %{?_smp_mflags} %{?mflags}
46
47%install
48%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
49
50%clean
51test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
52
53%post
54/sbin/ldconfig
55
56%postun
57/sbin/ldconfig
58
59%files
60%defattr(-, root, root)
61%doc AUTHORS COPYING* README
62%{_libdir}/*.so.*
63
64%files bin
65%defattr(-, root, root)
66%attr(755,root,root) %{_bindir}/embryo_cc
67%{_datadir}/embryo/include
68
69%files devel
70%defattr(-, root, root)
71%{_libdir}/*.so
72%{_libdir}/*.la
73%{_libdir}/*.a
74%{_libdir}/pkgconfig/*
75%{_includedir}/embryo-1/*.h
76
77%changelog
diff --git a/libraries/embryo/embryo.spec.in b/libraries/embryo/embryo.spec.in
deleted file mode 100644
index 4c37ede..0000000
--- a/libraries/embryo/embryo.spec.in
+++ /dev/null
@@ -1,77 +0,0 @@
1%define _missing_doc_files_terminate_build 0
2
3%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
4
5Summary: A small virtual machine engine (in a library) and bytecode compiler
6Name: @PACKAGE@
7Version: @VERSION@
8Release: %{_rel}
9License: BSD
10Group: System Environment/Libraries
11Source: %{name}-%{version}.tar.gz
12Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
13Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
14Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
15URL: http://www.enlightenment.org/
16BuildRoot: %{_tmppath}/%{name}-%{version}-root
17
18%description
19Embryo is a tiny library designed as a virtual machine to interpret a
20limited set of small compiled programs.
21
22%package devel
23Summary: Embryo headers, static libraries, documentation and test programs
24Group: System Environment/Libraries
25Requires: %{name} = %{version}
26
27%description devel
28Headers, static libraries, test programs and documentation for Embryo
29
30%package bin
31Summary: Embryo bytecode compiler and needed data files
32Group: System Environment/Libraries
33Requires: %{name} = %{version}
34
35%description bin
36The embryo bytecode compiler and its files
37
38%prep
39%setup -q
40
41%build
42%{configure} --prefix=%{_prefix}
43### use this if you have build problems
44#./configure --prefix=%{_prefix}
45%{__make} %{?_smp_mflags} %{?mflags}
46
47%install
48%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
49
50%clean
51test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
52
53%post
54/sbin/ldconfig
55
56%postun
57/sbin/ldconfig
58
59%files
60%defattr(-, root, root)
61%doc AUTHORS COPYING* README
62%{_libdir}/*.so.*
63
64%files bin
65%defattr(-, root, root)
66%attr(755,root,root) %{_bindir}/embryo_cc
67%{_datadir}/embryo/include
68
69%files devel
70%defattr(-, root, root)
71%{_libdir}/*.so
72%{_libdir}/*.la
73%{_libdir}/*.a
74%{_libdir}/pkgconfig/*
75%{_includedir}/embryo-1/*.h
76
77%changelog
diff --git a/libraries/embryo/include/Makefile.am b/libraries/embryo/include/Makefile.am
deleted file mode 100644
index 006ee14..0000000
--- a/libraries/embryo/include/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3filesdir = $(datadir)/embryo/include
4files_DATA = \
5default.inc
6
7EXTRA_DIST = $(files_DATA)
diff --git a/libraries/embryo/include/Makefile.in b/libraries/embryo/include/Makefile.in
deleted file mode 100644
index f462b6c..0000000
--- a/libraries/embryo/include/Makefile.in
+++ /dev/null
@@ -1,442 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = include
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
41 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_gettimeofday.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
45 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
46 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
47 $(top_srcdir)/configure.ac
48am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
49 $(ACLOCAL_M4)
50mkinstalldirs = $(install_sh) -d
51CONFIG_HEADER = $(top_builddir)/config.h
52CONFIG_CLEAN_FILES =
53CONFIG_CLEAN_VPATH_FILES =
54AM_V_GEN = $(am__v_GEN_$(V))
55am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
56am__v_GEN_0 = @echo " GEN " $@;
57AM_V_at = $(am__v_at_$(V))
58am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
59am__v_at_0 = @
60SOURCES =
61DIST_SOURCES =
62am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
63am__vpath_adj = case $$p in \
64 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
65 *) f=$$p;; \
66 esac;
67am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
68am__install_max = 40
69am__nobase_strip_setup = \
70 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
71am__nobase_strip = \
72 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
73am__nobase_list = $(am__nobase_strip_setup); \
74 for p in $$list; do echo "$$p $$p"; done | \
75 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
76 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
77 if (++n[$$2] == $(am__install_max)) \
78 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
79 END { for (dir in files) print dir, files[dir] }'
80am__base_list = \
81 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
82 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
83am__installdirs = "$(DESTDIR)$(filesdir)"
84DATA = $(files_DATA)
85DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
86ACLOCAL = @ACLOCAL@
87ALLOCA = @ALLOCA@
88AMTAR = @AMTAR@
89AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
90AR = @AR@
91AS = @AS@
92AUTOCONF = @AUTOCONF@
93AUTOHEADER = @AUTOHEADER@
94AUTOMAKE = @AUTOMAKE@
95AWK = @AWK@
96CC = @CC@
97CCDEPMODE = @CCDEPMODE@
98CFLAGS = @CFLAGS@
99CPP = @CPP@
100CPPFLAGS = @CPPFLAGS@
101CYGPATH_W = @CYGPATH_W@
102DEFS = @DEFS@
103DEPDIR = @DEPDIR@
104DLLTOOL = @DLLTOOL@
105DSYMUTIL = @DSYMUTIL@
106DUMPBIN = @DUMPBIN@
107ECHO_C = @ECHO_C@
108ECHO_N = @ECHO_N@
109ECHO_T = @ECHO_T@
110EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
111EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
112EGREP = @EGREP@
113EINA_CFLAGS = @EINA_CFLAGS@
114EINA_LIBS = @EINA_LIBS@
115EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
116EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
117EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
118EVIL_CFLAGS = @EVIL_CFLAGS@
119EVIL_LIBS = @EVIL_LIBS@
120EXEEXT = @EXEEXT@
121EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
122EXOTIC_LIBS = @EXOTIC_LIBS@
123FGREP = @FGREP@
124GREP = @GREP@
125INSTALL = @INSTALL@
126INSTALL_DATA = @INSTALL_DATA@
127INSTALL_PROGRAM = @INSTALL_PROGRAM@
128INSTALL_SCRIPT = @INSTALL_SCRIPT@
129INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
130LD = @LD@
131LDFLAGS = @LDFLAGS@
132LIBOBJS = @LIBOBJS@
133LIBS = @LIBS@
134LIBTOOL = @LIBTOOL@
135LIPO = @LIPO@
136LN_S = @LN_S@
137LTLIBOBJS = @LTLIBOBJS@
138MAKEINFO = @MAKEINFO@
139MKDIR_P = @MKDIR_P@
140NM = @NM@
141NMEDIT = @NMEDIT@
142OBJDUMP = @OBJDUMP@
143OBJEXT = @OBJEXT@
144OTOOL = @OTOOL@
145OTOOL64 = @OTOOL64@
146PACKAGE = @PACKAGE@
147PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
148PACKAGE_NAME = @PACKAGE_NAME@
149PACKAGE_STRING = @PACKAGE_STRING@
150PACKAGE_TARNAME = @PACKAGE_TARNAME@
151PACKAGE_URL = @PACKAGE_URL@
152PACKAGE_VERSION = @PACKAGE_VERSION@
153PATH_SEPARATOR = @PATH_SEPARATOR@
154PKG_CONFIG = @PKG_CONFIG@
155PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
156PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
157RANLIB = @RANLIB@
158SED = @SED@
159SET_MAKE = @SET_MAKE@
160SHELL = @SHELL@
161STRIP = @STRIP@
162VERSION = @VERSION@
163VMAJ = @VMAJ@
164abs_builddir = @abs_builddir@
165abs_srcdir = @abs_srcdir@
166abs_top_builddir = @abs_top_builddir@
167abs_top_srcdir = @abs_top_srcdir@
168ac_ct_CC = @ac_ct_CC@
169ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
170am__include = @am__include@
171am__leading_dot = @am__leading_dot@
172am__quote = @am__quote@
173am__tar = @am__tar@
174am__untar = @am__untar@
175bindir = @bindir@
176build = @build@
177build_alias = @build_alias@
178build_cpu = @build_cpu@
179build_os = @build_os@
180build_vendor = @build_vendor@
181builddir = @builddir@
182datadir = @datadir@
183datarootdir = @datarootdir@
184docdir = @docdir@
185dvidir = @dvidir@
186efl_doxygen = @efl_doxygen@
187efl_have_doxygen = @efl_have_doxygen@
188embryoincludedir = @embryoincludedir@
189exec_prefix = @exec_prefix@
190host = @host@
191host_alias = @host_alias@
192host_cpu = @host_cpu@
193host_os = @host_os@
194host_vendor = @host_vendor@
195htmldir = @htmldir@
196includedir = @includedir@
197infodir = @infodir@
198install_sh = @install_sh@
199libdir = @libdir@
200libexecdir = @libexecdir@
201localedir = @localedir@
202localstatedir = @localstatedir@
203lt_ECHO = @lt_ECHO@
204lt_enable_auto_import = @lt_enable_auto_import@
205mandir = @mandir@
206mkdir_p = @mkdir_p@
207oldincludedir = @oldincludedir@
208pdfdir = @pdfdir@
209pkgconfig_requires_private = @pkgconfig_requires_private@
210prefix = @prefix@
211program_transform_name = @program_transform_name@
212psdir = @psdir@
213release_info = @release_info@
214requirement_embryo = @requirement_embryo@
215sbindir = @sbindir@
216sharedstatedir = @sharedstatedir@
217srcdir = @srcdir@
218sysconfdir = @sysconfdir@
219target_alias = @target_alias@
220top_build_prefix = @top_build_prefix@
221top_builddir = @top_builddir@
222top_srcdir = @top_srcdir@
223version_info = @version_info@
224MAINTAINERCLEANFILES = Makefile.in
225filesdir = $(datadir)/embryo/include
226files_DATA = \
227default.inc
228
229EXTRA_DIST = $(files_DATA)
230all: all-am
231
232.SUFFIXES:
233$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
234 @for dep in $?; do \
235 case '$(am__configure_deps)' in \
236 *$$dep*) \
237 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
238 && { if test -f $@; then exit 0; else break; fi; }; \
239 exit 1;; \
240 esac; \
241 done; \
242 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
243 $(am__cd) $(top_srcdir) && \
244 $(AUTOMAKE) --gnu include/Makefile
245.PRECIOUS: Makefile
246Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
247 @case '$?' in \
248 *config.status*) \
249 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
250 *) \
251 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
252 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
253 esac;
254
255$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
256 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
257
258$(top_srcdir)/configure: $(am__configure_deps)
259 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
260$(ACLOCAL_M4): $(am__aclocal_m4_deps)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262$(am__aclocal_m4_deps):
263
264mostlyclean-libtool:
265 -rm -f *.lo
266
267clean-libtool:
268 -rm -rf .libs _libs
269install-filesDATA: $(files_DATA)
270 @$(NORMAL_INSTALL)
271 test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)"
272 @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
273 for p in $$list; do \
274 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
275 echo "$$d$$p"; \
276 done | $(am__base_list) | \
277 while read files; do \
278 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \
279 $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \
280 done
281
282uninstall-filesDATA:
283 @$(NORMAL_UNINSTALL)
284 @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
285 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
286 test -n "$$files" || exit 0; \
287 echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \
288 cd "$(DESTDIR)$(filesdir)" && rm -f $$files
289tags: TAGS
290TAGS:
291
292ctags: CTAGS
293CTAGS:
294
295
296distdir: $(DISTFILES)
297 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
298 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
299 list='$(DISTFILES)'; \
300 dist_files=`for file in $$list; do echo $$file; done | \
301 sed -e "s|^$$srcdirstrip/||;t" \
302 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
303 case $$dist_files in \
304 */*) $(MKDIR_P) `echo "$$dist_files" | \
305 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
306 sort -u` ;; \
307 esac; \
308 for file in $$dist_files; do \
309 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
310 if test -d $$d/$$file; then \
311 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
312 if test -d "$(distdir)/$$file"; then \
313 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
314 fi; \
315 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
316 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
317 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
318 fi; \
319 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
320 else \
321 test -f "$(distdir)/$$file" \
322 || cp -p $$d/$$file "$(distdir)/$$file" \
323 || exit 1; \
324 fi; \
325 done
326check-am: all-am
327check: check-am
328all-am: Makefile $(DATA)
329installdirs:
330 for dir in "$(DESTDIR)$(filesdir)"; do \
331 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
332 done
333install: install-am
334install-exec: install-exec-am
335install-data: install-data-am
336uninstall: uninstall-am
337
338install-am: all-am
339 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
340
341installcheck: installcheck-am
342install-strip:
343 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
344 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
345 `test -z '$(STRIP)' || \
346 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
347mostlyclean-generic:
348
349clean-generic:
350
351distclean-generic:
352 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
353 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
354
355maintainer-clean-generic:
356 @echo "This command is intended for maintainers to use"
357 @echo "it deletes files that may require special tools to rebuild."
358 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
359clean: clean-am
360
361clean-am: clean-generic clean-libtool mostlyclean-am
362
363distclean: distclean-am
364 -rm -f Makefile
365distclean-am: clean-am distclean-generic
366
367dvi: dvi-am
368
369dvi-am:
370
371html: html-am
372
373html-am:
374
375info: info-am
376
377info-am:
378
379install-data-am: install-filesDATA
380
381install-dvi: install-dvi-am
382
383install-dvi-am:
384
385install-exec-am:
386
387install-html: install-html-am
388
389install-html-am:
390
391install-info: install-info-am
392
393install-info-am:
394
395install-man:
396
397install-pdf: install-pdf-am
398
399install-pdf-am:
400
401install-ps: install-ps-am
402
403install-ps-am:
404
405installcheck-am:
406
407maintainer-clean: maintainer-clean-am
408 -rm -f Makefile
409maintainer-clean-am: distclean-am maintainer-clean-generic
410
411mostlyclean: mostlyclean-am
412
413mostlyclean-am: mostlyclean-generic mostlyclean-libtool
414
415pdf: pdf-am
416
417pdf-am:
418
419ps: ps-am
420
421ps-am:
422
423uninstall-am: uninstall-filesDATA
424
425.MAKE: install-am install-strip
426
427.PHONY: all all-am check check-am clean clean-generic clean-libtool \
428 distclean distclean-generic distclean-libtool distdir dvi \
429 dvi-am html html-am info info-am install install-am \
430 install-data install-data-am install-dvi install-dvi-am \
431 install-exec install-exec-am install-filesDATA install-html \
432 install-html-am install-info install-info-am install-man \
433 install-pdf install-pdf-am install-ps install-ps-am \
434 install-strip installcheck installcheck-am installdirs \
435 maintainer-clean maintainer-clean-generic mostlyclean \
436 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
437 uninstall uninstall-am uninstall-filesDATA
438
439
440# Tell versions [3.59,3.63) of GNU make to not export all variables.
441# Otherwise a system limit (for SysV at least) may be exceeded.
442.NOEXPORT:
diff --git a/libraries/embryo/include/default.inc b/libraries/embryo/include/default.inc
deleted file mode 100644
index 0733503..0000000
--- a/libraries/embryo/include/default.inc
+++ /dev/null
@@ -1,213 +0,0 @@
1/* Float arithmetic
2 *
3 * (c) Copyright 1999, Artran, Inc.
4 * Written by Greg Garner (gmg@artran.com)
5 * Modified in March 2001 to include user defined
6 * operators for the floating point functions.
7 * (c) Copyright 2004, Carsten Haitzler
8 * Modified March 2004 by Carsten Haitzler <raster@rasterman.com> to conform
9 * to E coding style
10 * Became default include for embryo...
11 * Added string functions
12 * Added rand functions
13 * Added time functions
14 *
15 * This file is provided as is (no warranties).
16 */
17#if defined DEFAULT_INC
18#endinput
19#endif
20#define DEFAULT_INC
21
22#pragma rational Float
23
24#define PI 3.1415926535897932384626433832795
25
26/* Different methods of rounding */
27enum Float_Round_Method
28{
29 ROUND, FLOOR, CEIL, TOZERO
30};
31/* different angle addressing modes (default is radians) */
32enum Float_Angle_Mode
33{
34 RADIAN, DEGREES, GRADES
35};
36
37/* varags - get numebr of args to a function */
38native numargs();
39/* varags - get arg no "arg" */
40native getarg(arg, index=0);
41native getsarg(arg, buf[], buflen);
42native Float:getfarg(arg, index=0);
43/* varags - set arg no "arg" */
44native setarg(arg, index=0, value);
45native setfarg(arg, index=0, Float:value);
46
47/* Convert a string into a floating point value */
48native Float:atof(const string[]);
49/* Return the fractional part of a float */
50native Float:fract(Float:value);
51/* Round a float into a integer value */
52native round(Float:value, Float_Round_Method:method=ROUND);
53/* Return the square root of value, same as float_power(value, 0.5) */
54native Float:sqrt(Float:value);
55/* Return the value raised to the power of the exponent */
56native Float:pow(Float:value, Float:exponent);
57/* Return the logarithm */
58native Float:log(Float:value, Float:base=10.0);
59/* Return the sine, cosine or tangent. The input angle may be in radian*/
60/* degrees or grades. */
61native Float:sin(Float:value, Float_Angle_Mode:mode=RADIAN);
62native Float:cos(Float:value, Float_Angle_Mode:mode=RADIAN);
63native Float:tan(Float:value, Float_Angle_Mode:mode=RADIAN);
64/* Return the absolute value */
65native Float:abs(Float:value);
66/* return integer from string */
67native atoi(str[]);
68/* return 0 if string matches glob, non-zero otherwise */
69native fnmatch(glob[], str[]);
70/* same as strcmp() */
71native strcmp(str1[], str2[]);
72/* same as strncmp */
73native strncmp(str1[], str2[], n);
74/* same as strcpy */
75native strcpy(dst[], src[]);
76/* same as strncpy except it nul terminates */
77native strncpy(dst[], src[], n);
78/* same as strlen */
79native strlen(str[]);
80/* same as strcat */
81native strcat(dst[], src[]);
82/* same as strncat except it nul terminates */
83native strncat(dst[], src[], n);
84/* prepends src string onto start of dst string */
85native strprep(dst[], src[]);
86/* prepends at most n chars from src string onto dst string */
87native strnprep(dst[], src[], n);
88/* cuts chars from char n to (not including) n2, and puts them in str */
89native strcut(dst[], str[], n, n2);
90/* same as snprintf, except only supports %%, %c, %i, %d, %f, %x, %X, %s, \n and \t */
91native snprintf(dst[], dstn, fmt[], ...);
92/* same as strstr */
93native strstr(str[], ndl[]);
94/* same as strchr, except ch must be a 1 charater long string, and returns string index */
95native strchr(str[], ch[]);
96/* same as strrchr, except ch must be a 1 charater long string and returns string index */
97native strrchr(str[], ch[]);
98/* return random number 0 - 65535 */
99native rand();
100/* return random number 0.0 - 1.0 */
101native Float:randf();
102/* return seconds since midnight as a float */
103native Float:seconds();
104/* return the current date, year, time etc. in the variables provided */
105native date(&year, &month, &day, &yearday, &weekday, &hr, &min, &Float:sec);
106
107/*****************************************************************************/
108/*****************************************************************************/
109/*****************************************************************************/
110/*****************************************************************************/
111/*****************************************************************************/
112/*****************************************************************************/
113/*****************************************************************************/
114/*****************************************************************************/
115/*****************************************************************************/
116/*****************************************************************************/
117/*****************************************************************************/
118/*****************************************************************************/
119/*****************************************************************************/
120/*****************************************************************************/
121/*****************************************************************************/
122/*****************************************************************************/
123/*****************************************************************************/
124/*****************************************************************************/
125/*****************************************************************************/
126/*****************************************************************************/
127/*****************************************************************************/
128/*****************************************************************************/
129/*****************************************************************************/
130/*****************************************************************************/
131/*****************************************************************************/
132/*****************************************************************************/
133
134/**************************************************/
135/* Hidden calls - all are overloaded on operators */
136/**************************************************/
137
138/* Convert an integer into a floating point value */
139native Float:float(value);
140/* Multiple two floats together */
141native Float:float_mul(Float:oper1, Float:oper2);
142/* Divide the dividend float by the divisor float */
143native Float:float_div(Float:dividend, Float:divisor);
144/* Add two floats together */
145native Float:float_add(Float:oper1, Float:oper2);
146/* Subtract oper2 float from oper1 float */
147native Float:float_sub(Float:oper1, Float:oper2);
148/* Compare two integers. If the two elements are equal, return 0. */
149/* If the first argument is greater than the second argument, return 1, */
150/* If the first argument is less than the second argument, return -1. */
151native float_cmp(Float:oper1, Float:oper2);
152/* user defined operators */
153native Float:operator*(Float:oper1, Float:oper2) = float_mul;
154native Float:operator/(Float:oper1, Float:oper2) = float_div;
155native Float:operator+(Float:oper1, Float:oper2) = float_add;
156native Float:operator-(Float:oper1, Float:oper2) = float_sub;
157native Float:operator=(oper) = float;
158stock Float:operator++(Float:oper)
159 return oper+1.0;
160stock Float:operator--(Float:oper)
161 return oper-1.0;
162stock Float:operator-(Float:oper)
163 return oper^Float:0x80000000; /* IEEE values are sign/magnitude */
164stock Float:operator*(Float:oper1, oper2)
165 return float_mul(oper1, float(oper2)); /* "*" is commutative */
166stock Float:operator/(Float:oper1, oper2)
167 return float_div(oper1, float(oper2));
168stock Float:operator/(oper1, Float:oper2)
169 return float_div(float(oper1), oper2);
170stock Float:operator+(Float:oper1, oper2)
171 return float_add(oper1, float(oper2)); /* "+" is commutative */
172stock Float:operator-(Float:oper1, oper2)
173 return float_sub(oper1, float(oper2));
174stock Float:operator-(oper1, Float:oper2)
175 return float_sub(float(oper1), oper2);
176stock bool:operator==(Float:oper1, Float:oper2)
177 return float_cmp(oper1, oper2) == 0;
178stock bool:operator==(Float:oper1, oper2)
179 return float_cmp(oper1, float(oper2)) == 0; /* "==" is commutative */
180stock bool:operator!=(Float:oper1, Float:oper2)
181 return float_cmp(oper1, oper2) != 0;
182stock bool:operator!=(Float:oper1, oper2)
183 return float_cmp(oper1, float(oper2)) != 0; /* "!=" is commutative */
184stock bool:operator>(Float:oper1, Float:oper2)
185 return float_cmp(oper1, oper2) > 0;
186stock bool:operator>(Float:oper1, oper2)
187 return float_cmp(oper1, float(oper2)) > 0;
188stock bool:operator>(oper1, Float:oper2)
189 return float_cmp(float(oper1), oper2) > 0;
190stock bool:operator>=(Float:oper1, Float:oper2)
191 return float_cmp(oper1, oper2) >= 0;
192stock bool:operator>=(Float:oper1, oper2)
193 return float_cmp(oper1, float(oper2)) >= 0;
194stock bool:operator>=(oper1, Float:oper2)
195 return float_cmp(float(oper1), oper2) >= 0;
196stock bool:operator<(Float:oper1, Float:oper2)
197 return float_cmp(oper1, oper2) < 0;
198stock bool:operator<(Float:oper1, oper2)
199 return float_cmp(oper1, float(oper2)) < 0;
200stock bool:operator<(oper1, Float:oper2)
201 return float_cmp(float(oper1), oper2) < 0;
202stock bool:operator<=(Float:oper1, Float:oper2)
203 return float_cmp(oper1, oper2) <= 0;
204stock bool:operator<=(Float:oper1, oper2)
205 return float_cmp(oper1, float(oper2)) <= 0;
206stock bool:operator<=(oper1, Float:oper2)
207 return float_cmp(float(oper1), oper2) <= 0;
208stock bool:operator!(Float:oper)
209 return (_:oper & 0x7fffffff) == 0;
210/* forbidden operations */
211forward operator%(Float:oper1, Float:oper2);
212forward operator%(Float:oper1, oper2);
213forward operator%(oper1, Float:oper2);
diff --git a/libraries/embryo/install-sh b/libraries/embryo/install-sh
deleted file mode 100755
index 6781b98..0000000
--- a/libraries/embryo/install-sh
+++ /dev/null
@@ -1,520 +0,0 @@
1#!/bin/sh
2# install - install a program, script, or datafile
3
4scriptversion=2009-04-28.21; # UTC
5
6# This originates from X11R5 (mit/util/scripts/install.sh), which was
7# later released in X11R6 (xc/config/util/install.sh) with the
8# following copyright and license.
9#
10# Copyright (C) 1994 X Consortium
11#
12# Permission is hereby granted, free of charge, to any person obtaining a copy
13# of this software and associated documentation files (the "Software"), to
14# deal in the Software without restriction, including without limitation the
15# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16# sell copies of the Software, and to permit persons to whom the Software is
17# furnished to do so, subject to the following conditions:
18#
19# The above copyright notice and this permission notice shall be included in
20# all copies or substantial portions of the Software.
21#
22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
27# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28#
29# Except as contained in this notice, the name of the X Consortium shall not
30# be used in advertising or otherwise to promote the sale, use or other deal-
31# ings in this Software without prior written authorization from the X Consor-
32# tium.
33#
34#
35# FSF changes to this file are in the public domain.
36#
37# Calling this script install-sh is preferred over install.sh, to prevent
38# `make' implicit rules from creating a file called install from it
39# when there is no Makefile.
40#
41# This script is compatible with the BSD install script, but was written
42# from scratch.
43
44nl='
45'
46IFS=" "" $nl"
47
48# set DOITPROG to echo to test this script
49
50# Don't use :- since 4.3BSD and earlier shells don't like it.
51doit=${DOITPROG-}
52if test -z "$doit"; then
53 doit_exec=exec
54else
55 doit_exec=$doit
56fi
57
58# Put in absolute file names if you don't have them in your path;
59# or use environment vars.
60
61chgrpprog=${CHGRPPROG-chgrp}
62chmodprog=${CHMODPROG-chmod}
63chownprog=${CHOWNPROG-chown}
64cmpprog=${CMPPROG-cmp}
65cpprog=${CPPROG-cp}
66mkdirprog=${MKDIRPROG-mkdir}
67mvprog=${MVPROG-mv}
68rmprog=${RMPROG-rm}
69stripprog=${STRIPPROG-strip}
70
71posix_glob='?'
72initialize_posix_glob='
73 test "$posix_glob" != "?" || {
74 if (set -f) 2>/dev/null; then
75 posix_glob=
76 else
77 posix_glob=:
78 fi
79 }
80'
81
82posix_mkdir=
83
84# Desired mode of installed file.
85mode=0755
86
87chgrpcmd=
88chmodcmd=$chmodprog
89chowncmd=
90mvcmd=$mvprog
91rmcmd="$rmprog -f"
92stripcmd=
93
94src=
95dst=
96dir_arg=
97dst_arg=
98
99copy_on_change=false
100no_target_directory=
101
102usage="\
103Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
104 or: $0 [OPTION]... SRCFILES... DIRECTORY
105 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
106 or: $0 [OPTION]... -d DIRECTORIES...
107
108In the 1st form, copy SRCFILE to DSTFILE.
109In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
110In the 4th, create DIRECTORIES.
111
112Options:
113 --help display this help and exit.
114 --version display version info and exit.
115
116 -c (ignored)
117 -C install only if different (preserve the last data modification time)
118 -d create directories instead of installing files.
119 -g GROUP $chgrpprog installed files to GROUP.
120 -m MODE $chmodprog installed files to MODE.
121 -o USER $chownprog installed files to USER.
122 -s $stripprog installed files.
123 -t DIRECTORY install into DIRECTORY.
124 -T report an error if DSTFILE is a directory.
125
126Environment variables override the default commands:
127 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
128 RMPROG STRIPPROG
129"
130
131while test $# -ne 0; do
132 case $1 in
133 -c) ;;
134
135 -C) copy_on_change=true;;
136
137 -d) dir_arg=true;;
138
139 -g) chgrpcmd="$chgrpprog $2"
140 shift;;
141
142 --help) echo "$usage"; exit $?;;
143
144 -m) mode=$2
145 case $mode in
146 *' '* | *' '* | *'
147'* | *'*'* | *'?'* | *'['*)
148 echo "$0: invalid mode: $mode" >&2
149 exit 1;;
150 esac
151 shift;;
152
153 -o) chowncmd="$chownprog $2"
154 shift;;
155
156 -s) stripcmd=$stripprog;;
157
158 -t) dst_arg=$2
159 shift;;
160
161 -T) no_target_directory=true;;
162
163 --version) echo "$0 $scriptversion"; exit $?;;
164
165 --) shift
166 break;;
167
168 -*) echo "$0: invalid option: $1" >&2
169 exit 1;;
170
171 *) break;;
172 esac
173 shift
174done
175
176if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
177 # When -d is used, all remaining arguments are directories to create.
178 # When -t is used, the destination is already specified.
179 # Otherwise, the last argument is the destination. Remove it from $@.
180 for arg
181 do
182 if test -n "$dst_arg"; then
183 # $@ is not empty: it contains at least $arg.
184 set fnord "$@" "$dst_arg"
185 shift # fnord
186 fi
187 shift # arg
188 dst_arg=$arg
189 done
190fi
191
192if test $# -eq 0; then
193 if test -z "$dir_arg"; then
194 echo "$0: no input file specified." >&2
195 exit 1
196 fi
197 # It's OK to call `install-sh -d' without argument.
198 # This can happen when creating conditional directories.
199 exit 0
200fi
201
202if test -z "$dir_arg"; then
203 trap '(exit $?); exit' 1 2 13 15
204
205 # Set umask so as not to create temps with too-generous modes.
206 # However, 'strip' requires both read and write access to temps.
207 case $mode in
208 # Optimize common cases.
209 *644) cp_umask=133;;
210 *755) cp_umask=22;;
211
212 *[0-7])
213 if test -z "$stripcmd"; then
214 u_plus_rw=
215 else
216 u_plus_rw='% 200'
217 fi
218 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
219 *)
220 if test -z "$stripcmd"; then
221 u_plus_rw=
222 else
223 u_plus_rw=,u+rw
224 fi
225 cp_umask=$mode$u_plus_rw;;
226 esac
227fi
228
229for src
230do
231 # Protect names starting with `-'.
232 case $src in
233 -*) src=./$src;;
234 esac
235
236 if test -n "$dir_arg"; then
237 dst=$src
238 dstdir=$dst
239 test -d "$dstdir"
240 dstdir_status=$?
241 else
242
243 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
244 # might cause directories to be created, which would be especially bad
245 # if $src (and thus $dsttmp) contains '*'.
246 if test ! -f "$src" && test ! -d "$src"; then
247 echo "$0: $src does not exist." >&2
248 exit 1
249 fi
250
251 if test -z "$dst_arg"; then
252 echo "$0: no destination specified." >&2
253 exit 1
254 fi
255
256 dst=$dst_arg
257 # Protect names starting with `-'.
258 case $dst in
259 -*) dst=./$dst;;
260 esac
261
262 # If destination is a directory, append the input filename; won't work
263 # if double slashes aren't ignored.
264 if test -d "$dst"; then
265 if test -n "$no_target_directory"; then
266 echo "$0: $dst_arg: Is a directory" >&2
267 exit 1
268 fi
269 dstdir=$dst
270 dst=$dstdir/`basename "$src"`
271 dstdir_status=0
272 else
273 # Prefer dirname, but fall back on a substitute if dirname fails.
274 dstdir=`
275 (dirname "$dst") 2>/dev/null ||
276 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
277 X"$dst" : 'X\(//\)[^/]' \| \
278 X"$dst" : 'X\(//\)$' \| \
279 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
280 echo X"$dst" |
281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
282 s//\1/
283 q
284 }
285 /^X\(\/\/\)[^/].*/{
286 s//\1/
287 q
288 }
289 /^X\(\/\/\)$/{
290 s//\1/
291 q
292 }
293 /^X\(\/\).*/{
294 s//\1/
295 q
296 }
297 s/.*/./; q'
298 `
299
300 test -d "$dstdir"
301 dstdir_status=$?
302 fi
303 fi
304
305 obsolete_mkdir_used=false
306
307 if test $dstdir_status != 0; then
308 case $posix_mkdir in
309 '')
310 # Create intermediate dirs using mode 755 as modified by the umask.
311 # This is like FreeBSD 'install' as of 1997-10-28.
312 umask=`umask`
313 case $stripcmd.$umask in
314 # Optimize common cases.
315 *[2367][2367]) mkdir_umask=$umask;;
316 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
317
318 *[0-7])
319 mkdir_umask=`expr $umask + 22 \
320 - $umask % 100 % 40 + $umask % 20 \
321 - $umask % 10 % 4 + $umask % 2
322 `;;
323 *) mkdir_umask=$umask,go-w;;
324 esac
325
326 # With -d, create the new directory with the user-specified mode.
327 # Otherwise, rely on $mkdir_umask.
328 if test -n "$dir_arg"; then
329 mkdir_mode=-m$mode
330 else
331 mkdir_mode=
332 fi
333
334 posix_mkdir=false
335 case $umask in
336 *[123567][0-7][0-7])
337 # POSIX mkdir -p sets u+wx bits regardless of umask, which
338 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
339 ;;
340 *)
341 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
342 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
343
344 if (umask $mkdir_umask &&
345 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
346 then
347 if test -z "$dir_arg" || {
348 # Check for POSIX incompatibilities with -m.
349 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
350 # other-writeable bit of parent directory when it shouldn't.
351 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
352 ls_ld_tmpdir=`ls -ld "$tmpdir"`
353 case $ls_ld_tmpdir in
354 d????-?r-*) different_mode=700;;
355 d????-?--*) different_mode=755;;
356 *) false;;
357 esac &&
358 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
359 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
360 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
361 }
362 }
363 then posix_mkdir=:
364 fi
365 rmdir "$tmpdir/d" "$tmpdir"
366 else
367 # Remove any dirs left behind by ancient mkdir implementations.
368 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
369 fi
370 trap '' 0;;
371 esac;;
372 esac
373
374 if
375 $posix_mkdir && (
376 umask $mkdir_umask &&
377 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
378 )
379 then :
380 else
381
382 # The umask is ridiculous, or mkdir does not conform to POSIX,
383 # or it failed possibly due to a race condition. Create the
384 # directory the slow way, step by step, checking for races as we go.
385
386 case $dstdir in
387 /*) prefix='/';;
388 -*) prefix='./';;
389 *) prefix='';;
390 esac
391
392 eval "$initialize_posix_glob"
393
394 oIFS=$IFS
395 IFS=/
396 $posix_glob set -f
397 set fnord $dstdir
398 shift
399 $posix_glob set +f
400 IFS=$oIFS
401
402 prefixes=
403
404 for d
405 do
406 test -z "$d" && continue
407
408 prefix=$prefix$d
409 if test -d "$prefix"; then
410 prefixes=
411 else
412 if $posix_mkdir; then
413 (umask=$mkdir_umask &&
414 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
415 # Don't fail if two instances are running concurrently.
416 test -d "$prefix" || exit 1
417 else
418 case $prefix in
419 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
420 *) qprefix=$prefix;;
421 esac
422 prefixes="$prefixes '$qprefix'"
423 fi
424 fi
425 prefix=$prefix/
426 done
427
428 if test -n "$prefixes"; then
429 # Don't fail if two instances are running concurrently.
430 (umask $mkdir_umask &&
431 eval "\$doit_exec \$mkdirprog $prefixes") ||
432 test -d "$dstdir" || exit 1
433 obsolete_mkdir_used=true
434 fi
435 fi
436 fi
437
438 if test -n "$dir_arg"; then
439 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
440 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
441 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
442 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
443 else
444
445 # Make a couple of temp file names in the proper directory.
446 dsttmp=$dstdir/_inst.$$_
447 rmtmp=$dstdir/_rm.$$_
448
449 # Trap to clean up those temp files at exit.
450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451
452 # Copy the file name to the temp name.
453 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
454
455 # and set any options; do chmod last to preserve setuid bits.
456 #
457 # If any of these fail, we abort the whole thing. If we want to
458 # ignore errors from any of these, just make sure not to ignore
459 # errors from the above "$doit $cpprog $src $dsttmp" command.
460 #
461 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
462 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
463 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
464 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
465
466 # If -C, don't bother to copy if it wouldn't change the file.
467 if $copy_on_change &&
468 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
469 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
470
471 eval "$initialize_posix_glob" &&
472 $posix_glob set -f &&
473 set X $old && old=:$2:$4:$5:$6 &&
474 set X $new && new=:$2:$4:$5:$6 &&
475 $posix_glob set +f &&
476
477 test "$old" = "$new" &&
478 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
479 then
480 rm -f "$dsttmp"
481 else
482 # Rename the file to the real destination.
483 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
484
485 # The rename failed, perhaps because mv can't rename something else
486 # to itself, or perhaps because mv is so ancient that it does not
487 # support -f.
488 {
489 # Now remove or move aside any old file at destination location.
490 # We try this two ways since rm can't unlink itself on some
491 # systems and the destination file might be busy for other
492 # reasons. In this case, the final cleanup might fail but the new
493 # file should still install successfully.
494 {
495 test ! -f "$dst" ||
496 $doit $rmcmd -f "$dst" 2>/dev/null ||
497 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
498 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
499 } ||
500 { echo "$0: cannot unlink or rename $dst" >&2
501 (exit 1); exit 1
502 }
503 } &&
504
505 # Now rename the file to the real destination.
506 $doit $mvcmd "$dsttmp" "$dst"
507 }
508 fi || exit 1
509
510 trap '' 0
511 fi
512done
513
514# Local variables:
515# eval: (add-hook 'write-file-hooks 'time-stamp)
516# time-stamp-start: "scriptversion="
517# time-stamp-format: "%:y-%02m-%02d.%02H"
518# time-stamp-time-zone: "UTC"
519# time-stamp-end: "; # UTC"
520# End:
diff --git a/libraries/embryo/ltmain.sh b/libraries/embryo/ltmain.sh
deleted file mode 100755
index fa4b1e1..0000000
--- a/libraries/embryo/ltmain.sh
+++ /dev/null
@@ -1,8413 +0,0 @@
1# Generated from ltmain.m4sh.
2
3# ltmain.sh (GNU libtool) 2.2.6b
4# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
6# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
7# This is free software; see the source for copying conditions. There is NO
8# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10# GNU Libtool is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# As a special exception to the GNU General Public License,
16# if you distribute this file as part of a program or library that
17# is built using GNU Libtool, you may include this file under the
18# same distribution terms that you use for the rest of that program.
19#
20# GNU Libtool is distributed in the hope that it will be useful, but
21# WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23# General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with GNU Libtool; see the file COPYING. If not, a copy
27# can be downloaded from http://www.gnu.org/licenses/gpl.html,
28# or obtained by writing to the Free Software Foundation, Inc.,
29# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
31# Usage: $progname [OPTION]... [MODE-ARG]...
32#
33# Provide generalized library-building support services.
34#
35# --config show all configuration variables
36# --debug enable verbose shell tracing
37# -n, --dry-run display commands without modifying any files
38# --features display basic configuration information and exit
39# --mode=MODE use operation mode MODE
40# --preserve-dup-deps don't remove duplicate dependency libraries
41# --quiet, --silent don't print informational messages
42# --tag=TAG use configuration variables from tag TAG
43# -v, --verbose print informational messages (default)
44# --version print version information
45# -h, --help print short or long help message
46#
47# MODE must be one of the following:
48#
49# clean remove files from the build directory
50# compile compile a source file into a libtool object
51# execute automatically set library path, then run a program
52# finish complete the installation of libtool libraries
53# install install libraries or executables
54# link create a library or an executable
55# uninstall remove libraries from an installed directory
56#
57# MODE-ARGS vary depending on the MODE.
58# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
59#
60# When reporting a bug, please describe a test case to reproduce it and
61# include the following information:
62#
63# host-triplet: $host
64# shell: $SHELL
65# compiler: $LTCC
66# compiler flags: $LTCFLAGS
67# linker: $LD (gnu? $with_gnu_ld)
68# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
69# automake: $automake_version
70# autoconf: $autoconf_version
71#
72# Report bugs to <bug-libtool@gnu.org>.
73
74PROGRAM=ltmain.sh
75PACKAGE=libtool
76VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
77TIMESTAMP=""
78package_revision=1.3017
79
80# Be Bourne compatible
81if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
82 emulate sh
83 NULLCMD=:
84 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
85 # is contrary to our usage. Disable this feature.
86 alias -g '${1+"$@"}'='"$@"'
87 setopt NO_GLOB_SUBST
88else
89 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
90fi
91BIN_SH=xpg4; export BIN_SH # for Tru64
92DUALCASE=1; export DUALCASE # for MKS sh
93
94# NLS nuisances: We save the old values to restore during execute mode.
95# Only set LANG and LC_ALL to C if already set.
96# These must not be set unconditionally because not all systems understand
97# e.g. LANG=C (notably SCO).
98lt_user_locale=
99lt_safe_locale=
100for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
101do
102 eval "if test \"\${$lt_var+set}\" = set; then
103 save_$lt_var=\$$lt_var
104 $lt_var=C
105 export $lt_var
106 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
107 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
108 fi"
109done
110
111$lt_unset CDPATH
112
113
114
115
116
117: ${CP="cp -f"}
118: ${ECHO="echo"}
119: ${EGREP="/bin/grep -E"}
120: ${FGREP="/bin/grep -F"}
121: ${GREP="/bin/grep"}
122: ${LN_S="ln -s"}
123: ${MAKE="make"}
124: ${MKDIR="mkdir"}
125: ${MV="mv -f"}
126: ${RM="rm -f"}
127: ${SED="/bin/sed"}
128: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129: ${Xsed="$SED -e 1s/^X//"}
130
131# Global variables:
132EXIT_SUCCESS=0
133EXIT_FAILURE=1
134EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
135EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
136
137exit_status=$EXIT_SUCCESS
138
139# Make sure IFS has a sensible default
140lt_nl='
141'
142IFS=" $lt_nl"
143
144dirname="s,/[^/]*$,,"
145basename="s,^.*/,,"
146
147# func_dirname_and_basename file append nondir_replacement
148# perform func_basename and func_dirname in a single function
149# call:
150# dirname: Compute the dirname of FILE. If nonempty,
151# add APPEND to the result, otherwise set result
152# to NONDIR_REPLACEMENT.
153# value returned in "$func_dirname_result"
154# basename: Compute filename of FILE.
155# value retuned in "$func_basename_result"
156# Implementation must be kept synchronized with func_dirname
157# and func_basename. For efficiency, we do not delegate to
158# those functions but instead duplicate the functionality here.
159func_dirname_and_basename ()
160{
161 # Extract subdirectory from the argument.
162 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
163 if test "X$func_dirname_result" = "X${1}"; then
164 func_dirname_result="${3}"
165 else
166 func_dirname_result="$func_dirname_result${2}"
167 fi
168 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
169}
170
171# Generated shell functions inserted here.
172
173# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
174# is ksh but when the shell is invoked as "sh" and the current value of
175# the _XPG environment variable is not equal to 1 (one), the special
176# positional parameter $0, within a function call, is the name of the
177# function.
178progpath="$0"
179
180# The name of this program:
181# In the unlikely event $progname began with a '-', it would play havoc with
182# func_echo (imagine progname=-n), so we prepend ./ in that case:
183func_dirname_and_basename "$progpath"
184progname=$func_basename_result
185case $progname in
186 -*) progname=./$progname ;;
187esac
188
189# Make sure we have an absolute path for reexecution:
190case $progpath in
191 [\\/]*|[A-Za-z]:\\*) ;;
192 *[\\/]*)
193 progdir=$func_dirname_result
194 progdir=`cd "$progdir" && pwd`
195 progpath="$progdir/$progname"
196 ;;
197 *)
198 save_IFS="$IFS"
199 IFS=:
200 for progdir in $PATH; do
201 IFS="$save_IFS"
202 test -x "$progdir/$progname" && break
203 done
204 IFS="$save_IFS"
205 test -n "$progdir" || progdir=`pwd`
206 progpath="$progdir/$progname"
207 ;;
208esac
209
210# Sed substitution that helps us do robust quoting. It backslashifies
211# metacharacters that are still active within double-quoted strings.
212Xsed="${SED}"' -e 1s/^X//'
213sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
214
215# Same as above, but do not quote variable references.
216double_quote_subst='s/\(["`\\]\)/\\\1/g'
217
218# Re-`\' parameter expansions in output of double_quote_subst that were
219# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
220# in input to double_quote_subst, that '$' was protected from expansion.
221# Since each input `\' is now two `\'s, look for any number of runs of
222# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
223bs='\\'
224bs2='\\\\'
225bs4='\\\\\\\\'
226dollar='\$'
227sed_double_backslash="\
228 s/$bs4/&\\
229/g
230 s/^$bs2$dollar/$bs&/
231 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
232 s/\n//g"
233
234# Standard options:
235opt_dry_run=false
236opt_help=false
237opt_quiet=false
238opt_verbose=false
239opt_warning=:
240
241# func_echo arg...
242# Echo program name prefixed message, along with the current mode
243# name if it has been set yet.
244func_echo ()
245{
246 $ECHO "$progname${mode+: }$mode: $*"
247}
248
249# func_verbose arg...
250# Echo program name prefixed message in verbose mode only.
251func_verbose ()
252{
253 $opt_verbose && func_echo ${1+"$@"}
254
255 # A bug in bash halts the script if the last line of a function
256 # fails when set -e is in force, so we need another command to
257 # work around that:
258 :
259}
260
261# func_error arg...
262# Echo program name prefixed message to standard error.
263func_error ()
264{
265 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
266}
267
268# func_warning arg...
269# Echo program name prefixed warning message to standard error.
270func_warning ()
271{
272 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
273
274 # bash bug again:
275 :
276}
277
278# func_fatal_error arg...
279# Echo program name prefixed message to standard error, and exit.
280func_fatal_error ()
281{
282 func_error ${1+"$@"}
283 exit $EXIT_FAILURE
284}
285
286# func_fatal_help arg...
287# Echo program name prefixed message to standard error, followed by
288# a help hint, and exit.
289func_fatal_help ()
290{
291 func_error ${1+"$@"}
292 func_fatal_error "$help"
293}
294help="Try \`$progname --help' for more information." ## default
295
296
297# func_grep expression filename
298# Check whether EXPRESSION matches any line of FILENAME, without output.
299func_grep ()
300{
301 $GREP "$1" "$2" >/dev/null 2>&1
302}
303
304
305# func_mkdir_p directory-path
306# Make sure the entire path to DIRECTORY-PATH is available.
307func_mkdir_p ()
308{
309 my_directory_path="$1"
310 my_dir_list=
311
312 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
313
314 # Protect directory names starting with `-'
315 case $my_directory_path in
316 -*) my_directory_path="./$my_directory_path" ;;
317 esac
318
319 # While some portion of DIR does not yet exist...
320 while test ! -d "$my_directory_path"; do
321 # ...make a list in topmost first order. Use a colon delimited
322 # list incase some portion of path contains whitespace.
323 my_dir_list="$my_directory_path:$my_dir_list"
324
325 # If the last portion added has no slash in it, the list is done
326 case $my_directory_path in */*) ;; *) break ;; esac
327
328 # ...otherwise throw away the child directory and loop
329 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
330 done
331 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
332
333 save_mkdir_p_IFS="$IFS"; IFS=':'
334 for my_dir in $my_dir_list; do
335 IFS="$save_mkdir_p_IFS"
336 # mkdir can fail with a `File exist' error if two processes
337 # try to create one of the directories concurrently. Don't
338 # stop in that case!
339 $MKDIR "$my_dir" 2>/dev/null || :
340 done
341 IFS="$save_mkdir_p_IFS"
342
343 # Bail out if we (or some other process) failed to create a directory.
344 test -d "$my_directory_path" || \
345 func_fatal_error "Failed to create \`$1'"
346 fi
347}
348
349
350# func_mktempdir [string]
351# Make a temporary directory that won't clash with other running
352# libtool processes, and avoids race conditions if possible. If
353# given, STRING is the basename for that directory.
354func_mktempdir ()
355{
356 my_template="${TMPDIR-/tmp}/${1-$progname}"
357
358 if test "$opt_dry_run" = ":"; then
359 # Return a directory name, but don't create it in dry-run mode
360 my_tmpdir="${my_template}-$$"
361 else
362
363 # If mktemp works, use that first and foremost
364 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
365
366 if test ! -d "$my_tmpdir"; then
367 # Failing that, at least try and use $RANDOM to avoid a race
368 my_tmpdir="${my_template}-${RANDOM-0}$$"
369
370 save_mktempdir_umask=`umask`
371 umask 0077
372 $MKDIR "$my_tmpdir"
373 umask $save_mktempdir_umask
374 fi
375
376 # If we're not in dry-run mode, bomb out on failure
377 test -d "$my_tmpdir" || \
378 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
379 fi
380
381 $ECHO "X$my_tmpdir" | $Xsed
382}
383
384
385# func_quote_for_eval arg
386# Aesthetically quote ARG to be evaled later.
387# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
388# is double-quoted, suitable for a subsequent eval, whereas
389# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
390# which are still active within double quotes backslashified.
391func_quote_for_eval ()
392{
393 case $1 in
394 *[\\\`\"\$]*)
395 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
396 *)
397 func_quote_for_eval_unquoted_result="$1" ;;
398 esac
399
400 case $func_quote_for_eval_unquoted_result in
401 # Double-quote args containing shell metacharacters to delay
402 # word splitting, command substitution and and variable
403 # expansion for a subsequent eval.
404 # Many Bourne shells cannot handle close brackets correctly
405 # in scan sets, so we specify it separately.
406 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
407 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
408 ;;
409 *)
410 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
411 esac
412}
413
414
415# func_quote_for_expand arg
416# Aesthetically quote ARG to be evaled later; same as above,
417# but do not quote variable references.
418func_quote_for_expand ()
419{
420 case $1 in
421 *[\\\`\"]*)
422 my_arg=`$ECHO "X$1" | $Xsed \
423 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
424 *)
425 my_arg="$1" ;;
426 esac
427
428 case $my_arg in
429 # Double-quote args containing shell metacharacters to delay
430 # word splitting and command substitution for a subsequent eval.
431 # Many Bourne shells cannot handle close brackets correctly
432 # in scan sets, so we specify it separately.
433 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
434 my_arg="\"$my_arg\""
435 ;;
436 esac
437
438 func_quote_for_expand_result="$my_arg"
439}
440
441
442# func_show_eval cmd [fail_exp]
443# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
444# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
445# is given, then evaluate it.
446func_show_eval ()
447{
448 my_cmd="$1"
449 my_fail_exp="${2-:}"
450
451 ${opt_silent-false} || {
452 func_quote_for_expand "$my_cmd"
453 eval "func_echo $func_quote_for_expand_result"
454 }
455
456 if ${opt_dry_run-false}; then :; else
457 eval "$my_cmd"
458 my_status=$?
459 if test "$my_status" -eq 0; then :; else
460 eval "(exit $my_status); $my_fail_exp"
461 fi
462 fi
463}
464
465
466# func_show_eval_locale cmd [fail_exp]
467# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
468# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
469# is given, then evaluate it. Use the saved locale for evaluation.
470func_show_eval_locale ()
471{
472 my_cmd="$1"
473 my_fail_exp="${2-:}"
474
475 ${opt_silent-false} || {
476 func_quote_for_expand "$my_cmd"
477 eval "func_echo $func_quote_for_expand_result"
478 }
479
480 if ${opt_dry_run-false}; then :; else
481 eval "$lt_user_locale
482 $my_cmd"
483 my_status=$?
484 eval "$lt_safe_locale"
485 if test "$my_status" -eq 0; then :; else
486 eval "(exit $my_status); $my_fail_exp"
487 fi
488 fi
489}
490
491
492
493
494
495# func_version
496# Echo version message to standard output and exit.
497func_version ()
498{
499 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
500 s/^# //
501 s/^# *$//
502 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
503 p
504 }' < "$progpath"
505 exit $?
506}
507
508# func_usage
509# Echo short help message to standard output and exit.
510func_usage ()
511{
512 $SED -n '/^# Usage:/,/# -h/ {
513 s/^# //
514 s/^# *$//
515 s/\$progname/'$progname'/
516 p
517 }' < "$progpath"
518 $ECHO
519 $ECHO "run \`$progname --help | more' for full usage"
520 exit $?
521}
522
523# func_help
524# Echo long help message to standard output and exit.
525func_help ()
526{
527 $SED -n '/^# Usage:/,/# Report bugs to/ {
528 s/^# //
529 s/^# *$//
530 s*\$progname*'$progname'*
531 s*\$host*'"$host"'*
532 s*\$SHELL*'"$SHELL"'*
533 s*\$LTCC*'"$LTCC"'*
534 s*\$LTCFLAGS*'"$LTCFLAGS"'*
535 s*\$LD*'"$LD"'*
536 s/\$with_gnu_ld/'"$with_gnu_ld"'/
537 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
538 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
539 p
540 }' < "$progpath"
541 exit $?
542}
543
544# func_missing_arg argname
545# Echo program name prefixed message to standard error and set global
546# exit_cmd.
547func_missing_arg ()
548{
549 func_error "missing argument for $1"
550 exit_cmd=exit
551}
552
553exit_cmd=:
554
555
556
557
558
559# Check that we have a working $ECHO.
560if test "X$1" = X--no-reexec; then
561 # Discard the --no-reexec flag, and continue.
562 shift
563elif test "X$1" = X--fallback-echo; then
564 # Avoid inline document here, it may be left over
565 :
566elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
567 # Yippee, $ECHO works!
568 :
569else
570 # Restart under the correct shell, and then maybe $ECHO will work.
571 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
572fi
573
574if test "X$1" = X--fallback-echo; then
575 # used as fallback echo
576 shift
577 cat <<EOF
578$*
579EOF
580 exit $EXIT_SUCCESS
581fi
582
583magic="%%%MAGIC variable%%%"
584magic_exe="%%%MAGIC EXE variable%%%"
585
586# Global variables.
587# $mode is unset
588nonopt=
589execute_dlfiles=
590preserve_args=
591lo2o="s/\\.lo\$/.${objext}/"
592o2lo="s/\\.${objext}\$/.lo/"
593extracted_archives=
594extracted_serial=0
595
596opt_dry_run=false
597opt_duplicate_deps=false
598opt_silent=false
599opt_debug=:
600
601# If this variable is set in any of the actions, the command in it
602# will be execed at the end. This prevents here-documents from being
603# left over by shells.
604exec_cmd=
605
606# func_fatal_configuration arg...
607# Echo program name prefixed message to standard error, followed by
608# a configuration failure hint, and exit.
609func_fatal_configuration ()
610{
611 func_error ${1+"$@"}
612 func_error "See the $PACKAGE documentation for more information."
613 func_fatal_error "Fatal configuration error."
614}
615
616
617# func_config
618# Display the configuration for all the tags in this script.
619func_config ()
620{
621 re_begincf='^# ### BEGIN LIBTOOL'
622 re_endcf='^# ### END LIBTOOL'
623
624 # Default configuration.
625 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
626
627 # Now print the configurations for the tags.
628 for tagname in $taglist; do
629 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
630 done
631
632 exit $?
633}
634
635# func_features
636# Display the features supported by this script.
637func_features ()
638{
639 $ECHO "host: $host"
640 if test "$build_libtool_libs" = yes; then
641 $ECHO "enable shared libraries"
642 else
643 $ECHO "disable shared libraries"
644 fi
645 if test "$build_old_libs" = yes; then
646 $ECHO "enable static libraries"
647 else
648 $ECHO "disable static libraries"
649 fi
650
651 exit $?
652}
653
654# func_enable_tag tagname
655# Verify that TAGNAME is valid, and either flag an error and exit, or
656# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
657# variable here.
658func_enable_tag ()
659{
660 # Global variable:
661 tagname="$1"
662
663 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
664 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
665 sed_extractcf="/$re_begincf/,/$re_endcf/p"
666
667 # Validate tagname.
668 case $tagname in
669 *[!-_A-Za-z0-9,/]*)
670 func_fatal_error "invalid tag name: $tagname"
671 ;;
672 esac
673
674 # Don't test for the "default" C tag, as we know it's
675 # there but not specially marked.
676 case $tagname in
677 CC) ;;
678 *)
679 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
680 taglist="$taglist $tagname"
681
682 # Evaluate the configuration. Be careful to quote the path
683 # and the sed script, to avoid splitting on whitespace, but
684 # also don't use non-portable quotes within backquotes within
685 # quotes we have to do it in 2 steps:
686 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
687 eval "$extractedcf"
688 else
689 func_error "ignoring unknown tag $tagname"
690 fi
691 ;;
692 esac
693}
694
695# Parse options once, thoroughly. This comes as soon as possible in
696# the script to make things like `libtool --version' happen quickly.
697{
698
699 # Shorthand for --mode=foo, only valid as the first argument
700 case $1 in
701 clean|clea|cle|cl)
702 shift; set dummy --mode clean ${1+"$@"}; shift
703 ;;
704 compile|compil|compi|comp|com|co|c)
705 shift; set dummy --mode compile ${1+"$@"}; shift
706 ;;
707 execute|execut|execu|exec|exe|ex|e)
708 shift; set dummy --mode execute ${1+"$@"}; shift
709 ;;
710 finish|finis|fini|fin|fi|f)
711 shift; set dummy --mode finish ${1+"$@"}; shift
712 ;;
713 install|instal|insta|inst|ins|in|i)
714 shift; set dummy --mode install ${1+"$@"}; shift
715 ;;
716 link|lin|li|l)
717 shift; set dummy --mode link ${1+"$@"}; shift
718 ;;
719 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
720 shift; set dummy --mode uninstall ${1+"$@"}; shift
721 ;;
722 esac
723
724 # Parse non-mode specific arguments:
725 while test "$#" -gt 0; do
726 opt="$1"
727 shift
728
729 case $opt in
730 --config) func_config ;;
731
732 --debug) preserve_args="$preserve_args $opt"
733 func_echo "enabling shell trace mode"
734 opt_debug='set -x'
735 $opt_debug
736 ;;
737
738 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
739 execute_dlfiles="$execute_dlfiles $1"
740 shift
741 ;;
742
743 --dry-run | -n) opt_dry_run=: ;;
744 --features) func_features ;;
745 --finish) mode="finish" ;;
746
747 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
748 case $1 in
749 # Valid mode arguments:
750 clean) ;;
751 compile) ;;
752 execute) ;;
753 finish) ;;
754 install) ;;
755 link) ;;
756 relink) ;;
757 uninstall) ;;
758
759 # Catch anything else as an error
760 *) func_error "invalid argument for $opt"
761 exit_cmd=exit
762 break
763 ;;
764 esac
765
766 mode="$1"
767 shift
768 ;;
769
770 --preserve-dup-deps)
771 opt_duplicate_deps=: ;;
772
773 --quiet|--silent) preserve_args="$preserve_args $opt"
774 opt_silent=:
775 ;;
776
777 --verbose| -v) preserve_args="$preserve_args $opt"
778 opt_silent=false
779 ;;
780
781 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
782 preserve_args="$preserve_args $opt $1"
783 func_enable_tag "$1" # tagname is set here
784 shift
785 ;;
786
787 # Separate optargs to long options:
788 -dlopen=*|--mode=*|--tag=*)
789 func_opt_split "$opt"
790 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
791 shift
792 ;;
793
794 -\?|-h) func_usage ;;
795 --help) opt_help=: ;;
796 --version) func_version ;;
797
798 -*) func_fatal_help "unrecognized option \`$opt'" ;;
799
800 *) nonopt="$opt"
801 break
802 ;;
803 esac
804 done
805
806
807 case $host in
808 *cygwin* | *mingw* | *pw32* | *cegcc*)
809 # don't eliminate duplications in $postdeps and $predeps
810 opt_duplicate_compiler_generated_deps=:
811 ;;
812 *)
813 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
814 ;;
815 esac
816
817 # Having warned about all mis-specified options, bail out if
818 # anything was wrong.
819 $exit_cmd $EXIT_FAILURE
820}
821
822# func_check_version_match
823# Ensure that we are using m4 macros, and libtool script from the same
824# release of libtool.
825func_check_version_match ()
826{
827 if test "$package_revision" != "$macro_revision"; then
828 if test "$VERSION" != "$macro_version"; then
829 if test -z "$macro_version"; then
830 cat >&2 <<_LT_EOF
831$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
832$progname: definition of this LT_INIT comes from an older release.
833$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
834$progname: and run autoconf again.
835_LT_EOF
836 else
837 cat >&2 <<_LT_EOF
838$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
839$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
840$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
841$progname: and run autoconf again.
842_LT_EOF
843 fi
844 else
845 cat >&2 <<_LT_EOF
846$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
847$progname: but the definition of this LT_INIT comes from revision $macro_revision.
848$progname: You should recreate aclocal.m4 with macros from revision $package_revision
849$progname: of $PACKAGE $VERSION and run autoconf again.
850_LT_EOF
851 fi
852
853 exit $EXIT_MISMATCH
854 fi
855}
856
857
858## ----------- ##
859## Main. ##
860## ----------- ##
861
862$opt_help || {
863 # Sanity checks first:
864 func_check_version_match
865
866 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
867 func_fatal_configuration "not configured to build any kind of library"
868 fi
869
870 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
871
872
873 # Darwin sucks
874 eval std_shrext=\"$shrext_cmds\"
875
876
877 # Only execute mode is allowed to have -dlopen flags.
878 if test -n "$execute_dlfiles" && test "$mode" != execute; then
879 func_error "unrecognized option \`-dlopen'"
880 $ECHO "$help" 1>&2
881 exit $EXIT_FAILURE
882 fi
883
884 # Change the help message to a mode-specific one.
885 generic_help="$help"
886 help="Try \`$progname --help --mode=$mode' for more information."
887}
888
889
890# func_lalib_p file
891# True iff FILE is a libtool `.la' library or `.lo' object file.
892# This function is only a basic sanity check; it will hardly flush out
893# determined imposters.
894func_lalib_p ()
895{
896 test -f "$1" &&
897 $SED -e 4q "$1" 2>/dev/null \
898 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
899}
900
901# func_lalib_unsafe_p file
902# True iff FILE is a libtool `.la' library or `.lo' object file.
903# This function implements the same check as func_lalib_p without
904# resorting to external programs. To this end, it redirects stdin and
905# closes it afterwards, without saving the original file descriptor.
906# As a safety measure, use it only where a negative result would be
907# fatal anyway. Works if `file' does not exist.
908func_lalib_unsafe_p ()
909{
910 lalib_p=no
911 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
912 for lalib_p_l in 1 2 3 4
913 do
914 read lalib_p_line
915 case "$lalib_p_line" in
916 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
917 esac
918 done
919 exec 0<&5 5<&-
920 fi
921 test "$lalib_p" = yes
922}
923
924# func_ltwrapper_script_p file
925# True iff FILE is a libtool wrapper script
926# This function is only a basic sanity check; it will hardly flush out
927# determined imposters.
928func_ltwrapper_script_p ()
929{
930 func_lalib_p "$1"
931}
932
933# func_ltwrapper_executable_p file
934# True iff FILE is a libtool wrapper executable
935# This function is only a basic sanity check; it will hardly flush out
936# determined imposters.
937func_ltwrapper_executable_p ()
938{
939 func_ltwrapper_exec_suffix=
940 case $1 in
941 *.exe) ;;
942 *) func_ltwrapper_exec_suffix=.exe ;;
943 esac
944 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
945}
946
947# func_ltwrapper_scriptname file
948# Assumes file is an ltwrapper_executable
949# uses $file to determine the appropriate filename for a
950# temporary ltwrapper_script.
951func_ltwrapper_scriptname ()
952{
953 func_ltwrapper_scriptname_result=""
954 if func_ltwrapper_executable_p "$1"; then
955 func_dirname_and_basename "$1" "" "."
956 func_stripname '' '.exe' "$func_basename_result"
957 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
958 fi
959}
960
961# func_ltwrapper_p file
962# True iff FILE is a libtool wrapper script or wrapper executable
963# This function is only a basic sanity check; it will hardly flush out
964# determined imposters.
965func_ltwrapper_p ()
966{
967 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
968}
969
970
971# func_execute_cmds commands fail_cmd
972# Execute tilde-delimited COMMANDS.
973# If FAIL_CMD is given, eval that upon failure.
974# FAIL_CMD may read-access the current command in variable CMD!
975func_execute_cmds ()
976{
977 $opt_debug
978 save_ifs=$IFS; IFS='~'
979 for cmd in $1; do
980 IFS=$save_ifs
981 eval cmd=\"$cmd\"
982 func_show_eval "$cmd" "${2-:}"
983 done
984 IFS=$save_ifs
985}
986
987
988# func_source file
989# Source FILE, adding directory component if necessary.
990# Note that it is not necessary on cygwin/mingw to append a dot to
991# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
992# behavior happens only for exec(3), not for open(2)! Also, sourcing
993# `FILE.' does not work on cygwin managed mounts.
994func_source ()
995{
996 $opt_debug
997 case $1 in
998 */* | *\\*) . "$1" ;;
999 *) . "./$1" ;;
1000 esac
1001}
1002
1003
1004# func_infer_tag arg
1005# Infer tagged configuration to use if any are available and
1006# if one wasn't chosen via the "--tag" command line option.
1007# Only attempt this if the compiler in the base compile
1008# command doesn't match the default compiler.
1009# arg is usually of the form 'gcc ...'
1010func_infer_tag ()
1011{
1012 $opt_debug
1013 if test -n "$available_tags" && test -z "$tagname"; then
1014 CC_quoted=
1015 for arg in $CC; do
1016 func_quote_for_eval "$arg"
1017 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1018 done
1019 case $@ in
1020 # Blanks in the command may have been stripped by the calling shell,
1021 # but not from the CC environment variable when configure was run.
1022 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1023 # Blanks at the start of $base_compile will cause this to fail
1024 # if we don't check for them as well.
1025 *)
1026 for z in $available_tags; do
1027 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1028 # Evaluate the configuration.
1029 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1030 CC_quoted=
1031 for arg in $CC; do
1032 # Double-quote args containing other shell metacharacters.
1033 func_quote_for_eval "$arg"
1034 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1035 done
1036 case "$@ " in
1037 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1038 # The compiler in the base compile command matches
1039 # the one in the tagged configuration.
1040 # Assume this is the tagged configuration we want.
1041 tagname=$z
1042 break
1043 ;;
1044 esac
1045 fi
1046 done
1047 # If $tagname still isn't set, then no tagged configuration
1048 # was found and let the user know that the "--tag" command
1049 # line option must be used.
1050 if test -z "$tagname"; then
1051 func_echo "unable to infer tagged configuration"
1052 func_fatal_error "specify a tag with \`--tag'"
1053# else
1054# func_verbose "using $tagname tagged configuration"
1055 fi
1056 ;;
1057 esac
1058 fi
1059}
1060
1061
1062
1063# func_write_libtool_object output_name pic_name nonpic_name
1064# Create a libtool object file (analogous to a ".la" file),
1065# but don't create it if we're doing a dry run.
1066func_write_libtool_object ()
1067{
1068 write_libobj=${1}
1069 if test "$build_libtool_libs" = yes; then
1070 write_lobj=\'${2}\'
1071 else
1072 write_lobj=none
1073 fi
1074
1075 if test "$build_old_libs" = yes; then
1076 write_oldobj=\'${3}\'
1077 else
1078 write_oldobj=none
1079 fi
1080
1081 $opt_dry_run || {
1082 cat >${write_libobj}T <<EOF
1083# $write_libobj - a libtool object file
1084# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1085#
1086# Please DO NOT delete this file!
1087# It is necessary for linking the library.
1088
1089# Name of the PIC object.
1090pic_object=$write_lobj
1091
1092# Name of the non-PIC object
1093non_pic_object=$write_oldobj
1094
1095EOF
1096 $MV "${write_libobj}T" "${write_libobj}"
1097 }
1098}
1099
1100# func_mode_compile arg...
1101func_mode_compile ()
1102{
1103 $opt_debug
1104 # Get the compilation command and the source file.
1105 base_compile=
1106 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1107 suppress_opt=yes
1108 suppress_output=
1109 arg_mode=normal
1110 libobj=
1111 later=
1112 pie_flag=
1113
1114 for arg
1115 do
1116 case $arg_mode in
1117 arg )
1118 # do not "continue". Instead, add this to base_compile
1119 lastarg="$arg"
1120 arg_mode=normal
1121 ;;
1122
1123 target )
1124 libobj="$arg"
1125 arg_mode=normal
1126 continue
1127 ;;
1128
1129 normal )
1130 # Accept any command-line options.
1131 case $arg in
1132 -o)
1133 test -n "$libobj" && \
1134 func_fatal_error "you cannot specify \`-o' more than once"
1135 arg_mode=target
1136 continue
1137 ;;
1138
1139 -pie | -fpie | -fPIE)
1140 pie_flag="$pie_flag $arg"
1141 continue
1142 ;;
1143
1144 -shared | -static | -prefer-pic | -prefer-non-pic)
1145 later="$later $arg"
1146 continue
1147 ;;
1148
1149 -no-suppress)
1150 suppress_opt=no
1151 continue
1152 ;;
1153
1154 -Xcompiler)
1155 arg_mode=arg # the next one goes into the "base_compile" arg list
1156 continue # The current "srcfile" will either be retained or
1157 ;; # replaced later. I would guess that would be a bug.
1158
1159 -Wc,*)
1160 func_stripname '-Wc,' '' "$arg"
1161 args=$func_stripname_result
1162 lastarg=
1163 save_ifs="$IFS"; IFS=','
1164 for arg in $args; do
1165 IFS="$save_ifs"
1166 func_quote_for_eval "$arg"
1167 lastarg="$lastarg $func_quote_for_eval_result"
1168 done
1169 IFS="$save_ifs"
1170 func_stripname ' ' '' "$lastarg"
1171 lastarg=$func_stripname_result
1172
1173 # Add the arguments to base_compile.
1174 base_compile="$base_compile $lastarg"
1175 continue
1176 ;;
1177
1178 *)
1179 # Accept the current argument as the source file.
1180 # The previous "srcfile" becomes the current argument.
1181 #
1182 lastarg="$srcfile"
1183 srcfile="$arg"
1184 ;;
1185 esac # case $arg
1186 ;;
1187 esac # case $arg_mode
1188
1189 # Aesthetically quote the previous argument.
1190 func_quote_for_eval "$lastarg"
1191 base_compile="$base_compile $func_quote_for_eval_result"
1192 done # for arg
1193
1194 case $arg_mode in
1195 arg)
1196 func_fatal_error "you must specify an argument for -Xcompile"
1197 ;;
1198 target)
1199 func_fatal_error "you must specify a target with \`-o'"
1200 ;;
1201 *)
1202 # Get the name of the library object.
1203 test -z "$libobj" && {
1204 func_basename "$srcfile"
1205 libobj="$func_basename_result"
1206 }
1207 ;;
1208 esac
1209
1210 # Recognize several different file suffixes.
1211 # If the user specifies -o file.o, it is replaced with file.lo
1212 case $libobj in
1213 *.[cCFSifmso] | \
1214 *.ada | *.adb | *.ads | *.asm | \
1215 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1216 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
1217 func_xform "$libobj"
1218 libobj=$func_xform_result
1219 ;;
1220 esac
1221
1222 case $libobj in
1223 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
1224 *)
1225 func_fatal_error "cannot determine name of library object from \`$libobj'"
1226 ;;
1227 esac
1228
1229 func_infer_tag $base_compile
1230
1231 for arg in $later; do
1232 case $arg in
1233 -shared)
1234 test "$build_libtool_libs" != yes && \
1235 func_fatal_configuration "can not build a shared library"
1236 build_old_libs=no
1237 continue
1238 ;;
1239
1240 -static)
1241 build_libtool_libs=no
1242 build_old_libs=yes
1243 continue
1244 ;;
1245
1246 -prefer-pic)
1247 pic_mode=yes
1248 continue
1249 ;;
1250
1251 -prefer-non-pic)
1252 pic_mode=no
1253 continue
1254 ;;
1255 esac
1256 done
1257
1258 func_quote_for_eval "$libobj"
1259 test "X$libobj" != "X$func_quote_for_eval_result" \
1260 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
1261 && func_warning "libobj name \`$libobj' may not contain shell special characters."
1262 func_dirname_and_basename "$obj" "/" ""
1263 objname="$func_basename_result"
1264 xdir="$func_dirname_result"
1265 lobj=${xdir}$objdir/$objname
1266
1267 test -z "$base_compile" && \
1268 func_fatal_help "you must specify a compilation command"
1269
1270 # Delete any leftover library objects.
1271 if test "$build_old_libs" = yes; then
1272 removelist="$obj $lobj $libobj ${libobj}T"
1273 else
1274 removelist="$lobj $libobj ${libobj}T"
1275 fi
1276
1277 # On Cygwin there's no "real" PIC flag so we must build both object types
1278 case $host_os in
1279 cygwin* | mingw* | pw32* | os2* | cegcc*)
1280 pic_mode=default
1281 ;;
1282 esac
1283 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1284 # non-PIC code in shared libraries is not supported
1285 pic_mode=default
1286 fi
1287
1288 # Calculate the filename of the output object if compiler does
1289 # not support -o with -c
1290 if test "$compiler_c_o" = no; then
1291 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1292 lockfile="$output_obj.lock"
1293 else
1294 output_obj=
1295 need_locks=no
1296 lockfile=
1297 fi
1298
1299 # Lock this critical section if it is needed
1300 # We use this script file to make the link, it avoids creating a new file
1301 if test "$need_locks" = yes; then
1302 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1303 func_echo "Waiting for $lockfile to be removed"
1304 sleep 2
1305 done
1306 elif test "$need_locks" = warn; then
1307 if test -f "$lockfile"; then
1308 $ECHO "\
1309*** ERROR, $lockfile exists and contains:
1310`cat $lockfile 2>/dev/null`
1311
1312This indicates that another process is trying to use the same
1313temporary object file, and libtool could not work around it because
1314your compiler does not support \`-c' and \`-o' together. If you
1315repeat this compilation, it may succeed, by chance, but you had better
1316avoid parallel builds (make -j) in this platform, or get a better
1317compiler."
1318
1319 $opt_dry_run || $RM $removelist
1320 exit $EXIT_FAILURE
1321 fi
1322 removelist="$removelist $output_obj"
1323 $ECHO "$srcfile" > "$lockfile"
1324 fi
1325
1326 $opt_dry_run || $RM $removelist
1327 removelist="$removelist $lockfile"
1328 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
1329
1330 if test -n "$fix_srcfile_path"; then
1331 eval srcfile=\"$fix_srcfile_path\"
1332 fi
1333 func_quote_for_eval "$srcfile"
1334 qsrcfile=$func_quote_for_eval_result
1335
1336 # Only build a PIC object if we are building libtool libraries.
1337 if test "$build_libtool_libs" = yes; then
1338 # Without this assignment, base_compile gets emptied.
1339 fbsd_hideous_sh_bug=$base_compile
1340
1341 if test "$pic_mode" != no; then
1342 command="$base_compile $qsrcfile $pic_flag"
1343 else
1344 # Don't build PIC code
1345 command="$base_compile $qsrcfile"
1346 fi
1347
1348 func_mkdir_p "$xdir$objdir"
1349
1350 if test -z "$output_obj"; then
1351 # Place PIC objects in $objdir
1352 command="$command -o $lobj"
1353 fi
1354
1355 func_show_eval_locale "$command" \
1356 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
1357
1358 if test "$need_locks" = warn &&
1359 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1360 $ECHO "\
1361*** ERROR, $lockfile contains:
1362`cat $lockfile 2>/dev/null`
1363
1364but it should contain:
1365$srcfile
1366
1367This indicates that another process is trying to use the same
1368temporary object file, and libtool could not work around it because
1369your compiler does not support \`-c' and \`-o' together. If you
1370repeat this compilation, it may succeed, by chance, but you had better
1371avoid parallel builds (make -j) in this platform, or get a better
1372compiler."
1373
1374 $opt_dry_run || $RM $removelist
1375 exit $EXIT_FAILURE
1376 fi
1377
1378 # Just move the object if needed, then go on to compile the next one
1379 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1380 func_show_eval '$MV "$output_obj" "$lobj"' \
1381 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1382 fi
1383
1384 # Allow error messages only from the first compilation.
1385 if test "$suppress_opt" = yes; then
1386 suppress_output=' >/dev/null 2>&1'
1387 fi
1388 fi
1389
1390 # Only build a position-dependent object if we build old libraries.
1391 if test "$build_old_libs" = yes; then
1392 if test "$pic_mode" != yes; then
1393 # Don't build PIC code
1394 command="$base_compile $qsrcfile$pie_flag"
1395 else
1396 command="$base_compile $qsrcfile $pic_flag"
1397 fi
1398 if test "$compiler_c_o" = yes; then
1399 command="$command -o $obj"
1400 fi
1401
1402 # Suppress compiler output if we already did a PIC compilation.
1403 command="$command$suppress_output"
1404 func_show_eval_locale "$command" \
1405 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
1406
1407 if test "$need_locks" = warn &&
1408 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1409 $ECHO "\
1410*** ERROR, $lockfile contains:
1411`cat $lockfile 2>/dev/null`
1412
1413but it should contain:
1414$srcfile
1415
1416This indicates that another process is trying to use the same
1417temporary object file, and libtool could not work around it because
1418your compiler does not support \`-c' and \`-o' together. If you
1419repeat this compilation, it may succeed, by chance, but you had better
1420avoid parallel builds (make -j) in this platform, or get a better
1421compiler."
1422
1423 $opt_dry_run || $RM $removelist
1424 exit $EXIT_FAILURE
1425 fi
1426
1427 # Just move the object if needed
1428 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1429 func_show_eval '$MV "$output_obj" "$obj"' \
1430 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1431 fi
1432 fi
1433
1434 $opt_dry_run || {
1435 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
1436
1437 # Unlock the critical section if it was locked
1438 if test "$need_locks" != no; then
1439 removelist=$lockfile
1440 $RM "$lockfile"
1441 fi
1442 }
1443
1444 exit $EXIT_SUCCESS
1445}
1446
1447$opt_help || {
1448test "$mode" = compile && func_mode_compile ${1+"$@"}
1449}
1450
1451func_mode_help ()
1452{
1453 # We need to display help for each of the modes.
1454 case $mode in
1455 "")
1456 # Generic help is extracted from the usage comments
1457 # at the start of this file.
1458 func_help
1459 ;;
1460
1461 clean)
1462 $ECHO \
1463"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
1464
1465Remove files from the build directory.
1466
1467RM is the name of the program to use to delete files associated with each FILE
1468(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1469to RM.
1470
1471If FILE is a libtool library, object or program, all the files associated
1472with it are deleted. Otherwise, only FILE itself is deleted using RM."
1473 ;;
1474
1475 compile)
1476 $ECHO \
1477"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
1478
1479Compile a source file into a libtool library object.
1480
1481This mode accepts the following additional options:
1482
1483 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1484 -no-suppress do not suppress compiler output for multiple passes
1485 -prefer-pic try to building PIC objects only
1486 -prefer-non-pic try to building non-PIC objects only
1487 -shared do not build a \`.o' file suitable for static linking
1488 -static only build a \`.o' file suitable for static linking
1489
1490COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1491from the given SOURCEFILE.
1492
1493The output file name is determined by removing the directory component from
1494SOURCEFILE, then substituting the C source code suffix \`.c' with the
1495library object suffix, \`.lo'."
1496 ;;
1497
1498 execute)
1499 $ECHO \
1500"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
1501
1502Automatically set library path, then run a program.
1503
1504This mode accepts the following additional options:
1505
1506 -dlopen FILE add the directory containing FILE to the library path
1507
1508This mode sets the library path environment variable according to \`-dlopen'
1509flags.
1510
1511If any of the ARGS are libtool executable wrappers, then they are translated
1512into their corresponding uninstalled binary, and any of their required library
1513directories are added to the library path.
1514
1515Then, COMMAND is executed, with ARGS as arguments."
1516 ;;
1517
1518 finish)
1519 $ECHO \
1520"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
1521
1522Complete the installation of libtool libraries.
1523
1524Each LIBDIR is a directory that contains libtool libraries.
1525
1526The commands that this mode executes may require superuser privileges. Use
1527the \`--dry-run' option if you just want to see what would be executed."
1528 ;;
1529
1530 install)
1531 $ECHO \
1532"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
1533
1534Install executables or libraries.
1535
1536INSTALL-COMMAND is the installation command. The first component should be
1537either the \`install' or \`cp' program.
1538
1539The following components of INSTALL-COMMAND are treated specially:
1540
1541 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1542
1543The rest of the components are interpreted as arguments to that command (only
1544BSD-compatible install options are recognized)."
1545 ;;
1546
1547 link)
1548 $ECHO \
1549"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
1550
1551Link object files or libraries together to form another library, or to
1552create an executable program.
1553
1554LINK-COMMAND is a command using the C compiler that you would use to create
1555a program from several object files.
1556
1557The following components of LINK-COMMAND are treated specially:
1558
1559 -all-static do not do any dynamic linking at all
1560 -avoid-version do not add a version suffix if possible
1561 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1562 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1563 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
1564 -export-symbols SYMFILE
1565 try to export only the symbols listed in SYMFILE
1566 -export-symbols-regex REGEX
1567 try to export only the symbols matching REGEX
1568 -LLIBDIR search LIBDIR for required installed libraries
1569 -lNAME OUTPUT-FILE requires the installed library libNAME
1570 -module build a library that can dlopened
1571 -no-fast-install disable the fast-install mode
1572 -no-install link a not-installable executable
1573 -no-undefined declare that a library does not refer to external symbols
1574 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
1575 -objectlist FILE Use a list of object files found in FILE to specify objects
1576 -precious-files-regex REGEX
1577 don't remove output files matching REGEX
1578 -release RELEASE specify package release information
1579 -rpath LIBDIR the created library will eventually be installed in LIBDIR
1580 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
1581 -shared only do dynamic linking of libtool libraries
1582 -shrext SUFFIX override the standard shared library file extension
1583 -static do not do any dynamic linking of uninstalled libtool libraries
1584 -static-libtool-libs
1585 do not do any dynamic linking of libtool libraries
1586 -version-info CURRENT[:REVISION[:AGE]]
1587 specify library version info [each variable defaults to 0]
1588 -weak LIBNAME declare that the target provides the LIBNAME interface
1589
1590All other options (arguments beginning with \`-') are ignored.
1591
1592Every other argument is treated as a filename. Files ending in \`.la' are
1593treated as uninstalled libtool libraries, other files are standard or library
1594object files.
1595
1596If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
1597only library objects (\`.lo' files) may be specified, and \`-rpath' is
1598required, except when creating a convenience library.
1599
1600If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
1601using \`ar' and \`ranlib', or on Windows using \`lib'.
1602
1603If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
1604is created, otherwise an executable program is created."
1605 ;;
1606
1607 uninstall)
1608 $ECHO \
1609"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
1610
1611Remove libraries from an installation directory.
1612
1613RM is the name of the program to use to delete files associated with each FILE
1614(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1615to RM.
1616
1617If FILE is a libtool library, all the files associated with it are deleted.
1618Otherwise, only FILE itself is deleted using RM."
1619 ;;
1620
1621 *)
1622 func_fatal_help "invalid operation mode \`$mode'"
1623 ;;
1624 esac
1625
1626 $ECHO
1627 $ECHO "Try \`$progname --help' for more information about other modes."
1628
1629 exit $?
1630}
1631
1632 # Now that we've collected a possible --mode arg, show help if necessary
1633 $opt_help && func_mode_help
1634
1635
1636# func_mode_execute arg...
1637func_mode_execute ()
1638{
1639 $opt_debug
1640 # The first argument is the command name.
1641 cmd="$nonopt"
1642 test -z "$cmd" && \
1643 func_fatal_help "you must specify a COMMAND"
1644
1645 # Handle -dlopen flags immediately.
1646 for file in $execute_dlfiles; do
1647 test -f "$file" \
1648 || func_fatal_help "\`$file' is not a file"
1649
1650 dir=
1651 case $file in
1652 *.la)
1653 # Check to see that this really is a libtool archive.
1654 func_lalib_unsafe_p "$file" \
1655 || func_fatal_help "\`$lib' is not a valid libtool archive"
1656
1657 # Read the libtool library.
1658 dlname=
1659 library_names=
1660 func_source "$file"
1661
1662 # Skip this library if it cannot be dlopened.
1663 if test -z "$dlname"; then
1664 # Warn if it was a shared library.
1665 test -n "$library_names" && \
1666 func_warning "\`$file' was not linked with \`-export-dynamic'"
1667 continue
1668 fi
1669
1670 func_dirname "$file" "" "."
1671 dir="$func_dirname_result"
1672
1673 if test -f "$dir/$objdir/$dlname"; then
1674 dir="$dir/$objdir"
1675 else
1676 if test ! -f "$dir/$dlname"; then
1677 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
1678 fi
1679 fi
1680 ;;
1681
1682 *.lo)
1683 # Just add the directory containing the .lo file.
1684 func_dirname "$file" "" "."
1685 dir="$func_dirname_result"
1686 ;;
1687
1688 *)
1689 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
1690 continue
1691 ;;
1692 esac
1693
1694 # Get the absolute pathname.
1695 absdir=`cd "$dir" && pwd`
1696 test -n "$absdir" && dir="$absdir"
1697
1698 # Now add the directory to shlibpath_var.
1699 if eval "test -z \"\$$shlibpath_var\""; then
1700 eval "$shlibpath_var=\"\$dir\""
1701 else
1702 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
1703 fi
1704 done
1705
1706 # This variable tells wrapper scripts just to set shlibpath_var
1707 # rather than running their programs.
1708 libtool_execute_magic="$magic"
1709
1710 # Check if any of the arguments is a wrapper script.
1711 args=
1712 for file
1713 do
1714 case $file in
1715 -*) ;;
1716 *)
1717 # Do a test to see if this is really a libtool program.
1718 if func_ltwrapper_script_p "$file"; then
1719 func_source "$file"
1720 # Transform arg to wrapped name.
1721 file="$progdir/$program"
1722 elif func_ltwrapper_executable_p "$file"; then
1723 func_ltwrapper_scriptname "$file"
1724 func_source "$func_ltwrapper_scriptname_result"
1725 # Transform arg to wrapped name.
1726 file="$progdir/$program"
1727 fi
1728 ;;
1729 esac
1730 # Quote arguments (to preserve shell metacharacters).
1731 func_quote_for_eval "$file"
1732 args="$args $func_quote_for_eval_result"
1733 done
1734
1735 if test "X$opt_dry_run" = Xfalse; then
1736 if test -n "$shlibpath_var"; then
1737 # Export the shlibpath_var.
1738 eval "export $shlibpath_var"
1739 fi
1740
1741 # Restore saved environment variables
1742 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1743 do
1744 eval "if test \"\${save_$lt_var+set}\" = set; then
1745 $lt_var=\$save_$lt_var; export $lt_var
1746 else
1747 $lt_unset $lt_var
1748 fi"
1749 done
1750
1751 # Now prepare to actually exec the command.
1752 exec_cmd="\$cmd$args"
1753 else
1754 # Display what would be done.
1755 if test -n "$shlibpath_var"; then
1756 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1757 $ECHO "export $shlibpath_var"
1758 fi
1759 $ECHO "$cmd$args"
1760 exit $EXIT_SUCCESS
1761 fi
1762}
1763
1764test "$mode" = execute && func_mode_execute ${1+"$@"}
1765
1766
1767# func_mode_finish arg...
1768func_mode_finish ()
1769{
1770 $opt_debug
1771 libdirs="$nonopt"
1772 admincmds=
1773
1774 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1775 for dir
1776 do
1777 libdirs="$libdirs $dir"
1778 done
1779
1780 for libdir in $libdirs; do
1781 if test -n "$finish_cmds"; then
1782 # Do each command in the finish commands.
1783 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
1784'"$cmd"'"'
1785 fi
1786 if test -n "$finish_eval"; then
1787 # Do the single finish_eval.
1788 eval cmds=\"$finish_eval\"
1789 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
1790 $cmds"
1791 fi
1792 done
1793 fi
1794
1795 # Exit here if they wanted silent mode.
1796 $opt_silent && exit $EXIT_SUCCESS
1797
1798 $ECHO "X----------------------------------------------------------------------" | $Xsed
1799 $ECHO "Libraries have been installed in:"
1800 for libdir in $libdirs; do
1801 $ECHO " $libdir"
1802 done
1803 $ECHO
1804 $ECHO "If you ever happen to want to link against installed libraries"
1805 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1806 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1807 $ECHO "flag during linking and do at least one of the following:"
1808 if test -n "$shlibpath_var"; then
1809 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1810 $ECHO " during execution"
1811 fi
1812 if test -n "$runpath_var"; then
1813 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1814 $ECHO " during linking"
1815 fi
1816 if test -n "$hardcode_libdir_flag_spec"; then
1817 libdir=LIBDIR
1818 eval flag=\"$hardcode_libdir_flag_spec\"
1819
1820 $ECHO " - use the \`$flag' linker flag"
1821 fi
1822 if test -n "$admincmds"; then
1823 $ECHO " - have your system administrator run these commands:$admincmds"
1824 fi
1825 if test -f /etc/ld.so.conf; then
1826 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1827 fi
1828 $ECHO
1829
1830 $ECHO "See any operating system documentation about shared libraries for"
1831 case $host in
1832 solaris2.[6789]|solaris2.1[0-9])
1833 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1834 $ECHO "pages."
1835 ;;
1836 *)
1837 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1838 ;;
1839 esac
1840 $ECHO "X----------------------------------------------------------------------" | $Xsed
1841 exit $EXIT_SUCCESS
1842}
1843
1844test "$mode" = finish && func_mode_finish ${1+"$@"}
1845
1846
1847# func_mode_install arg...
1848func_mode_install ()
1849{
1850 $opt_debug
1851 # There may be an optional sh(1) argument at the beginning of
1852 # install_prog (especially on Windows NT).
1853 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
1854 # Allow the use of GNU shtool's install command.
1855 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
1856 # Aesthetically quote it.
1857 func_quote_for_eval "$nonopt"
1858 install_prog="$func_quote_for_eval_result "
1859 arg=$1
1860 shift
1861 else
1862 install_prog=
1863 arg=$nonopt
1864 fi
1865
1866 # The real first argument should be the name of the installation program.
1867 # Aesthetically quote it.
1868 func_quote_for_eval "$arg"
1869 install_prog="$install_prog$func_quote_for_eval_result"
1870
1871 # We need to accept at least all the BSD install flags.
1872 dest=
1873 files=
1874 opts=
1875 prev=
1876 install_type=
1877 isdir=no
1878 stripme=
1879 for arg
1880 do
1881 if test -n "$dest"; then
1882 files="$files $dest"
1883 dest=$arg
1884 continue
1885 fi
1886
1887 case $arg in
1888 -d) isdir=yes ;;
1889 -f)
1890 case " $install_prog " in
1891 *[\\\ /]cp\ *) ;;
1892 *) prev=$arg ;;
1893 esac
1894 ;;
1895 -g | -m | -o)
1896 prev=$arg
1897 ;;
1898 -s)
1899 stripme=" -s"
1900 continue
1901 ;;
1902 -*)
1903 ;;
1904 *)
1905 # If the previous option needed an argument, then skip it.
1906 if test -n "$prev"; then
1907 prev=
1908 else
1909 dest=$arg
1910 continue
1911 fi
1912 ;;
1913 esac
1914
1915 # Aesthetically quote the argument.
1916 func_quote_for_eval "$arg"
1917 install_prog="$install_prog $func_quote_for_eval_result"
1918 done
1919
1920 test -z "$install_prog" && \
1921 func_fatal_help "you must specify an install program"
1922
1923 test -n "$prev" && \
1924 func_fatal_help "the \`$prev' option requires an argument"
1925
1926 if test -z "$files"; then
1927 if test -z "$dest"; then
1928 func_fatal_help "no file or destination specified"
1929 else
1930 func_fatal_help "you must specify a destination"
1931 fi
1932 fi
1933
1934 # Strip any trailing slash from the destination.
1935 func_stripname '' '/' "$dest"
1936 dest=$func_stripname_result
1937
1938 # Check to see that the destination is a directory.
1939 test -d "$dest" && isdir=yes
1940 if test "$isdir" = yes; then
1941 destdir="$dest"
1942 destname=
1943 else
1944 func_dirname_and_basename "$dest" "" "."
1945 destdir="$func_dirname_result"
1946 destname="$func_basename_result"
1947
1948 # Not a directory, so check to see that there is only one file specified.
1949 set dummy $files; shift
1950 test "$#" -gt 1 && \
1951 func_fatal_help "\`$dest' is not a directory"
1952 fi
1953 case $destdir in
1954 [\\/]* | [A-Za-z]:[\\/]*) ;;
1955 *)
1956 for file in $files; do
1957 case $file in
1958 *.lo) ;;
1959 *)
1960 func_fatal_help "\`$destdir' must be an absolute directory name"
1961 ;;
1962 esac
1963 done
1964 ;;
1965 esac
1966
1967 # This variable tells wrapper scripts just to set variables rather
1968 # than running their programs.
1969 libtool_install_magic="$magic"
1970
1971 staticlibs=
1972 future_libdirs=
1973 current_libdirs=
1974 for file in $files; do
1975
1976 # Do each installation.
1977 case $file in
1978 *.$libext)
1979 # Do the static libraries later.
1980 staticlibs="$staticlibs $file"
1981 ;;
1982
1983 *.la)
1984 # Check to see that this really is a libtool archive.
1985 func_lalib_unsafe_p "$file" \
1986 || func_fatal_help "\`$file' is not a valid libtool archive"
1987
1988 library_names=
1989 old_library=
1990 relink_command=
1991 func_source "$file"
1992
1993 # Add the libdir to current_libdirs if it is the destination.
1994 if test "X$destdir" = "X$libdir"; then
1995 case "$current_libdirs " in
1996 *" $libdir "*) ;;
1997 *) current_libdirs="$current_libdirs $libdir" ;;
1998 esac
1999 else
2000 # Note the libdir as a future libdir.
2001 case "$future_libdirs " in
2002 *" $libdir "*) ;;
2003 *) future_libdirs="$future_libdirs $libdir" ;;
2004 esac
2005 fi
2006
2007 func_dirname "$file" "/" ""
2008 dir="$func_dirname_result"
2009 dir="$dir$objdir"
2010
2011 if test -n "$relink_command"; then
2012 # Determine the prefix the user has applied to our future dir.
2013 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2014
2015 # Don't allow the user to place us outside of our expected
2016 # location b/c this prevents finding dependent libraries that
2017 # are installed to the same prefix.
2018 # At present, this check doesn't affect windows .dll's that
2019 # are installed into $libdir/../bin (currently, that works fine)
2020 # but it's something to keep an eye on.
2021 test "$inst_prefix_dir" = "$destdir" && \
2022 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2023
2024 if test -n "$inst_prefix_dir"; then
2025 # Stick the inst_prefix_dir data into the link command.
2026 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2027 else
2028 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2029 fi
2030
2031 func_warning "relinking \`$file'"
2032 func_show_eval "$relink_command" \
2033 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2034 fi
2035
2036 # See the names of the shared library.
2037 set dummy $library_names; shift
2038 if test -n "$1"; then
2039 realname="$1"
2040 shift
2041
2042 srcname="$realname"
2043 test -n "$relink_command" && srcname="$realname"T
2044
2045 # Install the shared library and build the symlinks.
2046 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2047 'exit $?'
2048 tstripme="$stripme"
2049 case $host_os in
2050 cygwin* | mingw* | pw32* | cegcc*)
2051 case $realname in
2052 *.dll.a)
2053 tstripme=""
2054 ;;
2055 esac
2056 ;;
2057 esac
2058 if test -n "$tstripme" && test -n "$striplib"; then
2059 func_show_eval "$striplib $destdir/$realname" 'exit $?'
2060 fi
2061
2062 if test "$#" -gt 0; then
2063 # Delete the old symlinks, and create new ones.
2064 # Try `ln -sf' first, because the `ln' binary might depend on
2065 # the symlink we replace! Solaris /bin/ln does not understand -f,
2066 # so we also need to try rm && ln -s.
2067 for linkname
2068 do
2069 test "$linkname" != "$realname" \
2070 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
2071 done
2072 fi
2073
2074 # Do each command in the postinstall commands.
2075 lib="$destdir/$realname"
2076 func_execute_cmds "$postinstall_cmds" 'exit $?'
2077 fi
2078
2079 # Install the pseudo-library for information purposes.
2080 func_basename "$file"
2081 name="$func_basename_result"
2082 instname="$dir/$name"i
2083 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
2084
2085 # Maybe install the static library, too.
2086 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
2087 ;;
2088
2089 *.lo)
2090 # Install (i.e. copy) a libtool object.
2091
2092 # Figure out destination file name, if it wasn't already specified.
2093 if test -n "$destname"; then
2094 destfile="$destdir/$destname"
2095 else
2096 func_basename "$file"
2097 destfile="$func_basename_result"
2098 destfile="$destdir/$destfile"
2099 fi
2100
2101 # Deduce the name of the destination old-style object file.
2102 case $destfile in
2103 *.lo)
2104 func_lo2o "$destfile"
2105 staticdest=$func_lo2o_result
2106 ;;
2107 *.$objext)
2108 staticdest="$destfile"
2109 destfile=
2110 ;;
2111 *)
2112 func_fatal_help "cannot copy a libtool object to \`$destfile'"
2113 ;;
2114 esac
2115
2116 # Install the libtool object if requested.
2117 test -n "$destfile" && \
2118 func_show_eval "$install_prog $file $destfile" 'exit $?'
2119
2120 # Install the old object if enabled.
2121 if test "$build_old_libs" = yes; then
2122 # Deduce the name of the old-style object file.
2123 func_lo2o "$file"
2124 staticobj=$func_lo2o_result
2125 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
2126 fi
2127 exit $EXIT_SUCCESS
2128 ;;
2129
2130 *)
2131 # Figure out destination file name, if it wasn't already specified.
2132 if test -n "$destname"; then
2133 destfile="$destdir/$destname"
2134 else
2135 func_basename "$file"
2136 destfile="$func_basename_result"
2137 destfile="$destdir/$destfile"
2138 fi
2139
2140 # If the file is missing, and there is a .exe on the end, strip it
2141 # because it is most likely a libtool script we actually want to
2142 # install
2143 stripped_ext=""
2144 case $file in
2145 *.exe)
2146 if test ! -f "$file"; then
2147 func_stripname '' '.exe' "$file"
2148 file=$func_stripname_result
2149 stripped_ext=".exe"
2150 fi
2151 ;;
2152 esac
2153
2154 # Do a test to see if this is really a libtool program.
2155 case $host in
2156 *cygwin* | *mingw*)
2157 if func_ltwrapper_executable_p "$file"; then
2158 func_ltwrapper_scriptname "$file"
2159 wrapper=$func_ltwrapper_scriptname_result
2160 else
2161 func_stripname '' '.exe' "$file"
2162 wrapper=$func_stripname_result
2163 fi
2164 ;;
2165 *)
2166 wrapper=$file
2167 ;;
2168 esac
2169 if func_ltwrapper_script_p "$wrapper"; then
2170 notinst_deplibs=
2171 relink_command=
2172
2173 func_source "$wrapper"
2174
2175 # Check the variables that should have been set.
2176 test -z "$generated_by_libtool_version" && \
2177 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
2178
2179 finalize=yes
2180 for lib in $notinst_deplibs; do
2181 # Check to see that each library is installed.
2182 libdir=
2183 if test -f "$lib"; then
2184 func_source "$lib"
2185 fi
2186 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
2187 if test -n "$libdir" && test ! -f "$libfile"; then
2188 func_warning "\`$lib' has not been installed in \`$libdir'"
2189 finalize=no
2190 fi
2191 done
2192
2193 relink_command=
2194 func_source "$wrapper"
2195
2196 outputname=
2197 if test "$fast_install" = no && test -n "$relink_command"; then
2198 $opt_dry_run || {
2199 if test "$finalize" = yes; then
2200 tmpdir=`func_mktempdir`
2201 func_basename "$file$stripped_ext"
2202 file="$func_basename_result"
2203 outputname="$tmpdir/$file"
2204 # Replace the output file specification.
2205 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
2206
2207 $opt_silent || {
2208 func_quote_for_expand "$relink_command"
2209 eval "func_echo $func_quote_for_expand_result"
2210 }
2211 if eval "$relink_command"; then :
2212 else
2213 func_error "error: relink \`$file' with the above command before installing it"
2214 $opt_dry_run || ${RM}r "$tmpdir"
2215 continue
2216 fi
2217 file="$outputname"
2218 else
2219 func_warning "cannot relink \`$file'"
2220 fi
2221 }
2222 else
2223 # Install the binary that we compiled earlier.
2224 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
2225 fi
2226 fi
2227
2228 # remove .exe since cygwin /usr/bin/install will append another
2229 # one anyway
2230 case $install_prog,$host in
2231 */usr/bin/install*,*cygwin*)
2232 case $file:$destfile in
2233 *.exe:*.exe)
2234 # this is ok
2235 ;;
2236 *.exe:*)
2237 destfile=$destfile.exe
2238 ;;
2239 *:*.exe)
2240 func_stripname '' '.exe' "$destfile"
2241 destfile=$func_stripname_result
2242 ;;
2243 esac
2244 ;;
2245 esac
2246 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
2247 $opt_dry_run || if test -n "$outputname"; then
2248 ${RM}r "$tmpdir"
2249 fi
2250 ;;
2251 esac
2252 done
2253
2254 for file in $staticlibs; do
2255 func_basename "$file"
2256 name="$func_basename_result"
2257
2258 # Set up the ranlib parameters.
2259 oldlib="$destdir/$name"
2260
2261 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
2262
2263 if test -n "$stripme" && test -n "$old_striplib"; then
2264 func_show_eval "$old_striplib $oldlib" 'exit $?'
2265 fi
2266
2267 # Do each command in the postinstall commands.
2268 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
2269 done
2270
2271 test -n "$future_libdirs" && \
2272 func_warning "remember to run \`$progname --finish$future_libdirs'"
2273
2274 if test -n "$current_libdirs"; then
2275 # Maybe just do a dry run.
2276 $opt_dry_run && current_libdirs=" -n$current_libdirs"
2277 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
2278 else
2279 exit $EXIT_SUCCESS
2280 fi
2281}
2282
2283test "$mode" = install && func_mode_install ${1+"$@"}
2284
2285
2286# func_generate_dlsyms outputname originator pic_p
2287# Extract symbols from dlprefiles and create ${outputname}S.o with
2288# a dlpreopen symbol table.
2289func_generate_dlsyms ()
2290{
2291 $opt_debug
2292 my_outputname="$1"
2293 my_originator="$2"
2294 my_pic_p="${3-no}"
2295 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
2296 my_dlsyms=
2297
2298 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2299 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2300 my_dlsyms="${my_outputname}S.c"
2301 else
2302 func_error "not configured to extract global symbols from dlpreopened files"
2303 fi
2304 fi
2305
2306 if test -n "$my_dlsyms"; then
2307 case $my_dlsyms in
2308 "") ;;
2309 *.c)
2310 # Discover the nlist of each of the dlfiles.
2311 nlist="$output_objdir/${my_outputname}.nm"
2312
2313 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
2314
2315 # Parse the name list into a source file.
2316 func_verbose "creating $output_objdir/$my_dlsyms"
2317
2318 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
2319/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
2320/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
2321
2322#ifdef __cplusplus
2323extern \"C\" {
2324#endif
2325
2326/* External symbol declarations for the compiler. */\
2327"
2328
2329 if test "$dlself" = yes; then
2330 func_verbose "generating symbol list for \`$output'"
2331
2332 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
2333
2334 # Add our own program objects to the symbol list.
2335 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2336 for progfile in $progfiles; do
2337 func_verbose "extracting global C symbols from \`$progfile'"
2338 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
2339 done
2340
2341 if test -n "$exclude_expsyms"; then
2342 $opt_dry_run || {
2343 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2344 eval '$MV "$nlist"T "$nlist"'
2345 }
2346 fi
2347
2348 if test -n "$export_symbols_regex"; then
2349 $opt_dry_run || {
2350 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2351 eval '$MV "$nlist"T "$nlist"'
2352 }
2353 fi
2354
2355 # Prepare the list of exported symbols
2356 if test -z "$export_symbols"; then
2357 export_symbols="$output_objdir/$outputname.exp"
2358 $opt_dry_run || {
2359 $RM $export_symbols
2360 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2361 case $host in
2362 *cygwin* | *mingw* | *cegcc* )
2363 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2364 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
2365 ;;
2366 esac
2367 }
2368 else
2369 $opt_dry_run || {
2370 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
2371 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2372 eval '$MV "$nlist"T "$nlist"'
2373 case $host in
2374 *cygwin | *mingw* | *cegcc* )
2375 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2376 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
2377 ;;
2378 esac
2379 }
2380 fi
2381 fi
2382
2383 for dlprefile in $dlprefiles; do
2384 func_verbose "extracting global C symbols from \`$dlprefile'"
2385 func_basename "$dlprefile"
2386 name="$func_basename_result"
2387 $opt_dry_run || {
2388 eval '$ECHO ": $name " >> "$nlist"'
2389 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2390 }
2391 done
2392
2393 $opt_dry_run || {
2394 # Make sure we have at least an empty file.
2395 test -f "$nlist" || : > "$nlist"
2396
2397 if test -n "$exclude_expsyms"; then
2398 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2399 $MV "$nlist"T "$nlist"
2400 fi
2401
2402 # Try sorting and uniquifying the output.
2403 if $GREP -v "^: " < "$nlist" |
2404 if sort -k 3 </dev/null >/dev/null 2>&1; then
2405 sort -k 3
2406 else
2407 sort +2
2408 fi |
2409 uniq > "$nlist"S; then
2410 :
2411 else
2412 $GREP -v "^: " < "$nlist" > "$nlist"S
2413 fi
2414
2415 if test -f "$nlist"S; then
2416 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
2417 else
2418 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
2419 fi
2420
2421 $ECHO >> "$output_objdir/$my_dlsyms" "\
2422
2423/* The mapping between symbol names and symbols. */
2424typedef struct {
2425 const char *name;
2426 void *address;
2427} lt_dlsymlist;
2428"
2429 case $host in
2430 *cygwin* | *mingw* | *cegcc* )
2431 $ECHO >> "$output_objdir/$my_dlsyms" "\
2432/* DATA imports from DLLs on WIN32 con't be const, because
2433 runtime relocations are performed -- see ld's documentation
2434 on pseudo-relocs. */"
2435 lt_dlsym_const= ;;
2436 *osf5*)
2437 echo >> "$output_objdir/$my_dlsyms" "\
2438/* This system does not cope well with relocations in const data */"
2439 lt_dlsym_const= ;;
2440 *)
2441 lt_dlsym_const=const ;;
2442 esac
2443
2444 $ECHO >> "$output_objdir/$my_dlsyms" "\
2445extern $lt_dlsym_const lt_dlsymlist
2446lt_${my_prefix}_LTX_preloaded_symbols[];
2447$lt_dlsym_const lt_dlsymlist
2448lt_${my_prefix}_LTX_preloaded_symbols[] =
2449{\
2450 { \"$my_originator\", (void *) 0 },"
2451
2452 case $need_lib_prefix in
2453 no)
2454 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
2455 ;;
2456 *)
2457 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
2458 ;;
2459 esac
2460 $ECHO >> "$output_objdir/$my_dlsyms" "\
2461 {0, (void *) 0}
2462};
2463
2464/* This works around a problem in FreeBSD linker */
2465#ifdef FREEBSD_WORKAROUND
2466static const void *lt_preloaded_setup() {
2467 return lt_${my_prefix}_LTX_preloaded_symbols;
2468}
2469#endif
2470
2471#ifdef __cplusplus
2472}
2473#endif\
2474"
2475 } # !$opt_dry_run
2476
2477 pic_flag_for_symtable=
2478 case "$compile_command " in
2479 *" -static "*) ;;
2480 *)
2481 case $host in
2482 # compiling the symbol table file with pic_flag works around
2483 # a FreeBSD bug that causes programs to crash when -lm is
2484 # linked before any other PIC object. But we must not use
2485 # pic_flag when linking with -static. The problem exists in
2486 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2487 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2488 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2489 *-*-hpux*)
2490 pic_flag_for_symtable=" $pic_flag" ;;
2491 *)
2492 if test "X$my_pic_p" != Xno; then
2493 pic_flag_for_symtable=" $pic_flag"
2494 fi
2495 ;;
2496 esac
2497 ;;
2498 esac
2499 symtab_cflags=
2500 for arg in $LTCFLAGS; do
2501 case $arg in
2502 -pie | -fpie | -fPIE) ;;
2503 *) symtab_cflags="$symtab_cflags $arg" ;;
2504 esac
2505 done
2506
2507 # Now compile the dynamic symbol file.
2508 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
2509
2510 # Clean up the generated files.
2511 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
2512
2513 # Transform the symbol file into the correct name.
2514 symfileobj="$output_objdir/${my_outputname}S.$objext"
2515 case $host in
2516 *cygwin* | *mingw* | *cegcc* )
2517 if test -f "$output_objdir/$my_outputname.def"; then
2518 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2519 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2520 else
2521 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2522 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2523 fi
2524 ;;
2525 *)
2526 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2527 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2528 ;;
2529 esac
2530 ;;
2531 *)
2532 func_fatal_error "unknown suffix for \`$my_dlsyms'"
2533 ;;
2534 esac
2535 else
2536 # We keep going just in case the user didn't refer to
2537 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2538 # really was required.
2539
2540 # Nullify the symbol file.
2541 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2542 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2543 fi
2544}
2545
2546# func_win32_libid arg
2547# return the library type of file 'arg'
2548#
2549# Need a lot of goo to handle *both* DLLs and import libs
2550# Has to be a shell function in order to 'eat' the argument
2551# that is supplied when $file_magic_command is called.
2552func_win32_libid ()
2553{
2554 $opt_debug
2555 win32_libid_type="unknown"
2556 win32_fileres=`file -L $1 2>/dev/null`
2557 case $win32_fileres in
2558 *ar\ archive\ import\ library*) # definitely import
2559 win32_libid_type="x86 archive import"
2560 ;;
2561 *ar\ archive*) # could be an import, or static
2562 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2563 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2564 win32_nmres=`eval $NM -f posix -A $1 |
2565 $SED -n -e '
2566 1,100{
2567 / I /{
2568 s,.*,import,
2569 p
2570 q
2571 }
2572 }'`
2573 case $win32_nmres in
2574 import*) win32_libid_type="x86 archive import";;
2575 *) win32_libid_type="x86 archive static";;
2576 esac
2577 fi
2578 ;;
2579 *DLL*)
2580 win32_libid_type="x86 DLL"
2581 ;;
2582 *executable*) # but shell scripts are "executable" too...
2583 case $win32_fileres in
2584 *MS\ Windows\ PE\ Intel*)
2585 win32_libid_type="x86 DLL"
2586 ;;
2587 esac
2588 ;;
2589 esac
2590 $ECHO "$win32_libid_type"
2591}
2592
2593
2594
2595# func_extract_an_archive dir oldlib
2596func_extract_an_archive ()
2597{
2598 $opt_debug
2599 f_ex_an_ar_dir="$1"; shift
2600 f_ex_an_ar_oldlib="$1"
2601 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
2602 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2603 :
2604 else
2605 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
2606 fi
2607}
2608
2609
2610# func_extract_archives gentop oldlib ...
2611func_extract_archives ()
2612{
2613 $opt_debug
2614 my_gentop="$1"; shift
2615 my_oldlibs=${1+"$@"}
2616 my_oldobjs=""
2617 my_xlib=""
2618 my_xabs=""
2619 my_xdir=""
2620
2621 for my_xlib in $my_oldlibs; do
2622 # Extract the objects.
2623 case $my_xlib in
2624 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
2625 *) my_xabs=`pwd`"/$my_xlib" ;;
2626 esac
2627 func_basename "$my_xlib"
2628 my_xlib="$func_basename_result"
2629 my_xlib_u=$my_xlib
2630 while :; do
2631 case " $extracted_archives " in
2632 *" $my_xlib_u "*)
2633 func_arith $extracted_serial + 1
2634 extracted_serial=$func_arith_result
2635 my_xlib_u=lt$extracted_serial-$my_xlib ;;
2636 *) break ;;
2637 esac
2638 done
2639 extracted_archives="$extracted_archives $my_xlib_u"
2640 my_xdir="$my_gentop/$my_xlib_u"
2641
2642 func_mkdir_p "$my_xdir"
2643
2644 case $host in
2645 *-darwin*)
2646 func_verbose "Extracting $my_xabs"
2647 # Do not bother doing anything if just a dry run
2648 $opt_dry_run || {
2649 darwin_orig_dir=`pwd`
2650 cd $my_xdir || exit $?
2651 darwin_archive=$my_xabs
2652 darwin_curdir=`pwd`
2653 darwin_base_archive=`basename "$darwin_archive"`
2654 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
2655 if test -n "$darwin_arches"; then
2656 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
2657 darwin_arch=
2658 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
2659 for darwin_arch in $darwin_arches ; do
2660 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2661 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
2662 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2663 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
2664 cd "$darwin_curdir"
2665 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
2666 done # $darwin_arches
2667 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
2668 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
2669 darwin_file=
2670 darwin_files=
2671 for darwin_file in $darwin_filelist; do
2672 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2673 $LIPO -create -output "$darwin_file" $darwin_files
2674 done # $darwin_filelist
2675 $RM -rf unfat-$$
2676 cd "$darwin_orig_dir"
2677 else
2678 cd $darwin_orig_dir
2679 func_extract_an_archive "$my_xdir" "$my_xabs"
2680 fi # $darwin_arches
2681 } # !$opt_dry_run
2682 ;;
2683 *)
2684 func_extract_an_archive "$my_xdir" "$my_xabs"
2685 ;;
2686 esac
2687 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2688 done
2689
2690 func_extract_archives_result="$my_oldobjs"
2691}
2692
2693
2694
2695# func_emit_wrapper_part1 [arg=no]
2696#
2697# Emit the first part of a libtool wrapper script on stdout.
2698# For more information, see the description associated with
2699# func_emit_wrapper(), below.
2700func_emit_wrapper_part1 ()
2701{
2702 func_emit_wrapper_part1_arg1=no
2703 if test -n "$1" ; then
2704 func_emit_wrapper_part1_arg1=$1
2705 fi
2706
2707 $ECHO "\
2708#! $SHELL
2709
2710# $output - temporary wrapper script for $objdir/$outputname
2711# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2712#
2713# The $output program cannot be directly executed until all the libtool
2714# libraries that it depends on are installed.
2715#
2716# This wrapper script should never be moved out of the build directory.
2717# If it is, it will not operate correctly.
2718
2719# Sed substitution that helps us do robust quoting. It backslashifies
2720# metacharacters that are still active within double-quoted strings.
2721Xsed='${SED} -e 1s/^X//'
2722sed_quote_subst='$sed_quote_subst'
2723
2724# Be Bourne compatible
2725if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2726 emulate sh
2727 NULLCMD=:
2728 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2729 # is contrary to our usage. Disable this feature.
2730 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2731 setopt NO_GLOB_SUBST
2732else
2733 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2734fi
2735BIN_SH=xpg4; export BIN_SH # for Tru64
2736DUALCASE=1; export DUALCASE # for MKS sh
2737
2738# The HP-UX ksh and POSIX shell print the target directory to stdout
2739# if CDPATH is set.
2740(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2741
2742relink_command=\"$relink_command\"
2743
2744# This environment variable determines our operation mode.
2745if test \"\$libtool_install_magic\" = \"$magic\"; then
2746 # install mode needs the following variables:
2747 generated_by_libtool_version='$macro_version'
2748 notinst_deplibs='$notinst_deplibs'
2749else
2750 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2751 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2752 ECHO=\"$qecho\"
2753 file=\"\$0\"
2754 # Make sure echo works.
2755 if test \"X\$1\" = X--no-reexec; then
2756 # Discard the --no-reexec flag, and continue.
2757 shift
2758 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2759 # Yippee, \$ECHO works!
2760 :
2761 else
2762 # Restart under the correct shell, and then maybe \$ECHO will work.
2763 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2764 fi
2765 fi\
2766"
2767 $ECHO "\
2768
2769 # Find the directory that this script lives in.
2770 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2771 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2772
2773 # Follow symbolic links until we get to the real thisdir.
2774 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2775 while test -n \"\$file\"; do
2776 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2777
2778 # If there was a directory component, then change thisdir.
2779 if test \"x\$destdir\" != \"x\$file\"; then
2780 case \"\$destdir\" in
2781 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2782 *) thisdir=\"\$thisdir/\$destdir\" ;;
2783 esac
2784 fi
2785
2786 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2787 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2788 done
2789"
2790}
2791# end: func_emit_wrapper_part1
2792
2793# func_emit_wrapper_part2 [arg=no]
2794#
2795# Emit the second part of a libtool wrapper script on stdout.
2796# For more information, see the description associated with
2797# func_emit_wrapper(), below.
2798func_emit_wrapper_part2 ()
2799{
2800 func_emit_wrapper_part2_arg1=no
2801 if test -n "$1" ; then
2802 func_emit_wrapper_part2_arg1=$1
2803 fi
2804
2805 $ECHO "\
2806
2807 # Usually 'no', except on cygwin/mingw when embedded into
2808 # the cwrapper.
2809 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2810 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2811 # special case for '.'
2812 if test \"\$thisdir\" = \".\"; then
2813 thisdir=\`pwd\`
2814 fi
2815 # remove .libs from thisdir
2816 case \"\$thisdir\" in
2817 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2818 $objdir ) thisdir=. ;;
2819 esac
2820 fi
2821
2822 # Try to get the absolute directory name.
2823 absdir=\`cd \"\$thisdir\" && pwd\`
2824 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2825"
2826
2827 if test "$fast_install" = yes; then
2828 $ECHO "\
2829 program=lt-'$outputname'$exeext
2830 progdir=\"\$thisdir/$objdir\"
2831
2832 if test ! -f \"\$progdir/\$program\" ||
2833 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2834 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2835
2836 file=\"\$\$-\$program\"
2837
2838 if test ! -d \"\$progdir\"; then
2839 $MKDIR \"\$progdir\"
2840 else
2841 $RM \"\$progdir/\$file\"
2842 fi"
2843
2844 $ECHO "\
2845
2846 # relink executable if necessary
2847 if test -n \"\$relink_command\"; then
2848 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2849 else
2850 $ECHO \"\$relink_command_output\" >&2
2851 $RM \"\$progdir/\$file\"
2852 exit 1
2853 fi
2854 fi
2855
2856 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2857 { $RM \"\$progdir/\$program\";
2858 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2859 $RM \"\$progdir/\$file\"
2860 fi"
2861 else
2862 $ECHO "\
2863 program='$outputname'
2864 progdir=\"\$thisdir/$objdir\"
2865"
2866 fi
2867
2868 $ECHO "\
2869
2870 if test -f \"\$progdir/\$program\"; then"
2871
2872 # Export our shlibpath_var if we have one.
2873 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2874 $ECHO "\
2875 # Add our own library path to $shlibpath_var
2876 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2877
2878 # Some systems cannot cope with colon-terminated $shlibpath_var
2879 # The second colon is a workaround for a bug in BeOS R4 sed
2880 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2881
2882 export $shlibpath_var
2883"
2884 fi
2885
2886 # fixup the dll searchpath if we need to.
2887 if test -n "$dllsearchpath"; then
2888 $ECHO "\
2889 # Add the dll search path components to the executable PATH
2890 PATH=$dllsearchpath:\$PATH
2891"
2892 fi
2893
2894 $ECHO "\
2895 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2896 # Run the actual program with our arguments.
2897"
2898 case $host in
2899 # Backslashes separate directories on plain windows
2900 *-*-mingw | *-*-os2* | *-cegcc*)
2901 $ECHO "\
2902 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2903"
2904 ;;
2905
2906 *)
2907 $ECHO "\
2908 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2909"
2910 ;;
2911 esac
2912 $ECHO "\
2913 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2914 exit 1
2915 fi
2916 else
2917 # The program doesn't exist.
2918 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2919 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2920 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2921 exit 1
2922 fi
2923fi\
2924"
2925}
2926# end: func_emit_wrapper_part2
2927
2928
2929# func_emit_wrapper [arg=no]
2930#
2931# Emit a libtool wrapper script on stdout.
2932# Don't directly open a file because we may want to
2933# incorporate the script contents within a cygwin/mingw
2934# wrapper executable. Must ONLY be called from within
2935# func_mode_link because it depends on a number of variables
2936# set therein.
2937#
2938# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2939# variable will take. If 'yes', then the emitted script
2940# will assume that the directory in which it is stored is
2941# the $objdir directory. This is a cygwin/mingw-specific
2942# behavior.
2943func_emit_wrapper ()
2944{
2945 func_emit_wrapper_arg1=no
2946 if test -n "$1" ; then
2947 func_emit_wrapper_arg1=$1
2948 fi
2949
2950 # split this up so that func_emit_cwrapperexe_src
2951 # can call each part independently.
2952 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2953 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2954}
2955
2956
2957# func_to_host_path arg
2958#
2959# Convert paths to host format when used with build tools.
2960# Intended for use with "native" mingw (where libtool itself
2961# is running under the msys shell), or in the following cross-
2962# build environments:
2963# $build $host
2964# mingw (msys) mingw [e.g. native]
2965# cygwin mingw
2966# *nix + wine mingw
2967# where wine is equipped with the `winepath' executable.
2968# In the native mingw case, the (msys) shell automatically
2969# converts paths for any non-msys applications it launches,
2970# but that facility isn't available from inside the cwrapper.
2971# Similar accommodations are necessary for $host mingw and
2972# $build cygwin. Calling this function does no harm for other
2973# $host/$build combinations not listed above.
2974#
2975# ARG is the path (on $build) that should be converted to
2976# the proper representation for $host. The result is stored
2977# in $func_to_host_path_result.
2978func_to_host_path ()
2979{
2980 func_to_host_path_result="$1"
2981 if test -n "$1" ; then
2982 case $host in
2983 *mingw* )
2984 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2985 case $build in
2986 *mingw* ) # actually, msys
2987 # awkward: cmd appends spaces to result
2988 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2989 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2990 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2991 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2992 $SED -e "$lt_sed_naive_backslashify"`
2993 ;;
2994 *cygwin* )
2995 func_to_host_path_tmp1=`cygpath -w "$1"`
2996 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2997 $SED -e "$lt_sed_naive_backslashify"`
2998 ;;
2999 * )
3000 # Unfortunately, winepath does not exit with a non-zero
3001 # error code, so we are forced to check the contents of
3002 # stdout. On the other hand, if the command is not
3003 # found, the shell will set an exit code of 127 and print
3004 # *an error message* to stdout. So we must check for both
3005 # error code of zero AND non-empty stdout, which explains
3006 # the odd construction:
3007 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3008 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3009 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3010 $SED -e "$lt_sed_naive_backslashify"`
3011 else
3012 # Allow warning below.
3013 func_to_host_path_result=""
3014 fi
3015 ;;
3016 esac
3017 if test -z "$func_to_host_path_result" ; then
3018 func_error "Could not determine host path corresponding to"
3019 func_error " '$1'"
3020 func_error "Continuing, but uninstalled executables may not work."
3021 # Fallback:
3022 func_to_host_path_result="$1"
3023 fi
3024 ;;
3025 esac
3026 fi
3027}
3028# end: func_to_host_path
3029
3030# func_to_host_pathlist arg
3031#
3032# Convert pathlists to host format when used with build tools.
3033# See func_to_host_path(), above. This function supports the
3034# following $build/$host combinations (but does no harm for
3035# combinations not listed here):
3036# $build $host
3037# mingw (msys) mingw [e.g. native]
3038# cygwin mingw
3039# *nix + wine mingw
3040#
3041# Path separators are also converted from $build format to
3042# $host format. If ARG begins or ends with a path separator
3043# character, it is preserved (but converted to $host format)
3044# on output.
3045#
3046# ARG is a pathlist (on $build) that should be converted to
3047# the proper representation on $host. The result is stored
3048# in $func_to_host_pathlist_result.
3049func_to_host_pathlist ()
3050{
3051 func_to_host_pathlist_result="$1"
3052 if test -n "$1" ; then
3053 case $host in
3054 *mingw* )
3055 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3056 # Remove leading and trailing path separator characters from
3057 # ARG. msys behavior is inconsistent here, cygpath turns them
3058 # into '.;' and ';.', and winepath ignores them completely.
3059 func_to_host_pathlist_tmp2="$1"
3060 # Once set for this call, this variable should not be
3061 # reassigned. It is used in tha fallback case.
3062 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3063 $SED -e 's|^:*||' -e 's|:*$||'`
3064 case $build in
3065 *mingw* ) # Actually, msys.
3066 # Awkward: cmd appends spaces to result.
3067 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3068 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3069 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3070 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3071 $SED -e "$lt_sed_naive_backslashify"`
3072 ;;
3073 *cygwin* )
3074 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3075 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3076 $SED -e "$lt_sed_naive_backslashify"`
3077 ;;
3078 * )
3079 # unfortunately, winepath doesn't convert pathlists
3080 func_to_host_pathlist_result=""
3081 func_to_host_pathlist_oldIFS=$IFS
3082 IFS=:
3083 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3084 IFS=$func_to_host_pathlist_oldIFS
3085 if test -n "$func_to_host_pathlist_f" ; then
3086 func_to_host_path "$func_to_host_pathlist_f"
3087 if test -n "$func_to_host_path_result" ; then
3088 if test -z "$func_to_host_pathlist_result" ; then
3089 func_to_host_pathlist_result="$func_to_host_path_result"
3090 else
3091 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3092 fi
3093 fi
3094 fi
3095 IFS=:
3096 done
3097 IFS=$func_to_host_pathlist_oldIFS
3098 ;;
3099 esac
3100 if test -z "$func_to_host_pathlist_result" ; then
3101 func_error "Could not determine the host path(s) corresponding to"
3102 func_error " '$1'"
3103 func_error "Continuing, but uninstalled executables may not work."
3104 # Fallback. This may break if $1 contains DOS-style drive
3105 # specifications. The fix is not to complicate the expression
3106 # below, but for the user to provide a working wine installation
3107 # with winepath so that path translation in the cross-to-mingw
3108 # case works properly.
3109 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3110 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3111 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3112 fi
3113 # Now, add the leading and trailing path separators back
3114 case "$1" in
3115 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3116 ;;
3117 esac
3118 case "$1" in
3119 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3120 ;;
3121 esac
3122 ;;
3123 esac
3124 fi
3125}
3126# end: func_to_host_pathlist
3127
3128# func_emit_cwrapperexe_src
3129# emit the source code for a wrapper executable on stdout
3130# Must ONLY be called from within func_mode_link because
3131# it depends on a number of variable set therein.
3132func_emit_cwrapperexe_src ()
3133{
3134 cat <<EOF
3135
3136/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
3137 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3138
3139 The $output program cannot be directly executed until all the libtool
3140 libraries that it depends on are installed.
3141
3142 This wrapper executable should never be moved out of the build directory.
3143 If it is, it will not operate correctly.
3144
3145 Currently, it simply execs the wrapper *script* "$SHELL $output",
3146 but could eventually absorb all of the scripts functionality and
3147 exec $objdir/$outputname directly.
3148*/
3149EOF
3150 cat <<"EOF"
3151#include <stdio.h>
3152#include <stdlib.h>
3153#ifdef _MSC_VER
3154# include <direct.h>
3155# include <process.h>
3156# include <io.h>
3157# define setmode _setmode
3158#else
3159# include <unistd.h>
3160# include <stdint.h>
3161# ifdef __CYGWIN__
3162# include <io.h>
3163# define HAVE_SETENV
3164# ifdef __STRICT_ANSI__
3165char *realpath (const char *, char *);
3166int putenv (char *);
3167int setenv (const char *, const char *, int);
3168# endif
3169# endif
3170#endif
3171#include <malloc.h>
3172#include <stdarg.h>
3173#include <assert.h>
3174#include <string.h>
3175#include <ctype.h>
3176#include <errno.h>
3177#include <fcntl.h>
3178#include <sys/stat.h>
3179
3180#if defined(PATH_MAX)
3181# define LT_PATHMAX PATH_MAX
3182#elif defined(MAXPATHLEN)
3183# define LT_PATHMAX MAXPATHLEN
3184#else
3185# define LT_PATHMAX 1024
3186#endif
3187
3188#ifndef S_IXOTH
3189# define S_IXOTH 0
3190#endif
3191#ifndef S_IXGRP
3192# define S_IXGRP 0
3193#endif
3194
3195#ifdef _MSC_VER
3196# define S_IXUSR _S_IEXEC
3197# define stat _stat
3198# ifndef _INTPTR_T_DEFINED
3199# define intptr_t int
3200# endif
3201#endif
3202
3203#ifndef DIR_SEPARATOR
3204# define DIR_SEPARATOR '/'
3205# define PATH_SEPARATOR ':'
3206#endif
3207
3208#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
3209 defined (__OS2__)
3210# define HAVE_DOS_BASED_FILE_SYSTEM
3211# define FOPEN_WB "wb"
3212# ifndef DIR_SEPARATOR_2
3213# define DIR_SEPARATOR_2 '\\'
3214# endif
3215# ifndef PATH_SEPARATOR_2
3216# define PATH_SEPARATOR_2 ';'
3217# endif
3218#endif
3219
3220#ifndef DIR_SEPARATOR_2
3221# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
3222#else /* DIR_SEPARATOR_2 */
3223# define IS_DIR_SEPARATOR(ch) \
3224 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
3225#endif /* DIR_SEPARATOR_2 */
3226
3227#ifndef PATH_SEPARATOR_2
3228# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
3229#else /* PATH_SEPARATOR_2 */
3230# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
3231#endif /* PATH_SEPARATOR_2 */
3232
3233#ifdef __CYGWIN__
3234# define FOPEN_WB "wb"
3235#endif
3236
3237#ifndef FOPEN_WB
3238# define FOPEN_WB "w"
3239#endif
3240#ifndef _O_BINARY
3241# define _O_BINARY 0
3242#endif
3243
3244#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
3245#define XFREE(stale) do { \
3246 if (stale) { free ((void *) stale); stale = 0; } \
3247} while (0)
3248
3249#undef LTWRAPPER_DEBUGPRINTF
3250#if defined DEBUGWRAPPER
3251# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3252static void
3253ltwrapper_debugprintf (const char *fmt, ...)
3254{
3255 va_list args;
3256 va_start (args, fmt);
3257 (void) vfprintf (stderr, fmt, args);
3258 va_end (args);
3259}
3260#else
3261# define LTWRAPPER_DEBUGPRINTF(args)
3262#endif
3263
3264const char *program_name = NULL;
3265
3266void *xmalloc (size_t num);
3267char *xstrdup (const char *string);
3268const char *base_name (const char *name);
3269char *find_executable (const char *wrapper);
3270char *chase_symlinks (const char *pathspec);
3271int make_executable (const char *path);
3272int check_executable (const char *path);
3273char *strendzap (char *str, const char *pat);
3274void lt_fatal (const char *message, ...);
3275void lt_setenv (const char *name, const char *value);
3276char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3277void lt_opt_process_env_set (const char *arg);
3278void lt_opt_process_env_prepend (const char *arg);
3279void lt_opt_process_env_append (const char *arg);
3280int lt_split_name_value (const char *arg, char** name, char** value);
3281void lt_update_exe_path (const char *name, const char *value);
3282void lt_update_lib_path (const char *name, const char *value);
3283
3284static const char *script_text_part1 =
3285EOF
3286
3287 func_emit_wrapper_part1 yes |
3288 $SED -e 's/\([\\"]\)/\\\1/g' \
3289 -e 's/^/ "/' -e 's/$/\\n"/'
3290 echo ";"
3291 cat <<EOF
3292
3293static const char *script_text_part2 =
3294EOF
3295 func_emit_wrapper_part2 yes |
3296 $SED -e 's/\([\\"]\)/\\\1/g' \
3297 -e 's/^/ "/' -e 's/$/\\n"/'
3298 echo ";"
3299
3300 cat <<EOF
3301const char * MAGIC_EXE = "$magic_exe";
3302const char * LIB_PATH_VARNAME = "$shlibpath_var";
3303EOF
3304
3305 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3306 func_to_host_pathlist "$temp_rpath"
3307 cat <<EOF
3308const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
3309EOF
3310 else
3311 cat <<"EOF"
3312const char * LIB_PATH_VALUE = "";
3313EOF
3314 fi
3315
3316 if test -n "$dllsearchpath"; then
3317 func_to_host_pathlist "$dllsearchpath:"
3318 cat <<EOF
3319const char * EXE_PATH_VARNAME = "PATH";
3320const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
3321EOF
3322 else
3323 cat <<"EOF"
3324const char * EXE_PATH_VARNAME = "";
3325const char * EXE_PATH_VALUE = "";
3326EOF
3327 fi
3328
3329 if test "$fast_install" = yes; then
3330 cat <<EOF
3331const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
3332EOF
3333 else
3334 cat <<EOF
3335const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
3336EOF
3337 fi
3338
3339
3340 cat <<"EOF"
3341
3342#define LTWRAPPER_OPTION_PREFIX "--lt-"
3343#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3344
3345static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
3346static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3347
3348static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3349
3350static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3351static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3352 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3353
3354static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3355static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3356 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3357
3358static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3359static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3360 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3361
3362int
3363main (int argc, char *argv[])
3364{
3365 char **newargz;
3366 int newargc;
3367 char *tmp_pathspec;
3368 char *actual_cwrapper_path;
3369 char *actual_cwrapper_name;
3370 char *target_name;
3371 char *lt_argv_zero;
3372 intptr_t rval = 127;
3373
3374 int i;
3375
3376 program_name = (char *) xstrdup (base_name (argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3378 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3379
3380 /* very simple arg parsing; don't want to rely on getopt */
3381 for (i = 1; i < argc; i++)
3382 {
3383 if (strcmp (argv[i], dumpscript_opt) == 0)
3384 {
3385EOF
3386 case "$host" in
3387 *mingw* | *cygwin* )
3388 # make stdout use "unix" line endings
3389 echo " setmode(1,_O_BINARY);"
3390 ;;
3391 esac
3392
3393 cat <<"EOF"
3394 printf ("%s", script_text_part1);
3395 printf ("%s", script_text_part2);
3396 return 0;
3397 }
3398 }
3399
3400 newargz = XMALLOC (char *, argc + 1);
3401 tmp_pathspec = find_executable (argv[0]);
3402 if (tmp_pathspec == NULL)
3403 lt_fatal ("Couldn't find %s", argv[0]);
3404 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3405 tmp_pathspec));
3406
3407 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3408 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3409 actual_cwrapper_path));
3410 XFREE (tmp_pathspec);
3411
3412 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
3413 strendzap (actual_cwrapper_path, actual_cwrapper_name);
3414
3415 /* wrapper name transforms */
3416 strendzap (actual_cwrapper_name, ".exe");
3417 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
3418 XFREE (actual_cwrapper_name);
3419 actual_cwrapper_name = tmp_pathspec;
3420 tmp_pathspec = 0;
3421
3422 /* target_name transforms -- use actual target program name; might have lt- prefix */
3423 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
3424 strendzap (target_name, ".exe");
3425 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
3426 XFREE (target_name);
3427 target_name = tmp_pathspec;
3428 tmp_pathspec = 0;
3429
3430 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3431 target_name));
3432EOF
3433
3434 cat <<EOF
3435 newargz[0] =
3436 XMALLOC (char, (strlen (actual_cwrapper_path) +
3437 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
3438 strcpy (newargz[0], actual_cwrapper_path);
3439 strcat (newargz[0], "$objdir");
3440 strcat (newargz[0], "/");
3441EOF
3442
3443 cat <<"EOF"
3444 /* stop here, and copy so we don't have to do this twice */
3445 tmp_pathspec = xstrdup (newargz[0]);
3446
3447 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
3448 strcat (newargz[0], actual_cwrapper_name);
3449
3450 /* DO want the lt- prefix here if it exists, so use target_name */
3451 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
3452 XFREE (tmp_pathspec);
3453 tmp_pathspec = NULL;
3454EOF
3455
3456 case $host_os in
3457 mingw*)
3458 cat <<"EOF"
3459 {
3460 char* p;
3461 while ((p = strchr (newargz[0], '\\')) != NULL)
3462 {
3463 *p = '/';
3464 }
3465 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
3466 {
3467 *p = '/';
3468 }
3469 }
3470EOF
3471 ;;
3472 esac
3473
3474 cat <<"EOF"
3475 XFREE (target_name);
3476 XFREE (actual_cwrapper_path);
3477 XFREE (actual_cwrapper_name);
3478
3479 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
3480 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
3481 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3482 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3483
3484 newargc=0;
3485 for (i = 1; i < argc; i++)
3486 {
3487 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3488 {
3489 if (argv[i][env_set_opt_len] == '=')
3490 {
3491 const char *p = argv[i] + env_set_opt_len + 1;
3492 lt_opt_process_env_set (p);
3493 }
3494 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3495 {
3496 lt_opt_process_env_set (argv[++i]); /* don't copy */
3497 }
3498 else
3499 lt_fatal ("%s missing required argument", env_set_opt);
3500 continue;
3501 }
3502 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3503 {
3504 if (argv[i][env_prepend_opt_len] == '=')
3505 {
3506 const char *p = argv[i] + env_prepend_opt_len + 1;
3507 lt_opt_process_env_prepend (p);
3508 }
3509 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3510 {
3511 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3512 }
3513 else
3514 lt_fatal ("%s missing required argument", env_prepend_opt);
3515 continue;
3516 }
3517 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3518 {
3519 if (argv[i][env_append_opt_len] == '=')
3520 {
3521 const char *p = argv[i] + env_append_opt_len + 1;
3522 lt_opt_process_env_append (p);
3523 }
3524 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3525 {
3526 lt_opt_process_env_append (argv[++i]); /* don't copy */
3527 }
3528 else
3529 lt_fatal ("%s missing required argument", env_append_opt);
3530 continue;
3531 }
3532 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3533 {
3534 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3535 namespace, but it is not one of the ones we know about and
3536 have already dealt with, above (inluding dump-script), then
3537 report an error. Otherwise, targets might begin to believe
3538 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3539 namespace. The first time any user complains about this, we'll
3540 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3541 or a configure.ac-settable value.
3542 */
3543 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3544 ltwrapper_option_prefix, argv[i]);
3545 }
3546 /* otherwise ... */
3547 newargz[++newargc] = xstrdup (argv[i]);
3548 }
3549 newargz[++newargc] = NULL;
3550
3551 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
3552 for (i = 0; i < newargc; i++)
3553 {
3554 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
3555 }
3556
3557EOF
3558
3559 case $host_os in
3560 mingw*)
3561 cat <<"EOF"
3562 /* execv doesn't actually work on mingw as expected on unix */
3563 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
3564 if (rval == -1)
3565 {
3566 /* failed to start process */
3567 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
3568 return 127;
3569 }
3570 return rval;
3571EOF
3572 ;;
3573 *)
3574 cat <<"EOF"
3575 execv (lt_argv_zero, newargz);
3576 return rval; /* =127, but avoids unused variable warning */
3577EOF
3578 ;;
3579 esac
3580
3581 cat <<"EOF"
3582}
3583
3584void *
3585xmalloc (size_t num)
3586{
3587 void *p = (void *) malloc (num);
3588 if (!p)
3589 lt_fatal ("Memory exhausted");
3590
3591 return p;
3592}
3593
3594char *
3595xstrdup (const char *string)
3596{
3597 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
3598 string) : NULL;
3599}
3600
3601const char *
3602base_name (const char *name)
3603{
3604 const char *base;
3605
3606#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3607 /* Skip over the disk name in MSDOS pathnames. */
3608 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
3609 name += 2;
3610#endif
3611
3612 for (base = name; *name; name++)
3613 if (IS_DIR_SEPARATOR (*name))
3614 base = name + 1;
3615 return base;
3616}
3617
3618int
3619check_executable (const char *path)
3620{
3621 struct stat st;
3622
3623 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3624 path ? (*path ? path : "EMPTY!") : "NULL!"));
3625 if ((!path) || (!*path))
3626 return 0;
3627
3628 if ((stat (path, &st) >= 0)
3629 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
3630 return 1;
3631 else
3632 return 0;
3633}
3634
3635int
3636make_executable (const char *path)
3637{
3638 int rval = 0;
3639 struct stat st;
3640
3641 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3642 path ? (*path ? path : "EMPTY!") : "NULL!"));
3643 if ((!path) || (!*path))
3644 return 0;
3645
3646 if (stat (path, &st) >= 0)
3647 {
3648 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
3649 }
3650 return rval;
3651}
3652
3653/* Searches for the full path of the wrapper. Returns
3654 newly allocated full path name if found, NULL otherwise
3655 Does not chase symlinks, even on platforms that support them.
3656*/
3657char *
3658find_executable (const char *wrapper)
3659{
3660 int has_slash = 0;
3661 const char *p;
3662 const char *p_next;
3663 /* static buffer for getcwd */
3664 char tmp[LT_PATHMAX + 1];
3665 int tmp_len;
3666 char *concat_name;
3667
3668 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3669 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
3670
3671 if ((wrapper == NULL) || (*wrapper == '\0'))
3672 return NULL;
3673
3674 /* Absolute path? */
3675#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3676 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
3677 {
3678 concat_name = xstrdup (wrapper);
3679 if (check_executable (concat_name))
3680 return concat_name;
3681 XFREE (concat_name);
3682 }
3683 else
3684 {
3685#endif
3686 if (IS_DIR_SEPARATOR (wrapper[0]))
3687 {
3688 concat_name = xstrdup (wrapper);
3689 if (check_executable (concat_name))
3690 return concat_name;
3691 XFREE (concat_name);
3692 }
3693#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3694 }
3695#endif
3696
3697 for (p = wrapper; *p; p++)
3698 if (*p == '/')
3699 {
3700 has_slash = 1;
3701 break;
3702 }
3703 if (!has_slash)
3704 {
3705 /* no slashes; search PATH */
3706 const char *path = getenv ("PATH");
3707 if (path != NULL)
3708 {
3709 for (p = path; *p; p = p_next)
3710 {
3711 const char *q;
3712 size_t p_len;
3713 for (q = p; *q; q++)
3714 if (IS_PATH_SEPARATOR (*q))
3715 break;
3716 p_len = q - p;
3717 p_next = (*q == '\0' ? q : q + 1);
3718 if (p_len == 0)
3719 {
3720 /* empty path: current directory */
3721 if (getcwd (tmp, LT_PATHMAX) == NULL)
3722 lt_fatal ("getcwd failed");
3723 tmp_len = strlen (tmp);
3724 concat_name =
3725 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3726 memcpy (concat_name, tmp, tmp_len);
3727 concat_name[tmp_len] = '/';
3728 strcpy (concat_name + tmp_len + 1, wrapper);
3729 }
3730 else
3731 {
3732 concat_name =
3733 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
3734 memcpy (concat_name, p, p_len);
3735 concat_name[p_len] = '/';
3736 strcpy (concat_name + p_len + 1, wrapper);
3737 }
3738 if (check_executable (concat_name))
3739 return concat_name;
3740 XFREE (concat_name);
3741 }
3742 }
3743 /* not found in PATH; assume curdir */
3744 }
3745 /* Relative path | not found in path: prepend cwd */
3746 if (getcwd (tmp, LT_PATHMAX) == NULL)
3747 lt_fatal ("getcwd failed");
3748 tmp_len = strlen (tmp);
3749 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3750 memcpy (concat_name, tmp, tmp_len);
3751 concat_name[tmp_len] = '/';
3752 strcpy (concat_name + tmp_len + 1, wrapper);
3753
3754 if (check_executable (concat_name))
3755 return concat_name;
3756 XFREE (concat_name);
3757 return NULL;
3758}
3759
3760char *
3761chase_symlinks (const char *pathspec)
3762{
3763#ifndef S_ISLNK
3764 return xstrdup (pathspec);
3765#else
3766 char buf[LT_PATHMAX];
3767 struct stat s;
3768 char *tmp_pathspec = xstrdup (pathspec);
3769 char *p;
3770 int has_symlinks = 0;
3771 while (strlen (tmp_pathspec) && !has_symlinks)
3772 {
3773 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3774 tmp_pathspec));
3775 if (lstat (tmp_pathspec, &s) == 0)
3776 {
3777 if (S_ISLNK (s.st_mode) != 0)
3778 {
3779 has_symlinks = 1;
3780 break;
3781 }
3782
3783 /* search backwards for last DIR_SEPARATOR */
3784 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
3785 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3786 p--;
3787 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3788 {
3789 /* no more DIR_SEPARATORS left */
3790 break;
3791 }
3792 *p = '\0';
3793 }
3794 else
3795 {
3796 char *errstr = strerror (errno);
3797 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
3798 }
3799 }
3800 XFREE (tmp_pathspec);
3801
3802 if (!has_symlinks)
3803 {
3804 return xstrdup (pathspec);
3805 }
3806
3807 tmp_pathspec = realpath (pathspec, buf);
3808 if (tmp_pathspec == 0)
3809 {
3810 lt_fatal ("Could not follow symlinks for %s", pathspec);
3811 }
3812 return xstrdup (tmp_pathspec);
3813#endif
3814}
3815
3816char *
3817strendzap (char *str, const char *pat)
3818{
3819 size_t len, patlen;
3820
3821 assert (str != NULL);
3822 assert (pat != NULL);
3823
3824 len = strlen (str);
3825 patlen = strlen (pat);
3826
3827 if (patlen <= len)
3828 {
3829 str += len - patlen;
3830 if (strcmp (str, pat) == 0)
3831 *str = '\0';
3832 }
3833 return str;
3834}
3835
3836static void
3837lt_error_core (int exit_status, const char *mode,
3838 const char *message, va_list ap)
3839{
3840 fprintf (stderr, "%s: %s: ", program_name, mode);
3841 vfprintf (stderr, message, ap);
3842 fprintf (stderr, ".\n");
3843
3844 if (exit_status >= 0)
3845 exit (exit_status);
3846}
3847
3848void
3849lt_fatal (const char *message, ...)
3850{
3851 va_list ap;
3852 va_start (ap, message);
3853 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
3854 va_end (ap);
3855}
3856
3857void
3858lt_setenv (const char *name, const char *value)
3859{
3860 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3861 (name ? name : "<NULL>"),
3862 (value ? value : "<NULL>")));
3863 {
3864#ifdef HAVE_SETENV
3865 /* always make a copy, for consistency with !HAVE_SETENV */
3866 char *str = xstrdup (value);
3867 setenv (name, str, 1);
3868#else
3869 int len = strlen (name) + 1 + strlen (value) + 1;
3870 char *str = XMALLOC (char, len);
3871 sprintf (str, "%s=%s", name, value);
3872 if (putenv (str) != EXIT_SUCCESS)
3873 {
3874 XFREE (str);
3875 }
3876#endif
3877 }
3878}
3879
3880char *
3881lt_extend_str (const char *orig_value, const char *add, int to_end)
3882{
3883 char *new_value;
3884 if (orig_value && *orig_value)
3885 {
3886 int orig_value_len = strlen (orig_value);
3887 int add_len = strlen (add);
3888 new_value = XMALLOC (char, add_len + orig_value_len + 1);
3889 if (to_end)
3890 {
3891 strcpy (new_value, orig_value);
3892 strcpy (new_value + orig_value_len, add);
3893 }
3894 else
3895 {
3896 strcpy (new_value, add);
3897 strcpy (new_value + add_len, orig_value);
3898 }
3899 }
3900 else
3901 {
3902 new_value = xstrdup (add);
3903 }
3904 return new_value;
3905}
3906
3907int
3908lt_split_name_value (const char *arg, char** name, char** value)
3909{
3910 const char *p;
3911 int len;
3912 if (!arg || !*arg)
3913 return 1;
3914
3915 p = strchr (arg, (int)'=');
3916
3917 if (!p)
3918 return 1;
3919
3920 *value = xstrdup (++p);
3921
3922 len = strlen (arg) - strlen (*value);
3923 *name = XMALLOC (char, len);
3924 strncpy (*name, arg, len-1);
3925 (*name)[len - 1] = '\0';
3926
3927 return 0;
3928}
3929
3930void
3931lt_opt_process_env_set (const char *arg)
3932{
3933 char *name = NULL;
3934 char *value = NULL;
3935
3936 if (lt_split_name_value (arg, &name, &value) != 0)
3937 {
3938 XFREE (name);
3939 XFREE (value);
3940 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3941 }
3942
3943 lt_setenv (name, value);
3944 XFREE (name);
3945 XFREE (value);
3946}
3947
3948void
3949lt_opt_process_env_prepend (const char *arg)
3950{
3951 char *name = NULL;
3952 char *value = NULL;
3953 char *new_value = NULL;
3954
3955 if (lt_split_name_value (arg, &name, &value) != 0)
3956 {
3957 XFREE (name);
3958 XFREE (value);
3959 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3960 }
3961
3962 new_value = lt_extend_str (getenv (name), value, 0);
3963 lt_setenv (name, new_value);
3964 XFREE (new_value);
3965 XFREE (name);
3966 XFREE (value);
3967}
3968
3969void
3970lt_opt_process_env_append (const char *arg)
3971{
3972 char *name = NULL;
3973 char *value = NULL;
3974 char *new_value = NULL;
3975
3976 if (lt_split_name_value (arg, &name, &value) != 0)
3977 {
3978 XFREE (name);
3979 XFREE (value);
3980 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3981 }
3982
3983 new_value = lt_extend_str (getenv (name), value, 1);
3984 lt_setenv (name, new_value);
3985 XFREE (new_value);
3986 XFREE (name);
3987 XFREE (value);
3988}
3989
3990void
3991lt_update_exe_path (const char *name, const char *value)
3992{
3993 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3994 (name ? name : "<NULL>"),
3995 (value ? value : "<NULL>")));
3996
3997 if (name && *name && value && *value)
3998 {
3999 char *new_value = lt_extend_str (getenv (name), value, 0);
4000 /* some systems can't cope with a ':'-terminated path #' */
4001 int len = strlen (new_value);
4002 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4003 {
4004 new_value[len-1] = '\0';
4005 }
4006 lt_setenv (name, new_value);
4007 XFREE (new_value);
4008 }
4009}
4010
4011void
4012lt_update_lib_path (const char *name, const char *value)
4013{
4014 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4015 (name ? name : "<NULL>"),
4016 (value ? value : "<NULL>")));
4017
4018 if (name && *name && value && *value)
4019 {
4020 char *new_value = lt_extend_str (getenv (name), value, 0);
4021 lt_setenv (name, new_value);
4022 XFREE (new_value);
4023 }
4024}
4025
4026
4027EOF
4028}
4029# end: func_emit_cwrapperexe_src
4030
4031# func_mode_link arg...
4032func_mode_link ()
4033{
4034 $opt_debug
4035 case $host in
4036 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4037 # It is impossible to link a dll without this setting, and
4038 # we shouldn't force the makefile maintainer to figure out
4039 # which system we are compiling for in order to pass an extra
4040 # flag for every libtool invocation.
4041 # allow_undefined=no
4042
4043 # FIXME: Unfortunately, there are problems with the above when trying
4044 # to make a dll which has undefined symbols, in which case not
4045 # even a static library is built. For now, we need to specify
4046 # -no-undefined on the libtool link line when we can be certain
4047 # that all symbols are satisfied, otherwise we get a static library.
4048 allow_undefined=yes
4049 ;;
4050 *)
4051 allow_undefined=yes
4052 ;;
4053 esac
4054 libtool_args=$nonopt
4055 base_compile="$nonopt $@"
4056 compile_command=$nonopt
4057 finalize_command=$nonopt
4058
4059 compile_rpath=
4060 finalize_rpath=
4061 compile_shlibpath=
4062 finalize_shlibpath=
4063 convenience=
4064 old_convenience=
4065 deplibs=
4066 old_deplibs=
4067 compiler_flags=
4068 linker_flags=
4069 dllsearchpath=
4070 lib_search_path=`pwd`
4071 inst_prefix_dir=
4072 new_inherited_linker_flags=
4073
4074 avoid_version=no
4075 dlfiles=
4076 dlprefiles=
4077 dlself=no
4078 export_dynamic=no
4079 export_symbols=
4080 export_symbols_regex=
4081 generated=
4082 libobjs=
4083 ltlibs=
4084 module=no
4085 no_install=no
4086 objs=
4087 non_pic_objects=
4088 precious_files_regex=
4089 prefer_static_libs=no
4090 preload=no
4091 prev=
4092 prevarg=
4093 release=
4094 rpath=
4095 xrpath=
4096 perm_rpath=
4097 temp_rpath=
4098 thread_safe=no
4099 vinfo=
4100 vinfo_number=no
4101 weak_libs=
4102 single_module="${wl}-single_module"
4103 func_infer_tag $base_compile
4104
4105 # We need to know -static, to get the right output filenames.
4106 for arg
4107 do
4108 case $arg in
4109 -shared)
4110 test "$build_libtool_libs" != yes && \
4111 func_fatal_configuration "can not build a shared library"
4112 build_old_libs=no
4113 break
4114 ;;
4115 -all-static | -static | -static-libtool-libs)
4116 case $arg in
4117 -all-static)
4118 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
4119 func_warning "complete static linking is impossible in this configuration"
4120 fi
4121 if test -n "$link_static_flag"; then
4122 dlopen_self=$dlopen_self_static
4123 fi
4124 prefer_static_libs=yes
4125 ;;
4126 -static)
4127 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4128 dlopen_self=$dlopen_self_static
4129 fi
4130 prefer_static_libs=built
4131 ;;
4132 -static-libtool-libs)
4133 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4134 dlopen_self=$dlopen_self_static
4135 fi
4136 prefer_static_libs=yes
4137 ;;
4138 esac
4139 build_libtool_libs=no
4140 build_old_libs=yes
4141 break
4142 ;;
4143 esac
4144 done
4145
4146 # See if our shared archives depend on static archives.
4147 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
4148
4149 # Go through the arguments, transforming them on the way.
4150 while test "$#" -gt 0; do
4151 arg="$1"
4152 shift
4153 func_quote_for_eval "$arg"
4154 qarg=$func_quote_for_eval_unquoted_result
4155 func_append libtool_args " $func_quote_for_eval_result"
4156
4157 # If the previous option needs an argument, assign it.
4158 if test -n "$prev"; then
4159 case $prev in
4160 output)
4161 func_append compile_command " @OUTPUT@"
4162 func_append finalize_command " @OUTPUT@"
4163 ;;
4164 esac
4165
4166 case $prev in
4167 dlfiles|dlprefiles)
4168 if test "$preload" = no; then
4169 # Add the symbol object into the linking commands.
4170 func_append compile_command " @SYMFILE@"
4171 func_append finalize_command " @SYMFILE@"
4172 preload=yes
4173 fi
4174 case $arg in
4175 *.la | *.lo) ;; # We handle these cases below.
4176 force)
4177 if test "$dlself" = no; then
4178 dlself=needless
4179 export_dynamic=yes
4180 fi
4181 prev=
4182 continue
4183 ;;
4184 self)
4185 if test "$prev" = dlprefiles; then
4186 dlself=yes
4187 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
4188 dlself=yes
4189 else
4190 dlself=needless
4191 export_dynamic=yes
4192 fi
4193 prev=
4194 continue
4195 ;;
4196 *)
4197 if test "$prev" = dlfiles; then
4198 dlfiles="$dlfiles $arg"
4199 else
4200 dlprefiles="$dlprefiles $arg"
4201 fi
4202 prev=
4203 continue
4204 ;;
4205 esac
4206 ;;
4207 expsyms)
4208 export_symbols="$arg"
4209 test -f "$arg" \
4210 || func_fatal_error "symbol file \`$arg' does not exist"
4211 prev=
4212 continue
4213 ;;
4214 expsyms_regex)
4215 export_symbols_regex="$arg"
4216 prev=
4217 continue
4218 ;;
4219 framework)
4220 case $host in
4221 *-*-darwin*)
4222 case "$deplibs " in
4223 *" $qarg.ltframework "*) ;;
4224 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
4225 ;;
4226 esac
4227 ;;
4228 esac
4229 prev=
4230 continue
4231 ;;
4232 inst_prefix)
4233 inst_prefix_dir="$arg"
4234 prev=
4235 continue
4236 ;;
4237 objectlist)
4238 if test -f "$arg"; then
4239 save_arg=$arg
4240 moreargs=
4241 for fil in `cat "$save_arg"`
4242 do
4243# moreargs="$moreargs $fil"
4244 arg=$fil
4245 # A libtool-controlled object.
4246
4247 # Check to see that this really is a libtool object.
4248 if func_lalib_unsafe_p "$arg"; then
4249 pic_object=
4250 non_pic_object=
4251
4252 # Read the .lo file
4253 func_source "$arg"
4254
4255 if test -z "$pic_object" ||
4256 test -z "$non_pic_object" ||
4257 test "$pic_object" = none &&
4258 test "$non_pic_object" = none; then
4259 func_fatal_error "cannot find name of object for \`$arg'"
4260 fi
4261
4262 # Extract subdirectory from the argument.
4263 func_dirname "$arg" "/" ""
4264 xdir="$func_dirname_result"
4265
4266 if test "$pic_object" != none; then
4267 # Prepend the subdirectory the object is found in.
4268 pic_object="$xdir$pic_object"
4269
4270 if test "$prev" = dlfiles; then
4271 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4272 dlfiles="$dlfiles $pic_object"
4273 prev=
4274 continue
4275 else
4276 # If libtool objects are unsupported, then we need to preload.
4277 prev=dlprefiles
4278 fi
4279 fi
4280
4281 # CHECK ME: I think I busted this. -Ossama
4282 if test "$prev" = dlprefiles; then
4283 # Preload the old-style object.
4284 dlprefiles="$dlprefiles $pic_object"
4285 prev=
4286 fi
4287
4288 # A PIC object.
4289 func_append libobjs " $pic_object"
4290 arg="$pic_object"
4291 fi
4292
4293 # Non-PIC object.
4294 if test "$non_pic_object" != none; then
4295 # Prepend the subdirectory the object is found in.
4296 non_pic_object="$xdir$non_pic_object"
4297
4298 # A standard non-PIC object
4299 func_append non_pic_objects " $non_pic_object"
4300 if test -z "$pic_object" || test "$pic_object" = none ; then
4301 arg="$non_pic_object"
4302 fi
4303 else
4304 # If the PIC object exists, use it instead.
4305 # $xdir was prepended to $pic_object above.
4306 non_pic_object="$pic_object"
4307 func_append non_pic_objects " $non_pic_object"
4308 fi
4309 else
4310 # Only an error if not doing a dry-run.
4311 if $opt_dry_run; then
4312 # Extract subdirectory from the argument.
4313 func_dirname "$arg" "/" ""
4314 xdir="$func_dirname_result"
4315
4316 func_lo2o "$arg"
4317 pic_object=$xdir$objdir/$func_lo2o_result
4318 non_pic_object=$xdir$func_lo2o_result
4319 func_append libobjs " $pic_object"
4320 func_append non_pic_objects " $non_pic_object"
4321 else
4322 func_fatal_error "\`$arg' is not a valid libtool object"
4323 fi
4324 fi
4325 done
4326 else
4327 func_fatal_error "link input file \`$arg' does not exist"
4328 fi
4329 arg=$save_arg
4330 prev=
4331 continue
4332 ;;
4333 precious_regex)
4334 precious_files_regex="$arg"
4335 prev=
4336 continue
4337 ;;
4338 release)
4339 release="-$arg"
4340 prev=
4341 continue
4342 ;;
4343 rpath | xrpath)
4344 # We need an absolute path.
4345 case $arg in
4346 [\\/]* | [A-Za-z]:[\\/]*) ;;
4347 *)
4348 func_fatal_error "only absolute run-paths are allowed"
4349 ;;
4350 esac
4351 if test "$prev" = rpath; then
4352 case "$rpath " in
4353 *" $arg "*) ;;
4354 *) rpath="$rpath $arg" ;;
4355 esac
4356 else
4357 case "$xrpath " in
4358 *" $arg "*) ;;
4359 *) xrpath="$xrpath $arg" ;;
4360 esac
4361 fi
4362 prev=
4363 continue
4364 ;;
4365 shrext)
4366 shrext_cmds="$arg"
4367 prev=
4368 continue
4369 ;;
4370 weak)
4371 weak_libs="$weak_libs $arg"
4372 prev=
4373 continue
4374 ;;
4375 xcclinker)
4376 linker_flags="$linker_flags $qarg"
4377 compiler_flags="$compiler_flags $qarg"
4378 prev=
4379 func_append compile_command " $qarg"
4380 func_append finalize_command " $qarg"
4381 continue
4382 ;;
4383 xcompiler)
4384 compiler_flags="$compiler_flags $qarg"
4385 prev=
4386 func_append compile_command " $qarg"
4387 func_append finalize_command " $qarg"
4388 continue
4389 ;;
4390 xlinker)
4391 linker_flags="$linker_flags $qarg"
4392 compiler_flags="$compiler_flags $wl$qarg"
4393 prev=
4394 func_append compile_command " $wl$qarg"
4395 func_append finalize_command " $wl$qarg"
4396 continue
4397 ;;
4398 *)
4399 eval "$prev=\"\$arg\""
4400 prev=
4401 continue
4402 ;;
4403 esac
4404 fi # test -n "$prev"
4405
4406 prevarg="$arg"
4407
4408 case $arg in
4409 -all-static)
4410 if test -n "$link_static_flag"; then
4411 # See comment for -static flag below, for more details.
4412 func_append compile_command " $link_static_flag"
4413 func_append finalize_command " $link_static_flag"
4414 fi
4415 continue
4416 ;;
4417
4418 -allow-undefined)
4419 # FIXME: remove this flag sometime in the future.
4420 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
4421 ;;
4422
4423 -avoid-version)
4424 avoid_version=yes
4425 continue
4426 ;;
4427
4428 -dlopen)
4429 prev=dlfiles
4430 continue
4431 ;;
4432
4433 -dlpreopen)
4434 prev=dlprefiles
4435 continue
4436 ;;
4437
4438 -export-dynamic)
4439 export_dynamic=yes
4440 continue
4441 ;;
4442
4443 -export-symbols | -export-symbols-regex)
4444 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
4445 func_fatal_error "more than one -exported-symbols argument is not allowed"
4446 fi
4447 if test "X$arg" = "X-export-symbols"; then
4448 prev=expsyms
4449 else
4450 prev=expsyms_regex
4451 fi
4452 continue
4453 ;;
4454
4455 -framework)
4456 prev=framework
4457 continue
4458 ;;
4459
4460 -inst-prefix-dir)
4461 prev=inst_prefix
4462 continue
4463 ;;
4464
4465 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
4466 # so, if we see these flags be careful not to treat them like -L
4467 -L[A-Z][A-Z]*:*)
4468 case $with_gcc/$host in
4469 no/*-*-irix* | /*-*-irix*)
4470 func_append compile_command " $arg"
4471 func_append finalize_command " $arg"
4472 ;;
4473 esac
4474 continue
4475 ;;
4476
4477 -L*)
4478 func_stripname '-L' '' "$arg"
4479 dir=$func_stripname_result
4480 if test -z "$dir"; then
4481 if test "$#" -gt 0; then
4482 func_fatal_error "require no space between \`-L' and \`$1'"
4483 else
4484 func_fatal_error "need path for \`-L' option"
4485 fi
4486 fi
4487 # We need an absolute path.
4488 case $dir in
4489 [\\/]* | [A-Za-z]:[\\/]*) ;;
4490 *)
4491 absdir=`cd "$dir" && pwd`
4492 test -z "$absdir" && \
4493 func_fatal_error "cannot determine absolute directory name of \`$dir'"
4494 dir="$absdir"
4495 ;;
4496 esac
4497 case "$deplibs " in
4498 *" -L$dir "*) ;;
4499 *)
4500 deplibs="$deplibs -L$dir"
4501 lib_search_path="$lib_search_path $dir"
4502 ;;
4503 esac
4504 case $host in
4505 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4506 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4507 case :$dllsearchpath: in
4508 *":$dir:"*) ;;
4509 ::) dllsearchpath=$dir;;
4510 *) dllsearchpath="$dllsearchpath:$dir";;
4511 esac
4512 case :$dllsearchpath: in
4513 *":$testbindir:"*) ;;
4514 ::) dllsearchpath=$testbindir;;
4515 *) dllsearchpath="$dllsearchpath:$testbindir";;
4516 esac
4517 ;;
4518 esac
4519 continue
4520 ;;
4521
4522 -l*)
4523 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4524 case $host in
4525 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
4526 # These systems don't actually have a C or math library (as such)
4527 continue
4528 ;;
4529 *-*-os2*)
4530 # These systems don't actually have a C library (as such)
4531 test "X$arg" = "X-lc" && continue
4532 ;;
4533 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4534 # Do not include libc due to us having libc/libc_r.
4535 test "X$arg" = "X-lc" && continue
4536 ;;
4537 *-*-rhapsody* | *-*-darwin1.[012])
4538 # Rhapsody C and math libraries are in the System framework
4539 deplibs="$deplibs System.ltframework"
4540 continue
4541 ;;
4542 *-*-sco3.2v5* | *-*-sco5v6*)
4543 # Causes problems with __ctype
4544 test "X$arg" = "X-lc" && continue
4545 ;;
4546 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
4547 # Compiler inserts libc in the correct place for threads to work
4548 test "X$arg" = "X-lc" && continue
4549 ;;
4550 esac
4551 elif test "X$arg" = "X-lc_r"; then
4552 case $host in
4553 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4554 # Do not include libc_r directly, use -pthread flag.
4555 continue
4556 ;;
4557 esac
4558 fi
4559 deplibs="$deplibs $arg"
4560 continue
4561 ;;
4562
4563 -module)
4564 module=yes
4565 continue
4566 ;;
4567
4568 # Tru64 UNIX uses -model [arg] to determine the layout of C++
4569 # classes, name mangling, and exception handling.
4570 # Darwin uses the -arch flag to determine output architecture.
4571 -model|-arch|-isysroot)
4572 compiler_flags="$compiler_flags $arg"
4573 func_append compile_command " $arg"
4574 func_append finalize_command " $arg"
4575 prev=xcompiler
4576 continue
4577 ;;
4578
4579 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4580 compiler_flags="$compiler_flags $arg"
4581 func_append compile_command " $arg"
4582 func_append finalize_command " $arg"
4583 case "$new_inherited_linker_flags " in
4584 *" $arg "*) ;;
4585 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
4586 esac
4587 continue
4588 ;;
4589
4590 -multi_module)
4591 single_module="${wl}-multi_module"
4592 continue
4593 ;;
4594
4595 -no-fast-install)
4596 fast_install=no
4597 continue
4598 ;;
4599
4600 -no-install)
4601 case $host in
4602 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
4603 # The PATH hackery in wrapper scripts is required on Windows
4604 # and Darwin in order for the loader to find any dlls it needs.
4605 func_warning "\`-no-install' is ignored for $host"
4606 func_warning "assuming \`-no-fast-install' instead"
4607 fast_install=no
4608 ;;
4609 *) no_install=yes ;;
4610 esac
4611 continue
4612 ;;
4613
4614 -no-undefined)
4615 allow_undefined=no
4616 continue
4617 ;;
4618
4619 -objectlist)
4620 prev=objectlist
4621 continue
4622 ;;
4623
4624 -o) prev=output ;;
4625
4626 -precious-files-regex)
4627 prev=precious_regex
4628 continue
4629 ;;
4630
4631 -release)
4632 prev=release
4633 continue
4634 ;;
4635
4636 -rpath)
4637 prev=rpath
4638 continue
4639 ;;
4640
4641 -R)
4642 prev=xrpath
4643 continue
4644 ;;
4645
4646 -R*)
4647 func_stripname '-R' '' "$arg"
4648 dir=$func_stripname_result
4649 # We need an absolute path.
4650 case $dir in
4651 [\\/]* | [A-Za-z]:[\\/]*) ;;
4652 *)
4653 func_fatal_error "only absolute run-paths are allowed"
4654 ;;
4655 esac
4656 case "$xrpath " in
4657 *" $dir "*) ;;
4658 *) xrpath="$xrpath $dir" ;;
4659 esac
4660 continue
4661 ;;
4662
4663 -shared)
4664 # The effects of -shared are defined in a previous loop.
4665 continue
4666 ;;
4667
4668 -shrext)
4669 prev=shrext
4670 continue
4671 ;;
4672
4673 -static | -static-libtool-libs)
4674 # The effects of -static are defined in a previous loop.
4675 # We used to do the same as -all-static on platforms that
4676 # didn't have a PIC flag, but the assumption that the effects
4677 # would be equivalent was wrong. It would break on at least
4678 # Digital Unix and AIX.
4679 continue
4680 ;;
4681
4682 -thread-safe)
4683 thread_safe=yes
4684 continue
4685 ;;
4686
4687 -version-info)
4688 prev=vinfo
4689 continue
4690 ;;
4691
4692 -version-number)
4693 prev=vinfo
4694 vinfo_number=yes
4695 continue
4696 ;;
4697
4698 -weak)
4699 prev=weak
4700 continue
4701 ;;
4702
4703 -Wc,*)
4704 func_stripname '-Wc,' '' "$arg"
4705 args=$func_stripname_result
4706 arg=
4707 save_ifs="$IFS"; IFS=','
4708 for flag in $args; do
4709 IFS="$save_ifs"
4710 func_quote_for_eval "$flag"
4711 arg="$arg $wl$func_quote_for_eval_result"
4712 compiler_flags="$compiler_flags $func_quote_for_eval_result"
4713 done
4714 IFS="$save_ifs"
4715 func_stripname ' ' '' "$arg"
4716 arg=$func_stripname_result
4717 ;;
4718
4719 -Wl,*)
4720 func_stripname '-Wl,' '' "$arg"
4721 args=$func_stripname_result
4722 arg=
4723 save_ifs="$IFS"; IFS=','
4724 for flag in $args; do
4725 IFS="$save_ifs"
4726 func_quote_for_eval "$flag"
4727 arg="$arg $wl$func_quote_for_eval_result"
4728 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4729 linker_flags="$linker_flags $func_quote_for_eval_result"
4730 done
4731 IFS="$save_ifs"
4732 func_stripname ' ' '' "$arg"
4733 arg=$func_stripname_result
4734 ;;
4735
4736 -Xcompiler)
4737 prev=xcompiler
4738 continue
4739 ;;
4740
4741 -Xlinker)
4742 prev=xlinker
4743 continue
4744 ;;
4745
4746 -XCClinker)
4747 prev=xcclinker
4748 continue
4749 ;;
4750
4751 # -msg_* for osf cc
4752 -msg_*)
4753 func_quote_for_eval "$arg"
4754 arg="$func_quote_for_eval_result"
4755 ;;
4756
4757 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4758 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4759 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4760 # +DA*, +DD* enable 64-bit mode on the HP compiler
4761 # -q* pass through compiler args for the IBM compiler
4762 # -m*, -t[45]*, -txscale* pass through architecture-specific
4763 # compiler args for GCC
4764 # -F/path gives path to uninstalled frameworks, gcc on darwin
4765 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4766 # @file GCC response files
4767 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4768 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
4769 func_quote_for_eval "$arg"
4770 arg="$func_quote_for_eval_result"
4771 func_append compile_command " $arg"
4772 func_append finalize_command " $arg"
4773 compiler_flags="$compiler_flags $arg"
4774 continue
4775 ;;
4776
4777 # Some other compiler flag.
4778 -* | +*)
4779 func_quote_for_eval "$arg"
4780 arg="$func_quote_for_eval_result"
4781 ;;
4782
4783 *.$objext)
4784 # A standard object.
4785 objs="$objs $arg"
4786 ;;
4787
4788 *.lo)
4789 # A libtool-controlled object.
4790
4791 # Check to see that this really is a libtool object.
4792 if func_lalib_unsafe_p "$arg"; then
4793 pic_object=
4794 non_pic_object=
4795
4796 # Read the .lo file
4797 func_source "$arg"
4798
4799 if test -z "$pic_object" ||
4800 test -z "$non_pic_object" ||
4801 test "$pic_object" = none &&
4802 test "$non_pic_object" = none; then
4803 func_fatal_error "cannot find name of object for \`$arg'"
4804 fi
4805
4806 # Extract subdirectory from the argument.
4807 func_dirname "$arg" "/" ""
4808 xdir="$func_dirname_result"
4809
4810 if test "$pic_object" != none; then
4811 # Prepend the subdirectory the object is found in.
4812 pic_object="$xdir$pic_object"
4813
4814 if test "$prev" = dlfiles; then
4815 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4816 dlfiles="$dlfiles $pic_object"
4817 prev=
4818 continue
4819 else
4820 # If libtool objects are unsupported, then we need to preload.
4821 prev=dlprefiles
4822 fi
4823 fi
4824
4825 # CHECK ME: I think I busted this. -Ossama
4826 if test "$prev" = dlprefiles; then
4827 # Preload the old-style object.
4828 dlprefiles="$dlprefiles $pic_object"
4829 prev=
4830 fi
4831
4832 # A PIC object.
4833 func_append libobjs " $pic_object"
4834 arg="$pic_object"
4835 fi
4836
4837 # Non-PIC object.
4838 if test "$non_pic_object" != none; then
4839 # Prepend the subdirectory the object is found in.
4840 non_pic_object="$xdir$non_pic_object"
4841
4842 # A standard non-PIC object
4843 func_append non_pic_objects " $non_pic_object"
4844 if test -z "$pic_object" || test "$pic_object" = none ; then
4845 arg="$non_pic_object"
4846 fi
4847 else
4848 # If the PIC object exists, use it instead.
4849 # $xdir was prepended to $pic_object above.
4850 non_pic_object="$pic_object"
4851 func_append non_pic_objects " $non_pic_object"
4852 fi
4853 else
4854 # Only an error if not doing a dry-run.
4855 if $opt_dry_run; then
4856 # Extract subdirectory from the argument.
4857 func_dirname "$arg" "/" ""
4858 xdir="$func_dirname_result"
4859
4860 func_lo2o "$arg"
4861 pic_object=$xdir$objdir/$func_lo2o_result
4862 non_pic_object=$xdir$func_lo2o_result
4863 func_append libobjs " $pic_object"
4864 func_append non_pic_objects " $non_pic_object"
4865 else
4866 func_fatal_error "\`$arg' is not a valid libtool object"
4867 fi
4868 fi
4869 ;;
4870
4871 *.$libext)
4872 # An archive.
4873 deplibs="$deplibs $arg"
4874 old_deplibs="$old_deplibs $arg"
4875 continue
4876 ;;
4877
4878 *.la)
4879 # A libtool-controlled library.
4880
4881 if test "$prev" = dlfiles; then
4882 # This library was specified with -dlopen.
4883 dlfiles="$dlfiles $arg"
4884 prev=
4885 elif test "$prev" = dlprefiles; then
4886 # The library was specified with -dlpreopen.
4887 dlprefiles="$dlprefiles $arg"
4888 prev=
4889 else
4890 deplibs="$deplibs $arg"
4891 fi
4892 continue
4893 ;;
4894
4895 # Some other compiler argument.
4896 *)
4897 # Unknown arguments in both finalize_command and compile_command need
4898 # to be aesthetically quoted because they are evaled later.
4899 func_quote_for_eval "$arg"
4900 arg="$func_quote_for_eval_result"
4901 ;;
4902 esac # arg
4903
4904 # Now actually substitute the argument into the commands.
4905 if test -n "$arg"; then
4906 func_append compile_command " $arg"
4907 func_append finalize_command " $arg"
4908 fi
4909 done # argument parsing loop
4910
4911 test -n "$prev" && \
4912 func_fatal_help "the \`$prevarg' option requires an argument"
4913
4914 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
4915 eval arg=\"$export_dynamic_flag_spec\"
4916 func_append compile_command " $arg"
4917 func_append finalize_command " $arg"
4918 fi
4919
4920 oldlibs=
4921 # calculate the name of the file, without its directory
4922 func_basename "$output"
4923 outputname="$func_basename_result"
4924 libobjs_save="$libobjs"
4925
4926 if test -n "$shlibpath_var"; then
4927 # get the directories listed in $shlibpath_var
4928 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
4929 else
4930 shlib_search_path=
4931 fi
4932 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
4933 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
4934
4935 func_dirname "$output" "/" ""
4936 output_objdir="$func_dirname_result$objdir"
4937 # Create the object directory.
4938 func_mkdir_p "$output_objdir"
4939
4940 # Determine the type of output
4941 case $output in
4942 "")
4943 func_fatal_help "you must specify an output file"
4944 ;;
4945 *.$libext) linkmode=oldlib ;;
4946 *.lo | *.$objext) linkmode=obj ;;
4947 *.la) linkmode=lib ;;
4948 *) linkmode=prog ;; # Anything else should be a program.
4949 esac
4950
4951 specialdeplibs=
4952
4953 libs=
4954 # Find all interdependent deplibs by searching for libraries
4955 # that are linked more than once (e.g. -la -lb -la)
4956 for deplib in $deplibs; do
4957 if $opt_duplicate_deps ; then
4958 case "$libs " in
4959 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4960 esac
4961 fi
4962 libs="$libs $deplib"
4963 done
4964
4965 if test "$linkmode" = lib; then
4966 libs="$predeps $libs $compiler_lib_search_path $postdeps"
4967
4968 # Compute libraries that are listed more than once in $predeps
4969 # $postdeps and mark them as special (i.e., whose duplicates are
4970 # not to be eliminated).
4971 pre_post_deps=
4972 if $opt_duplicate_compiler_generated_deps; then
4973 for pre_post_dep in $predeps $postdeps; do
4974 case "$pre_post_deps " in
4975 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
4976 esac
4977 pre_post_deps="$pre_post_deps $pre_post_dep"
4978 done
4979 fi
4980 pre_post_deps=
4981 fi
4982
4983 deplibs=
4984 newdependency_libs=
4985 newlib_search_path=
4986 need_relink=no # whether we're linking any uninstalled libtool libraries
4987 notinst_deplibs= # not-installed libtool libraries
4988 notinst_path= # paths that contain not-installed libtool libraries
4989
4990 case $linkmode in
4991 lib)
4992 passes="conv dlpreopen link"
4993 for file in $dlfiles $dlprefiles; do
4994 case $file in
4995 *.la) ;;
4996 *)
4997 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
4998 ;;
4999 esac
5000 done
5001 ;;
5002 prog)
5003 compile_deplibs=
5004 finalize_deplibs=
5005 alldeplibs=no
5006 newdlfiles=
5007 newdlprefiles=
5008 passes="conv scan dlopen dlpreopen link"
5009 ;;
5010 *) passes="conv"
5011 ;;
5012 esac
5013
5014 for pass in $passes; do
5015 # The preopen pass in lib mode reverses $deplibs; put it back here
5016 # so that -L comes before libs that need it for instance...
5017 if test "$linkmode,$pass" = "lib,link"; then
5018 ## FIXME: Find the place where the list is rebuilt in the wrong
5019 ## order, and fix it there properly
5020 tmp_deplibs=
5021 for deplib in $deplibs; do
5022 tmp_deplibs="$deplib $tmp_deplibs"
5023 done
5024 deplibs="$tmp_deplibs"
5025 fi
5026
5027 if test "$linkmode,$pass" = "lib,link" ||
5028 test "$linkmode,$pass" = "prog,scan"; then
5029 libs="$deplibs"
5030 deplibs=
5031 fi
5032 if test "$linkmode" = prog; then
5033 case $pass in
5034 dlopen) libs="$dlfiles" ;;
5035 dlpreopen) libs="$dlprefiles" ;;
5036 link)
5037 libs="$deplibs %DEPLIBS%"
5038 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5039 ;;
5040 esac
5041 fi
5042 if test "$linkmode,$pass" = "lib,dlpreopen"; then
5043 # Collect and forward deplibs of preopened libtool libs
5044 for lib in $dlprefiles; do
5045 # Ignore non-libtool-libs
5046 dependency_libs=
5047 case $lib in
5048 *.la) func_source "$lib" ;;
5049 esac
5050
5051 # Collect preopened libtool deplibs, except any this library
5052 # has declared as weak libs
5053 for deplib in $dependency_libs; do
5054 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
5055 case " $weak_libs " in
5056 *" $deplib_base "*) ;;
5057 *) deplibs="$deplibs $deplib" ;;
5058 esac
5059 done
5060 done
5061 libs="$dlprefiles"
5062 fi
5063 if test "$pass" = dlopen; then
5064 # Collect dlpreopened libraries
5065 save_deplibs="$deplibs"
5066 deplibs=
5067 fi
5068
5069 for deplib in $libs; do
5070 lib=
5071 found=no
5072 case $deplib in
5073 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5074 if test "$linkmode,$pass" = "prog,link"; then
5075 compile_deplibs="$deplib $compile_deplibs"
5076 finalize_deplibs="$deplib $finalize_deplibs"
5077 else
5078 compiler_flags="$compiler_flags $deplib"
5079 if test "$linkmode" = lib ; then
5080 case "$new_inherited_linker_flags " in
5081 *" $deplib "*) ;;
5082 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5083 esac
5084 fi
5085 fi
5086 continue
5087 ;;
5088 -l*)
5089 if test "$linkmode" != lib && test "$linkmode" != prog; then
5090 func_warning "\`-l' is ignored for archives/objects"
5091 continue
5092 fi
5093 func_stripname '-l' '' "$deplib"
5094 name=$func_stripname_result
5095 if test "$linkmode" = lib; then
5096 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
5097 else
5098 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
5099 fi
5100 for searchdir in $searchdirs; do
5101 for search_ext in .la $std_shrext .so .a; do
5102 # Search the libtool library
5103 lib="$searchdir/lib${name}${search_ext}"
5104 if test -f "$lib"; then
5105 if test "$search_ext" = ".la"; then
5106 found=yes
5107 else
5108 found=no
5109 fi
5110 break 2
5111 fi
5112 done
5113 done
5114 if test "$found" != yes; then
5115 # deplib doesn't seem to be a libtool library
5116 if test "$linkmode,$pass" = "prog,link"; then
5117 compile_deplibs="$deplib $compile_deplibs"
5118 finalize_deplibs="$deplib $finalize_deplibs"
5119 else
5120 deplibs="$deplib $deplibs"
5121 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5122 fi
5123 continue
5124 else # deplib is a libtool library
5125 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
5126 # We need to do some special things here, and not later.
5127 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5128 case " $predeps $postdeps " in
5129 *" $deplib "*)
5130 if func_lalib_p "$lib"; then
5131 library_names=
5132 old_library=
5133 func_source "$lib"
5134 for l in $old_library $library_names; do
5135 ll="$l"
5136 done
5137 if test "X$ll" = "X$old_library" ; then # only static version available
5138 found=no
5139 func_dirname "$lib" "" "."
5140 ladir="$func_dirname_result"
5141 lib=$ladir/$old_library
5142 if test "$linkmode,$pass" = "prog,link"; then
5143 compile_deplibs="$deplib $compile_deplibs"
5144 finalize_deplibs="$deplib $finalize_deplibs"
5145 else
5146 deplibs="$deplib $deplibs"
5147 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5148 fi
5149 continue
5150 fi
5151 fi
5152 ;;
5153 *) ;;
5154 esac
5155 fi
5156 fi
5157 ;; # -l
5158 *.ltframework)
5159 if test "$linkmode,$pass" = "prog,link"; then
5160 compile_deplibs="$deplib $compile_deplibs"
5161 finalize_deplibs="$deplib $finalize_deplibs"
5162 else
5163 deplibs="$deplib $deplibs"
5164 if test "$linkmode" = lib ; then
5165 case "$new_inherited_linker_flags " in
5166 *" $deplib "*) ;;
5167 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5168 esac
5169 fi
5170 fi
5171 continue
5172 ;;
5173 -L*)
5174 case $linkmode in
5175 lib)
5176 deplibs="$deplib $deplibs"
5177 test "$pass" = conv && continue
5178 newdependency_libs="$deplib $newdependency_libs"
5179 func_stripname '-L' '' "$deplib"
5180 newlib_search_path="$newlib_search_path $func_stripname_result"
5181 ;;
5182 prog)
5183 if test "$pass" = conv; then
5184 deplibs="$deplib $deplibs"
5185 continue
5186 fi
5187 if test "$pass" = scan; then
5188 deplibs="$deplib $deplibs"
5189 else
5190 compile_deplibs="$deplib $compile_deplibs"
5191 finalize_deplibs="$deplib $finalize_deplibs"
5192 fi
5193 func_stripname '-L' '' "$deplib"
5194 newlib_search_path="$newlib_search_path $func_stripname_result"
5195 ;;
5196 *)
5197 func_warning "\`-L' is ignored for archives/objects"
5198 ;;
5199 esac # linkmode
5200 continue
5201 ;; # -L
5202 -R*)
5203 if test "$pass" = link; then
5204 func_stripname '-R' '' "$deplib"
5205 dir=$func_stripname_result
5206 # Make sure the xrpath contains only unique directories.
5207 case "$xrpath " in
5208 *" $dir "*) ;;
5209 *) xrpath="$xrpath $dir" ;;
5210 esac
5211 fi
5212 deplibs="$deplib $deplibs"
5213 continue
5214 ;;
5215 *.la) lib="$deplib" ;;
5216 *.$libext)
5217 if test "$pass" = conv; then
5218 deplibs="$deplib $deplibs"
5219 continue
5220 fi
5221 case $linkmode in
5222 lib)
5223 # Linking convenience modules into shared libraries is allowed,
5224 # but linking other static libraries is non-portable.
5225 case " $dlpreconveniencelibs " in
5226 *" $deplib "*) ;;
5227 *)
5228 valid_a_lib=no
5229 case $deplibs_check_method in
5230 match_pattern*)
5231 set dummy $deplibs_check_method; shift
5232 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5233 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
5234 | $EGREP "$match_pattern_regex" > /dev/null; then
5235 valid_a_lib=yes
5236 fi
5237 ;;
5238 pass_all)
5239 valid_a_lib=yes
5240 ;;
5241 esac
5242 if test "$valid_a_lib" != yes; then
5243 $ECHO
5244 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5245 $ECHO "*** I have the capability to make that library automatically link in when"
5246 $ECHO "*** you link to this library. But I can only do this if you have a"
5247 $ECHO "*** shared version of the library, which you do not appear to have"
5248 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5249 $ECHO "*** that it is just a static archive that I should not use here."
5250 else
5251 $ECHO
5252 $ECHO "*** Warning: Linking the shared library $output against the"
5253 $ECHO "*** static library $deplib is not portable!"
5254 deplibs="$deplib $deplibs"
5255 fi
5256 ;;
5257 esac
5258 continue
5259 ;;
5260 prog)
5261 if test "$pass" != link; then
5262 deplibs="$deplib $deplibs"
5263 else
5264 compile_deplibs="$deplib $compile_deplibs"
5265 finalize_deplibs="$deplib $finalize_deplibs"
5266 fi
5267 continue
5268 ;;
5269 esac # linkmode
5270 ;; # *.$libext
5271 *.lo | *.$objext)
5272 if test "$pass" = conv; then
5273 deplibs="$deplib $deplibs"
5274 elif test "$linkmode" = prog; then
5275 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5276 # If there is no dlopen support or we're linking statically,
5277 # we need to preload.
5278 newdlprefiles="$newdlprefiles $deplib"
5279 compile_deplibs="$deplib $compile_deplibs"
5280 finalize_deplibs="$deplib $finalize_deplibs"
5281 else
5282 newdlfiles="$newdlfiles $deplib"
5283 fi
5284 fi
5285 continue
5286 ;;
5287 %DEPLIBS%)
5288 alldeplibs=yes
5289 continue
5290 ;;
5291 esac # case $deplib
5292
5293 if test "$found" = yes || test -f "$lib"; then :
5294 else
5295 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
5296 fi
5297
5298 # Check to see that this really is a libtool archive.
5299 func_lalib_unsafe_p "$lib" \
5300 || func_fatal_error "\`$lib' is not a valid libtool archive"
5301
5302 func_dirname "$lib" "" "."
5303 ladir="$func_dirname_result"
5304
5305 dlname=
5306 dlopen=
5307 dlpreopen=
5308 libdir=
5309 library_names=
5310 old_library=
5311 inherited_linker_flags=
5312 # If the library was installed with an old release of libtool,
5313 # it will not redefine variables installed, or shouldnotlink
5314 installed=yes
5315 shouldnotlink=no
5316 avoidtemprpath=
5317
5318
5319 # Read the .la file
5320 func_source "$lib"
5321
5322 # Convert "-framework foo" to "foo.ltframework"
5323 if test -n "$inherited_linker_flags"; then
5324 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
5325 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5326 case " $new_inherited_linker_flags " in
5327 *" $tmp_inherited_linker_flag "*) ;;
5328 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
5329 esac
5330 done
5331 fi
5332 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5333 if test "$linkmode,$pass" = "lib,link" ||
5334 test "$linkmode,$pass" = "prog,scan" ||
5335 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5336 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5337 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5338 fi
5339
5340 if test "$pass" = conv; then
5341 # Only check for convenience libraries
5342 deplibs="$lib $deplibs"
5343 if test -z "$libdir"; then
5344 if test -z "$old_library"; then
5345 func_fatal_error "cannot find name of link library for \`$lib'"
5346 fi
5347 # It is a libtool convenience library, so add in its objects.
5348 convenience="$convenience $ladir/$objdir/$old_library"
5349 old_convenience="$old_convenience $ladir/$objdir/$old_library"
5350 tmp_libs=
5351 for deplib in $dependency_libs; do
5352 deplibs="$deplib $deplibs"
5353 if $opt_duplicate_deps ; then
5354 case "$tmp_libs " in
5355 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5356 esac
5357 fi
5358 tmp_libs="$tmp_libs $deplib"
5359 done
5360 elif test "$linkmode" != prog && test "$linkmode" != lib; then
5361 func_fatal_error "\`$lib' is not a convenience library"
5362 fi
5363 continue
5364 fi # $pass = conv
5365
5366
5367 # Get the name of the library we link against.
5368 linklib=
5369 for l in $old_library $library_names; do
5370 linklib="$l"
5371 done
5372 if test -z "$linklib"; then
5373 func_fatal_error "cannot find name of link library for \`$lib'"
5374 fi
5375
5376 # This library was specified with -dlopen.
5377 if test "$pass" = dlopen; then
5378 if test -z "$libdir"; then
5379 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
5380 fi
5381 if test -z "$dlname" ||
5382 test "$dlopen_support" != yes ||
5383 test "$build_libtool_libs" = no; then
5384 # If there is no dlname, no dlopen support or we're linking
5385 # statically, we need to preload. We also need to preload any
5386 # dependent libraries so libltdl's deplib preloader doesn't
5387 # bomb out in the load deplibs phase.
5388 dlprefiles="$dlprefiles $lib $dependency_libs"
5389 else
5390 newdlfiles="$newdlfiles $lib"
5391 fi
5392 continue
5393 fi # $pass = dlopen
5394
5395 # We need an absolute path.
5396 case $ladir in
5397 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
5398 *)
5399 abs_ladir=`cd "$ladir" && pwd`
5400 if test -z "$abs_ladir"; then
5401 func_warning "cannot determine absolute directory name of \`$ladir'"
5402 func_warning "passing it literally to the linker, although it might fail"
5403 abs_ladir="$ladir"
5404 fi
5405 ;;
5406 esac
5407 func_basename "$lib"
5408 laname="$func_basename_result"
5409
5410 # Find the relevant object directory and library name.
5411 if test "X$installed" = Xyes; then
5412 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5413 func_warning "library \`$lib' was moved."
5414 dir="$ladir"
5415 absdir="$abs_ladir"
5416 libdir="$abs_ladir"
5417 else
5418 dir="$libdir"
5419 absdir="$libdir"
5420 fi
5421 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5422 else
5423 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5424 dir="$ladir"
5425 absdir="$abs_ladir"
5426 # Remove this search path later
5427 notinst_path="$notinst_path $abs_ladir"
5428 else
5429 dir="$ladir/$objdir"
5430 absdir="$abs_ladir/$objdir"
5431 # Remove this search path later
5432 notinst_path="$notinst_path $abs_ladir"
5433 fi
5434 fi # $installed = yes
5435 func_stripname 'lib' '.la' "$laname"
5436 name=$func_stripname_result
5437
5438 # This library was specified with -dlpreopen.
5439 if test "$pass" = dlpreopen; then
5440 if test -z "$libdir" && test "$linkmode" = prog; then
5441 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5442 fi
5443 # Prefer using a static library (so that no silly _DYNAMIC symbols
5444 # are required to link).
5445 if test -n "$old_library"; then
5446 newdlprefiles="$newdlprefiles $dir/$old_library"
5447 # Keep a list of preopened convenience libraries to check
5448 # that they are being used correctly in the link pass.
5449 test -z "$libdir" && \
5450 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5451 # Otherwise, use the dlname, so that lt_dlopen finds it.
5452 elif test -n "$dlname"; then
5453 newdlprefiles="$newdlprefiles $dir/$dlname"
5454 else
5455 newdlprefiles="$newdlprefiles $dir/$linklib"
5456 fi
5457 fi # $pass = dlpreopen
5458
5459 if test -z "$libdir"; then
5460 # Link the convenience library
5461 if test "$linkmode" = lib; then
5462 deplibs="$dir/$old_library $deplibs"
5463 elif test "$linkmode,$pass" = "prog,link"; then
5464 compile_deplibs="$dir/$old_library $compile_deplibs"
5465 finalize_deplibs="$dir/$old_library $finalize_deplibs"
5466 else
5467 deplibs="$lib $deplibs" # used for prog,scan pass
5468 fi
5469 continue
5470 fi
5471
5472
5473 if test "$linkmode" = prog && test "$pass" != link; then
5474 newlib_search_path="$newlib_search_path $ladir"
5475 deplibs="$lib $deplibs"
5476
5477 linkalldeplibs=no
5478 if test "$link_all_deplibs" != no || test -z "$library_names" ||
5479 test "$build_libtool_libs" = no; then
5480 linkalldeplibs=yes
5481 fi
5482
5483 tmp_libs=
5484 for deplib in $dependency_libs; do
5485 case $deplib in
5486 -L*) func_stripname '-L' '' "$deplib"
5487 newlib_search_path="$newlib_search_path $func_stripname_result"
5488 ;;
5489 esac
5490 # Need to link against all dependency_libs?
5491 if test "$linkalldeplibs" = yes; then
5492 deplibs="$deplib $deplibs"
5493 else
5494 # Need to hardcode shared library paths
5495 # or/and link against static libraries
5496 newdependency_libs="$deplib $newdependency_libs"
5497 fi
5498 if $opt_duplicate_deps ; then
5499 case "$tmp_libs " in
5500 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5501 esac
5502 fi
5503 tmp_libs="$tmp_libs $deplib"
5504 done # for deplib
5505 continue
5506 fi # $linkmode = prog...
5507
5508 if test "$linkmode,$pass" = "prog,link"; then
5509 if test -n "$library_names" &&
5510 { { test "$prefer_static_libs" = no ||
5511 test "$prefer_static_libs,$installed" = "built,yes"; } ||
5512 test -z "$old_library"; }; then
5513 # We need to hardcode the library path
5514 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5515 # Make sure the rpath contains only unique directories.
5516 case "$temp_rpath:" in
5517 *"$absdir:"*) ;;
5518 *) temp_rpath="$temp_rpath$absdir:" ;;
5519 esac
5520 fi
5521
5522 # Hardcode the library path.
5523 # Skip directories that are in the system default run-time
5524 # search path.
5525 case " $sys_lib_dlsearch_path " in
5526 *" $absdir "*) ;;
5527 *)
5528 case "$compile_rpath " in
5529 *" $absdir "*) ;;
5530 *) compile_rpath="$compile_rpath $absdir"
5531 esac
5532 ;;
5533 esac
5534 case " $sys_lib_dlsearch_path " in
5535 *" $libdir "*) ;;
5536 *)
5537 case "$finalize_rpath " in
5538 *" $libdir "*) ;;
5539 *) finalize_rpath="$finalize_rpath $libdir"
5540 esac
5541 ;;
5542 esac
5543 fi # $linkmode,$pass = prog,link...
5544
5545 if test "$alldeplibs" = yes &&
5546 { test "$deplibs_check_method" = pass_all ||
5547 { test "$build_libtool_libs" = yes &&
5548 test -n "$library_names"; }; }; then
5549 # We only need to search for static libraries
5550 continue
5551 fi
5552 fi
5553
5554 link_static=no # Whether the deplib will be linked statically
5555 use_static_libs=$prefer_static_libs
5556 if test "$use_static_libs" = built && test "$installed" = yes; then
5557 use_static_libs=no
5558 fi
5559 if test -n "$library_names" &&
5560 { test "$use_static_libs" = no || test -z "$old_library"; }; then
5561 case $host in
5562 *cygwin* | *mingw* | *cegcc*)
5563 # No point in relinking DLLs because paths are not encoded
5564 notinst_deplibs="$notinst_deplibs $lib"
5565 need_relink=no
5566 ;;
5567 *)
5568 if test "$installed" = no; then
5569 notinst_deplibs="$notinst_deplibs $lib"
5570 need_relink=yes
5571 fi
5572 ;;
5573 esac
5574 # This is a shared library
5575
5576 # Warn about portability, can't link against -module's on some
5577 # systems (darwin). Don't bleat about dlopened modules though!
5578 dlopenmodule=""
5579 for dlpremoduletest in $dlprefiles; do
5580 if test "X$dlpremoduletest" = "X$lib"; then
5581 dlopenmodule="$dlpremoduletest"
5582 break
5583 fi
5584 done
5585 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5586 $ECHO
5587 if test "$linkmode" = prog; then
5588 $ECHO "*** Warning: Linking the executable $output against the loadable module"
5589 else
5590 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
5591 fi
5592 $ECHO "*** $linklib is not portable!"
5593 fi
5594 if test "$linkmode" = lib &&
5595 test "$hardcode_into_libs" = yes; then
5596 # Hardcode the library path.
5597 # Skip directories that are in the system default run-time
5598 # search path.
5599 case " $sys_lib_dlsearch_path " in
5600 *" $absdir "*) ;;
5601 *)
5602 case "$compile_rpath " in
5603 *" $absdir "*) ;;
5604 *) compile_rpath="$compile_rpath $absdir"
5605 esac
5606 ;;
5607 esac
5608 case " $sys_lib_dlsearch_path " in
5609 *" $libdir "*) ;;
5610 *)
5611 case "$finalize_rpath " in
5612 *" $libdir "*) ;;
5613 *) finalize_rpath="$finalize_rpath $libdir"
5614 esac
5615 ;;
5616 esac
5617 fi
5618
5619 if test -n "$old_archive_from_expsyms_cmds"; then
5620 # figure out the soname
5621 set dummy $library_names
5622 shift
5623 realname="$1"
5624 shift
5625 libname=`eval "\\$ECHO \"$libname_spec\""`
5626 # use dlname if we got it. it's perfectly good, no?
5627 if test -n "$dlname"; then
5628 soname="$dlname"
5629 elif test -n "$soname_spec"; then
5630 # bleh windows
5631 case $host in
5632 *cygwin* | mingw* | *cegcc*)
5633 func_arith $current - $age
5634 major=$func_arith_result
5635 versuffix="-$major"
5636 ;;
5637 esac
5638 eval soname=\"$soname_spec\"
5639 else
5640 soname="$realname"
5641 fi
5642
5643 # Make a new name for the extract_expsyms_cmds to use
5644 soroot="$soname"
5645 func_basename "$soroot"
5646 soname="$func_basename_result"
5647 func_stripname 'lib' '.dll' "$soname"
5648 newlib=libimp-$func_stripname_result.a
5649
5650 # If the library has no export list, then create one now
5651 if test -f "$output_objdir/$soname-def"; then :
5652 else
5653 func_verbose "extracting exported symbol list from \`$soname'"
5654 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
5655 fi
5656
5657 # Create $newlib
5658 if test -f "$output_objdir/$newlib"; then :; else
5659 func_verbose "generating import library for \`$soname'"
5660 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
5661 fi
5662 # make sure the library variables are pointing to the new library
5663 dir=$output_objdir
5664 linklib=$newlib
5665 fi # test -n "$old_archive_from_expsyms_cmds"
5666
5667 if test "$linkmode" = prog || test "$mode" != relink; then
5668 add_shlibpath=
5669 add_dir=
5670 add=
5671 lib_linked=yes
5672 case $hardcode_action in
5673 immediate | unsupported)
5674 if test "$hardcode_direct" = no; then
5675 add="$dir/$linklib"
5676 case $host in
5677 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
5678 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
5679 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
5680 *-*-unixware7*) add_dir="-L$dir" ;;
5681 *-*-darwin* )
5682 # if the lib is a (non-dlopened) module then we can not
5683 # link against it, someone is ignoring the earlier warnings
5684 if /usr/bin/file -L $add 2> /dev/null |
5685 $GREP ": [^:]* bundle" >/dev/null ; then
5686 if test "X$dlopenmodule" != "X$lib"; then
5687 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
5688 if test -z "$old_library" ; then
5689 $ECHO
5690 $ECHO "*** And there doesn't seem to be a static archive available"
5691 $ECHO "*** The link will probably fail, sorry"
5692 else
5693 add="$dir/$old_library"
5694 fi
5695 elif test -n "$old_library"; then
5696 add="$dir/$old_library"
5697 fi
5698 fi
5699 esac
5700 elif test "$hardcode_minus_L" = no; then
5701 case $host in
5702 *-*-sunos*) add_shlibpath="$dir" ;;
5703 esac
5704 add_dir="-L$dir"
5705 add="-l$name"
5706 elif test "$hardcode_shlibpath_var" = no; then
5707 add_shlibpath="$dir"
5708 add="-l$name"
5709 else
5710 lib_linked=no
5711 fi
5712 ;;
5713 relink)
5714 if test "$hardcode_direct" = yes &&
5715 test "$hardcode_direct_absolute" = no; then
5716 add="$dir/$linklib"
5717 elif test "$hardcode_minus_L" = yes; then
5718 add_dir="-L$dir"
5719 # Try looking first in the location we're being installed to.
5720 if test -n "$inst_prefix_dir"; then
5721 case $libdir in
5722 [\\/]*)
5723 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5724 ;;
5725 esac
5726 fi
5727 add="-l$name"
5728 elif test "$hardcode_shlibpath_var" = yes; then
5729 add_shlibpath="$dir"
5730 add="-l$name"
5731 else
5732 lib_linked=no
5733 fi
5734 ;;
5735 *) lib_linked=no ;;
5736 esac
5737
5738 if test "$lib_linked" != yes; then
5739 func_fatal_configuration "unsupported hardcode properties"
5740 fi
5741
5742 if test -n "$add_shlibpath"; then
5743 case :$compile_shlibpath: in
5744 *":$add_shlibpath:"*) ;;
5745 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
5746 esac
5747 fi
5748 if test "$linkmode" = prog; then
5749 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
5750 test -n "$add" && compile_deplibs="$add $compile_deplibs"
5751 else
5752 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5753 test -n "$add" && deplibs="$add $deplibs"
5754 if test "$hardcode_direct" != yes &&
5755 test "$hardcode_minus_L" != yes &&
5756 test "$hardcode_shlibpath_var" = yes; then
5757 case :$finalize_shlibpath: in
5758 *":$libdir:"*) ;;
5759 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5760 esac
5761 fi
5762 fi
5763 fi
5764
5765 if test "$linkmode" = prog || test "$mode" = relink; then
5766 add_shlibpath=
5767 add_dir=
5768 add=
5769 # Finalize command for both is simple: just hardcode it.
5770 if test "$hardcode_direct" = yes &&
5771 test "$hardcode_direct_absolute" = no; then
5772 add="$libdir/$linklib"
5773 elif test "$hardcode_minus_L" = yes; then
5774 add_dir="-L$libdir"
5775 add="-l$name"
5776 elif test "$hardcode_shlibpath_var" = yes; then
5777 case :$finalize_shlibpath: in
5778 *":$libdir:"*) ;;
5779 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5780 esac
5781 add="-l$name"
5782 elif test "$hardcode_automatic" = yes; then
5783 if test -n "$inst_prefix_dir" &&
5784 test -f "$inst_prefix_dir$libdir/$linklib" ; then
5785 add="$inst_prefix_dir$libdir/$linklib"
5786 else
5787 add="$libdir/$linklib"
5788 fi
5789 else
5790 # We cannot seem to hardcode it, guess we'll fake it.
5791 add_dir="-L$libdir"
5792 # Try looking first in the location we're being installed to.
5793 if test -n "$inst_prefix_dir"; then
5794 case $libdir in
5795 [\\/]*)
5796 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5797 ;;
5798 esac
5799 fi
5800 add="-l$name"
5801 fi
5802
5803 if test "$linkmode" = prog; then
5804 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
5805 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
5806 else
5807 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5808 test -n "$add" && deplibs="$add $deplibs"
5809 fi
5810 fi
5811 elif test "$linkmode" = prog; then
5812 # Here we assume that one of hardcode_direct or hardcode_minus_L
5813 # is not unsupported. This is valid on all known static and
5814 # shared platforms.
5815 if test "$hardcode_direct" != unsupported; then
5816 test -n "$old_library" && linklib="$old_library"
5817 compile_deplibs="$dir/$linklib $compile_deplibs"
5818 finalize_deplibs="$dir/$linklib $finalize_deplibs"
5819 else
5820 compile_deplibs="-l$name -L$dir $compile_deplibs"
5821 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
5822 fi
5823 elif test "$build_libtool_libs" = yes; then
5824 # Not a shared library
5825 if test "$deplibs_check_method" != pass_all; then
5826 # We're trying link a shared library against a static one
5827 # but the system doesn't support it.
5828
5829 # Just print a warning and add the library to dependency_libs so
5830 # that the program can be linked against the static library.
5831 $ECHO
5832 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5833 $ECHO "*** I have the capability to make that library automatically link in when"
5834 $ECHO "*** you link to this library. But I can only do this if you have a"
5835 $ECHO "*** shared version of the library, which you do not appear to have."
5836 if test "$module" = yes; then
5837 $ECHO "*** But as you try to build a module library, libtool will still create "
5838 $ECHO "*** a static module, that should work as long as the dlopening application"
5839 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
5840 if test -z "$global_symbol_pipe"; then
5841 $ECHO
5842 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5843 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5844 $ECHO "*** not find such a program. So, this module is probably useless."
5845 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
5846 fi
5847 if test "$build_old_libs" = no; then
5848 build_libtool_libs=module
5849 build_old_libs=yes
5850 else
5851 build_libtool_libs=no
5852 fi
5853 fi
5854 else
5855 deplibs="$dir/$old_library $deplibs"
5856 link_static=yes
5857 fi
5858 fi # link shared/static library?
5859
5860 if test "$linkmode" = lib; then
5861 if test -n "$dependency_libs" &&
5862 { test "$hardcode_into_libs" != yes ||
5863 test "$build_old_libs" = yes ||
5864 test "$link_static" = yes; }; then
5865 # Extract -R from dependency_libs
5866 temp_deplibs=
5867 for libdir in $dependency_libs; do
5868 case $libdir in
5869 -R*) func_stripname '-R' '' "$libdir"
5870 temp_xrpath=$func_stripname_result
5871 case " $xrpath " in
5872 *" $temp_xrpath "*) ;;
5873 *) xrpath="$xrpath $temp_xrpath";;
5874 esac;;
5875 *) temp_deplibs="$temp_deplibs $libdir";;
5876 esac
5877 done
5878 dependency_libs="$temp_deplibs"
5879 fi
5880
5881 newlib_search_path="$newlib_search_path $absdir"
5882 # Link against this library
5883 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
5884 # ... and its dependency_libs
5885 tmp_libs=
5886 for deplib in $dependency_libs; do
5887 newdependency_libs="$deplib $newdependency_libs"
5888 if $opt_duplicate_deps ; then
5889 case "$tmp_libs " in
5890 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5891 esac
5892 fi
5893 tmp_libs="$tmp_libs $deplib"
5894 done
5895
5896 if test "$link_all_deplibs" != no; then
5897 # Add the search paths of all dependency libraries
5898 for deplib in $dependency_libs; do
5899 path=
5900 case $deplib in
5901 -L*) path="$deplib" ;;
5902 *.la)
5903 func_dirname "$deplib" "" "."
5904 dir="$func_dirname_result"
5905 # We need an absolute path.
5906 case $dir in
5907 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
5908 *)
5909 absdir=`cd "$dir" && pwd`
5910 if test -z "$absdir"; then
5911 func_warning "cannot determine absolute directory name of \`$dir'"
5912 absdir="$dir"
5913 fi
5914 ;;
5915 esac
5916 if $GREP "^installed=no" $deplib > /dev/null; then
5917 case $host in
5918 *-*-darwin*)
5919 depdepl=
5920 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5921 if test -n "$deplibrary_names" ; then
5922 for tmp in $deplibrary_names ; do
5923 depdepl=$tmp
5924 done
5925 if test -f "$absdir/$objdir/$depdepl" ; then
5926 depdepl="$absdir/$objdir/$depdepl"
5927 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5928 if test -z "$darwin_install_name"; then
5929 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5930 fi
5931 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5932 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
5933 path=
5934 fi
5935 fi
5936 ;;
5937 *)
5938 path="-L$absdir/$objdir"
5939 ;;
5940 esac
5941 else
5942 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5943 test -z "$libdir" && \
5944 func_fatal_error "\`$deplib' is not a valid libtool archive"
5945 test "$absdir" != "$libdir" && \
5946 func_warning "\`$deplib' seems to be moved"
5947
5948 path="-L$absdir"
5949 fi
5950 ;;
5951 esac
5952 case " $deplibs " in
5953 *" $path "*) ;;
5954 *) deplibs="$path $deplibs" ;;
5955 esac
5956 done
5957 fi # link_all_deplibs != no
5958 fi # linkmode = lib
5959 done # for deplib in $libs
5960 if test "$pass" = link; then
5961 if test "$linkmode" = "prog"; then
5962 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
5963 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
5964 else
5965 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5966 fi
5967 fi
5968 dependency_libs="$newdependency_libs"
5969 if test "$pass" = dlpreopen; then
5970 # Link the dlpreopened libraries before other libraries
5971 for deplib in $save_deplibs; do
5972 deplibs="$deplib $deplibs"
5973 done
5974 fi
5975 if test "$pass" != dlopen; then
5976 if test "$pass" != conv; then
5977 # Make sure lib_search_path contains only unique directories.
5978 lib_search_path=
5979 for dir in $newlib_search_path; do
5980 case "$lib_search_path " in
5981 *" $dir "*) ;;
5982 *) lib_search_path="$lib_search_path $dir" ;;
5983 esac
5984 done
5985 newlib_search_path=
5986 fi
5987
5988 if test "$linkmode,$pass" != "prog,link"; then
5989 vars="deplibs"
5990 else
5991 vars="compile_deplibs finalize_deplibs"
5992 fi
5993 for var in $vars dependency_libs; do
5994 # Add libraries to $var in reverse order
5995 eval tmp_libs=\"\$$var\"
5996 new_libs=
5997 for deplib in $tmp_libs; do
5998 # FIXME: Pedantically, this is the right thing to do, so
5999 # that some nasty dependency loop isn't accidentally
6000 # broken:
6001 #new_libs="$deplib $new_libs"
6002 # Pragmatically, this seems to cause very few problems in
6003 # practice:
6004 case $deplib in
6005 -L*) new_libs="$deplib $new_libs" ;;
6006 -R*) ;;
6007 *)
6008 # And here is the reason: when a library appears more
6009 # than once as an explicit dependence of a library, or
6010 # is implicitly linked in more than once by the
6011 # compiler, it is considered special, and multiple
6012 # occurrences thereof are not removed. Compare this
6013 # with having the same library being listed as a
6014 # dependency of multiple other libraries: in this case,
6015 # we know (pedantically, we assume) the library does not
6016 # need to be listed more than once, so we keep only the
6017 # last copy. This is not always right, but it is rare
6018 # enough that we require users that really mean to play
6019 # such unportable linking tricks to link the library
6020 # using -Wl,-lname, so that libtool does not consider it
6021 # for duplicate removal.
6022 case " $specialdeplibs " in
6023 *" $deplib "*) new_libs="$deplib $new_libs" ;;
6024 *)
6025 case " $new_libs " in
6026 *" $deplib "*) ;;
6027 *) new_libs="$deplib $new_libs" ;;
6028 esac
6029 ;;
6030 esac
6031 ;;
6032 esac
6033 done
6034 tmp_libs=
6035 for deplib in $new_libs; do
6036 case $deplib in
6037 -L*)
6038 case " $tmp_libs " in
6039 *" $deplib "*) ;;
6040 *) tmp_libs="$tmp_libs $deplib" ;;
6041 esac
6042 ;;
6043 *) tmp_libs="$tmp_libs $deplib" ;;
6044 esac
6045 done
6046 eval $var=\"$tmp_libs\"
6047 done # for var
6048 fi
6049 # Last step: remove runtime libs from dependency_libs
6050 # (they stay in deplibs)
6051 tmp_libs=
6052 for i in $dependency_libs ; do
6053 case " $predeps $postdeps $compiler_lib_search_path " in
6054 *" $i "*)
6055 i=""
6056 ;;
6057 esac
6058 if test -n "$i" ; then
6059 tmp_libs="$tmp_libs $i"
6060 fi
6061 done
6062 dependency_libs=$tmp_libs
6063 done # for pass
6064 if test "$linkmode" = prog; then
6065 dlfiles="$newdlfiles"
6066 fi
6067 if test "$linkmode" = prog || test "$linkmode" = lib; then
6068 dlprefiles="$newdlprefiles"
6069 fi
6070
6071 case $linkmode in
6072 oldlib)
6073 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
6074 func_warning "\`-dlopen' is ignored for archives"
6075 fi
6076
6077 case " $deplibs" in
6078 *\ -l* | *\ -L*)
6079 func_warning "\`-l' and \`-L' are ignored for archives" ;;
6080 esac
6081
6082 test -n "$rpath" && \
6083 func_warning "\`-rpath' is ignored for archives"
6084
6085 test -n "$xrpath" && \
6086 func_warning "\`-R' is ignored for archives"
6087
6088 test -n "$vinfo" && \
6089 func_warning "\`-version-info/-version-number' is ignored for archives"
6090
6091 test -n "$release" && \
6092 func_warning "\`-release' is ignored for archives"
6093
6094 test -n "$export_symbols$export_symbols_regex" && \
6095 func_warning "\`-export-symbols' is ignored for archives"
6096
6097 # Now set the variables for building old libraries.
6098 build_libtool_libs=no
6099 oldlibs="$output"
6100 objs="$objs$old_deplibs"
6101 ;;
6102
6103 lib)
6104 # Make sure we only generate libraries of the form `libNAME.la'.
6105 case $outputname in
6106 lib*)
6107 func_stripname 'lib' '.la' "$outputname"
6108 name=$func_stripname_result
6109 eval shared_ext=\"$shrext_cmds\"
6110 eval libname=\"$libname_spec\"
6111 ;;
6112 *)
6113 test "$module" = no && \
6114 func_fatal_help "libtool library \`$output' must begin with \`lib'"
6115
6116 if test "$need_lib_prefix" != no; then
6117 # Add the "lib" prefix for modules if required
6118 func_stripname '' '.la' "$outputname"
6119 name=$func_stripname_result
6120 eval shared_ext=\"$shrext_cmds\"
6121 eval libname=\"$libname_spec\"
6122 else
6123 func_stripname '' '.la' "$outputname"
6124 libname=$func_stripname_result
6125 fi
6126 ;;
6127 esac
6128
6129 if test -n "$objs"; then
6130 if test "$deplibs_check_method" != pass_all; then
6131 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
6132 else
6133 $ECHO
6134 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6135 $ECHO "*** objects $objs is not portable!"
6136 libobjs="$libobjs $objs"
6137 fi
6138 fi
6139
6140 test "$dlself" != no && \
6141 func_warning "\`-dlopen self' is ignored for libtool libraries"
6142
6143 set dummy $rpath
6144 shift
6145 test "$#" -gt 1 && \
6146 func_warning "ignoring multiple \`-rpath's for a libtool library"
6147
6148 install_libdir="$1"
6149
6150 oldlibs=
6151 if test -z "$rpath"; then
6152 if test "$build_libtool_libs" = yes; then
6153 # Building a libtool convenience library.
6154 # Some compilers have problems with a `.al' extension so
6155 # convenience libraries should have the same extension an
6156 # archive normally would.
6157 oldlibs="$output_objdir/$libname.$libext $oldlibs"
6158 build_libtool_libs=convenience
6159 build_old_libs=yes
6160 fi
6161
6162 test -n "$vinfo" && \
6163 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
6164
6165 test -n "$release" && \
6166 func_warning "\`-release' is ignored for convenience libraries"
6167 else
6168
6169 # Parse the version information argument.
6170 save_ifs="$IFS"; IFS=':'
6171 set dummy $vinfo 0 0 0
6172 shift
6173 IFS="$save_ifs"
6174
6175 test -n "$7" && \
6176 func_fatal_help "too many parameters to \`-version-info'"
6177
6178 # convert absolute version numbers to libtool ages
6179 # this retains compatibility with .la files and attempts
6180 # to make the code below a bit more comprehensible
6181
6182 case $vinfo_number in
6183 yes)
6184 number_major="$1"
6185 number_minor="$2"
6186 number_revision="$3"
6187 #
6188 # There are really only two kinds -- those that
6189 # use the current revision as the major version
6190 # and those that subtract age and use age as
6191 # a minor version. But, then there is irix
6192 # which has an extra 1 added just for fun
6193 #
6194 case $version_type in
6195 darwin|linux|osf|windows|none)
6196 func_arith $number_major + $number_minor
6197 current=$func_arith_result
6198 age="$number_minor"
6199 revision="$number_revision"
6200 ;;
6201 freebsd-aout|freebsd-elf|sunos)
6202 current="$number_major"
6203 revision="$number_minor"
6204 age="0"
6205 ;;
6206 irix|nonstopux)
6207 func_arith $number_major + $number_minor
6208 current=$func_arith_result
6209 age="$number_minor"
6210 revision="$number_minor"
6211 lt_irix_increment=no
6212 ;;
6213 *)
6214 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
6215 ;;
6216 esac
6217 ;;
6218 no)
6219 current="$1"
6220 revision="$2"
6221 age="$3"
6222 ;;
6223 esac
6224
6225 # Check that each of the things are valid numbers.
6226 case $current in
6227 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]) ;;
6228 *)
6229 func_error "CURRENT \`$current' must be a nonnegative integer"
6230 func_fatal_error "\`$vinfo' is not valid version information"
6231 ;;
6232 esac
6233
6234 case $revision in
6235 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]) ;;
6236 *)
6237 func_error "REVISION \`$revision' must be a nonnegative integer"
6238 func_fatal_error "\`$vinfo' is not valid version information"
6239 ;;
6240 esac
6241
6242 case $age in
6243 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]) ;;
6244 *)
6245 func_error "AGE \`$age' must be a nonnegative integer"
6246 func_fatal_error "\`$vinfo' is not valid version information"
6247 ;;
6248 esac
6249
6250 if test "$age" -gt "$current"; then
6251 func_error "AGE \`$age' is greater than the current interface number \`$current'"
6252 func_fatal_error "\`$vinfo' is not valid version information"
6253 fi
6254
6255 # Calculate the version variables.
6256 major=
6257 versuffix=
6258 verstring=
6259 case $version_type in
6260 none) ;;
6261
6262 darwin)
6263 # Like Linux, but with the current version available in
6264 # verstring for coding it into the library header
6265 func_arith $current - $age
6266 major=.$func_arith_result
6267 versuffix="$major.$age.$revision"
6268 # Darwin ld doesn't like 0 for these options...
6269 func_arith $current + 1
6270 minor_current=$func_arith_result
6271 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
6272 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
6273 ;;
6274
6275 freebsd-aout)
6276 major=".$current"
6277 versuffix=".$current.$revision";
6278 ;;
6279
6280 freebsd-elf)
6281 major=".$current"
6282 versuffix=".$current"
6283 ;;
6284
6285 irix | nonstopux)
6286 if test "X$lt_irix_increment" = "Xno"; then
6287 func_arith $current - $age
6288 else
6289 func_arith $current - $age + 1
6290 fi
6291 major=$func_arith_result
6292
6293 case $version_type in
6294 nonstopux) verstring_prefix=nonstopux ;;
6295 *) verstring_prefix=sgi ;;
6296 esac
6297 verstring="$verstring_prefix$major.$revision"
6298
6299 # Add in all the interfaces that we are compatible with.
6300 loop=$revision
6301 while test "$loop" -ne 0; do
6302 func_arith $revision - $loop
6303 iface=$func_arith_result
6304 func_arith $loop - 1
6305 loop=$func_arith_result
6306 verstring="$verstring_prefix$major.$iface:$verstring"
6307 done
6308
6309 # Before this point, $major must not contain `.'.
6310 major=.$major
6311 versuffix="$major.$revision"
6312 ;;
6313
6314 linux)
6315 func_arith $current - $age
6316 major=.$func_arith_result
6317 versuffix="$major.$age.$revision"
6318 ;;
6319
6320 osf)
6321 func_arith $current - $age
6322 major=.$func_arith_result
6323 versuffix=".$current.$age.$revision"
6324 verstring="$current.$age.$revision"
6325
6326 # Add in all the interfaces that we are compatible with.
6327 loop=$age
6328 while test "$loop" -ne 0; do
6329 func_arith $current - $loop
6330 iface=$func_arith_result
6331 func_arith $loop - 1
6332 loop=$func_arith_result
6333 verstring="$verstring:${iface}.0"
6334 done
6335
6336 # Make executables depend on our current version.
6337 verstring="$verstring:${current}.0"
6338 ;;
6339
6340 qnx)
6341 major=".$current"
6342 versuffix=".$current"
6343 ;;
6344
6345 sunos)
6346 major=".$current"
6347 versuffix=".$current.$revision"
6348 ;;
6349
6350 windows)
6351 # Use '-' rather than '.', since we only want one
6352 # extension on DOS 8.3 filesystems.
6353 func_arith $current - $age
6354 major=$func_arith_result
6355 versuffix="-$major"
6356 ;;
6357
6358 *)
6359 func_fatal_configuration "unknown library version type \`$version_type'"
6360 ;;
6361 esac
6362
6363 # Clear the version info if we defaulted, and they specified a release.
6364 if test -z "$vinfo" && test -n "$release"; then
6365 major=
6366 case $version_type in
6367 darwin)
6368 # we can't check for "0.0" in archive_cmds due to quoting
6369 # problems, so we reset it completely
6370 verstring=
6371 ;;
6372 *)
6373 verstring="0.0"
6374 ;;
6375 esac
6376 if test "$need_version" = no; then
6377 versuffix=
6378 else
6379 versuffix=".0.0"
6380 fi
6381 fi
6382
6383 # Remove version info from name if versioning should be avoided
6384 if test "$avoid_version" = yes && test "$need_version" = no; then
6385 major=
6386 versuffix=
6387 verstring=""
6388 fi
6389
6390 # Check to see if the archive will have undefined symbols.
6391 if test "$allow_undefined" = yes; then
6392 if test "$allow_undefined_flag" = unsupported; then
6393 func_warning "undefined symbols not allowed in $host shared libraries"
6394 build_libtool_libs=no
6395 build_old_libs=yes
6396 fi
6397 else
6398 # Don't allow undefined symbols.
6399 allow_undefined_flag="$no_undefined_flag"
6400 fi
6401
6402 fi
6403
6404 func_generate_dlsyms "$libname" "$libname" "yes"
6405 libobjs="$libobjs $symfileobj"
6406 test "X$libobjs" = "X " && libobjs=
6407
6408 if test "$mode" != relink; then
6409 # Remove our outputs, but don't remove object files since they
6410 # may have been created when compiling PIC objects.
6411 removelist=
6412 tempremovelist=`$ECHO "$output_objdir/*"`
6413 for p in $tempremovelist; do
6414 case $p in
6415 *.$objext | *.gcno)
6416 ;;
6417 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
6418 if test "X$precious_files_regex" != "X"; then
6419 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
6420 then
6421 continue
6422 fi
6423 fi
6424 removelist="$removelist $p"
6425 ;;
6426 *) ;;
6427 esac
6428 done
6429 test -n "$removelist" && \
6430 func_show_eval "${RM}r \$removelist"
6431 fi
6432
6433 # Now set the variables for building old libraries.
6434 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6435 oldlibs="$oldlibs $output_objdir/$libname.$libext"
6436
6437 # Transform .lo files to .o files.
6438 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6439 fi
6440
6441 # Eliminate all temporary directories.
6442 #for path in $notinst_path; do
6443 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6444 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6445 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6446 #done
6447
6448 if test -n "$xrpath"; then
6449 # If the user specified any rpath flags, then add them.
6450 temp_xrpath=
6451 for libdir in $xrpath; do
6452 temp_xrpath="$temp_xrpath -R$libdir"
6453 case "$finalize_rpath " in
6454 *" $libdir "*) ;;
6455 *) finalize_rpath="$finalize_rpath $libdir" ;;
6456 esac
6457 done
6458 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
6459 dependency_libs="$temp_xrpath $dependency_libs"
6460 fi
6461 fi
6462
6463 # Make sure dlfiles contains only unique files that won't be dlpreopened
6464 old_dlfiles="$dlfiles"
6465 dlfiles=
6466 for lib in $old_dlfiles; do
6467 case " $dlprefiles $dlfiles " in
6468 *" $lib "*) ;;
6469 *) dlfiles="$dlfiles $lib" ;;
6470 esac
6471 done
6472
6473 # Make sure dlprefiles contains only unique files
6474 old_dlprefiles="$dlprefiles"
6475 dlprefiles=
6476 for lib in $old_dlprefiles; do
6477 case "$dlprefiles " in
6478 *" $lib "*) ;;
6479 *) dlprefiles="$dlprefiles $lib" ;;
6480 esac
6481 done
6482
6483 if test "$build_libtool_libs" = yes; then
6484 if test -n "$rpath"; then
6485 case $host in
6486 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
6487 # these systems don't actually have a c library (as such)!
6488 ;;
6489 *-*-rhapsody* | *-*-darwin1.[012])
6490 # Rhapsody C library is in the System framework
6491 deplibs="$deplibs System.ltframework"
6492 ;;
6493 *-*-netbsd*)
6494 # Don't link with libc until the a.out ld.so is fixed.
6495 ;;
6496 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
6497 # Do not include libc due to us having libc/libc_r.
6498 ;;
6499 *-*-sco3.2v5* | *-*-sco5v6*)
6500 # Causes problems with __ctype
6501 ;;
6502 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
6503 # Compiler inserts libc in the correct place for threads to work
6504 ;;
6505 *)
6506 # Add libc to deplibs on all other systems if necessary.
6507 if test "$build_libtool_need_lc" = "yes"; then
6508 deplibs="$deplibs -lc"
6509 fi
6510 ;;
6511 esac
6512 fi
6513
6514 # Transform deplibs into only deplibs that can be linked in shared.
6515 name_save=$name
6516 libname_save=$libname
6517 release_save=$release
6518 versuffix_save=$versuffix
6519 major_save=$major
6520 # I'm not sure if I'm treating the release correctly. I think
6521 # release should show up in the -l (ie -lgmp5) so we don't want to
6522 # add it in twice. Is that correct?
6523 release=""
6524 versuffix=""
6525 major=""
6526 newdeplibs=
6527 droppeddeps=no
6528 case $deplibs_check_method in
6529 pass_all)
6530 # Don't check for shared/static. Everything works.
6531 # This might be a little naive. We might want to check
6532 # whether the library exists or not. But this is on
6533 # osf3 & osf4 and I'm not really sure... Just
6534 # implementing what was already the behavior.
6535 newdeplibs=$deplibs
6536 ;;
6537 test_compile)
6538 # This code stresses the "libraries are programs" paradigm to its
6539 # limits. Maybe even breaks it. We compile a program, linking it
6540 # against the deplibs as a proxy for the library. Then we can check
6541 # whether they linked in statically or dynamically with ldd.
6542 $opt_dry_run || $RM conftest.c
6543 cat > conftest.c <<EOF
6544 int main() { return 0; }
6545EOF
6546 $opt_dry_run || $RM conftest
6547 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
6548 ldd_output=`ldd conftest`
6549 for i in $deplibs; do
6550 case $i in
6551 -l*)
6552 func_stripname -l '' "$i"
6553 name=$func_stripname_result
6554 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6555 case " $predeps $postdeps " in
6556 *" $i "*)
6557 newdeplibs="$newdeplibs $i"
6558 i=""
6559 ;;
6560 esac
6561 fi
6562 if test -n "$i" ; then
6563 libname=`eval "\\$ECHO \"$libname_spec\""`
6564 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6565 set dummy $deplib_matches; shift
6566 deplib_match=$1
6567 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6568 newdeplibs="$newdeplibs $i"
6569 else
6570 droppeddeps=yes
6571 $ECHO
6572 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6573 $ECHO "*** I have the capability to make that library automatically link in when"
6574 $ECHO "*** you link to this library. But I can only do this if you have a"
6575 $ECHO "*** shared version of the library, which I believe you do not have"
6576 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6577 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
6578 fi
6579 fi
6580 ;;
6581 *)
6582 newdeplibs="$newdeplibs $i"
6583 ;;
6584 esac
6585 done
6586 else
6587 # Error occurred in the first compile. Let's try to salvage
6588 # the situation: Compile a separate program for each library.
6589 for i in $deplibs; do
6590 case $i in
6591 -l*)
6592 func_stripname -l '' "$i"
6593 name=$func_stripname_result
6594 $opt_dry_run || $RM conftest
6595 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
6596 ldd_output=`ldd conftest`
6597 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6598 case " $predeps $postdeps " in
6599 *" $i "*)
6600 newdeplibs="$newdeplibs $i"
6601 i=""
6602 ;;
6603 esac
6604 fi
6605 if test -n "$i" ; then
6606 libname=`eval "\\$ECHO \"$libname_spec\""`
6607 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6608 set dummy $deplib_matches; shift
6609 deplib_match=$1
6610 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6611 newdeplibs="$newdeplibs $i"
6612 else
6613 droppeddeps=yes
6614 $ECHO
6615 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6616 $ECHO "*** I have the capability to make that library automatically link in when"
6617 $ECHO "*** you link to this library. But I can only do this if you have a"
6618 $ECHO "*** shared version of the library, which you do not appear to have"
6619 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6620 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
6621 fi
6622 fi
6623 else
6624 droppeddeps=yes
6625 $ECHO
6626 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6627 $ECHO "*** make it link in! You will probably need to install it or some"
6628 $ECHO "*** library that it depends on before this library will be fully"
6629 $ECHO "*** functional. Installing it before continuing would be even better."
6630 fi
6631 ;;
6632 *)
6633 newdeplibs="$newdeplibs $i"
6634 ;;
6635 esac
6636 done
6637 fi
6638 ;;
6639 file_magic*)
6640 set dummy $deplibs_check_method; shift
6641 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6642 for a_deplib in $deplibs; do
6643 case $a_deplib in
6644 -l*)
6645 func_stripname -l '' "$a_deplib"
6646 name=$func_stripname_result
6647 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6648 case " $predeps $postdeps " in
6649 *" $a_deplib "*)
6650 newdeplibs="$newdeplibs $a_deplib"
6651 a_deplib=""
6652 ;;
6653 esac
6654 fi
6655 if test -n "$a_deplib" ; then
6656 libname=`eval "\\$ECHO \"$libname_spec\""`
6657 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6658 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6659 for potent_lib in $potential_libs; do
6660 # Follow soft links.
6661 if ls -lLd "$potent_lib" 2>/dev/null |
6662 $GREP " -> " >/dev/null; then
6663 continue
6664 fi
6665 # The statement above tries to avoid entering an
6666 # endless loop below, in case of cyclic links.
6667 # We might still enter an endless loop, since a link
6668 # loop can be closed while we follow links,
6669 # but so what?
6670 potlib="$potent_lib"
6671 while test -h "$potlib" 2>/dev/null; do
6672 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6673 case $potliblink in
6674 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6675 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6676 esac
6677 done
6678 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
6679 $SED -e 10q |
6680 $EGREP "$file_magic_regex" > /dev/null; then
6681 newdeplibs="$newdeplibs $a_deplib"
6682 a_deplib=""
6683 break 2
6684 fi
6685 done
6686 done
6687 fi
6688 if test -n "$a_deplib" ; then
6689 droppeddeps=yes
6690 $ECHO
6691 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6692 $ECHO "*** I have the capability to make that library automatically link in when"
6693 $ECHO "*** you link to this library. But I can only do this if you have a"
6694 $ECHO "*** shared version of the library, which you do not appear to have"
6695 $ECHO "*** because I did check the linker path looking for a file starting"
6696 if test -z "$potlib" ; then
6697 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
6698 else
6699 $ECHO "*** with $libname and none of the candidates passed a file format test"
6700 $ECHO "*** using a file magic. Last file checked: $potlib"
6701 fi
6702 fi
6703 ;;
6704 *)
6705 # Add a -L argument.
6706 newdeplibs="$newdeplibs $a_deplib"
6707 ;;
6708 esac
6709 done # Gone through all deplibs.
6710 ;;
6711 match_pattern*)
6712 set dummy $deplibs_check_method; shift
6713 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6714 for a_deplib in $deplibs; do
6715 case $a_deplib in
6716 -l*)
6717 func_stripname -l '' "$a_deplib"
6718 name=$func_stripname_result
6719 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6720 case " $predeps $postdeps " in
6721 *" $a_deplib "*)
6722 newdeplibs="$newdeplibs $a_deplib"
6723 a_deplib=""
6724 ;;
6725 esac
6726 fi
6727 if test -n "$a_deplib" ; then
6728 libname=`eval "\\$ECHO \"$libname_spec\""`
6729 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6730 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6731 for potent_lib in $potential_libs; do
6732 potlib="$potent_lib" # see symlink-check above in file_magic test
6733 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
6734 $EGREP "$match_pattern_regex" > /dev/null; then
6735 newdeplibs="$newdeplibs $a_deplib"
6736 a_deplib=""
6737 break 2
6738 fi
6739 done
6740 done
6741 fi
6742 if test -n "$a_deplib" ; then
6743 droppeddeps=yes
6744 $ECHO
6745 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6746 $ECHO "*** I have the capability to make that library automatically link in when"
6747 $ECHO "*** you link to this library. But I can only do this if you have a"
6748 $ECHO "*** shared version of the library, which you do not appear to have"
6749 $ECHO "*** because I did check the linker path looking for a file starting"
6750 if test -z "$potlib" ; then
6751 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
6752 else
6753 $ECHO "*** with $libname and none of the candidates passed a file format test"
6754 $ECHO "*** using a regex pattern. Last file checked: $potlib"
6755 fi
6756 fi
6757 ;;
6758 *)
6759 # Add a -L argument.
6760 newdeplibs="$newdeplibs $a_deplib"
6761 ;;
6762 esac
6763 done # Gone through all deplibs.
6764 ;;
6765 none | unknown | *)
6766 newdeplibs=""
6767 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6768 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
6769 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6770 for i in $predeps $postdeps ; do
6771 # can't use Xsed below, because $i might contain '/'
6772 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
6773 done
6774 fi
6775 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6776 $GREP . >/dev/null; then
6777 $ECHO
6778 if test "X$deplibs_check_method" = "Xnone"; then
6779 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
6780 else
6781 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
6782 fi
6783 $ECHO "*** All declared inter-library dependencies are being dropped."
6784 droppeddeps=yes
6785 fi
6786 ;;
6787 esac
6788 versuffix=$versuffix_save
6789 major=$major_save
6790 release=$release_save
6791 libname=$libname_save
6792 name=$name_save
6793
6794 case $host in
6795 *-*-rhapsody* | *-*-darwin1.[012])
6796 # On Rhapsody replace the C library with the System framework
6797 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
6798 ;;
6799 esac
6800
6801 if test "$droppeddeps" = yes; then
6802 if test "$module" = yes; then
6803 $ECHO
6804 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
6805 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6806 $ECHO "*** a static module, that should work as long as the dlopening"
6807 $ECHO "*** application is linked with the -dlopen flag."
6808 if test -z "$global_symbol_pipe"; then
6809 $ECHO
6810 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6811 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6812 $ECHO "*** not find such a program. So, this module is probably useless."
6813 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6814 fi
6815 if test "$build_old_libs" = no; then
6816 oldlibs="$output_objdir/$libname.$libext"
6817 build_libtool_libs=module
6818 build_old_libs=yes
6819 else
6820 build_libtool_libs=no
6821 fi
6822 else
6823 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6824 $ECHO "*** automatically added whenever a program is linked with this library"
6825 $ECHO "*** or is declared to -dlopen it."
6826
6827 if test "$allow_undefined" = no; then
6828 $ECHO
6829 $ECHO "*** Since this library must not contain undefined symbols,"
6830 $ECHO "*** because either the platform does not support them or"
6831 $ECHO "*** it was explicitly requested with -no-undefined,"
6832 $ECHO "*** libtool will only create a static version of it."
6833 if test "$build_old_libs" = no; then
6834 oldlibs="$output_objdir/$libname.$libext"
6835 build_libtool_libs=module
6836 build_old_libs=yes
6837 else
6838 build_libtool_libs=no
6839 fi
6840 fi
6841 fi
6842 fi
6843 # Done checking deplibs!
6844 deplibs=$newdeplibs
6845 fi
6846 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6847 case $host in
6848 *-*-darwin*)
6849 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6851 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6852 ;;
6853 esac
6854
6855 # move library search paths that coincide with paths to not yet
6856 # installed libraries to the beginning of the library search list
6857 new_libs=
6858 for path in $notinst_path; do
6859 case " $new_libs " in
6860 *" -L$path/$objdir "*) ;;
6861 *)
6862 case " $deplibs " in
6863 *" -L$path/$objdir "*)
6864 new_libs="$new_libs -L$path/$objdir" ;;
6865 esac
6866 ;;
6867 esac
6868 done
6869 for deplib in $deplibs; do
6870 case $deplib in
6871 -L*)
6872 case " $new_libs " in
6873 *" $deplib "*) ;;
6874 *) new_libs="$new_libs $deplib" ;;
6875 esac
6876 ;;
6877 *) new_libs="$new_libs $deplib" ;;
6878 esac
6879 done
6880 deplibs="$new_libs"
6881
6882 # All the library-specific variables (install_libdir is set above).
6883 library_names=
6884 old_library=
6885 dlname=
6886
6887 # Test again, we may have decided not to build it any more
6888 if test "$build_libtool_libs" = yes; then
6889 if test "$hardcode_into_libs" = yes; then
6890 # Hardcode the library paths
6891 hardcode_libdirs=
6892 dep_rpath=
6893 rpath="$finalize_rpath"
6894 test "$mode" != relink && rpath="$compile_rpath$rpath"
6895 for libdir in $rpath; do
6896 if test -n "$hardcode_libdir_flag_spec"; then
6897 if test -n "$hardcode_libdir_separator"; then
6898 if test -z "$hardcode_libdirs"; then
6899 hardcode_libdirs="$libdir"
6900 else
6901 # Just accumulate the unique libdirs.
6902 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
6903 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6904 ;;
6905 *)
6906 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6907 ;;
6908 esac
6909 fi
6910 else
6911 eval flag=\"$hardcode_libdir_flag_spec\"
6912 dep_rpath="$dep_rpath $flag"
6913 fi
6914 elif test -n "$runpath_var"; then
6915 case "$perm_rpath " in
6916 *" $libdir "*) ;;
6917 *) perm_rpath="$perm_rpath $libdir" ;;
6918 esac
6919 fi
6920 done
6921 # Substitute the hardcoded libdirs into the rpath.
6922 if test -n "$hardcode_libdir_separator" &&
6923 test -n "$hardcode_libdirs"; then
6924 libdir="$hardcode_libdirs"
6925 if test -n "$hardcode_libdir_flag_spec_ld"; then
6926 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6927 else
6928 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6929 fi
6930 fi
6931 if test -n "$runpath_var" && test -n "$perm_rpath"; then
6932 # We should set the runpath_var.
6933 rpath=
6934 for dir in $perm_rpath; do
6935 rpath="$rpath$dir:"
6936 done
6937 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
6938 fi
6939 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
6940 fi
6941
6942 shlibpath="$finalize_shlibpath"
6943 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
6944 if test -n "$shlibpath"; then
6945 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
6946 fi
6947
6948 # Get the real and link names of the library.
6949 eval shared_ext=\"$shrext_cmds\"
6950 eval library_names=\"$library_names_spec\"
6951 set dummy $library_names
6952 shift
6953 realname="$1"
6954 shift
6955
6956 if test -n "$soname_spec"; then
6957 eval soname=\"$soname_spec\"
6958 else
6959 soname="$realname"
6960 fi
6961 if test -z "$dlname"; then
6962 dlname=$soname
6963 fi
6964
6965 lib="$output_objdir/$realname"
6966 linknames=
6967 for link
6968 do
6969 linknames="$linknames $link"
6970 done
6971
6972 # Use standard objects if they are pic
6973 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
6974 test "X$libobjs" = "X " && libobjs=
6975
6976 delfiles=
6977 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6978 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
6979 export_symbols="$output_objdir/$libname.uexp"
6980 delfiles="$delfiles $export_symbols"
6981 fi
6982
6983 orig_export_symbols=
6984 case $host_os in
6985 cygwin* | mingw* | cegcc*)
6986 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
6987 # exporting using user supplied symfile
6988 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
6989 # and it's NOT already a .def file. Must figure out
6990 # which of the given symbols are data symbols and tag
6991 # them as such. So, trigger use of export_symbols_cmds.
6992 # export_symbols gets reassigned inside the "prepare
6993 # the list of exported symbols" if statement, so the
6994 # include_expsyms logic still works.
6995 orig_export_symbols="$export_symbols"
6996 export_symbols=
6997 always_export_symbols=yes
6998 fi
6999 fi
7000 ;;
7001 esac
7002
7003 # Prepare the list of exported symbols
7004 if test -z "$export_symbols"; then
7005 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
7006 func_verbose "generating symbol list for \`$libname.la'"
7007 export_symbols="$output_objdir/$libname.exp"
7008 $opt_dry_run || $RM $export_symbols
7009 cmds=$export_symbols_cmds
7010 save_ifs="$IFS"; IFS='~'
7011 for cmd in $cmds; do
7012 IFS="$save_ifs"
7013 eval cmd=\"$cmd\"
7014 func_len " $cmd"
7015 len=$func_len_result
7016 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7017 func_show_eval "$cmd" 'exit $?'
7018 skipped_export=false
7019 else
7020 # The command line is too long to execute in one step.
7021 func_verbose "using reloadable object file for export list..."
7022 skipped_export=:
7023 # Break out early, otherwise skipped_export may be
7024 # set to false by a later but shorter cmd.
7025 break
7026 fi
7027 done
7028 IFS="$save_ifs"
7029 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
7030 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7031 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7032 fi
7033 fi
7034 fi
7035
7036 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7037 tmp_export_symbols="$export_symbols"
7038 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7039 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7040 fi
7041
7042 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
7043 # The given exports_symbols file has to be filtered, so filter it.
7044 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7045 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7046 # 's' commands which not all seds can handle. GNU sed should be fine
7047 # though. Also, the filter scales superlinearly with the number of
7048 # global variables. join(1) would be nice here, but unfortunately
7049 # isn't a blessed tool.
7050 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7051 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7052 export_symbols=$output_objdir/$libname.def
7053 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7054 fi
7055
7056 tmp_deplibs=
7057 for test_deplib in $deplibs; do
7058 case " $convenience " in
7059 *" $test_deplib "*) ;;
7060 *)
7061 tmp_deplibs="$tmp_deplibs $test_deplib"
7062 ;;
7063 esac
7064 done
7065 deplibs="$tmp_deplibs"
7066
7067 if test -n "$convenience"; then
7068 if test -n "$whole_archive_flag_spec" &&
7069 test "$compiler_needs_object" = yes &&
7070 test -z "$libobjs"; then
7071 # extract the archives, so we have objects to list.
7072 # TODO: could optimize this to just extract one archive.
7073 whole_archive_flag_spec=
7074 fi
7075 if test -n "$whole_archive_flag_spec"; then
7076 save_libobjs=$libobjs
7077 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7078 test "X$libobjs" = "X " && libobjs=
7079 else
7080 gentop="$output_objdir/${outputname}x"
7081 generated="$generated $gentop"
7082
7083 func_extract_archives $gentop $convenience
7084 libobjs="$libobjs $func_extract_archives_result"
7085 test "X$libobjs" = "X " && libobjs=
7086 fi
7087 fi
7088
7089 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7090 eval flag=\"$thread_safe_flag_spec\"
7091 linker_flags="$linker_flags $flag"
7092 fi
7093
7094 # Make a backup of the uninstalled library when relinking
7095 if test "$mode" = relink; then
7096 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
7097 fi
7098
7099 # Do each of the archive commands.
7100 if test "$module" = yes && test -n "$module_cmds" ; then
7101 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7102 eval test_cmds=\"$module_expsym_cmds\"
7103 cmds=$module_expsym_cmds
7104 else
7105 eval test_cmds=\"$module_cmds\"
7106 cmds=$module_cmds
7107 fi
7108 else
7109 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7110 eval test_cmds=\"$archive_expsym_cmds\"
7111 cmds=$archive_expsym_cmds
7112 else
7113 eval test_cmds=\"$archive_cmds\"
7114 cmds=$archive_cmds
7115 fi
7116 fi
7117
7118 if test "X$skipped_export" != "X:" &&
7119 func_len " $test_cmds" &&
7120 len=$func_len_result &&
7121 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7122 :
7123 else
7124 # The command line is too long to link in one step, link piecewise
7125 # or, if using GNU ld and skipped_export is not :, use a linker
7126 # script.
7127
7128 # Save the value of $output and $libobjs because we want to
7129 # use them later. If we have whole_archive_flag_spec, we
7130 # want to use save_libobjs as it was before
7131 # whole_archive_flag_spec was expanded, because we can't
7132 # assume the linker understands whole_archive_flag_spec.
7133 # This may have to be revisited, in case too many
7134 # convenience libraries get linked in and end up exceeding
7135 # the spec.
7136 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
7137 save_libobjs=$libobjs
7138 fi
7139 save_output=$output
7140 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
7141
7142 # Clear the reloadable object creation command queue and
7143 # initialize k to one.
7144 test_cmds=
7145 concat_cmds=
7146 objlist=
7147 last_robj=
7148 k=1
7149
7150 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
7151 output=${output_objdir}/${output_la}.lnkscript
7152 func_verbose "creating GNU ld script: $output"
7153 $ECHO 'INPUT (' > $output
7154 for obj in $save_libobjs
7155 do
7156 $ECHO "$obj" >> $output
7157 done
7158 $ECHO ')' >> $output
7159 delfiles="$delfiles $output"
7160 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
7161 output=${output_objdir}/${output_la}.lnk
7162 func_verbose "creating linker input file list: $output"
7163 : > $output
7164 set x $save_libobjs
7165 shift
7166 firstobj=
7167 if test "$compiler_needs_object" = yes; then
7168 firstobj="$1 "
7169 shift
7170 fi
7171 for obj
7172 do
7173 $ECHO "$obj" >> $output
7174 done
7175 delfiles="$delfiles $output"
7176 output=$firstobj\"$file_list_spec$output\"
7177 else
7178 if test -n "$save_libobjs"; then
7179 func_verbose "creating reloadable object files..."
7180 output=$output_objdir/$output_la-${k}.$objext
7181 eval test_cmds=\"$reload_cmds\"
7182 func_len " $test_cmds"
7183 len0=$func_len_result
7184 len=$len0
7185
7186 # Loop over the list of objects to be linked.
7187 for obj in $save_libobjs
7188 do
7189 func_len " $obj"
7190 func_arith $len + $func_len_result
7191 len=$func_arith_result
7192 if test "X$objlist" = X ||
7193 test "$len" -lt "$max_cmd_len"; then
7194 func_append objlist " $obj"
7195 else
7196 # The command $test_cmds is almost too long, add a
7197 # command to the queue.
7198 if test "$k" -eq 1 ; then
7199 # The first file doesn't have a previous command to add.
7200 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7201 else
7202 # All subsequent reloadable object files will link in
7203 # the last one created.
7204 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
7205 fi
7206 last_robj=$output_objdir/$output_la-${k}.$objext
7207 func_arith $k + 1
7208 k=$func_arith_result
7209 output=$output_objdir/$output_la-${k}.$objext
7210 objlist=$obj
7211 func_len " $last_robj"
7212 func_arith $len0 + $func_len_result
7213 len=$func_arith_result
7214 fi
7215 done
7216 # Handle the remaining objects by creating one last
7217 # reloadable object file. All subsequent reloadable object
7218 # files will link in the last one created.
7219 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7220 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
7221 if test -n "$last_robj"; then
7222 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
7223 fi
7224 delfiles="$delfiles $output"
7225
7226 else
7227 output=
7228 fi
7229
7230 if ${skipped_export-false}; then
7231 func_verbose "generating symbol list for \`$libname.la'"
7232 export_symbols="$output_objdir/$libname.exp"
7233 $opt_dry_run || $RM $export_symbols
7234 libobjs=$output
7235 # Append the command to create the export file.
7236 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7237 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
7238 if test -n "$last_robj"; then
7239 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
7240 fi
7241 fi
7242
7243 test -n "$save_libobjs" &&
7244 func_verbose "creating a temporary reloadable object file: $output"
7245
7246 # Loop through the commands generated above and execute them.
7247 save_ifs="$IFS"; IFS='~'
7248 for cmd in $concat_cmds; do
7249 IFS="$save_ifs"
7250 $opt_silent || {
7251 func_quote_for_expand "$cmd"
7252 eval "func_echo $func_quote_for_expand_result"
7253 }
7254 $opt_dry_run || eval "$cmd" || {
7255 lt_exit=$?
7256
7257 # Restore the uninstalled library and exit
7258 if test "$mode" = relink; then
7259 ( cd "$output_objdir" && \
7260 $RM "${realname}T" && \
7261 $MV "${realname}U" "$realname" )
7262 fi
7263
7264 exit $lt_exit
7265 }
7266 done
7267 IFS="$save_ifs"
7268
7269 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
7270 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7271 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7272 fi
7273 fi
7274
7275 if ${skipped_export-false}; then
7276 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7277 tmp_export_symbols="$export_symbols"
7278 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7279 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7280 fi
7281
7282 if test -n "$orig_export_symbols"; then
7283 # The given exports_symbols file has to be filtered, so filter it.
7284 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7285 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7286 # 's' commands which not all seds can handle. GNU sed should be fine
7287 # though. Also, the filter scales superlinearly with the number of
7288 # global variables. join(1) would be nice here, but unfortunately
7289 # isn't a blessed tool.
7290 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7291 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7292 export_symbols=$output_objdir/$libname.def
7293 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7294 fi
7295 fi
7296
7297 libobjs=$output
7298 # Restore the value of output.
7299 output=$save_output
7300
7301 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
7302 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7303 test "X$libobjs" = "X " && libobjs=
7304 fi
7305 # Expand the library linking commands again to reset the
7306 # value of $libobjs for piecewise linking.
7307
7308 # Do each of the archive commands.
7309 if test "$module" = yes && test -n "$module_cmds" ; then
7310 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7311 cmds=$module_expsym_cmds
7312 else
7313 cmds=$module_cmds
7314 fi
7315 else
7316 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7317 cmds=$archive_expsym_cmds
7318 else
7319 cmds=$archive_cmds
7320 fi
7321 fi
7322 fi
7323
7324 if test -n "$delfiles"; then
7325 # Append the command to remove temporary files to $cmds.
7326 eval cmds=\"\$cmds~\$RM $delfiles\"
7327 fi
7328
7329 # Add any objects from preloaded convenience libraries
7330 if test -n "$dlprefiles"; then
7331 gentop="$output_objdir/${outputname}x"
7332 generated="$generated $gentop"
7333
7334 func_extract_archives $gentop $dlprefiles
7335 libobjs="$libobjs $func_extract_archives_result"
7336 test "X$libobjs" = "X " && libobjs=
7337 fi
7338
7339 save_ifs="$IFS"; IFS='~'
7340 for cmd in $cmds; do
7341 IFS="$save_ifs"
7342 eval cmd=\"$cmd\"
7343 $opt_silent || {
7344 func_quote_for_expand "$cmd"
7345 eval "func_echo $func_quote_for_expand_result"
7346 }
7347 $opt_dry_run || eval "$cmd" || {
7348 lt_exit=$?
7349
7350 # Restore the uninstalled library and exit
7351 if test "$mode" = relink; then
7352 ( cd "$output_objdir" && \
7353 $RM "${realname}T" && \
7354 $MV "${realname}U" "$realname" )
7355 fi
7356
7357 exit $lt_exit
7358 }
7359 done
7360 IFS="$save_ifs"
7361
7362 # Restore the uninstalled library and exit
7363 if test "$mode" = relink; then
7364 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
7365
7366 if test -n "$convenience"; then
7367 if test -z "$whole_archive_flag_spec"; then
7368 func_show_eval '${RM}r "$gentop"'
7369 fi
7370 fi
7371
7372 exit $EXIT_SUCCESS
7373 fi
7374
7375 # Create links to the real library.
7376 for linkname in $linknames; do
7377 if test "$realname" != "$linkname"; then
7378 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
7379 fi
7380 done
7381
7382 # If -module or -export-dynamic was specified, set the dlname.
7383 if test "$module" = yes || test "$export_dynamic" = yes; then
7384 # On all known operating systems, these are identical.
7385 dlname="$soname"
7386 fi
7387 fi
7388 ;;
7389
7390 obj)
7391 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7392 func_warning "\`-dlopen' is ignored for objects"
7393 fi
7394
7395 case " $deplibs" in
7396 *\ -l* | *\ -L*)
7397 func_warning "\`-l' and \`-L' are ignored for objects" ;;
7398 esac
7399
7400 test -n "$rpath" && \
7401 func_warning "\`-rpath' is ignored for objects"
7402
7403 test -n "$xrpath" && \
7404 func_warning "\`-R' is ignored for objects"
7405
7406 test -n "$vinfo" && \
7407 func_warning "\`-version-info' is ignored for objects"
7408
7409 test -n "$release" && \
7410 func_warning "\`-release' is ignored for objects"
7411
7412 case $output in
7413 *.lo)
7414 test -n "$objs$old_deplibs" && \
7415 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
7416
7417 libobj=$output
7418 func_lo2o "$libobj"
7419 obj=$func_lo2o_result
7420 ;;
7421 *)
7422 libobj=
7423 obj="$output"
7424 ;;
7425 esac
7426
7427 # Delete the old objects.
7428 $opt_dry_run || $RM $obj $libobj
7429
7430 # Objects from convenience libraries. This assumes
7431 # single-version convenience libraries. Whenever we create
7432 # different ones for PIC/non-PIC, this we'll have to duplicate
7433 # the extraction.
7434 reload_conv_objs=
7435 gentop=
7436 # reload_cmds runs $LD directly, so let us get rid of
7437 # -Wl from whole_archive_flag_spec and hope we can get by with
7438 # turning comma into space..
7439 wl=
7440
7441 if test -n "$convenience"; then
7442 if test -n "$whole_archive_flag_spec"; then
7443 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7444 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
7445 else
7446 gentop="$output_objdir/${obj}x"
7447 generated="$generated $gentop"
7448
7449 func_extract_archives $gentop $convenience
7450 reload_conv_objs="$reload_objs $func_extract_archives_result"
7451 fi
7452 fi
7453
7454 # Create the old-style object.
7455 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
7456
7457 output="$obj"
7458 func_execute_cmds "$reload_cmds" 'exit $?'
7459
7460 # Exit if we aren't doing a library object file.
7461 if test -z "$libobj"; then
7462 if test -n "$gentop"; then
7463 func_show_eval '${RM}r "$gentop"'
7464 fi
7465
7466 exit $EXIT_SUCCESS
7467 fi
7468
7469 if test "$build_libtool_libs" != yes; then
7470 if test -n "$gentop"; then
7471 func_show_eval '${RM}r "$gentop"'
7472 fi
7473
7474 # Create an invalid libtool object if no PIC, so that we don't
7475 # accidentally link it into a program.
7476 # $show "echo timestamp > $libobj"
7477 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
7478 exit $EXIT_SUCCESS
7479 fi
7480
7481 if test -n "$pic_flag" || test "$pic_mode" != default; then
7482 # Only do commands if we really have different PIC objects.
7483 reload_objs="$libobjs $reload_conv_objs"
7484 output="$libobj"
7485 func_execute_cmds "$reload_cmds" 'exit $?'
7486 fi
7487
7488 if test -n "$gentop"; then
7489 func_show_eval '${RM}r "$gentop"'
7490 fi
7491
7492 exit $EXIT_SUCCESS
7493 ;;
7494
7495 prog)
7496 case $host in
7497 *cygwin*) func_stripname '' '.exe' "$output"
7498 output=$func_stripname_result.exe;;
7499 esac
7500 test -n "$vinfo" && \
7501 func_warning "\`-version-info' is ignored for programs"
7502
7503 test -n "$release" && \
7504 func_warning "\`-release' is ignored for programs"
7505
7506 test "$preload" = yes \
7507 && test "$dlopen_support" = unknown \
7508 && test "$dlopen_self" = unknown \
7509 && test "$dlopen_self_static" = unknown && \
7510 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
7511
7512 case $host in
7513 *-*-rhapsody* | *-*-darwin1.[012])
7514 # On Rhapsody replace the C library is the System framework
7515 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7516 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7517 ;;
7518 esac
7519
7520 case $host in
7521 *-*-darwin*)
7522 # Don't allow lazy linking, it breaks C++ global constructors
7523 # But is supposedly fixed on 10.4 or later (yay!).
7524 if test "$tagname" = CXX ; then
7525 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
7526 10.[0123])
7527 compile_command="$compile_command ${wl}-bind_at_load"
7528 finalize_command="$finalize_command ${wl}-bind_at_load"
7529 ;;
7530 esac
7531 fi
7532 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7533 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7534 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7535 ;;
7536 esac
7537
7538
7539 # move library search paths that coincide with paths to not yet
7540 # installed libraries to the beginning of the library search list
7541 new_libs=
7542 for path in $notinst_path; do
7543 case " $new_libs " in
7544 *" -L$path/$objdir "*) ;;
7545 *)
7546 case " $compile_deplibs " in
7547 *" -L$path/$objdir "*)
7548 new_libs="$new_libs -L$path/$objdir" ;;
7549 esac
7550 ;;
7551 esac
7552 done
7553 for deplib in $compile_deplibs; do
7554 case $deplib in
7555 -L*)
7556 case " $new_libs " in
7557 *" $deplib "*) ;;
7558 *) new_libs="$new_libs $deplib" ;;
7559 esac
7560 ;;
7561 *) new_libs="$new_libs $deplib" ;;
7562 esac
7563 done
7564 compile_deplibs="$new_libs"
7565
7566
7567 compile_command="$compile_command $compile_deplibs"
7568 finalize_command="$finalize_command $finalize_deplibs"
7569
7570 if test -n "$rpath$xrpath"; then
7571 # If the user specified any rpath flags, then add them.
7572 for libdir in $rpath $xrpath; do
7573 # This is the magic to use -rpath.
7574 case "$finalize_rpath " in
7575 *" $libdir "*) ;;
7576 *) finalize_rpath="$finalize_rpath $libdir" ;;
7577 esac
7578 done
7579 fi
7580
7581 # Now hardcode the library paths
7582 rpath=
7583 hardcode_libdirs=
7584 for libdir in $compile_rpath $finalize_rpath; do
7585 if test -n "$hardcode_libdir_flag_spec"; then
7586 if test -n "$hardcode_libdir_separator"; then
7587 if test -z "$hardcode_libdirs"; then
7588 hardcode_libdirs="$libdir"
7589 else
7590 # Just accumulate the unique libdirs.
7591 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7592 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7593 ;;
7594 *)
7595 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7596 ;;
7597 esac
7598 fi
7599 else
7600 eval flag=\"$hardcode_libdir_flag_spec\"
7601 rpath="$rpath $flag"
7602 fi
7603 elif test -n "$runpath_var"; then
7604 case "$perm_rpath " in
7605 *" $libdir "*) ;;
7606 *) perm_rpath="$perm_rpath $libdir" ;;
7607 esac
7608 fi
7609 case $host in
7610 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7611 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
7612 case :$dllsearchpath: in
7613 *":$libdir:"*) ;;
7614 ::) dllsearchpath=$libdir;;
7615 *) dllsearchpath="$dllsearchpath:$libdir";;
7616 esac
7617 case :$dllsearchpath: in
7618 *":$testbindir:"*) ;;
7619 ::) dllsearchpath=$testbindir;;
7620 *) dllsearchpath="$dllsearchpath:$testbindir";;
7621 esac
7622 ;;
7623 esac
7624 done
7625 # Substitute the hardcoded libdirs into the rpath.
7626 if test -n "$hardcode_libdir_separator" &&
7627 test -n "$hardcode_libdirs"; then
7628 libdir="$hardcode_libdirs"
7629 eval rpath=\" $hardcode_libdir_flag_spec\"
7630 fi
7631 compile_rpath="$rpath"
7632
7633 rpath=
7634 hardcode_libdirs=
7635 for libdir in $finalize_rpath; do
7636 if test -n "$hardcode_libdir_flag_spec"; then
7637 if test -n "$hardcode_libdir_separator"; then
7638 if test -z "$hardcode_libdirs"; then
7639 hardcode_libdirs="$libdir"
7640 else
7641 # Just accumulate the unique libdirs.
7642 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7643 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7644 ;;
7645 *)
7646 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7647 ;;
7648 esac
7649 fi
7650 else
7651 eval flag=\"$hardcode_libdir_flag_spec\"
7652 rpath="$rpath $flag"
7653 fi
7654 elif test -n "$runpath_var"; then
7655 case "$finalize_perm_rpath " in
7656 *" $libdir "*) ;;
7657 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
7658 esac
7659 fi
7660 done
7661 # Substitute the hardcoded libdirs into the rpath.
7662 if test -n "$hardcode_libdir_separator" &&
7663 test -n "$hardcode_libdirs"; then
7664 libdir="$hardcode_libdirs"
7665 eval rpath=\" $hardcode_libdir_flag_spec\"
7666 fi
7667 finalize_rpath="$rpath"
7668
7669 if test -n "$libobjs" && test "$build_old_libs" = yes; then
7670 # Transform all the library objects into standard objects.
7671 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7672 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7673 fi
7674
7675 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
7676
7677 # template prelinking step
7678 if test -n "$prelink_cmds"; then
7679 func_execute_cmds "$prelink_cmds" 'exit $?'
7680 fi
7681
7682 wrappers_required=yes
7683 case $host in
7684 *cygwin* | *mingw* )
7685 if test "$build_libtool_libs" != yes; then
7686 wrappers_required=no
7687 fi
7688 ;;
7689 *cegcc)
7690 # Disable wrappers for cegcc, we are cross compiling anyway.
7691 wrappers_required=no
7692 ;;
7693 *)
7694 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
7695 wrappers_required=no
7696 fi
7697 ;;
7698 esac
7699 if test "$wrappers_required" = no; then
7700 # Replace the output file specification.
7701 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7702 link_command="$compile_command$compile_rpath"
7703
7704 # We have no uninstalled library dependencies, so finalize right now.
7705 exit_status=0
7706 func_show_eval "$link_command" 'exit_status=$?'
7707
7708 # Delete the generated files.
7709 if test -f "$output_objdir/${outputname}S.${objext}"; then
7710 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
7711 fi
7712
7713 exit $exit_status
7714 fi
7715
7716 if test -n "$compile_shlibpath$finalize_shlibpath"; then
7717 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
7718 fi
7719 if test -n "$finalize_shlibpath"; then
7720 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
7721 fi
7722
7723 compile_var=
7724 finalize_var=
7725 if test -n "$runpath_var"; then
7726 if test -n "$perm_rpath"; then
7727 # We should set the runpath_var.
7728 rpath=
7729 for dir in $perm_rpath; do
7730 rpath="$rpath$dir:"
7731 done
7732 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
7733 fi
7734 if test -n "$finalize_perm_rpath"; then
7735 # We should set the runpath_var.
7736 rpath=
7737 for dir in $finalize_perm_rpath; do
7738 rpath="$rpath$dir:"
7739 done
7740 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
7741 fi
7742 fi
7743
7744 if test "$no_install" = yes; then
7745 # We don't need to create a wrapper script.
7746 link_command="$compile_var$compile_command$compile_rpath"
7747 # Replace the output file specification.
7748 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7749 # Delete the old output file.
7750 $opt_dry_run || $RM $output
7751 # Link the executable and exit
7752 func_show_eval "$link_command" 'exit $?'
7753 exit $EXIT_SUCCESS
7754 fi
7755
7756 if test "$hardcode_action" = relink; then
7757 # Fast installation is not supported
7758 link_command="$compile_var$compile_command$compile_rpath"
7759 relink_command="$finalize_var$finalize_command$finalize_rpath"
7760
7761 func_warning "this platform does not like uninstalled shared libraries"
7762 func_warning "\`$output' will be relinked during installation"
7763 else
7764 if test "$fast_install" != no; then
7765 link_command="$finalize_var$compile_command$finalize_rpath"
7766 if test "$fast_install" = yes; then
7767 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
7768 else
7769 # fast_install is set to needless
7770 relink_command=
7771 fi
7772 else
7773 link_command="$compile_var$compile_command$compile_rpath"
7774 relink_command="$finalize_var$finalize_command$finalize_rpath"
7775 fi
7776 fi
7777
7778 # Replace the output file specification.
7779 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
7780
7781 # Delete the old output files.
7782 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
7783
7784 func_show_eval "$link_command" 'exit $?'
7785
7786 # Now create the wrapper script.
7787 func_verbose "creating $output"
7788
7789 # Quote the relink command for shipping.
7790 if test -n "$relink_command"; then
7791 # Preserve any variables that may affect compiler behavior
7792 for var in $variables_saved_for_relink; do
7793 if eval test -z \"\${$var+set}\"; then
7794 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
7795 elif eval var_value=\$$var; test -z "$var_value"; then
7796 relink_command="$var=; export $var; $relink_command"
7797 else
7798 func_quote_for_eval "$var_value"
7799 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
7800 fi
7801 done
7802 relink_command="(cd `pwd`; $relink_command)"
7803 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7804 fi
7805
7806 # Quote $ECHO for shipping.
7807 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7808 case $progpath in
7809 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7810 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7811 esac
7812 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7813 else
7814 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
7815 fi
7816
7817 # Only actually do things if not in dry run mode.
7818 $opt_dry_run || {
7819 # win32 will think the script is a binary if it has
7820 # a .exe suffix, so we strip it off here.
7821 case $output in
7822 *.exe) func_stripname '' '.exe' "$output"
7823 output=$func_stripname_result ;;
7824 esac
7825 # test for cygwin because mv fails w/o .exe extensions
7826 case $host in
7827 *cygwin*)
7828 exeext=.exe
7829 func_stripname '' '.exe' "$outputname"
7830 outputname=$func_stripname_result ;;
7831 *) exeext= ;;
7832 esac
7833 case $host in
7834 *cygwin* | *mingw* )
7835 func_dirname_and_basename "$output" "" "."
7836 output_name=$func_basename_result
7837 output_path=$func_dirname_result
7838 cwrappersource="$output_path/$objdir/lt-$output_name.c"
7839 cwrapper="$output_path/$output_name.exe"
7840 $RM $cwrappersource $cwrapper
7841 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
7842
7843 func_emit_cwrapperexe_src > $cwrappersource
7844
7845 # The wrapper executable is built using the $host compiler,
7846 # because it contains $host paths and files. If cross-
7847 # compiling, it, like the target executable, must be
7848 # executed on the $host or under an emulation environment.
7849 $opt_dry_run || {
7850 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
7851 $STRIP $cwrapper
7852 }
7853
7854 # Now, create the wrapper script for func_source use:
7855 func_ltwrapper_scriptname $cwrapper
7856 $RM $func_ltwrapper_scriptname_result
7857 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
7858 $opt_dry_run || {
7859 # note: this script will not be executed, so do not chmod.
7860 if test "x$build" = "x$host" ; then
7861 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
7862 else
7863 func_emit_wrapper no > $func_ltwrapper_scriptname_result
7864 fi
7865 }
7866 ;;
7867 * )
7868 $RM $output
7869 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
7870
7871 func_emit_wrapper no > $output
7872 chmod +x $output
7873 ;;
7874 esac
7875 }
7876 exit $EXIT_SUCCESS
7877 ;;
7878 esac
7879
7880 # See if we need to build an old-fashioned archive.
7881 for oldlib in $oldlibs; do
7882
7883 if test "$build_libtool_libs" = convenience; then
7884 oldobjs="$libobjs_save $symfileobj"
7885 addlibs="$convenience"
7886 build_libtool_libs=no
7887 else
7888 if test "$build_libtool_libs" = module; then
7889 oldobjs="$libobjs_save"
7890 build_libtool_libs=no
7891 else
7892 oldobjs="$old_deplibs $non_pic_objects"
7893 if test "$preload" = yes && test -f "$symfileobj"; then
7894 oldobjs="$oldobjs $symfileobj"
7895 fi
7896 fi
7897 addlibs="$old_convenience"
7898 fi
7899
7900 if test -n "$addlibs"; then
7901 gentop="$output_objdir/${outputname}x"
7902 generated="$generated $gentop"
7903
7904 func_extract_archives $gentop $addlibs
7905 oldobjs="$oldobjs $func_extract_archives_result"
7906 fi
7907
7908 # Do each command in the archive commands.
7909 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
7910 cmds=$old_archive_from_new_cmds
7911 else
7912
7913 # Add any objects from preloaded convenience libraries
7914 if test -n "$dlprefiles"; then
7915 gentop="$output_objdir/${outputname}x"
7916 generated="$generated $gentop"
7917
7918 func_extract_archives $gentop $dlprefiles
7919 oldobjs="$oldobjs $func_extract_archives_result"
7920 fi
7921
7922 # POSIX demands no paths to be encoded in archives. We have
7923 # to avoid creating archives with duplicate basenames if we
7924 # might have to extract them afterwards, e.g., when creating a
7925 # static archive out of a convenience library, or when linking
7926 # the entirety of a libtool archive into another (currently
7927 # not supported by libtool).
7928 if (for obj in $oldobjs
7929 do
7930 func_basename "$obj"
7931 $ECHO "$func_basename_result"
7932 done | sort | sort -uc >/dev/null 2>&1); then
7933 :
7934 else
7935 $ECHO "copying selected object files to avoid basename conflicts..."
7936 gentop="$output_objdir/${outputname}x"
7937 generated="$generated $gentop"
7938 func_mkdir_p "$gentop"
7939 save_oldobjs=$oldobjs
7940 oldobjs=
7941 counter=1
7942 for obj in $save_oldobjs
7943 do
7944 func_basename "$obj"
7945 objbase="$func_basename_result"
7946 case " $oldobjs " in
7947 " ") oldobjs=$obj ;;
7948 *[\ /]"$objbase "*)
7949 while :; do
7950 # Make sure we don't pick an alternate name that also
7951 # overlaps.
7952 newobj=lt$counter-$objbase
7953 func_arith $counter + 1
7954 counter=$func_arith_result
7955 case " $oldobjs " in
7956 *[\ /]"$newobj "*) ;;
7957 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
7958 esac
7959 done
7960 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7961 oldobjs="$oldobjs $gentop/$newobj"
7962 ;;
7963 *) oldobjs="$oldobjs $obj" ;;
7964 esac
7965 done
7966 fi
7967 eval cmds=\"$old_archive_cmds\"
7968
7969 func_len " $cmds"
7970 len=$func_len_result
7971 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7972 cmds=$old_archive_cmds
7973 else
7974 # the command line is too long to link in one step, link in parts
7975 func_verbose "using piecewise archive linking..."
7976 save_RANLIB=$RANLIB
7977 RANLIB=:
7978 objlist=
7979 concat_cmds=
7980 save_oldobjs=$oldobjs
7981 oldobjs=
7982 # Is there a better way of finding the last object in the list?
7983 for obj in $save_oldobjs
7984 do
7985 last_oldobj=$obj
7986 done
7987 eval test_cmds=\"$old_archive_cmds\"
7988 func_len " $test_cmds"
7989 len0=$func_len_result
7990 len=$len0
7991 for obj in $save_oldobjs
7992 do
7993 func_len " $obj"
7994 func_arith $len + $func_len_result
7995 len=$func_arith_result
7996 func_append objlist " $obj"
7997 if test "$len" -lt "$max_cmd_len"; then
7998 :
7999 else
8000 # the above command should be used before it gets too long
8001 oldobjs=$objlist
8002 if test "$obj" = "$last_oldobj" ; then
8003 RANLIB=$save_RANLIB
8004 fi
8005 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8006 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
8007 objlist=
8008 len=$len0
8009 fi
8010 done
8011 RANLIB=$save_RANLIB
8012 oldobjs=$objlist
8013 if test "X$oldobjs" = "X" ; then
8014 eval cmds=\"\$concat_cmds\"
8015 else
8016 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
8017 fi
8018 fi
8019 fi
8020 func_execute_cmds "$cmds" 'exit $?'
8021 done
8022
8023 test -n "$generated" && \
8024 func_show_eval "${RM}r$generated"
8025
8026 # Now create the libtool archive.
8027 case $output in
8028 *.la)
8029 old_library=
8030 test "$build_old_libs" = yes && old_library="$libname.$libext"
8031 func_verbose "creating $output"
8032
8033 # Preserve any variables that may affect compiler behavior
8034 for var in $variables_saved_for_relink; do
8035 if eval test -z \"\${$var+set}\"; then
8036 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
8037 elif eval var_value=\$$var; test -z "$var_value"; then
8038 relink_command="$var=; export $var; $relink_command"
8039 else
8040 func_quote_for_eval "$var_value"
8041 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
8042 fi
8043 done
8044 # Quote the link command for shipping.
8045 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8046 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8047 if test "$hardcode_automatic" = yes ; then
8048 relink_command=
8049 fi
8050
8051 # Only create the output if not a dry run.
8052 $opt_dry_run || {
8053 for installed in no yes; do
8054 if test "$installed" = yes; then
8055 if test -z "$install_libdir"; then
8056 break
8057 fi
8058 output="$output_objdir/$outputname"i
8059 # Replace all uninstalled libtool libraries with the installed ones
8060 newdependency_libs=
8061 for deplib in $dependency_libs; do
8062 case $deplib in
8063 *.la)
8064 func_basename "$deplib"
8065 name="$func_basename_result"
8066 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8067 test -z "$libdir" && \
8068 func_fatal_error "\`$deplib' is not a valid libtool archive"
8069 newdependency_libs="$newdependency_libs $libdir/$name"
8070 ;;
8071 *) newdependency_libs="$newdependency_libs $deplib" ;;
8072 esac
8073 done
8074 dependency_libs="$newdependency_libs"
8075 newdlfiles=
8076
8077 for lib in $dlfiles; do
8078 case $lib in
8079 *.la)
8080 func_basename "$lib"
8081 name="$func_basename_result"
8082 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8083 test -z "$libdir" && \
8084 func_fatal_error "\`$lib' is not a valid libtool archive"
8085 newdlfiles="$newdlfiles $libdir/$name"
8086 ;;
8087 *) newdlfiles="$newdlfiles $lib" ;;
8088 esac
8089 done
8090 dlfiles="$newdlfiles"
8091 newdlprefiles=
8092 for lib in $dlprefiles; do
8093 case $lib in
8094 *.la)
8095 # Only pass preopened files to the pseudo-archive (for
8096 # eventual linking with the app. that links it) if we
8097 # didn't already link the preopened objects directly into
8098 # the library:
8099 func_basename "$lib"
8100 name="$func_basename_result"
8101 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8102 test -z "$libdir" && \
8103 func_fatal_error "\`$lib' is not a valid libtool archive"
8104 newdlprefiles="$newdlprefiles $libdir/$name"
8105 ;;
8106 esac
8107 done
8108 dlprefiles="$newdlprefiles"
8109 else
8110 newdlfiles=
8111 for lib in $dlfiles; do
8112 case $lib in
8113 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8114 *) abs=`pwd`"/$lib" ;;
8115 esac
8116 newdlfiles="$newdlfiles $abs"
8117 done
8118 dlfiles="$newdlfiles"
8119 newdlprefiles=
8120 for lib in $dlprefiles; do
8121 case $lib in
8122 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8123 *) abs=`pwd`"/$lib" ;;
8124 esac
8125 newdlprefiles="$newdlprefiles $abs"
8126 done
8127 dlprefiles="$newdlprefiles"
8128 fi
8129 $RM $output
8130 # place dlname in correct position for cygwin
8131 tdlname=$dlname
8132 case $host,$output,$installed,$module,$dlname in
8133 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
8134 esac
8135 $ECHO > $output "\
8136# $outputname - a libtool library file
8137# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
8138#
8139# Please DO NOT delete this file!
8140# It is necessary for linking the library.
8141
8142# The name that we can dlopen(3).
8143dlname='$tdlname'
8144
8145# Names of this library.
8146library_names='$library_names'
8147
8148# The name of the static archive.
8149old_library='$old_library'
8150
8151# Linker flags that can not go in dependency_libs.
8152inherited_linker_flags='$new_inherited_linker_flags'
8153
8154# Libraries that this one depends upon.
8155dependency_libs='$dependency_libs'
8156
8157# Names of additional weak libraries provided by this library
8158weak_library_names='$weak_libs'
8159
8160# Version information for $libname.
8161current=$current
8162age=$age
8163revision=$revision
8164
8165# Is this an already installed library?
8166installed=$installed
8167
8168# Should we warn about portability when linking against -modules?
8169shouldnotlink=$module
8170
8171# Files to dlopen/dlpreopen
8172dlopen='$dlfiles'
8173dlpreopen='$dlprefiles'
8174
8175# Directory that this library needs to be installed in:
8176libdir='$install_libdir'"
8177 if test "$installed" = no && test "$need_relink" = yes; then
8178 $ECHO >> $output "\
8179relink_command=\"$relink_command\""
8180 fi
8181 done
8182 }
8183
8184 # Do a symbolic link so that the libtool archive can be found in
8185 # LD_LIBRARY_PATH before the program is installed.
8186 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
8187 ;;
8188 esac
8189 exit $EXIT_SUCCESS
8190}
8191
8192{ test "$mode" = link || test "$mode" = relink; } &&
8193 func_mode_link ${1+"$@"}
8194
8195
8196# func_mode_uninstall arg...
8197func_mode_uninstall ()
8198{
8199 $opt_debug
8200 RM="$nonopt"
8201 files=
8202 rmforce=
8203 exit_status=0
8204
8205 # This variable tells wrapper scripts just to set variables rather
8206 # than running their programs.
8207 libtool_install_magic="$magic"
8208
8209 for arg
8210 do
8211 case $arg in
8212 -f) RM="$RM $arg"; rmforce=yes ;;
8213 -*) RM="$RM $arg" ;;
8214 *) files="$files $arg" ;;
8215 esac
8216 done
8217
8218 test -z "$RM" && \
8219 func_fatal_help "you must specify an RM program"
8220
8221 rmdirs=
8222
8223 origobjdir="$objdir"
8224 for file in $files; do
8225 func_dirname "$file" "" "."
8226 dir="$func_dirname_result"
8227 if test "X$dir" = X.; then
8228 objdir="$origobjdir"
8229 else
8230 objdir="$dir/$origobjdir"
8231 fi
8232 func_basename "$file"
8233 name="$func_basename_result"
8234 test "$mode" = uninstall && objdir="$dir"
8235
8236 # Remember objdir for removal later, being careful to avoid duplicates
8237 if test "$mode" = clean; then
8238 case " $rmdirs " in
8239 *" $objdir "*) ;;
8240 *) rmdirs="$rmdirs $objdir" ;;
8241 esac
8242 fi
8243
8244 # Don't error if the file doesn't exist and rm -f was used.
8245 if { test -L "$file"; } >/dev/null 2>&1 ||
8246 { test -h "$file"; } >/dev/null 2>&1 ||
8247 test -f "$file"; then
8248 :
8249 elif test -d "$file"; then
8250 exit_status=1
8251 continue
8252 elif test "$rmforce" = yes; then
8253 continue
8254 fi
8255
8256 rmfiles="$file"
8257
8258 case $name in
8259 *.la)
8260 # Possibly a libtool archive, so verify it.
8261 if func_lalib_p "$file"; then
8262 func_source $dir/$name
8263
8264 # Delete the libtool libraries and symlinks.
8265 for n in $library_names; do
8266 rmfiles="$rmfiles $objdir/$n"
8267 done
8268 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8269
8270 case "$mode" in
8271 clean)
8272 case " $library_names " in
8273 # " " in the beginning catches empty $dlname
8274 *" $dlname "*) ;;
8275 *) rmfiles="$rmfiles $objdir/$dlname" ;;
8276 esac
8277 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8278 ;;
8279 uninstall)
8280 if test -n "$library_names"; then
8281 # Do each command in the postuninstall commands.
8282 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8283 fi
8284
8285 if test -n "$old_library"; then
8286 # Do each command in the old_postuninstall commands.
8287 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8288 fi
8289 # FIXME: should reinstall the best remaining shared library.
8290 ;;
8291 esac
8292 fi
8293 ;;
8294
8295 *.lo)
8296 # Possibly a libtool object, so verify it.
8297 if func_lalib_p "$file"; then
8298
8299 # Read the .lo file
8300 func_source $dir/$name
8301
8302 # Add PIC object to the list of files to remove.
8303 if test -n "$pic_object" &&
8304 test "$pic_object" != none; then
8305 rmfiles="$rmfiles $dir/$pic_object"
8306 fi
8307
8308 # Add non-PIC object to the list of files to remove.
8309 if test -n "$non_pic_object" &&
8310 test "$non_pic_object" != none; then
8311 rmfiles="$rmfiles $dir/$non_pic_object"
8312 fi
8313 fi
8314 ;;
8315
8316 *)
8317 if test "$mode" = clean ; then
8318 noexename=$name
8319 case $file in
8320 *.exe)
8321 func_stripname '' '.exe' "$file"
8322 file=$func_stripname_result
8323 func_stripname '' '.exe' "$name"
8324 noexename=$func_stripname_result
8325 # $file with .exe has already been added to rmfiles,
8326 # add $file without .exe
8327 rmfiles="$rmfiles $file"
8328 ;;
8329 esac
8330 # Do a test to see if this is a libtool program.
8331 if func_ltwrapper_p "$file"; then
8332 if func_ltwrapper_executable_p "$file"; then
8333 func_ltwrapper_scriptname "$file"
8334 relink_command=
8335 func_source $func_ltwrapper_scriptname_result
8336 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
8337 else
8338 relink_command=
8339 func_source $dir/$noexename
8340 fi
8341
8342 # note $name still contains .exe if it was in $file originally
8343 # as does the version of $file that was added into $rmfiles
8344 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
8345 if test "$fast_install" = yes && test -n "$relink_command"; then
8346 rmfiles="$rmfiles $objdir/lt-$name"
8347 fi
8348 if test "X$noexename" != "X$name" ; then
8349 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
8350 fi
8351 fi
8352 fi
8353 ;;
8354 esac
8355 func_show_eval "$RM $rmfiles" 'exit_status=1'
8356 done
8357 objdir="$origobjdir"
8358
8359 # Try to remove the ${objdir}s in the directories where we deleted files
8360 for dir in $rmdirs; do
8361 if test -d "$dir"; then
8362 func_show_eval "rmdir $dir >/dev/null 2>&1"
8363 fi
8364 done
8365
8366 exit $exit_status
8367}
8368
8369{ test "$mode" = uninstall || test "$mode" = clean; } &&
8370 func_mode_uninstall ${1+"$@"}
8371
8372test -z "$mode" && {
8373 help="$generic_help"
8374 func_fatal_help "you must specify a MODE"
8375}
8376
8377test -z "$exec_cmd" && \
8378 func_fatal_help "invalid operation mode \`$mode'"
8379
8380if test -n "$exec_cmd"; then
8381 eval exec "$exec_cmd"
8382 exit $EXIT_FAILURE
8383fi
8384
8385exit $exit_status
8386
8387
8388# The TAGs below are defined such that we never get into a situation
8389# in which we disable both kinds of libraries. Given conflicting
8390# choices, we go for a static library, that is the most portable,
8391# since we can't tell whether shared libraries were disabled because
8392# the user asked for that or because the platform doesn't support
8393# them. This is particularly important on AIX, because we don't
8394# support having both static and shared libraries enabled at the same
8395# time on that platform, so we default to a shared-only configuration.
8396# If a disable-shared tag is given, we'll fallback to a static-only
8397# configuration. But we'll never go from static-only to shared-only.
8398
8399# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
8400build_libtool_libs=no
8401build_old_libs=yes
8402# ### END LIBTOOL TAG CONFIG: disable-shared
8403
8404# ### BEGIN LIBTOOL TAG CONFIG: disable-static
8405build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
8406# ### END LIBTOOL TAG CONFIG: disable-static
8407
8408# Local Variables:
8409# mode:shell-script
8410# sh-indentation:2
8411# End:
8412# vi:sw=2
8413
diff --git a/libraries/embryo/m4/ac_attribute.m4 b/libraries/embryo/m4/ac_attribute.m4
deleted file mode 100644
index 23479a9..0000000
--- a/libraries/embryo/m4/ac_attribute.m4
+++ /dev/null
@@ -1,47 +0,0 @@
1dnl Copyright (C) 2004-2008 Kim Woelders
2dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
3dnl That code is public domain and can be freely used or copied.
4dnl Originally snatched from somewhere...
5
6dnl Macro for checking if the compiler supports __attribute__
7
8dnl Usage: AC_C___ATTRIBUTE__
9dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__
10dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is
11dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused))
12dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is
13dnl defined to nothing.
14
15AC_DEFUN([AC_C___ATTRIBUTE__],
16[
17
18AC_MSG_CHECKING([for __attribute__])
19
20AC_CACHE_VAL([ac_cv___attribute__],
21 [AC_TRY_COMPILE(
22 [
23#include <stdlib.h>
24
25int func(int x);
26int foo(int x __attribute__ ((unused)))
27{
28 exit(1);
29}
30 ],
31 [],
32 [ac_cv___attribute__="yes"],
33 [ac_cv___attribute__="no"]
34 )])
35
36AC_MSG_RESULT($ac_cv___attribute__)
37
38if test "x${ac_cv___attribute__}" = "xyes" ; then
39 AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__])
40 AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused])
41 else
42 AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused])
43fi
44
45])
46
47dnl End of ac_attribute.m4
diff --git a/libraries/embryo/m4/efl_binary.m4 b/libraries/embryo/m4/efl_binary.m4
deleted file mode 100644
index 93d6934..0000000
--- a/libraries/embryo/m4/efl_binary.m4
+++ /dev/null
@@ -1,44 +0,0 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
diff --git a/libraries/embryo/m4/efl_doxygen.m4 b/libraries/embryo/m4/efl_doxygen.m4
deleted file mode 100644
index d83ed68..0000000
--- a/libraries/embryo/m4/efl_doxygen.m4
+++ /dev/null
@@ -1,97 +0,0 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_ARG_ENABLE([doc],
18 [AC_HELP_STRING(
19 [--disable-doc],
20 [Disable documentation build @<:@default=enabled@:>@])],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_enable_doc="yes"
24 else
25 efl_enable_doc="no"
26 fi
27 ],
28 [efl_enable_doc="yes"])
29
30AC_MSG_CHECKING([whether to build documentation])
31AC_MSG_RESULT([${efl_enable_doc}])
32
33if test "x${efl_enable_doc}" = "xyes" ; then
34
35dnl Specify the file name, without path
36
37 efl_doxygen="doxygen"
38
39 AC_ARG_WITH([doxygen],
40 [AC_HELP_STRING(
41 [--with-doxygen=FILE],
42 [doxygen program to use @<:@default=doxygen@:>@])],
43
44dnl Check the given doxygen program.
45
46 [efl_doxygen=${withval}
47 AC_CHECK_PROG([efl_have_doxygen],
48 [${efl_doxygen}],
49 [yes],
50 [no])
51 if test "x${efl_have_doxygen}" = "xno" ; then
52 echo "WARNING:"
53 echo "The doxygen program you specified:"
54 echo "${efl_doxygen}"
55 echo "was not found. Please check the path and make sure "
56 echo "the program exists and is executable."
57 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
58 fi
59 ],
60 [AC_CHECK_PROG([efl_have_doxygen],
61 [${efl_doxygen}],
62 [yes],
63 [no])
64 if test "x${efl_have_doxygen}" = "xno" ; then
65 echo "WARNING:"
66 echo "The doxygen program was not found in your execute path."
67 echo "You may have doxygen installed somewhere not covered by your path."
68 echo ""
69 echo "If this is the case make sure you have the packages installed, AND"
70 echo "that the doxygen program is in your execute path (see your"
71 echo "shell manual page on setting the \$PATH environment variable), OR"
72 echo "alternatively, specify the program to use with --with-doxygen."
73 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
74 fi
75 ])
76fi
77
78dnl
79dnl Substitution
80dnl
81AC_SUBST([efl_doxygen])
82
83if ! test "x${efl_have_doxygen}" = "xyes" ; then
84 efl_enable_doc="no"
85fi
86
87AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
88
89if test "x${efl_enable_doc}" = "xyes" ; then
90 m4_default([$1], [:])
91else
92 m4_default([$2], [:])
93fi
94
95])
96
97dnl End of efl_doxygen.m4
diff --git a/libraries/embryo/m4/efl_fnmatch.m4 b/libraries/embryo/m4/efl_fnmatch.m4
deleted file mode 100644
index c857046..0000000
--- a/libraries/embryo/m4/efl_fnmatch.m4
+++ /dev/null
@@ -1,31 +0,0 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if fnmatch functions are available or not.
5
6dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
8
9AC_DEFUN([EFL_CHECK_FNMATCH],
10[
11
12AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
13
14if test "x${_efl_have_fnmatch}" = "xyes" ; then
15 AC_SEARCH_LIBS([fnmatch],
16 [fnmatch evil exotic iberty],
17 [_efl_have_fnmatch="yes"],
18 [_efl_have_fnmatch="no"])
19fi
20
21EFL_FNMATCH_LIBS=""
22
23if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
24 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
25fi
26
27AC_SUBST(EFL_FNMATCH_LIBS)
28
29AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])
30
31])
diff --git a/libraries/embryo/m4/efl_gettimeofday.m4 b/libraries/embryo/m4/efl_gettimeofday.m4
deleted file mode 100644
index 9b767e5..0000000
--- a/libraries/embryo/m4/efl_gettimeofday.m4
+++ /dev/null
@@ -1,48 +0,0 @@
1dnl Copyright (C) 2011 Cedric Bail <cedric.bail@free.fr>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check for gettimeofday definition
5
6dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
7dnl Define EFL_HAVE_GETTIMEOFDAY
8
9AC_DEFUN([EFL_CHECK_GETTIMEOFDAY],
10[
11
12_efl_have_gettimeofday="no"
13
14AC_LINK_IFELSE(
15 [AC_LANG_PROGRAM([[
16#include <stdlib.h>
17#include <sys/time.h>
18 ]],
19 [[
20int res;
21res = gettimeofday(NULL, NULL);
22 ]])],
23 [_efl_have_gettimeofday="yes"],
24 [_efl_have_gettimeofday="no"])
25
26if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then
27 SAVE_LIBS="${LIBS}"
28 SAVE_CFLAGS="${CFLAGS}"
29 LIBS="${LIBS} ${EXOTIC_LIBS}"
30 CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}"
31 AC_LINK_IFELSE(
32 [AC_LANG_PROGRAM([[
33#include <Exotic.h>
34 ]],
35 [[
36int res;
37res = gettimeofday(NULL, NULL);
38 ]])],
39 [_efl_have_gettimeofday="yes"],
40 [_efl_have_gettimeofday="no"])
41fi
42
43if test "x${_efl_have_gettimeofday}" = "xyes"; then
44 AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.])
45fi
46
47AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2])
48])
diff --git a/libraries/embryo/m4/efl_path_max.m4 b/libraries/embryo/m4/efl_path_max.m4
deleted file mode 100644
index f57bfd2..0000000
--- a/libraries/embryo/m4/efl_path_max.m4
+++ /dev/null
@@ -1,36 +0,0 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int i = PATH_MAX;
24 ]])],
25 [AC_MSG_RESULT([yes])],
26 [
27 AC_DEFINE_UNQUOTED([PATH_MAX],
28 [${default_max}],
29 [default value since PATH_MAX is not defined])
30 AC_MSG_RESULT([no: using ${default_max}])
31 ])
32
33AC_LANG_POP([C])
34
35])
36dnl end of efl_path_max.m4
diff --git a/libraries/embryo/m4/libtool.m4 b/libraries/embryo/m4/libtool.m4
deleted file mode 100644
index a3fee53..0000000
--- a/libraries/embryo/m4/libtool.m4
+++ /dev/null
@@ -1,7377 +0,0 @@
1# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2#
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4# 2006, 2007, 2008 Free Software Foundation, Inc.
5# Written by Gordon Matzigkeit, 1996
6#
7# This file is free software; the Free Software Foundation gives
8# unlimited permission to copy and/or distribute it, with or without
9# modifications, as long as this notice is preserved.
10
11m4_define([_LT_COPYING], [dnl
12# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13# 2006, 2007, 2008 Free Software Foundation, Inc.
14# Written by Gordon Matzigkeit, 1996
15#
16# This file is part of GNU Libtool.
17#
18# GNU Libtool is free software; you can redistribute it and/or
19# modify it under the terms of the GNU General Public License as
20# published by the Free Software Foundation; either version 2 of
21# the License, or (at your option) any later version.
22#
23# As a special exception to the GNU General Public License,
24# if you distribute this file as part of a program or library that
25# is built using GNU Libtool, you may include this file under the
26# same distribution terms that you use for the rest of that program.
27#
28# GNU Libtool is distributed in the hope that it will be useful,
29# but WITHOUT ANY WARRANTY; without even the implied warranty of
30# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31# GNU General Public License for more details.
32#
33# You should have received a copy of the GNU General Public License
34# along with GNU Libtool; see the file COPYING. If not, a copy
35# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
36# obtained by writing to the Free Software Foundation, Inc.,
37# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38])
39
40# serial 56 LT_INIT
41
42
43# LT_PREREQ(VERSION)
44# ------------------
45# Complain and exit if this libtool version is less that VERSION.
46m4_defun([LT_PREREQ],
47[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
48 [m4_default([$3],
49 [m4_fatal([Libtool version $1 or higher is required],
50 63)])],
51 [$2])])
52
53
54# _LT_CHECK_BUILDDIR
55# ------------------
56# Complain if the absolute build directory name contains unusual characters
57m4_defun([_LT_CHECK_BUILDDIR],
58[case `pwd` in
59 *\ * | *\ *)
60 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
61esac
62])
63
64
65# LT_INIT([OPTIONS])
66# ------------------
67AC_DEFUN([LT_INIT],
68[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
69AC_BEFORE([$0], [LT_LANG])dnl
70AC_BEFORE([$0], [LT_OUTPUT])dnl
71AC_BEFORE([$0], [LTDL_INIT])dnl
72m4_require([_LT_CHECK_BUILDDIR])dnl
73
74dnl Autoconf doesn't catch unexpanded LT_ macros by default:
75m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
76m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
77dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
78dnl unless we require an AC_DEFUNed macro:
79AC_REQUIRE([LTOPTIONS_VERSION])dnl
80AC_REQUIRE([LTSUGAR_VERSION])dnl
81AC_REQUIRE([LTVERSION_VERSION])dnl
82AC_REQUIRE([LTOBSOLETE_VERSION])dnl
83m4_require([_LT_PROG_LTMAIN])dnl
84
85dnl Parse OPTIONS
86_LT_SET_OPTIONS([$0], [$1])
87
88# This can be used to rebuild libtool when needed
89LIBTOOL_DEPS="$ltmain"
90
91# Always use our own libtool.
92LIBTOOL='$(SHELL) $(top_builddir)/libtool'
93AC_SUBST(LIBTOOL)dnl
94
95_LT_SETUP
96
97# Only expand once:
98m4_define([LT_INIT])
99])# LT_INIT
100
101# Old names:
102AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
103AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
104dnl aclocal-1.4 backwards compatibility:
105dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
106dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
107
108
109# _LT_CC_BASENAME(CC)
110# -------------------
111# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
112m4_defun([_LT_CC_BASENAME],
113[for cc_temp in $1""; do
114 case $cc_temp in
115 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117 \-*) ;;
118 *) break;;
119 esac
120done
121cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
122])
123
124
125# _LT_FILEUTILS_DEFAULTS
126# ----------------------
127# It is okay to use these file commands and assume they have been set
128# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
129m4_defun([_LT_FILEUTILS_DEFAULTS],
130[: ${CP="cp -f"}
131: ${MV="mv -f"}
132: ${RM="rm -f"}
133])# _LT_FILEUTILS_DEFAULTS
134
135
136# _LT_SETUP
137# ---------
138m4_defun([_LT_SETUP],
139[AC_REQUIRE([AC_CANONICAL_HOST])dnl
140AC_REQUIRE([AC_CANONICAL_BUILD])dnl
141_LT_DECL([], [host_alias], [0], [The host system])dnl
142_LT_DECL([], [host], [0])dnl
143_LT_DECL([], [host_os], [0])dnl
144dnl
145_LT_DECL([], [build_alias], [0], [The build system])dnl
146_LT_DECL([], [build], [0])dnl
147_LT_DECL([], [build_os], [0])dnl
148dnl
149AC_REQUIRE([AC_PROG_CC])dnl
150AC_REQUIRE([LT_PATH_LD])dnl
151AC_REQUIRE([LT_PATH_NM])dnl
152dnl
153AC_REQUIRE([AC_PROG_LN_S])dnl
154test -z "$LN_S" && LN_S="ln -s"
155_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
156dnl
157AC_REQUIRE([LT_CMD_MAX_LEN])dnl
158_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
159_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
160dnl
161m4_require([_LT_FILEUTILS_DEFAULTS])dnl
162m4_require([_LT_CHECK_SHELL_FEATURES])dnl
163m4_require([_LT_CMD_RELOAD])dnl
164m4_require([_LT_CHECK_MAGIC_METHOD])dnl
165m4_require([_LT_CMD_OLD_ARCHIVE])dnl
166m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
167
168_LT_CONFIG_LIBTOOL_INIT([
169# See if we are running on zsh, and set the options which allow our
170# commands through without removal of \ escapes INIT.
171if test -n "\${ZSH_VERSION+set}" ; then
172 setopt NO_GLOB_SUBST
173fi
174])
175if test -n "${ZSH_VERSION+set}" ; then
176 setopt NO_GLOB_SUBST
177fi
178
179_LT_CHECK_OBJDIR
180
181m4_require([_LT_TAG_COMPILER])dnl
182_LT_PROG_ECHO_BACKSLASH
183
184case $host_os in
185aix3*)
186 # AIX sometimes has problems with the GCC collect2 program. For some
187 # reason, if we set the COLLECT_NAMES environment variable, the problems
188 # vanish in a puff of smoke.
189 if test "X${COLLECT_NAMES+set}" != Xset; then
190 COLLECT_NAMES=
191 export COLLECT_NAMES
192 fi
193 ;;
194esac
195
196# Sed substitution that helps us do robust quoting. It backslashifies
197# metacharacters that are still active within double-quoted strings.
198sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
199
200# Same as above, but do not quote variable references.
201double_quote_subst='s/\([["`\\]]\)/\\\1/g'
202
203# Sed substitution to delay expansion of an escaped shell variable in a
204# double_quote_subst'ed string.
205delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
206
207# Sed substitution to delay expansion of an escaped single quote.
208delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
209
210# Sed substitution to avoid accidental globbing in evaled expressions
211no_glob_subst='s/\*/\\\*/g'
212
213# Global variables:
214ofile=libtool
215can_build_shared=yes
216
217# All known linkers require a `.a' archive for static linking (except MSVC,
218# which needs '.lib').
219libext=a
220
221with_gnu_ld="$lt_cv_prog_gnu_ld"
222
223old_CC="$CC"
224old_CFLAGS="$CFLAGS"
225
226# Set sane defaults for various variables
227test -z "$CC" && CC=cc
228test -z "$LTCC" && LTCC=$CC
229test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
230test -z "$LD" && LD=ld
231test -z "$ac_objext" && ac_objext=o
232
233_LT_CC_BASENAME([$compiler])
234
235# Only perform the check for file, if the check method requires it
236test -z "$MAGIC_CMD" && MAGIC_CMD=file
237case $deplibs_check_method in
238file_magic*)
239 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
240 _LT_PATH_MAGIC
241 fi
242 ;;
243esac
244
245# Use C for the default configuration in the libtool script
246LT_SUPPORTED_TAG([CC])
247_LT_LANG_C_CONFIG
248_LT_LANG_DEFAULT_CONFIG
249_LT_CONFIG_COMMANDS
250])# _LT_SETUP
251
252
253# _LT_PROG_LTMAIN
254# ---------------
255# Note that this code is called both from `configure', and `config.status'
256# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
257# `config.status' has no value for ac_aux_dir unless we are using Automake,
258# so we pass a copy along to make sure it has a sensible value anyway.
259m4_defun([_LT_PROG_LTMAIN],
260[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
261_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
262ltmain="$ac_aux_dir/ltmain.sh"
263])# _LT_PROG_LTMAIN
264
265
266## ------------------------------------- ##
267## Accumulate code for creating libtool. ##
268## ------------------------------------- ##
269
270# So that we can recreate a full libtool script including additional
271# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
272# in macros and then make a single call at the end using the `libtool'
273# label.
274
275
276# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
277# ----------------------------------------
278# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
279m4_define([_LT_CONFIG_LIBTOOL_INIT],
280[m4_ifval([$1],
281 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
282 [$1
283])])])
284
285# Initialize.
286m4_define([_LT_OUTPUT_LIBTOOL_INIT])
287
288
289# _LT_CONFIG_LIBTOOL([COMMANDS])
290# ------------------------------
291# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
292m4_define([_LT_CONFIG_LIBTOOL],
293[m4_ifval([$1],
294 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
295 [$1
296])])])
297
298# Initialize.
299m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
300
301
302# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
303# -----------------------------------------------------
304m4_defun([_LT_CONFIG_SAVE_COMMANDS],
305[_LT_CONFIG_LIBTOOL([$1])
306_LT_CONFIG_LIBTOOL_INIT([$2])
307])
308
309
310# _LT_FORMAT_COMMENT([COMMENT])
311# -----------------------------
312# Add leading comment marks to the start of each line, and a trailing
313# full-stop to the whole comment if one is not present already.
314m4_define([_LT_FORMAT_COMMENT],
315[m4_ifval([$1], [
316m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
317 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
318)])
319
320
321
322## ------------------------ ##
323## FIXME: Eliminate VARNAME ##
324## ------------------------ ##
325
326
327# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
328# -------------------------------------------------------------------
329# CONFIGNAME is the name given to the value in the libtool script.
330# VARNAME is the (base) name used in the configure script.
331# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
332# VARNAME. Any other value will be used directly.
333m4_define([_LT_DECL],
334[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
335 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
336 [m4_ifval([$1], [$1], [$2])])
337 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
338 m4_ifval([$4],
339 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
340 lt_dict_add_subkey([lt_decl_dict], [$2],
341 [tagged?], [m4_ifval([$5], [yes], [no])])])
342])
343
344
345# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
346# --------------------------------------------------------
347m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
348
349
350# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
351# ------------------------------------------------
352m4_define([lt_decl_tag_varnames],
353[_lt_decl_filter([tagged?], [yes], $@)])
354
355
356# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
357# ---------------------------------------------------------
358m4_define([_lt_decl_filter],
359[m4_case([$#],
360 [0], [m4_fatal([$0: too few arguments: $#])],
361 [1], [m4_fatal([$0: too few arguments: $#: $1])],
362 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
363 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
364 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
365])
366
367
368# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
369# --------------------------------------------------
370m4_define([lt_decl_quote_varnames],
371[_lt_decl_filter([value], [1], $@)])
372
373
374# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
375# ---------------------------------------------------
376m4_define([lt_decl_dquote_varnames],
377[_lt_decl_filter([value], [2], $@)])
378
379
380# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
381# ---------------------------------------------------
382m4_define([lt_decl_varnames_tagged],
383[m4_assert([$# <= 2])dnl
384_$0(m4_quote(m4_default([$1], [[, ]])),
385 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
386 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
387m4_define([_lt_decl_varnames_tagged],
388[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
389
390
391# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
392# ------------------------------------------------
393m4_define([lt_decl_all_varnames],
394[_$0(m4_quote(m4_default([$1], [[, ]])),
395 m4_if([$2], [],
396 m4_quote(lt_decl_varnames),
397 m4_quote(m4_shift($@))))[]dnl
398])
399m4_define([_lt_decl_all_varnames],
400[lt_join($@, lt_decl_varnames_tagged([$1],
401 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
402])
403
404
405# _LT_CONFIG_STATUS_DECLARE([VARNAME])
406# ------------------------------------
407# Quote a variable value, and forward it to `config.status' so that its
408# declaration there will have the same value as in `configure'. VARNAME
409# must have a single quote delimited value for this to work.
410m4_define([_LT_CONFIG_STATUS_DECLARE],
411[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
412
413
414# _LT_CONFIG_STATUS_DECLARATIONS
415# ------------------------------
416# We delimit libtool config variables with single quotes, so when
417# we write them to config.status, we have to be sure to quote all
418# embedded single quotes properly. In configure, this macro expands
419# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
420#
421# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
422m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
423[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
424 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
425
426
427# _LT_LIBTOOL_TAGS
428# ----------------
429# Output comment and list of tags supported by the script
430m4_defun([_LT_LIBTOOL_TAGS],
431[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
432available_tags="_LT_TAGS"dnl
433])
434
435
436# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
437# -----------------------------------
438# Extract the dictionary values for VARNAME (optionally with TAG) and
439# expand to a commented shell variable setting:
440#
441# # Some comment about what VAR is for.
442# visible_name=$lt_internal_name
443m4_define([_LT_LIBTOOL_DECLARE],
444[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
445 [description])))[]dnl
446m4_pushdef([_libtool_name],
447 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
448m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
449 [0], [_libtool_name=[$]$1],
450 [1], [_libtool_name=$lt_[]$1],
451 [2], [_libtool_name=$lt_[]$1],
452 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
453m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
454])
455
456
457# _LT_LIBTOOL_CONFIG_VARS
458# -----------------------
459# Produce commented declarations of non-tagged libtool config variables
460# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
461# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
462# section) are produced by _LT_LIBTOOL_TAG_VARS.
463m4_defun([_LT_LIBTOOL_CONFIG_VARS],
464[m4_foreach([_lt_var],
465 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
466 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
467
468
469# _LT_LIBTOOL_TAG_VARS(TAG)
470# -------------------------
471m4_define([_LT_LIBTOOL_TAG_VARS],
472[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
473 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
474
475
476# _LT_TAGVAR(VARNAME, [TAGNAME])
477# ------------------------------
478m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
479
480
481# _LT_CONFIG_COMMANDS
482# -------------------
483# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
484# variables for single and double quote escaping we saved from calls
485# to _LT_DECL, we can put quote escaped variables declarations
486# into `config.status', and then the shell code to quote escape them in
487# for loops in `config.status'. Finally, any additional code accumulated
488# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
489m4_defun([_LT_CONFIG_COMMANDS],
490[AC_PROVIDE_IFELSE([LT_OUTPUT],
491 dnl If the libtool generation code has been placed in $CONFIG_LT,
492 dnl instead of duplicating it all over again into config.status,
493 dnl then we will have config.status run $CONFIG_LT later, so it
494 dnl needs to know what name is stored there:
495 [AC_CONFIG_COMMANDS([libtool],
496 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
497 dnl If the libtool generation code is destined for config.status,
498 dnl expand the accumulated commands and init code now:
499 [AC_CONFIG_COMMANDS([libtool],
500 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
501])#_LT_CONFIG_COMMANDS
502
503
504# Initialize.
505m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
506[
507
508# The HP-UX ksh and POSIX shell print the target directory to stdout
509# if CDPATH is set.
510(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
511
512sed_quote_subst='$sed_quote_subst'
513double_quote_subst='$double_quote_subst'
514delay_variable_subst='$delay_variable_subst'
515_LT_CONFIG_STATUS_DECLARATIONS
516LTCC='$LTCC'
517LTCFLAGS='$LTCFLAGS'
518compiler='$compiler_DEFAULT'
519
520# Quote evaled strings.
521for var in lt_decl_all_varnames([[ \
522]], lt_decl_quote_varnames); do
523 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
524 *[[\\\\\\\`\\"\\\$]]*)
525 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
526 ;;
527 *)
528 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
529 ;;
530 esac
531done
532
533# Double-quote double-evaled strings.
534for var in lt_decl_all_varnames([[ \
535]], lt_decl_dquote_varnames); do
536 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
537 *[[\\\\\\\`\\"\\\$]]*)
538 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
539 ;;
540 *)
541 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
542 ;;
543 esac
544done
545
546# Fix-up fallback echo if it was mangled by the above quoting rules.
547case \$lt_ECHO in
548*'\\\[$]0 --fallback-echo"')dnl "
549 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
550 ;;
551esac
552
553_LT_OUTPUT_LIBTOOL_INIT
554])
555
556
557# LT_OUTPUT
558# ---------
559# This macro allows early generation of the libtool script (before
560# AC_OUTPUT is called), incase it is used in configure for compilation
561# tests.
562AC_DEFUN([LT_OUTPUT],
563[: ${CONFIG_LT=./config.lt}
564AC_MSG_NOTICE([creating $CONFIG_LT])
565cat >"$CONFIG_LT" <<_LTEOF
566#! $SHELL
567# Generated by $as_me.
568# Run this file to recreate a libtool stub with the current configuration.
569
570lt_cl_silent=false
571SHELL=\${CONFIG_SHELL-$SHELL}
572_LTEOF
573
574cat >>"$CONFIG_LT" <<\_LTEOF
575AS_SHELL_SANITIZE
576_AS_PREPARE
577
578exec AS_MESSAGE_FD>&1
579exec AS_MESSAGE_LOG_FD>>config.log
580{
581 echo
582 AS_BOX([Running $as_me.])
583} >&AS_MESSAGE_LOG_FD
584
585lt_cl_help="\
586\`$as_me' creates a local libtool stub from the current configuration,
587for use in further configure time tests before the real libtool is
588generated.
589
590Usage: $[0] [[OPTIONS]]
591
592 -h, --help print this help, then exit
593 -V, --version print version number, then exit
594 -q, --quiet do not print progress messages
595 -d, --debug don't remove temporary files
596
597Report bugs to <bug-libtool@gnu.org>."
598
599lt_cl_version="\
600m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
601m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
602configured by $[0], generated by m4_PACKAGE_STRING.
603
604Copyright (C) 2008 Free Software Foundation, Inc.
605This config.lt script is free software; the Free Software Foundation
606gives unlimited permision to copy, distribute and modify it."
607
608while test $[#] != 0
609do
610 case $[1] in
611 --version | --v* | -V )
612 echo "$lt_cl_version"; exit 0 ;;
613 --help | --h* | -h )
614 echo "$lt_cl_help"; exit 0 ;;
615 --debug | --d* | -d )
616 debug=: ;;
617 --quiet | --q* | --silent | --s* | -q )
618 lt_cl_silent=: ;;
619
620 -*) AC_MSG_ERROR([unrecognized option: $[1]
621Try \`$[0] --help' for more information.]) ;;
622
623 *) AC_MSG_ERROR([unrecognized argument: $[1]
624Try \`$[0] --help' for more information.]) ;;
625 esac
626 shift
627done
628
629if $lt_cl_silent; then
630 exec AS_MESSAGE_FD>/dev/null
631fi
632_LTEOF
633
634cat >>"$CONFIG_LT" <<_LTEOF
635_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
636_LTEOF
637
638cat >>"$CONFIG_LT" <<\_LTEOF
639AC_MSG_NOTICE([creating $ofile])
640_LT_OUTPUT_LIBTOOL_COMMANDS
641AS_EXIT(0)
642_LTEOF
643chmod +x "$CONFIG_LT"
644
645# configure is writing to config.log, but config.lt does its own redirection,
646# appending to config.log, which fails on DOS, as config.log is still kept
647# open by configure. Here we exec the FD to /dev/null, effectively closing
648# config.log, so it can be properly (re)opened and appended to by config.lt.
649if test "$no_create" != yes; then
650 lt_cl_success=:
651 test "$silent" = yes &&
652 lt_config_lt_args="$lt_config_lt_args --quiet"
653 exec AS_MESSAGE_LOG_FD>/dev/null
654 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
655 exec AS_MESSAGE_LOG_FD>>config.log
656 $lt_cl_success || AS_EXIT(1)
657fi
658])# LT_OUTPUT
659
660
661# _LT_CONFIG(TAG)
662# ---------------
663# If TAG is the built-in tag, create an initial libtool script with a
664# default configuration from the untagged config vars. Otherwise add code
665# to config.status for appending the configuration named by TAG from the
666# matching tagged config vars.
667m4_defun([_LT_CONFIG],
668[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
669_LT_CONFIG_SAVE_COMMANDS([
670 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
671 m4_if(_LT_TAG, [C], [
672 # See if we are running on zsh, and set the options which allow our
673 # commands through without removal of \ escapes.
674 if test -n "${ZSH_VERSION+set}" ; then
675 setopt NO_GLOB_SUBST
676 fi
677
678 cfgfile="${ofile}T"
679 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
680 $RM "$cfgfile"
681
682 cat <<_LT_EOF >> "$cfgfile"
683#! $SHELL
684
685# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
686# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
687# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
688# NOTE: Changes made to this file will be lost: look at ltmain.sh.
689#
690_LT_COPYING
691_LT_LIBTOOL_TAGS
692
693# ### BEGIN LIBTOOL CONFIG
694_LT_LIBTOOL_CONFIG_VARS
695_LT_LIBTOOL_TAG_VARS
696# ### END LIBTOOL CONFIG
697
698_LT_EOF
699
700 case $host_os in
701 aix3*)
702 cat <<\_LT_EOF >> "$cfgfile"
703# AIX sometimes has problems with the GCC collect2 program. For some
704# reason, if we set the COLLECT_NAMES environment variable, the problems
705# vanish in a puff of smoke.
706if test "X${COLLECT_NAMES+set}" != Xset; then
707 COLLECT_NAMES=
708 export COLLECT_NAMES
709fi
710_LT_EOF
711 ;;
712 esac
713
714 _LT_PROG_LTMAIN
715
716 # We use sed instead of cat because bash on DJGPP gets confused if
717 # if finds mixed CR/LF and LF-only lines. Since sed operates in
718 # text mode, it properly converts lines to CR/LF. This bash problem
719 # is reportedly fixed, but why not run on old versions too?
720 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
721 || (rm -f "$cfgfile"; exit 1)
722
723 _LT_PROG_XSI_SHELLFNS
724
725 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
726 || (rm -f "$cfgfile"; exit 1)
727
728 mv -f "$cfgfile" "$ofile" ||
729 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
730 chmod +x "$ofile"
731],
732[cat <<_LT_EOF >> "$ofile"
733
734dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
735dnl in a comment (ie after a #).
736# ### BEGIN LIBTOOL TAG CONFIG: $1
737_LT_LIBTOOL_TAG_VARS(_LT_TAG)
738# ### END LIBTOOL TAG CONFIG: $1
739_LT_EOF
740])dnl /m4_if
741],
742[m4_if([$1], [], [
743 PACKAGE='$PACKAGE'
744 VERSION='$VERSION'
745 TIMESTAMP='$TIMESTAMP'
746 RM='$RM'
747 ofile='$ofile'], [])
748])dnl /_LT_CONFIG_SAVE_COMMANDS
749])# _LT_CONFIG
750
751
752# LT_SUPPORTED_TAG(TAG)
753# ---------------------
754# Trace this macro to discover what tags are supported by the libtool
755# --tag option, using:
756# autoconf --trace 'LT_SUPPORTED_TAG:$1'
757AC_DEFUN([LT_SUPPORTED_TAG], [])
758
759
760# C support is built-in for now
761m4_define([_LT_LANG_C_enabled], [])
762m4_define([_LT_TAGS], [])
763
764
765# LT_LANG(LANG)
766# -------------
767# Enable libtool support for the given language if not already enabled.
768AC_DEFUN([LT_LANG],
769[AC_BEFORE([$0], [LT_OUTPUT])dnl
770m4_case([$1],
771 [C], [_LT_LANG(C)],
772 [C++], [_LT_LANG(CXX)],
773 [Java], [_LT_LANG(GCJ)],
774 [Fortran 77], [_LT_LANG(F77)],
775 [Fortran], [_LT_LANG(FC)],
776 [Windows Resource], [_LT_LANG(RC)],
777 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
778 [_LT_LANG($1)],
779 [m4_fatal([$0: unsupported language: "$1"])])])dnl
780])# LT_LANG
781
782
783# _LT_LANG(LANGNAME)
784# ------------------
785m4_defun([_LT_LANG],
786[m4_ifdef([_LT_LANG_]$1[_enabled], [],
787 [LT_SUPPORTED_TAG([$1])dnl
788 m4_append([_LT_TAGS], [$1 ])dnl
789 m4_define([_LT_LANG_]$1[_enabled], [])dnl
790 _LT_LANG_$1_CONFIG($1)])dnl
791])# _LT_LANG
792
793
794# _LT_LANG_DEFAULT_CONFIG
795# -----------------------
796m4_defun([_LT_LANG_DEFAULT_CONFIG],
797[AC_PROVIDE_IFELSE([AC_PROG_CXX],
798 [LT_LANG(CXX)],
799 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
800
801AC_PROVIDE_IFELSE([AC_PROG_F77],
802 [LT_LANG(F77)],
803 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
804
805AC_PROVIDE_IFELSE([AC_PROG_FC],
806 [LT_LANG(FC)],
807 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
808
809dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
810dnl pulling things in needlessly.
811AC_PROVIDE_IFELSE([AC_PROG_GCJ],
812 [LT_LANG(GCJ)],
813 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
814 [LT_LANG(GCJ)],
815 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
816 [LT_LANG(GCJ)],
817 [m4_ifdef([AC_PROG_GCJ],
818 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
819 m4_ifdef([A][M_PROG_GCJ],
820 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
821 m4_ifdef([LT_PROG_GCJ],
822 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
823
824AC_PROVIDE_IFELSE([LT_PROG_RC],
825 [LT_LANG(RC)],
826 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
827])# _LT_LANG_DEFAULT_CONFIG
828
829# Obsolete macros:
830AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
831AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
832AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
833AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
834dnl aclocal-1.4 backwards compatibility:
835dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
836dnl AC_DEFUN([AC_LIBTOOL_F77], [])
837dnl AC_DEFUN([AC_LIBTOOL_FC], [])
838dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
839
840
841# _LT_TAG_COMPILER
842# ----------------
843m4_defun([_LT_TAG_COMPILER],
844[AC_REQUIRE([AC_PROG_CC])dnl
845
846_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
847_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
848_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
849_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
850
851# If no C compiler was specified, use CC.
852LTCC=${LTCC-"$CC"}
853
854# If no C compiler flags were specified, use CFLAGS.
855LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
856
857# Allow CC to be a program name with arguments.
858compiler=$CC
859])# _LT_TAG_COMPILER
860
861
862# _LT_COMPILER_BOILERPLATE
863# ------------------------
864# Check for compiler boilerplate output or warnings with
865# the simple compiler test code.
866m4_defun([_LT_COMPILER_BOILERPLATE],
867[m4_require([_LT_DECL_SED])dnl
868ac_outfile=conftest.$ac_objext
869echo "$lt_simple_compile_test_code" >conftest.$ac_ext
870eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
871_lt_compiler_boilerplate=`cat conftest.err`
872$RM conftest*
873])# _LT_COMPILER_BOILERPLATE
874
875
876# _LT_LINKER_BOILERPLATE
877# ----------------------
878# Check for linker boilerplate output or warnings with
879# the simple link test code.
880m4_defun([_LT_LINKER_BOILERPLATE],
881[m4_require([_LT_DECL_SED])dnl
882ac_outfile=conftest.$ac_objext
883echo "$lt_simple_link_test_code" >conftest.$ac_ext
884eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885_lt_linker_boilerplate=`cat conftest.err`
886$RM -r conftest*
887])# _LT_LINKER_BOILERPLATE
888
889# _LT_REQUIRED_DARWIN_CHECKS
890# -------------------------
891m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
892 case $host_os in
893 rhapsody* | darwin*)
894 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
895 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
896 AC_CHECK_TOOL([LIPO], [lipo], [:])
897 AC_CHECK_TOOL([OTOOL], [otool], [:])
898 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
899 _LT_DECL([], [DSYMUTIL], [1],
900 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
901 _LT_DECL([], [NMEDIT], [1],
902 [Tool to change global to local symbols on Mac OS X])
903 _LT_DECL([], [LIPO], [1],
904 [Tool to manipulate fat objects and archives on Mac OS X])
905 _LT_DECL([], [OTOOL], [1],
906 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
907 _LT_DECL([], [OTOOL64], [1],
908 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
909
910 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
911 [lt_cv_apple_cc_single_mod=no
912 if test -z "${LT_MULTI_MODULE}"; then
913 # By default we will add the -single_module flag. You can override
914 # by either setting the environment variable LT_MULTI_MODULE
915 # non-empty at configure time, or by adding -multi_module to the
916 # link flags.
917 rm -rf libconftest.dylib*
918 echo "int foo(void){return 1;}" > conftest.c
919 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
920-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
921 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
922 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
923 _lt_result=$?
924 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
925 lt_cv_apple_cc_single_mod=yes
926 else
927 cat conftest.err >&AS_MESSAGE_LOG_FD
928 fi
929 rm -rf libconftest.dylib*
930 rm -f conftest.*
931 fi])
932 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
933 [lt_cv_ld_exported_symbols_list],
934 [lt_cv_ld_exported_symbols_list=no
935 save_LDFLAGS=$LDFLAGS
936 echo "_main" > conftest.sym
937 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
938 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
939 [lt_cv_ld_exported_symbols_list=yes],
940 [lt_cv_ld_exported_symbols_list=no])
941 LDFLAGS="$save_LDFLAGS"
942 ])
943 case $host_os in
944 rhapsody* | darwin1.[[012]])
945 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
946 darwin1.*)
947 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
948 darwin*) # darwin 5.x on
949 # if running on 10.5 or later, the deployment target defaults
950 # to the OS version, if on x86, and 10.4, the deployment
951 # target defaults to 10.4. Don't you love it?
952 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
953 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
954 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
955 10.[[012]]*)
956 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
957 10.*)
958 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
959 esac
960 ;;
961 esac
962 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
963 _lt_dar_single_mod='$single_module'
964 fi
965 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
966 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
967 else
968 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
969 fi
970 if test "$DSYMUTIL" != ":"; then
971 _lt_dsymutil='~$DSYMUTIL $lib || :'
972 else
973 _lt_dsymutil=
974 fi
975 ;;
976 esac
977])
978
979
980# _LT_DARWIN_LINKER_FEATURES
981# --------------------------
982# Checks for linker and compiler features on darwin
983m4_defun([_LT_DARWIN_LINKER_FEATURES],
984[
985 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
986 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
987 _LT_TAGVAR(hardcode_direct, $1)=no
988 _LT_TAGVAR(hardcode_automatic, $1)=yes
989 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
990 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
991 _LT_TAGVAR(link_all_deplibs, $1)=yes
992 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
993 case $cc_basename in
994 ifort*) _lt_dar_can_shared=yes ;;
995 *) _lt_dar_can_shared=$GCC ;;
996 esac
997 if test "$_lt_dar_can_shared" = "yes"; then
998 output_verbose_link_cmd=echo
999 _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}"
1000 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1001 _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}"
1002 _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}"
1003 m4_if([$1], [CXX],
1004[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1005 _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}"
1006 _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}"
1007 fi
1008],[])
1009 else
1010 _LT_TAGVAR(ld_shlibs, $1)=no
1011 fi
1012])
1013
1014# _LT_SYS_MODULE_PATH_AIX
1015# -----------------------
1016# Links a minimal program and checks the executable
1017# for the system default hardcoded library path. In most cases,
1018# this is /usr/lib:/lib, but when the MPI compilers are used
1019# the location of the communication and MPI libs are included too.
1020# If we don't find anything, use the default library path according
1021# to the aix ld manual.
1022m4_defun([_LT_SYS_MODULE_PATH_AIX],
1023[m4_require([_LT_DECL_SED])dnl
1024AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1025lt_aix_libpath_sed='
1026 /Import File Strings/,/^$/ {
1027 /^0/ {
1028 s/^0 *\(.*\)$/\1/
1029 p
1030 }
1031 }'
1032aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1033# Check for a 64-bit object if we didn't find anything.
1034if test -z "$aix_libpath"; then
1035 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1036fi],[])
1037if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1038])# _LT_SYS_MODULE_PATH_AIX
1039
1040
1041# _LT_SHELL_INIT(ARG)
1042# -------------------
1043m4_define([_LT_SHELL_INIT],
1044[ifdef([AC_DIVERSION_NOTICE],
1045 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1046 [AC_DIVERT_PUSH(NOTICE)])
1047$1
1048AC_DIVERT_POP
1049])# _LT_SHELL_INIT
1050
1051
1052# _LT_PROG_ECHO_BACKSLASH
1053# -----------------------
1054# Add some code to the start of the generated configure script which
1055# will find an echo command which doesn't interpret backslashes.
1056m4_defun([_LT_PROG_ECHO_BACKSLASH],
1057[_LT_SHELL_INIT([
1058# Check that we are running under the correct shell.
1059SHELL=${CONFIG_SHELL-/bin/sh}
1060
1061case X$lt_ECHO in
1062X*--fallback-echo)
1063 # Remove one level of quotation (which was required for Make).
1064 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1065 ;;
1066esac
1067
1068ECHO=${lt_ECHO-echo}
1069if test "X[$]1" = X--no-reexec; then
1070 # Discard the --no-reexec flag, and continue.
1071 shift
1072elif test "X[$]1" = X--fallback-echo; then
1073 # Avoid inline document here, it may be left over
1074 :
1075elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1076 # Yippee, $ECHO works!
1077 :
1078else
1079 # Restart under the correct shell.
1080 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1081fi
1082
1083if test "X[$]1" = X--fallback-echo; then
1084 # used as fallback echo
1085 shift
1086 cat <<_LT_EOF
1087[$]*
1088_LT_EOF
1089 exit 0
1090fi
1091
1092# The HP-UX ksh and POSIX shell print the target directory to stdout
1093# if CDPATH is set.
1094(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1095
1096if test -z "$lt_ECHO"; then
1097 if test "X${echo_test_string+set}" != Xset; then
1098 # find a string as large as possible, as long as the shell can cope with it
1099 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1100 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1101 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1102 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1103 then
1104 break
1105 fi
1106 done
1107 fi
1108
1109 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1110 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1111 test "X$echo_testing_string" = "X$echo_test_string"; then
1112 :
1113 else
1114 # The Solaris, AIX, and Digital Unix default echo programs unquote
1115 # backslashes. This makes it impossible to quote backslashes using
1116 # echo "$something" | sed 's/\\/\\\\/g'
1117 #
1118 # So, first we look for a working echo in the user's PATH.
1119
1120 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1121 for dir in $PATH /usr/ucb; do
1122 IFS="$lt_save_ifs"
1123 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1124 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1125 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1126 test "X$echo_testing_string" = "X$echo_test_string"; then
1127 ECHO="$dir/echo"
1128 break
1129 fi
1130 done
1131 IFS="$lt_save_ifs"
1132
1133 if test "X$ECHO" = Xecho; then
1134 # We didn't find a better echo, so look for alternatives.
1135 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1136 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1137 test "X$echo_testing_string" = "X$echo_test_string"; then
1138 # This shell has a builtin print -r that does the trick.
1139 ECHO='print -r'
1140 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1141 test "X$CONFIG_SHELL" != X/bin/ksh; then
1142 # If we have ksh, try running configure again with it.
1143 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1144 export ORIGINAL_CONFIG_SHELL
1145 CONFIG_SHELL=/bin/ksh
1146 export CONFIG_SHELL
1147 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1148 else
1149 # Try using printf.
1150 ECHO='printf %s\n'
1151 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1152 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1153 test "X$echo_testing_string" = "X$echo_test_string"; then
1154 # Cool, printf works
1155 :
1156 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1157 test "X$echo_testing_string" = 'X\t' &&
1158 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1159 test "X$echo_testing_string" = "X$echo_test_string"; then
1160 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1161 export CONFIG_SHELL
1162 SHELL="$CONFIG_SHELL"
1163 export SHELL
1164 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1165 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1166 test "X$echo_testing_string" = 'X\t' &&
1167 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1168 test "X$echo_testing_string" = "X$echo_test_string"; then
1169 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1170 else
1171 # maybe with a smaller string...
1172 prev=:
1173
1174 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1175 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1176 then
1177 break
1178 fi
1179 prev="$cmd"
1180 done
1181
1182 if test "$prev" != 'sed 50q "[$]0"'; then
1183 echo_test_string=`eval $prev`
1184 export echo_test_string
1185 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1186 else
1187 # Oops. We lost completely, so just stick with echo.
1188 ECHO=echo
1189 fi
1190 fi
1191 fi
1192 fi
1193 fi
1194fi
1195
1196# Copy echo and quote the copy suitably for passing to libtool from
1197# the Makefile, instead of quoting the original, which is used later.
1198lt_ECHO=$ECHO
1199if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1200 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1201fi
1202
1203AC_SUBST(lt_ECHO)
1204])
1205_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1206_LT_DECL([], [ECHO], [1],
1207 [An echo program that does not interpret backslashes])
1208])# _LT_PROG_ECHO_BACKSLASH
1209
1210
1211# _LT_ENABLE_LOCK
1212# ---------------
1213m4_defun([_LT_ENABLE_LOCK],
1214[AC_ARG_ENABLE([libtool-lock],
1215 [AS_HELP_STRING([--disable-libtool-lock],
1216 [avoid locking (might break parallel builds)])])
1217test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1218
1219# Some flags need to be propagated to the compiler or linker for good
1220# libtool support.
1221case $host in
1222ia64-*-hpux*)
1223 # Find out which ABI we are using.
1224 echo 'int i;' > conftest.$ac_ext
1225 if AC_TRY_EVAL(ac_compile); then
1226 case `/usr/bin/file conftest.$ac_objext` in
1227 *ELF-32*)
1228 HPUX_IA64_MODE="32"
1229 ;;
1230 *ELF-64*)
1231 HPUX_IA64_MODE="64"
1232 ;;
1233 esac
1234 fi
1235 rm -rf conftest*
1236 ;;
1237*-*-irix6*)
1238 # Find out which ABI we are using.
1239 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 if test "$lt_cv_prog_gnu_ld" = yes; then
1242 case `/usr/bin/file conftest.$ac_objext` in
1243 *32-bit*)
1244 LD="${LD-ld} -melf32bsmip"
1245 ;;
1246 *N32*)
1247 LD="${LD-ld} -melf32bmipn32"
1248 ;;
1249 *64-bit*)
1250 LD="${LD-ld} -melf64bmip"
1251 ;;
1252 esac
1253 else
1254 case `/usr/bin/file conftest.$ac_objext` in
1255 *32-bit*)
1256 LD="${LD-ld} -32"
1257 ;;
1258 *N32*)
1259 LD="${LD-ld} -n32"
1260 ;;
1261 *64-bit*)
1262 LD="${LD-ld} -64"
1263 ;;
1264 esac
1265 fi
1266 fi
1267 rm -rf conftest*
1268 ;;
1269
1270x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1271s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1272 # Find out which ABI we are using.
1273 echo 'int i;' > conftest.$ac_ext
1274 if AC_TRY_EVAL(ac_compile); then
1275 case `/usr/bin/file conftest.o` in
1276 *32-bit*)
1277 case $host in
1278 x86_64-*kfreebsd*-gnu)
1279 LD="${LD-ld} -m elf_i386_fbsd"
1280 ;;
1281 x86_64-*linux*)
1282 LD="${LD-ld} -m elf_i386"
1283 ;;
1284 ppc64-*linux*|powerpc64-*linux*)
1285 LD="${LD-ld} -m elf32ppclinux"
1286 ;;
1287 s390x-*linux*)
1288 LD="${LD-ld} -m elf_s390"
1289 ;;
1290 sparc64-*linux*)
1291 LD="${LD-ld} -m elf32_sparc"
1292 ;;
1293 esac
1294 ;;
1295 *64-bit*)
1296 case $host in
1297 x86_64-*kfreebsd*-gnu)
1298 LD="${LD-ld} -m elf_x86_64_fbsd"
1299 ;;
1300 x86_64-*linux*)
1301 LD="${LD-ld} -m elf_x86_64"
1302 ;;
1303 ppc*-*linux*|powerpc*-*linux*)
1304 LD="${LD-ld} -m elf64ppc"
1305 ;;
1306 s390*-*linux*|s390*-*tpf*)
1307 LD="${LD-ld} -m elf64_s390"
1308 ;;
1309 sparc*-*linux*)
1310 LD="${LD-ld} -m elf64_sparc"
1311 ;;
1312 esac
1313 ;;
1314 esac
1315 fi
1316 rm -rf conftest*
1317 ;;
1318
1319*-*-sco3.2v5*)
1320 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1321 SAVE_CFLAGS="$CFLAGS"
1322 CFLAGS="$CFLAGS -belf"
1323 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1324 [AC_LANG_PUSH(C)
1325 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1326 AC_LANG_POP])
1327 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1328 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1329 CFLAGS="$SAVE_CFLAGS"
1330 fi
1331 ;;
1332sparc*-*solaris*)
1333 # Find out which ABI we are using.
1334 echo 'int i;' > conftest.$ac_ext
1335 if AC_TRY_EVAL(ac_compile); then
1336 case `/usr/bin/file conftest.o` in
1337 *64-bit*)
1338 case $lt_cv_prog_gnu_ld in
1339 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1340 *)
1341 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1342 LD="${LD-ld} -64"
1343 fi
1344 ;;
1345 esac
1346 ;;
1347 esac
1348 fi
1349 rm -rf conftest*
1350 ;;
1351esac
1352
1353need_locks="$enable_libtool_lock"
1354])# _LT_ENABLE_LOCK
1355
1356
1357# _LT_CMD_OLD_ARCHIVE
1358# -------------------
1359m4_defun([_LT_CMD_OLD_ARCHIVE],
1360[AC_CHECK_TOOL(AR, ar, false)
1361test -z "$AR" && AR=ar
1362test -z "$AR_FLAGS" && AR_FLAGS=cru
1363_LT_DECL([], [AR], [1], [The archiver])
1364_LT_DECL([], [AR_FLAGS], [1])
1365
1366AC_CHECK_TOOL(STRIP, strip, :)
1367test -z "$STRIP" && STRIP=:
1368_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1369
1370AC_CHECK_TOOL(RANLIB, ranlib, :)
1371test -z "$RANLIB" && RANLIB=:
1372_LT_DECL([], [RANLIB], [1],
1373 [Commands used to install an old-style archive])
1374
1375# Determine commands to create old-style static archives.
1376old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1377old_postinstall_cmds='chmod 644 $oldlib'
1378old_postuninstall_cmds=
1379
1380if test -n "$RANLIB"; then
1381 case $host_os in
1382 openbsd*)
1383 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1384 ;;
1385 *)
1386 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1387 ;;
1388 esac
1389 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1390fi
1391_LT_DECL([], [old_postinstall_cmds], [2])
1392_LT_DECL([], [old_postuninstall_cmds], [2])
1393_LT_TAGDECL([], [old_archive_cmds], [2],
1394 [Commands used to build an old-style archive])
1395])# _LT_CMD_OLD_ARCHIVE
1396
1397
1398# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1399# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1400# ----------------------------------------------------------------
1401# Check whether the given compiler option works
1402AC_DEFUN([_LT_COMPILER_OPTION],
1403[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1404m4_require([_LT_DECL_SED])dnl
1405AC_CACHE_CHECK([$1], [$2],
1406 [$2=no
1407 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1408 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1409 lt_compiler_flag="$3"
1410 # Insert the option either (1) after the last *FLAGS variable, or
1411 # (2) before a word containing "conftest.", or (3) at the end.
1412 # Note that $ac_compile itself does not contain backslashes and begins
1413 # with a dollar sign (not a hyphen), so the echo should work correctly.
1414 # The option is referenced via a variable to avoid confusing sed.
1415 lt_compile=`echo "$ac_compile" | $SED \
1416 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1417 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1418 -e 's:$: $lt_compiler_flag:'`
1419 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1420 (eval "$lt_compile" 2>conftest.err)
1421 ac_status=$?
1422 cat conftest.err >&AS_MESSAGE_LOG_FD
1423 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1424 if (exit $ac_status) && test -s "$ac_outfile"; then
1425 # The compiler can only warn and ignore the option if not recognized
1426 # So say no if there are warnings other than the usual output.
1427 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1428 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1429 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1430 $2=yes
1431 fi
1432 fi
1433 $RM conftest*
1434])
1435
1436if test x"[$]$2" = xyes; then
1437 m4_if([$5], , :, [$5])
1438else
1439 m4_if([$6], , :, [$6])
1440fi
1441])# _LT_COMPILER_OPTION
1442
1443# Old name:
1444AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1445dnl aclocal-1.4 backwards compatibility:
1446dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1447
1448
1449# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1450# [ACTION-SUCCESS], [ACTION-FAILURE])
1451# ----------------------------------------------------
1452# Check whether the given linker option works
1453AC_DEFUN([_LT_LINKER_OPTION],
1454[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1455m4_require([_LT_DECL_SED])dnl
1456AC_CACHE_CHECK([$1], [$2],
1457 [$2=no
1458 save_LDFLAGS="$LDFLAGS"
1459 LDFLAGS="$LDFLAGS $3"
1460 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1461 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1462 # The linker can only warn and ignore the option if not recognized
1463 # So say no if there are warnings
1464 if test -s conftest.err; then
1465 # Append any errors to the config.log.
1466 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1467 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1468 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1469 if diff conftest.exp conftest.er2 >/dev/null; then
1470 $2=yes
1471 fi
1472 else
1473 $2=yes
1474 fi
1475 fi
1476 $RM -r conftest*
1477 LDFLAGS="$save_LDFLAGS"
1478])
1479
1480if test x"[$]$2" = xyes; then
1481 m4_if([$4], , :, [$4])
1482else
1483 m4_if([$5], , :, [$5])
1484fi
1485])# _LT_LINKER_OPTION
1486
1487# Old name:
1488AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1489dnl aclocal-1.4 backwards compatibility:
1490dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1491
1492
1493# LT_CMD_MAX_LEN
1494#---------------
1495AC_DEFUN([LT_CMD_MAX_LEN],
1496[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1497# find the maximum length of command line arguments
1498AC_MSG_CHECKING([the maximum length of command line arguments])
1499AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1500 i=0
1501 teststring="ABCD"
1502
1503 case $build_os in
1504 msdosdjgpp*)
1505 # On DJGPP, this test can blow up pretty badly due to problems in libc
1506 # (any single argument exceeding 2000 bytes causes a buffer overrun
1507 # during glob expansion). Even if it were fixed, the result of this
1508 # check would be larger than it should be.
1509 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1510 ;;
1511
1512 gnu*)
1513 # Under GNU Hurd, this test is not required because there is
1514 # no limit to the length of command line arguments.
1515 # Libtool will interpret -1 as no limit whatsoever
1516 lt_cv_sys_max_cmd_len=-1;
1517 ;;
1518
1519 cygwin* | mingw* | cegcc*)
1520 # On Win9x/ME, this test blows up -- it succeeds, but takes
1521 # about 5 minutes as the teststring grows exponentially.
1522 # Worse, since 9x/ME are not pre-emptively multitasking,
1523 # you end up with a "frozen" computer, even though with patience
1524 # the test eventually succeeds (with a max line length of 256k).
1525 # Instead, let's just punt: use the minimum linelength reported by
1526 # all of the supported platforms: 8192 (on NT/2K/XP).
1527 lt_cv_sys_max_cmd_len=8192;
1528 ;;
1529
1530 amigaos*)
1531 # On AmigaOS with pdksh, this test takes hours, literally.
1532 # So we just punt and use a minimum line length of 8192.
1533 lt_cv_sys_max_cmd_len=8192;
1534 ;;
1535
1536 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1537 # This has been around since 386BSD, at least. Likely further.
1538 if test -x /sbin/sysctl; then
1539 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1540 elif test -x /usr/sbin/sysctl; then
1541 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1542 else
1543 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1544 fi
1545 # And add a safety zone
1546 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1547 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1548 ;;
1549
1550 interix*)
1551 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1552 lt_cv_sys_max_cmd_len=196608
1553 ;;
1554
1555 osf*)
1556 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1557 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1558 # nice to cause kernel panics so lets avoid the loop below.
1559 # First set a reasonable default.
1560 lt_cv_sys_max_cmd_len=16384
1561 #
1562 if test -x /sbin/sysconfig; then
1563 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1564 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1565 esac
1566 fi
1567 ;;
1568 sco3.2v5*)
1569 lt_cv_sys_max_cmd_len=102400
1570 ;;
1571 sysv5* | sco5v6* | sysv4.2uw2*)
1572 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1573 if test -n "$kargmax"; then
1574 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1575 else
1576 lt_cv_sys_max_cmd_len=32768
1577 fi
1578 ;;
1579 *)
1580 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1581 if test -n "$lt_cv_sys_max_cmd_len"; then
1582 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1583 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1584 else
1585 # Make teststring a little bigger before we do anything with it.
1586 # a 1K string should be a reasonable start.
1587 for i in 1 2 3 4 5 6 7 8 ; do
1588 teststring=$teststring$teststring
1589 done
1590 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1591 # If test is not a shell built-in, we'll probably end up computing a
1592 # maximum length that is only half of the actual maximum length, but
1593 # we can't tell.
1594 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1595 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1596 test $i != 17 # 1/2 MB should be enough
1597 do
1598 i=`expr $i + 1`
1599 teststring=$teststring$teststring
1600 done
1601 # Only check the string length outside the loop.
1602 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1603 teststring=
1604 # Add a significant safety factor because C++ compilers can tack on
1605 # massive amounts of additional arguments before passing them to the
1606 # linker. It appears as though 1/2 is a usable value.
1607 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1608 fi
1609 ;;
1610 esac
1611])
1612if test -n $lt_cv_sys_max_cmd_len ; then
1613 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1614else
1615 AC_MSG_RESULT(none)
1616fi
1617max_cmd_len=$lt_cv_sys_max_cmd_len
1618_LT_DECL([], [max_cmd_len], [0],
1619 [What is the maximum length of a command?])
1620])# LT_CMD_MAX_LEN
1621
1622# Old name:
1623AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1624dnl aclocal-1.4 backwards compatibility:
1625dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1626
1627
1628# _LT_HEADER_DLFCN
1629# ----------------
1630m4_defun([_LT_HEADER_DLFCN],
1631[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1632])# _LT_HEADER_DLFCN
1633
1634
1635# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1636# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1637# ----------------------------------------------------------------
1638m4_defun([_LT_TRY_DLOPEN_SELF],
1639[m4_require([_LT_HEADER_DLFCN])dnl
1640if test "$cross_compiling" = yes; then :
1641 [$4]
1642else
1643 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1644 lt_status=$lt_dlunknown
1645 cat > conftest.$ac_ext <<_LT_EOF
1646[#line __oline__ "configure"
1647#include "confdefs.h"
1648
1649#if HAVE_DLFCN_H
1650#include <dlfcn.h>
1651#endif
1652
1653#include <stdio.h>
1654
1655#ifdef RTLD_GLOBAL
1656# define LT_DLGLOBAL RTLD_GLOBAL
1657#else
1658# ifdef DL_GLOBAL
1659# define LT_DLGLOBAL DL_GLOBAL
1660# else
1661# define LT_DLGLOBAL 0
1662# endif
1663#endif
1664
1665/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1666 find out it does not work in some platform. */
1667#ifndef LT_DLLAZY_OR_NOW
1668# ifdef RTLD_LAZY
1669# define LT_DLLAZY_OR_NOW RTLD_LAZY
1670# else
1671# ifdef DL_LAZY
1672# define LT_DLLAZY_OR_NOW DL_LAZY
1673# else
1674# ifdef RTLD_NOW
1675# define LT_DLLAZY_OR_NOW RTLD_NOW
1676# else
1677# ifdef DL_NOW
1678# define LT_DLLAZY_OR_NOW DL_NOW
1679# else
1680# define LT_DLLAZY_OR_NOW 0
1681# endif
1682# endif
1683# endif
1684# endif
1685#endif
1686
1687void fnord() { int i=42;}
1688int main ()
1689{
1690 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1691 int status = $lt_dlunknown;
1692
1693 if (self)
1694 {
1695 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1696 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1697 /* dlclose (self); */
1698 }
1699 else
1700 puts (dlerror ());
1701
1702 return status;
1703}]
1704_LT_EOF
1705 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1706 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1707 lt_status=$?
1708 case x$lt_status in
1709 x$lt_dlno_uscore) $1 ;;
1710 x$lt_dlneed_uscore) $2 ;;
1711 x$lt_dlunknown|x*) $3 ;;
1712 esac
1713 else :
1714 # compilation failed
1715 $3
1716 fi
1717fi
1718rm -fr conftest*
1719])# _LT_TRY_DLOPEN_SELF
1720
1721
1722# LT_SYS_DLOPEN_SELF
1723# ------------------
1724AC_DEFUN([LT_SYS_DLOPEN_SELF],
1725[m4_require([_LT_HEADER_DLFCN])dnl
1726if test "x$enable_dlopen" != xyes; then
1727 enable_dlopen=unknown
1728 enable_dlopen_self=unknown
1729 enable_dlopen_self_static=unknown
1730else
1731 lt_cv_dlopen=no
1732 lt_cv_dlopen_libs=
1733
1734 case $host_os in
1735 beos*)
1736 lt_cv_dlopen="load_add_on"
1737 lt_cv_dlopen_libs=
1738 lt_cv_dlopen_self=yes
1739 ;;
1740
1741 mingw* | pw32* | cegcc*)
1742 lt_cv_dlopen="LoadLibrary"
1743 lt_cv_dlopen_libs=
1744 ;;
1745
1746 cygwin*)
1747 lt_cv_dlopen="dlopen"
1748 lt_cv_dlopen_libs=
1749 ;;
1750
1751 darwin*)
1752 # if libdl is installed we need to link against it
1753 AC_CHECK_LIB([dl], [dlopen],
1754 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1755 lt_cv_dlopen="dyld"
1756 lt_cv_dlopen_libs=
1757 lt_cv_dlopen_self=yes
1758 ])
1759 ;;
1760
1761 *)
1762 AC_CHECK_FUNC([shl_load],
1763 [lt_cv_dlopen="shl_load"],
1764 [AC_CHECK_LIB([dld], [shl_load],
1765 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1766 [AC_CHECK_FUNC([dlopen],
1767 [lt_cv_dlopen="dlopen"],
1768 [AC_CHECK_LIB([dl], [dlopen],
1769 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1770 [AC_CHECK_LIB([svld], [dlopen],
1771 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1772 [AC_CHECK_LIB([dld], [dld_link],
1773 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1774 ])
1775 ])
1776 ])
1777 ])
1778 ])
1779 ;;
1780 esac
1781
1782 if test "x$lt_cv_dlopen" != xno; then
1783 enable_dlopen=yes
1784 else
1785 enable_dlopen=no
1786 fi
1787
1788 case $lt_cv_dlopen in
1789 dlopen)
1790 save_CPPFLAGS="$CPPFLAGS"
1791 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1792
1793 save_LDFLAGS="$LDFLAGS"
1794 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1795
1796 save_LIBS="$LIBS"
1797 LIBS="$lt_cv_dlopen_libs $LIBS"
1798
1799 AC_CACHE_CHECK([whether a program can dlopen itself],
1800 lt_cv_dlopen_self, [dnl
1801 _LT_TRY_DLOPEN_SELF(
1802 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1803 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1804 ])
1805
1806 if test "x$lt_cv_dlopen_self" = xyes; then
1807 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1808 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1809 lt_cv_dlopen_self_static, [dnl
1810 _LT_TRY_DLOPEN_SELF(
1811 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1812 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1813 ])
1814 fi
1815
1816 CPPFLAGS="$save_CPPFLAGS"
1817 LDFLAGS="$save_LDFLAGS"
1818 LIBS="$save_LIBS"
1819 ;;
1820 esac
1821
1822 case $lt_cv_dlopen_self in
1823 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1824 *) enable_dlopen_self=unknown ;;
1825 esac
1826
1827 case $lt_cv_dlopen_self_static in
1828 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1829 *) enable_dlopen_self_static=unknown ;;
1830 esac
1831fi
1832_LT_DECL([dlopen_support], [enable_dlopen], [0],
1833 [Whether dlopen is supported])
1834_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1835 [Whether dlopen of programs is supported])
1836_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1837 [Whether dlopen of statically linked programs is supported])
1838])# LT_SYS_DLOPEN_SELF
1839
1840# Old name:
1841AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1842dnl aclocal-1.4 backwards compatibility:
1843dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1844
1845
1846# _LT_COMPILER_C_O([TAGNAME])
1847# ---------------------------
1848# Check to see if options -c and -o are simultaneously supported by compiler.
1849# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1850m4_defun([_LT_COMPILER_C_O],
1851[m4_require([_LT_DECL_SED])dnl
1852m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1853m4_require([_LT_TAG_COMPILER])dnl
1854AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1855 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1856 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1857 $RM -r conftest 2>/dev/null
1858 mkdir conftest
1859 cd conftest
1860 mkdir out
1861 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1862
1863 lt_compiler_flag="-o out/conftest2.$ac_objext"
1864 # Insert the option either (1) after the last *FLAGS variable, or
1865 # (2) before a word containing "conftest.", or (3) at the end.
1866 # Note that $ac_compile itself does not contain backslashes and begins
1867 # with a dollar sign (not a hyphen), so the echo should work correctly.
1868 lt_compile=`echo "$ac_compile" | $SED \
1869 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1870 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1871 -e 's:$: $lt_compiler_flag:'`
1872 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1873 (eval "$lt_compile" 2>out/conftest.err)
1874 ac_status=$?
1875 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1876 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1877 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1878 then
1879 # The compiler can only warn and ignore the option if not recognized
1880 # So say no if there are warnings
1881 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1882 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1883 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1884 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1885 fi
1886 fi
1887 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1888 $RM conftest*
1889 # SGI C++ compiler will create directory out/ii_files/ for
1890 # template instantiation
1891 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1892 $RM out/* && rmdir out
1893 cd ..
1894 $RM -r conftest
1895 $RM conftest*
1896])
1897_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1898 [Does compiler simultaneously support -c and -o options?])
1899])# _LT_COMPILER_C_O
1900
1901
1902# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1903# ----------------------------------
1904# Check to see if we can do hard links to lock some files if needed
1905m4_defun([_LT_COMPILER_FILE_LOCKS],
1906[m4_require([_LT_ENABLE_LOCK])dnl
1907m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1908_LT_COMPILER_C_O([$1])
1909
1910hard_links="nottested"
1911if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1912 # do not overwrite the value of need_locks provided by the user
1913 AC_MSG_CHECKING([if we can lock with hard links])
1914 hard_links=yes
1915 $RM conftest*
1916 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1917 touch conftest.a
1918 ln conftest.a conftest.b 2>&5 || hard_links=no
1919 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1920 AC_MSG_RESULT([$hard_links])
1921 if test "$hard_links" = no; then
1922 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1923 need_locks=warn
1924 fi
1925else
1926 need_locks=no
1927fi
1928_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1929])# _LT_COMPILER_FILE_LOCKS
1930
1931
1932# _LT_CHECK_OBJDIR
1933# ----------------
1934m4_defun([_LT_CHECK_OBJDIR],
1935[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1936[rm -f .libs 2>/dev/null
1937mkdir .libs 2>/dev/null
1938if test -d .libs; then
1939 lt_cv_objdir=.libs
1940else
1941 # MS-DOS does not allow filenames that begin with a dot.
1942 lt_cv_objdir=_libs
1943fi
1944rmdir .libs 2>/dev/null])
1945objdir=$lt_cv_objdir
1946_LT_DECL([], [objdir], [0],
1947 [The name of the directory that contains temporary libtool files])dnl
1948m4_pattern_allow([LT_OBJDIR])dnl
1949AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1950 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1951])# _LT_CHECK_OBJDIR
1952
1953
1954# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1955# --------------------------------------
1956# Check hardcoding attributes.
1957m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1958[AC_MSG_CHECKING([how to hardcode library paths into programs])
1959_LT_TAGVAR(hardcode_action, $1)=
1960if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1961 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1962 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1963
1964 # We can hardcode non-existent directories.
1965 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1966 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1967 # have to relink, otherwise we might link with an installed library
1968 # when we should be linking with a yet-to-be-installed one
1969 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1970 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1971 # Linking always hardcodes the temporary library directory.
1972 _LT_TAGVAR(hardcode_action, $1)=relink
1973 else
1974 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1975 _LT_TAGVAR(hardcode_action, $1)=immediate
1976 fi
1977else
1978 # We cannot hardcode anything, or else we can only hardcode existing
1979 # directories.
1980 _LT_TAGVAR(hardcode_action, $1)=unsupported
1981fi
1982AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1983
1984if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1985 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1986 # Fast installation is not supported
1987 enable_fast_install=no
1988elif test "$shlibpath_overrides_runpath" = yes ||
1989 test "$enable_shared" = no; then
1990 # Fast installation is not necessary
1991 enable_fast_install=needless
1992fi
1993_LT_TAGDECL([], [hardcode_action], [0],
1994 [How to hardcode a shared library path into an executable])
1995])# _LT_LINKER_HARDCODE_LIBPATH
1996
1997
1998# _LT_CMD_STRIPLIB
1999# ----------------
2000m4_defun([_LT_CMD_STRIPLIB],
2001[m4_require([_LT_DECL_EGREP])
2002striplib=
2003old_striplib=
2004AC_MSG_CHECKING([whether stripping libraries is possible])
2005if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2006 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2007 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2008 AC_MSG_RESULT([yes])
2009else
2010# FIXME - insert some real tests, host_os isn't really good enough
2011 case $host_os in
2012 darwin*)
2013 if test -n "$STRIP" ; then
2014 striplib="$STRIP -x"
2015 old_striplib="$STRIP -S"
2016 AC_MSG_RESULT([yes])
2017 else
2018 AC_MSG_RESULT([no])
2019 fi
2020 ;;
2021 *)
2022 AC_MSG_RESULT([no])
2023 ;;
2024 esac
2025fi
2026_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2027_LT_DECL([], [striplib], [1])
2028])# _LT_CMD_STRIPLIB
2029
2030
2031# _LT_SYS_DYNAMIC_LINKER([TAG])
2032# -----------------------------
2033# PORTME Fill in your ld.so characteristics
2034m4_defun([_LT_SYS_DYNAMIC_LINKER],
2035[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2036m4_require([_LT_DECL_EGREP])dnl
2037m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2038m4_require([_LT_DECL_OBJDUMP])dnl
2039m4_require([_LT_DECL_SED])dnl
2040AC_MSG_CHECKING([dynamic linker characteristics])
2041m4_if([$1],
2042 [], [
2043if test "$GCC" = yes; then
2044 case $host_os in
2045 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2046 *) lt_awk_arg="/^libraries:/" ;;
2047 esac
2048 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2049 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2050 # if the path contains ";" then we assume it to be the separator
2051 # otherwise default to the standard path separator (i.e. ":") - it is
2052 # assumed that no part of a normal pathname contains ";" but that should
2053 # okay in the real world where ";" in dirpaths is itself problematic.
2054 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2055 else
2056 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2057 fi
2058 # Ok, now we have the path, separated by spaces, we can step through it
2059 # and add multilib dir if necessary.
2060 lt_tmp_lt_search_path_spec=
2061 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2062 for lt_sys_path in $lt_search_path_spec; do
2063 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2064 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2065 else
2066 test -d "$lt_sys_path" && \
2067 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2068 fi
2069 done
2070 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2071BEGIN {RS=" "; FS="/|\n";} {
2072 lt_foo="";
2073 lt_count=0;
2074 for (lt_i = NF; lt_i > 0; lt_i--) {
2075 if ($lt_i != "" && $lt_i != ".") {
2076 if ($lt_i == "..") {
2077 lt_count++;
2078 } else {
2079 if (lt_count == 0) {
2080 lt_foo="/" $lt_i lt_foo;
2081 } else {
2082 lt_count--;
2083 }
2084 }
2085 }
2086 }
2087 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2088 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2089}'`
2090 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2091else
2092 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2093fi])
2094library_names_spec=
2095libname_spec='lib$name'
2096soname_spec=
2097shrext_cmds=".so"
2098postinstall_cmds=
2099postuninstall_cmds=
2100finish_cmds=
2101finish_eval=
2102shlibpath_var=
2103shlibpath_overrides_runpath=unknown
2104version_type=none
2105dynamic_linker="$host_os ld.so"
2106sys_lib_dlsearch_path_spec="/lib /usr/lib"
2107need_lib_prefix=unknown
2108hardcode_into_libs=no
2109
2110# when you set need_version to no, make sure it does not cause -set_version
2111# flags to be left without arguments
2112need_version=unknown
2113
2114case $host_os in
2115aix3*)
2116 version_type=linux
2117 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2118 shlibpath_var=LIBPATH
2119
2120 # AIX 3 has no versioning support, so we append a major version to the name.
2121 soname_spec='${libname}${release}${shared_ext}$major'
2122 ;;
2123
2124aix[[4-9]]*)
2125 version_type=linux
2126 need_lib_prefix=no
2127 need_version=no
2128 hardcode_into_libs=yes
2129 if test "$host_cpu" = ia64; then
2130 # AIX 5 supports IA64
2131 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2132 shlibpath_var=LD_LIBRARY_PATH
2133 else
2134 # With GCC up to 2.95.x, collect2 would create an import file
2135 # for dependence libraries. The import file would start with
2136 # the line `#! .'. This would cause the generated library to
2137 # depend on `.', always an invalid library. This was fixed in
2138 # development snapshots of GCC prior to 3.0.
2139 case $host_os in
2140 aix4 | aix4.[[01]] | aix4.[[01]].*)
2141 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2142 echo ' yes '
2143 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2144 :
2145 else
2146 can_build_shared=no
2147 fi
2148 ;;
2149 esac
2150 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2151 # soname into executable. Probably we can add versioning support to
2152 # collect2, so additional links can be useful in future.
2153 if test "$aix_use_runtimelinking" = yes; then
2154 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2155 # instead of lib<name>.a to let people know that these are not
2156 # typical AIX shared libraries.
2157 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2158 else
2159 # We preserve .a as extension for shared libraries through AIX4.2
2160 # and later when we are not doing run time linking.
2161 library_names_spec='${libname}${release}.a $libname.a'
2162 soname_spec='${libname}${release}${shared_ext}$major'
2163 fi
2164 shlibpath_var=LIBPATH
2165 fi
2166 ;;
2167
2168amigaos*)
2169 case $host_cpu in
2170 powerpc)
2171 # Since July 2007 AmigaOS4 officially supports .so libraries.
2172 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2174 ;;
2175 m68k)
2176 library_names_spec='$libname.ixlibrary $libname.a'
2177 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2178 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'
2179 ;;
2180 esac
2181 ;;
2182
2183beos*)
2184 library_names_spec='${libname}${shared_ext}'
2185 dynamic_linker="$host_os ld.so"
2186 shlibpath_var=LIBRARY_PATH
2187 ;;
2188
2189bsdi[[45]]*)
2190 version_type=linux
2191 need_version=no
2192 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2193 soname_spec='${libname}${release}${shared_ext}$major'
2194 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2195 shlibpath_var=LD_LIBRARY_PATH
2196 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2197 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2198 # the default ld.so.conf also contains /usr/contrib/lib and
2199 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2200 # libtool to hard-code these into programs
2201 ;;
2202
2203cygwin* | mingw* | pw32* | cegcc*)
2204 version_type=windows
2205 shrext_cmds=".dll"
2206 need_version=no
2207 need_lib_prefix=no
2208
2209 case $GCC,$host_os in
2210 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2211 library_names_spec='$libname.dll.a'
2212 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2213 postinstall_cmds='base_file=`basename \${file}`~
2214 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2215 dldir=$destdir/`dirname \$dlpath`~
2216 test -d \$dldir || mkdir -p \$dldir~
2217 $install_prog $dir/$dlname \$dldir/$dlname~
2218 chmod a+x \$dldir/$dlname~
2219 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2220 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2221 fi'
2222 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2223 dlpath=$dir/\$dldll~
2224 $RM \$dlpath'
2225 shlibpath_overrides_runpath=yes
2226
2227 case $host_os in
2228 cygwin*)
2229 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2230 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2231 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2232 ;;
2233 mingw* | cegcc*)
2234 # MinGW DLLs use traditional 'lib' prefix
2235 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2236 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2237 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2238 # It is most probably a Windows format PATH printed by
2239 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2240 # path with ; separators, and with drive letters. We can handle the
2241 # drive letters (cygwin fileutils understands them), so leave them,
2242 # especially as we might pass files found there to a mingw objdump,
2243 # which wouldn't understand a cygwinified path. Ahh.
2244 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2245 else
2246 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2247 fi
2248 ;;
2249 pw32*)
2250 # pw32 DLLs use 'pw' prefix rather than 'lib'
2251 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2252 ;;
2253 esac
2254 ;;
2255
2256 *)
2257 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2258 ;;
2259 esac
2260 dynamic_linker='Win32 ld.exe'
2261 # FIXME: first we should search . and the directory the executable is in
2262 shlibpath_var=PATH
2263 ;;
2264
2265darwin* | rhapsody*)
2266 dynamic_linker="$host_os dyld"
2267 version_type=darwin
2268 need_lib_prefix=no
2269 need_version=no
2270 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2271 soname_spec='${libname}${release}${major}$shared_ext'
2272 shlibpath_overrides_runpath=yes
2273 shlibpath_var=DYLD_LIBRARY_PATH
2274 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2275m4_if([$1], [],[
2276 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2277 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2278 ;;
2279
2280dgux*)
2281 version_type=linux
2282 need_lib_prefix=no
2283 need_version=no
2284 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2285 soname_spec='${libname}${release}${shared_ext}$major'
2286 shlibpath_var=LD_LIBRARY_PATH
2287 ;;
2288
2289freebsd1*)
2290 dynamic_linker=no
2291 ;;
2292
2293freebsd* | dragonfly*)
2294 # DragonFly does not have aout. When/if they implement a new
2295 # versioning mechanism, adjust this.
2296 if test -x /usr/bin/objformat; then
2297 objformat=`/usr/bin/objformat`
2298 else
2299 case $host_os in
2300 freebsd[[123]]*) objformat=aout ;;
2301 *) objformat=elf ;;
2302 esac
2303 fi
2304 version_type=freebsd-$objformat
2305 case $version_type in
2306 freebsd-elf*)
2307 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2308 need_version=no
2309 need_lib_prefix=no
2310 ;;
2311 freebsd-*)
2312 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2313 need_version=yes
2314 ;;
2315 esac
2316 shlibpath_var=LD_LIBRARY_PATH
2317 case $host_os in
2318 freebsd2*)
2319 shlibpath_overrides_runpath=yes
2320 ;;
2321 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2322 shlibpath_overrides_runpath=yes
2323 hardcode_into_libs=yes
2324 ;;
2325 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2326 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2327 shlibpath_overrides_runpath=no
2328 hardcode_into_libs=yes
2329 ;;
2330 *) # from 4.6 on, and DragonFly
2331 shlibpath_overrides_runpath=yes
2332 hardcode_into_libs=yes
2333 ;;
2334 esac
2335 ;;
2336
2337gnu*)
2338 version_type=linux
2339 need_lib_prefix=no
2340 need_version=no
2341 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2342 soname_spec='${libname}${release}${shared_ext}$major'
2343 shlibpath_var=LD_LIBRARY_PATH
2344 hardcode_into_libs=yes
2345 ;;
2346
2347hpux9* | hpux10* | hpux11*)
2348 # Give a soname corresponding to the major version so that dld.sl refuses to
2349 # link against other versions.
2350 version_type=sunos
2351 need_lib_prefix=no
2352 need_version=no
2353 case $host_cpu in
2354 ia64*)
2355 shrext_cmds='.so'
2356 hardcode_into_libs=yes
2357 dynamic_linker="$host_os dld.so"
2358 shlibpath_var=LD_LIBRARY_PATH
2359 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2360 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2361 soname_spec='${libname}${release}${shared_ext}$major'
2362 if test "X$HPUX_IA64_MODE" = X32; then
2363 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2364 else
2365 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2366 fi
2367 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2368 ;;
2369 hppa*64*)
2370 shrext_cmds='.sl'
2371 hardcode_into_libs=yes
2372 dynamic_linker="$host_os dld.sl"
2373 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2374 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376 soname_spec='${libname}${release}${shared_ext}$major'
2377 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2378 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2379 ;;
2380 *)
2381 shrext_cmds='.sl'
2382 dynamic_linker="$host_os dld.sl"
2383 shlibpath_var=SHLIB_PATH
2384 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2385 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2386 soname_spec='${libname}${release}${shared_ext}$major'
2387 ;;
2388 esac
2389 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2390 postinstall_cmds='chmod 555 $lib'
2391 ;;
2392
2393interix[[3-9]]*)
2394 version_type=linux
2395 need_lib_prefix=no
2396 need_version=no
2397 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2398 soname_spec='${libname}${release}${shared_ext}$major'
2399 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2400 shlibpath_var=LD_LIBRARY_PATH
2401 shlibpath_overrides_runpath=no
2402 hardcode_into_libs=yes
2403 ;;
2404
2405irix5* | irix6* | nonstopux*)
2406 case $host_os in
2407 nonstopux*) version_type=nonstopux ;;
2408 *)
2409 if test "$lt_cv_prog_gnu_ld" = yes; then
2410 version_type=linux
2411 else
2412 version_type=irix
2413 fi ;;
2414 esac
2415 need_lib_prefix=no
2416 need_version=no
2417 soname_spec='${libname}${release}${shared_ext}$major'
2418 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2419 case $host_os in
2420 irix5* | nonstopux*)
2421 libsuff= shlibsuff=
2422 ;;
2423 *)
2424 case $LD in # libtool.m4 will add one of these switches to LD
2425 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2426 libsuff= shlibsuff= libmagic=32-bit;;
2427 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2428 libsuff=32 shlibsuff=N32 libmagic=N32;;
2429 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2430 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2431 *) libsuff= shlibsuff= libmagic=never-match;;
2432 esac
2433 ;;
2434 esac
2435 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2436 shlibpath_overrides_runpath=no
2437 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2438 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2439 hardcode_into_libs=yes
2440 ;;
2441
2442# No shared lib support for Linux oldld, aout, or coff.
2443linux*oldld* | linux*aout* | linux*coff*)
2444 dynamic_linker=no
2445 ;;
2446
2447# This must be Linux ELF.
2448linux* | k*bsd*-gnu | kopensolaris*-gnu)
2449 version_type=linux
2450 need_lib_prefix=no
2451 need_version=no
2452 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2453 soname_spec='${libname}${release}${shared_ext}$major'
2454 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2455 shlibpath_var=LD_LIBRARY_PATH
2456 shlibpath_overrides_runpath=no
2457 # Some binutils ld are patched to set DT_RUNPATH
2458 save_LDFLAGS=$LDFLAGS
2459 save_libdir=$libdir
2460 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2461 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2462 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2463 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2464 [shlibpath_overrides_runpath=yes])])
2465 LDFLAGS=$save_LDFLAGS
2466 libdir=$save_libdir
2467
2468 # This implies no fast_install, which is unacceptable.
2469 # Some rework will be needed to allow for fast_install
2470 # before this can be enabled.
2471 hardcode_into_libs=yes
2472
2473 # Append ld.so.conf contents to the search path
2474 if test -f /etc/ld.so.conf; then
2475 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' ' '`
2476 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2477 fi
2478
2479 # We used to test for /lib/ld.so.1 and disable shared libraries on
2480 # powerpc, because MkLinux only supported shared libraries with the
2481 # GNU dynamic linker. Since this was broken with cross compilers,
2482 # most powerpc-linux boxes support dynamic linking these days and
2483 # people can always --disable-shared, the test was removed, and we
2484 # assume the GNU/Linux dynamic linker is in use.
2485 dynamic_linker='GNU/Linux ld.so'
2486 ;;
2487
2488netbsdelf*-gnu)
2489 version_type=linux
2490 need_lib_prefix=no
2491 need_version=no
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 shlibpath_var=LD_LIBRARY_PATH
2495 shlibpath_overrides_runpath=no
2496 hardcode_into_libs=yes
2497 dynamic_linker='NetBSD ld.elf_so'
2498 ;;
2499
2500netbsd*)
2501 version_type=sunos
2502 need_lib_prefix=no
2503 need_version=no
2504 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2506 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2507 dynamic_linker='NetBSD (a.out) ld.so'
2508 else
2509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2510 soname_spec='${libname}${release}${shared_ext}$major'
2511 dynamic_linker='NetBSD ld.elf_so'
2512 fi
2513 shlibpath_var=LD_LIBRARY_PATH
2514 shlibpath_overrides_runpath=yes
2515 hardcode_into_libs=yes
2516 ;;
2517
2518newsos6)
2519 version_type=linux
2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2521 shlibpath_var=LD_LIBRARY_PATH
2522 shlibpath_overrides_runpath=yes
2523 ;;
2524
2525*nto* | *qnx*)
2526 version_type=qnx
2527 need_lib_prefix=no
2528 need_version=no
2529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2530 soname_spec='${libname}${release}${shared_ext}$major'
2531 shlibpath_var=LD_LIBRARY_PATH
2532 shlibpath_overrides_runpath=no
2533 hardcode_into_libs=yes
2534 dynamic_linker='ldqnx.so'
2535 ;;
2536
2537openbsd*)
2538 version_type=sunos
2539 sys_lib_dlsearch_path_spec="/usr/lib"
2540 need_lib_prefix=no
2541 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2542 case $host_os in
2543 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2544 *) need_version=no ;;
2545 esac
2546 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2547 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2548 shlibpath_var=LD_LIBRARY_PATH
2549 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2550 case $host_os in
2551 openbsd2.[[89]] | openbsd2.[[89]].*)
2552 shlibpath_overrides_runpath=no
2553 ;;
2554 *)
2555 shlibpath_overrides_runpath=yes
2556 ;;
2557 esac
2558 else
2559 shlibpath_overrides_runpath=yes
2560 fi
2561 ;;
2562
2563os2*)
2564 libname_spec='$name'
2565 shrext_cmds=".dll"
2566 need_lib_prefix=no
2567 library_names_spec='$libname${shared_ext} $libname.a'
2568 dynamic_linker='OS/2 ld.exe'
2569 shlibpath_var=LIBPATH
2570 ;;
2571
2572osf3* | osf4* | osf5*)
2573 version_type=osf
2574 need_lib_prefix=no
2575 need_version=no
2576 soname_spec='${libname}${release}${shared_ext}$major'
2577 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2578 shlibpath_var=LD_LIBRARY_PATH
2579 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2580 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2581 ;;
2582
2583rdos*)
2584 dynamic_linker=no
2585 ;;
2586
2587solaris*)
2588 version_type=linux
2589 need_lib_prefix=no
2590 need_version=no
2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2592 soname_spec='${libname}${release}${shared_ext}$major'
2593 shlibpath_var=LD_LIBRARY_PATH
2594 shlibpath_overrides_runpath=yes
2595 hardcode_into_libs=yes
2596 # ldd complains unless libraries are executable
2597 postinstall_cmds='chmod +x $lib'
2598 ;;
2599
2600sunos4*)
2601 version_type=sunos
2602 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2603 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2604 shlibpath_var=LD_LIBRARY_PATH
2605 shlibpath_overrides_runpath=yes
2606 if test "$with_gnu_ld" = yes; then
2607 need_lib_prefix=no
2608 fi
2609 need_version=yes
2610 ;;
2611
2612sysv4 | sysv4.3*)
2613 version_type=linux
2614 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2615 soname_spec='${libname}${release}${shared_ext}$major'
2616 shlibpath_var=LD_LIBRARY_PATH
2617 case $host_vendor in
2618 sni)
2619 shlibpath_overrides_runpath=no
2620 need_lib_prefix=no
2621 runpath_var=LD_RUN_PATH
2622 ;;
2623 siemens)
2624 need_lib_prefix=no
2625 ;;
2626 motorola)
2627 need_lib_prefix=no
2628 need_version=no
2629 shlibpath_overrides_runpath=no
2630 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2631 ;;
2632 esac
2633 ;;
2634
2635sysv4*MP*)
2636 if test -d /usr/nec ;then
2637 version_type=linux
2638 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2639 soname_spec='$libname${shared_ext}.$major'
2640 shlibpath_var=LD_LIBRARY_PATH
2641 fi
2642 ;;
2643
2644sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2645 version_type=freebsd-elf
2646 need_lib_prefix=no
2647 need_version=no
2648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2649 soname_spec='${libname}${release}${shared_ext}$major'
2650 shlibpath_var=LD_LIBRARY_PATH
2651 shlibpath_overrides_runpath=yes
2652 hardcode_into_libs=yes
2653 if test "$with_gnu_ld" = yes; then
2654 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2655 else
2656 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2657 case $host_os in
2658 sco3.2v5*)
2659 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2660 ;;
2661 esac
2662 fi
2663 sys_lib_dlsearch_path_spec='/usr/lib'
2664 ;;
2665
2666tpf*)
2667 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2668 version_type=linux
2669 need_lib_prefix=no
2670 need_version=no
2671 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2672 shlibpath_var=LD_LIBRARY_PATH
2673 shlibpath_overrides_runpath=no
2674 hardcode_into_libs=yes
2675 ;;
2676
2677uts4*)
2678 version_type=linux
2679 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2680 soname_spec='${libname}${release}${shared_ext}$major'
2681 shlibpath_var=LD_LIBRARY_PATH
2682 ;;
2683
2684*)
2685 dynamic_linker=no
2686 ;;
2687esac
2688AC_MSG_RESULT([$dynamic_linker])
2689test "$dynamic_linker" = no && can_build_shared=no
2690
2691variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2692if test "$GCC" = yes; then
2693 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2694fi
2695
2696if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2697 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2698fi
2699if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2700 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2701fi
2702
2703_LT_DECL([], [variables_saved_for_relink], [1],
2704 [Variables whose values should be saved in libtool wrapper scripts and
2705 restored at link time])
2706_LT_DECL([], [need_lib_prefix], [0],
2707 [Do we need the "lib" prefix for modules?])
2708_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2709_LT_DECL([], [version_type], [0], [Library versioning type])
2710_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2711_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2712_LT_DECL([], [shlibpath_overrides_runpath], [0],
2713 [Is shlibpath searched before the hard-coded library search path?])
2714_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2715_LT_DECL([], [library_names_spec], [1],
2716 [[List of archive names. First name is the real one, the rest are links.
2717 The last name is the one that the linker finds with -lNAME]])
2718_LT_DECL([], [soname_spec], [1],
2719 [[The coded name of the library, if different from the real name]])
2720_LT_DECL([], [postinstall_cmds], [2],
2721 [Command to use after installation of a shared archive])
2722_LT_DECL([], [postuninstall_cmds], [2],
2723 [Command to use after uninstallation of a shared archive])
2724_LT_DECL([], [finish_cmds], [2],
2725 [Commands used to finish a libtool library installation in a directory])
2726_LT_DECL([], [finish_eval], [1],
2727 [[As "finish_cmds", except a single script fragment to be evaled but
2728 not shown]])
2729_LT_DECL([], [hardcode_into_libs], [0],
2730 [Whether we should hardcode library paths into libraries])
2731_LT_DECL([], [sys_lib_search_path_spec], [2],
2732 [Compile-time system search path for libraries])
2733_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2734 [Run-time system search path for libraries])
2735])# _LT_SYS_DYNAMIC_LINKER
2736
2737
2738# _LT_PATH_TOOL_PREFIX(TOOL)
2739# --------------------------
2740# find a file program which can recognize shared library
2741AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2742[m4_require([_LT_DECL_EGREP])dnl
2743AC_MSG_CHECKING([for $1])
2744AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2745[case $MAGIC_CMD in
2746[[\\/*] | ?:[\\/]*])
2747 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2748 ;;
2749*)
2750 lt_save_MAGIC_CMD="$MAGIC_CMD"
2751 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2752dnl $ac_dummy forces splitting on constant user-supplied paths.
2753dnl POSIX.2 word splitting is done only on the output of word expansions,
2754dnl not every word. This closes a longstanding sh security hole.
2755 ac_dummy="m4_if([$2], , $PATH, [$2])"
2756 for ac_dir in $ac_dummy; do
2757 IFS="$lt_save_ifs"
2758 test -z "$ac_dir" && ac_dir=.
2759 if test -f $ac_dir/$1; then
2760 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2761 if test -n "$file_magic_test_file"; then
2762 case $deplibs_check_method in
2763 "file_magic "*)
2764 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2765 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2766 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2767 $EGREP "$file_magic_regex" > /dev/null; then
2768 :
2769 else
2770 cat <<_LT_EOF 1>&2
2771
2772*** Warning: the command libtool uses to detect shared libraries,
2773*** $file_magic_cmd, produces output that libtool cannot recognize.
2774*** The result is that libtool may fail to recognize shared libraries
2775*** as such. This will affect the creation of libtool libraries that
2776*** depend on shared libraries, but programs linked with such libtool
2777*** libraries will work regardless of this problem. Nevertheless, you
2778*** may want to report the problem to your system manager and/or to
2779*** bug-libtool@gnu.org
2780
2781_LT_EOF
2782 fi ;;
2783 esac
2784 fi
2785 break
2786 fi
2787 done
2788 IFS="$lt_save_ifs"
2789 MAGIC_CMD="$lt_save_MAGIC_CMD"
2790 ;;
2791esac])
2792MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2793if test -n "$MAGIC_CMD"; then
2794 AC_MSG_RESULT($MAGIC_CMD)
2795else
2796 AC_MSG_RESULT(no)
2797fi
2798_LT_DECL([], [MAGIC_CMD], [0],
2799 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2800])# _LT_PATH_TOOL_PREFIX
2801
2802# Old name:
2803AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2804dnl aclocal-1.4 backwards compatibility:
2805dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2806
2807
2808# _LT_PATH_MAGIC
2809# --------------
2810# find a file program which can recognize a shared library
2811m4_defun([_LT_PATH_MAGIC],
2812[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2813if test -z "$lt_cv_path_MAGIC_CMD"; then
2814 if test -n "$ac_tool_prefix"; then
2815 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2816 else
2817 MAGIC_CMD=:
2818 fi
2819fi
2820])# _LT_PATH_MAGIC
2821
2822
2823# LT_PATH_LD
2824# ----------
2825# find the pathname to the GNU or non-GNU linker
2826AC_DEFUN([LT_PATH_LD],
2827[AC_REQUIRE([AC_PROG_CC])dnl
2828AC_REQUIRE([AC_CANONICAL_HOST])dnl
2829AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2830m4_require([_LT_DECL_SED])dnl
2831m4_require([_LT_DECL_EGREP])dnl
2832
2833AC_ARG_WITH([gnu-ld],
2834 [AS_HELP_STRING([--with-gnu-ld],
2835 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2836 [test "$withval" = no || with_gnu_ld=yes],
2837 [with_gnu_ld=no])dnl
2838
2839ac_prog=ld
2840if test "$GCC" = yes; then
2841 # Check if gcc -print-prog-name=ld gives a path.
2842 AC_MSG_CHECKING([for ld used by $CC])
2843 case $host in
2844 *-*-mingw*)
2845 # gcc leaves a trailing carriage return which upsets mingw
2846 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2847 *)
2848 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2849 esac
2850 case $ac_prog in
2851 # Accept absolute paths.
2852 [[\\/]]* | ?:[[\\/]]*)
2853 re_direlt='/[[^/]][[^/]]*/\.\./'
2854 # Canonicalize the pathname of ld
2855 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2856 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2857 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2858 done
2859 test -z "$LD" && LD="$ac_prog"
2860 ;;
2861 "")
2862 # If it fails, then pretend we aren't using GCC.
2863 ac_prog=ld
2864 ;;
2865 *)
2866 # If it is relative, then search for the first ld in PATH.
2867 with_gnu_ld=unknown
2868 ;;
2869 esac
2870elif test "$with_gnu_ld" = yes; then
2871 AC_MSG_CHECKING([for GNU ld])
2872else
2873 AC_MSG_CHECKING([for non-GNU ld])
2874fi
2875AC_CACHE_VAL(lt_cv_path_LD,
2876[if test -z "$LD"; then
2877 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2878 for ac_dir in $PATH; do
2879 IFS="$lt_save_ifs"
2880 test -z "$ac_dir" && ac_dir=.
2881 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2882 lt_cv_path_LD="$ac_dir/$ac_prog"
2883 # Check to see if the program is GNU ld. I'd rather use --version,
2884 # but apparently some variants of GNU ld only accept -v.
2885 # Break only if it was the GNU/non-GNU ld that we prefer.
2886 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2887 *GNU* | *'with BFD'*)
2888 test "$with_gnu_ld" != no && break
2889 ;;
2890 *)
2891 test "$with_gnu_ld" != yes && break
2892 ;;
2893 esac
2894 fi
2895 done
2896 IFS="$lt_save_ifs"
2897else
2898 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2899fi])
2900LD="$lt_cv_path_LD"
2901if test -n "$LD"; then
2902 AC_MSG_RESULT($LD)
2903else
2904 AC_MSG_RESULT(no)
2905fi
2906test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2907_LT_PATH_LD_GNU
2908AC_SUBST([LD])
2909
2910_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2911])# LT_PATH_LD
2912
2913# Old names:
2914AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2915AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2916dnl aclocal-1.4 backwards compatibility:
2917dnl AC_DEFUN([AM_PROG_LD], [])
2918dnl AC_DEFUN([AC_PROG_LD], [])
2919
2920
2921# _LT_PATH_LD_GNU
2922#- --------------
2923m4_defun([_LT_PATH_LD_GNU],
2924[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2925[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2926case `$LD -v 2>&1 </dev/null` in
2927*GNU* | *'with BFD'*)
2928 lt_cv_prog_gnu_ld=yes
2929 ;;
2930*)
2931 lt_cv_prog_gnu_ld=no
2932 ;;
2933esac])
2934with_gnu_ld=$lt_cv_prog_gnu_ld
2935])# _LT_PATH_LD_GNU
2936
2937
2938# _LT_CMD_RELOAD
2939# --------------
2940# find reload flag for linker
2941# -- PORTME Some linkers may need a different reload flag.
2942m4_defun([_LT_CMD_RELOAD],
2943[AC_CACHE_CHECK([for $LD option to reload object files],
2944 lt_cv_ld_reload_flag,
2945 [lt_cv_ld_reload_flag='-r'])
2946reload_flag=$lt_cv_ld_reload_flag
2947case $reload_flag in
2948"" | " "*) ;;
2949*) reload_flag=" $reload_flag" ;;
2950esac
2951reload_cmds='$LD$reload_flag -o $output$reload_objs'
2952case $host_os in
2953 darwin*)
2954 if test "$GCC" = yes; then
2955 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2956 else
2957 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2958 fi
2959 ;;
2960esac
2961_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2962_LT_DECL([], [reload_cmds], [2])dnl
2963])# _LT_CMD_RELOAD
2964
2965
2966# _LT_CHECK_MAGIC_METHOD
2967# ----------------------
2968# how to check for library dependencies
2969# -- PORTME fill in with the dynamic library characteristics
2970m4_defun([_LT_CHECK_MAGIC_METHOD],
2971[m4_require([_LT_DECL_EGREP])
2972m4_require([_LT_DECL_OBJDUMP])
2973AC_CACHE_CHECK([how to recognize dependent libraries],
2974lt_cv_deplibs_check_method,
2975[lt_cv_file_magic_cmd='$MAGIC_CMD'
2976lt_cv_file_magic_test_file=
2977lt_cv_deplibs_check_method='unknown'
2978# Need to set the preceding variable on all platforms that support
2979# interlibrary dependencies.
2980# 'none' -- dependencies not supported.
2981# `unknown' -- same as none, but documents that we really don't know.
2982# 'pass_all' -- all dependencies passed with no checks.
2983# 'test_compile' -- check by making test program.
2984# 'file_magic [[regex]]' -- check by looking for files in library path
2985# which responds to the $file_magic_cmd with a given extended regex.
2986# If you have `file' or equivalent on your system and you're not sure
2987# whether `pass_all' will *always* work, you probably want this one.
2988
2989case $host_os in
2990aix[[4-9]]*)
2991 lt_cv_deplibs_check_method=pass_all
2992 ;;
2993
2994beos*)
2995 lt_cv_deplibs_check_method=pass_all
2996 ;;
2997
2998bsdi[[45]]*)
2999 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3000 lt_cv_file_magic_cmd='/usr/bin/file -L'
3001 lt_cv_file_magic_test_file=/shlib/libc.so
3002 ;;
3003
3004cygwin*)
3005 # func_win32_libid is a shell function defined in ltmain.sh
3006 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3007 lt_cv_file_magic_cmd='func_win32_libid'
3008 ;;
3009
3010mingw* | pw32*)
3011 # Base MSYS/MinGW do not provide the 'file' command needed by
3012 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3013 # unless we find 'file', for example because we are cross-compiling.
3014 if ( file / ) >/dev/null 2>&1; then
3015 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3016 lt_cv_file_magic_cmd='func_win32_libid'
3017 else
3018 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3019 lt_cv_file_magic_cmd='$OBJDUMP -f'
3020 fi
3021 ;;
3022
3023cegcc)
3024 # use the weaker test based on 'objdump'. See mingw*.
3025 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3026 lt_cv_file_magic_cmd='$OBJDUMP -f'
3027 ;;
3028
3029darwin* | rhapsody*)
3030 lt_cv_deplibs_check_method=pass_all
3031 ;;
3032
3033freebsd* | dragonfly*)
3034 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3035 case $host_cpu in
3036 i*86 )
3037 # Not sure whether the presence of OpenBSD here was a mistake.
3038 # Let's accept both of them until this is cleared up.
3039 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3040 lt_cv_file_magic_cmd=/usr/bin/file
3041 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3042 ;;
3043 esac
3044 else
3045 lt_cv_deplibs_check_method=pass_all
3046 fi
3047 ;;
3048
3049gnu*)
3050 lt_cv_deplibs_check_method=pass_all
3051 ;;
3052
3053hpux10.20* | hpux11*)
3054 lt_cv_file_magic_cmd=/usr/bin/file
3055 case $host_cpu in
3056 ia64*)
3057 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3058 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3059 ;;
3060 hppa*64*)
3061 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3062 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3063 ;;
3064 *)
3065 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3066 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3067 ;;
3068 esac
3069 ;;
3070
3071interix[[3-9]]*)
3072 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3073 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3074 ;;
3075
3076irix5* | irix6* | nonstopux*)
3077 case $LD in
3078 *-32|*"-32 ") libmagic=32-bit;;
3079 *-n32|*"-n32 ") libmagic=N32;;
3080 *-64|*"-64 ") libmagic=64-bit;;
3081 *) libmagic=never-match;;
3082 esac
3083 lt_cv_deplibs_check_method=pass_all
3084 ;;
3085
3086# This must be Linux ELF.
3087linux* | k*bsd*-gnu | kopensolaris*-gnu)
3088 lt_cv_deplibs_check_method=pass_all
3089 ;;
3090
3091netbsd* | netbsdelf*-gnu)
3092 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3093 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3094 else
3095 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3096 fi
3097 ;;
3098
3099newos6*)
3100 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3101 lt_cv_file_magic_cmd=/usr/bin/file
3102 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3103 ;;
3104
3105*nto* | *qnx*)
3106 lt_cv_deplibs_check_method=pass_all
3107 ;;
3108
3109openbsd*)
3110 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3111 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3112 else
3113 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3114 fi
3115 ;;
3116
3117osf3* | osf4* | osf5*)
3118 lt_cv_deplibs_check_method=pass_all
3119 ;;
3120
3121rdos*)
3122 lt_cv_deplibs_check_method=pass_all
3123 ;;
3124
3125solaris*)
3126 lt_cv_deplibs_check_method=pass_all
3127 ;;
3128
3129sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3130 lt_cv_deplibs_check_method=pass_all
3131 ;;
3132
3133sysv4 | sysv4.3*)
3134 case $host_vendor in
3135 motorola)
3136 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3137 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3138 ;;
3139 ncr)
3140 lt_cv_deplibs_check_method=pass_all
3141 ;;
3142 sequent)
3143 lt_cv_file_magic_cmd='/bin/file'
3144 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3145 ;;
3146 sni)
3147 lt_cv_file_magic_cmd='/bin/file'
3148 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3149 lt_cv_file_magic_test_file=/lib/libc.so
3150 ;;
3151 siemens)
3152 lt_cv_deplibs_check_method=pass_all
3153 ;;
3154 pc)
3155 lt_cv_deplibs_check_method=pass_all
3156 ;;
3157 esac
3158 ;;
3159
3160tpf*)
3161 lt_cv_deplibs_check_method=pass_all
3162 ;;
3163esac
3164])
3165file_magic_cmd=$lt_cv_file_magic_cmd
3166deplibs_check_method=$lt_cv_deplibs_check_method
3167test -z "$deplibs_check_method" && deplibs_check_method=unknown
3168
3169_LT_DECL([], [deplibs_check_method], [1],
3170 [Method to check whether dependent libraries are shared objects])
3171_LT_DECL([], [file_magic_cmd], [1],
3172 [Command to use when deplibs_check_method == "file_magic"])
3173])# _LT_CHECK_MAGIC_METHOD
3174
3175
3176# LT_PATH_NM
3177# ----------
3178# find the pathname to a BSD- or MS-compatible name lister
3179AC_DEFUN([LT_PATH_NM],
3180[AC_REQUIRE([AC_PROG_CC])dnl
3181AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3182[if test -n "$NM"; then
3183 # Let the user override the test.
3184 lt_cv_path_NM="$NM"
3185else
3186 lt_nm_to_check="${ac_tool_prefix}nm"
3187 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3188 lt_nm_to_check="$lt_nm_to_check nm"
3189 fi
3190 for lt_tmp_nm in $lt_nm_to_check; do
3191 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3192 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3193 IFS="$lt_save_ifs"
3194 test -z "$ac_dir" && ac_dir=.
3195 tmp_nm="$ac_dir/$lt_tmp_nm"
3196 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3197 # Check to see if the nm accepts a BSD-compat flag.
3198 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3199 # nm: unknown option "B" ignored
3200 # Tru64's nm complains that /dev/null is an invalid object file
3201 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3202 */dev/null* | *'Invalid file or object type'*)
3203 lt_cv_path_NM="$tmp_nm -B"
3204 break
3205 ;;
3206 *)
3207 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3208 */dev/null*)
3209 lt_cv_path_NM="$tmp_nm -p"
3210 break
3211 ;;
3212 *)
3213 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3214 continue # so that we can try to find one that supports BSD flags
3215 ;;
3216 esac
3217 ;;
3218 esac
3219 fi
3220 done
3221 IFS="$lt_save_ifs"
3222 done
3223 : ${lt_cv_path_NM=no}
3224fi])
3225if test "$lt_cv_path_NM" != "no"; then
3226 NM="$lt_cv_path_NM"
3227else
3228 # Didn't find any BSD compatible name lister, look for dumpbin.
3229 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3230 AC_SUBST([DUMPBIN])
3231 if test "$DUMPBIN" != ":"; then
3232 NM="$DUMPBIN"
3233 fi
3234fi
3235test -z "$NM" && NM=nm
3236AC_SUBST([NM])
3237_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3238
3239AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3240 [lt_cv_nm_interface="BSD nm"
3241 echo "int some_variable = 0;" > conftest.$ac_ext
3242 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3243 (eval "$ac_compile" 2>conftest.err)
3244 cat conftest.err >&AS_MESSAGE_LOG_FD
3245 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3246 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3247 cat conftest.err >&AS_MESSAGE_LOG_FD
3248 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3249 cat conftest.out >&AS_MESSAGE_LOG_FD
3250 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3251 lt_cv_nm_interface="MS dumpbin"
3252 fi
3253 rm -f conftest*])
3254])# LT_PATH_NM
3255
3256# Old names:
3257AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3258AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3259dnl aclocal-1.4 backwards compatibility:
3260dnl AC_DEFUN([AM_PROG_NM], [])
3261dnl AC_DEFUN([AC_PROG_NM], [])
3262
3263
3264# LT_LIB_M
3265# --------
3266# check for math library
3267AC_DEFUN([LT_LIB_M],
3268[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3269LIBM=
3270case $host in
3271*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3272 # These system don't have libm, or don't need it
3273 ;;
3274*-ncr-sysv4.3*)
3275 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3276 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3277 ;;
3278*)
3279 AC_CHECK_LIB(m, cos, LIBM="-lm")
3280 ;;
3281esac
3282AC_SUBST([LIBM])
3283])# LT_LIB_M
3284
3285# Old name:
3286AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3287dnl aclocal-1.4 backwards compatibility:
3288dnl AC_DEFUN([AC_CHECK_LIBM], [])
3289
3290
3291# _LT_COMPILER_NO_RTTI([TAGNAME])
3292# -------------------------------
3293m4_defun([_LT_COMPILER_NO_RTTI],
3294[m4_require([_LT_TAG_COMPILER])dnl
3295
3296_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3297
3298if test "$GCC" = yes; then
3299 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3300
3301 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3302 lt_cv_prog_compiler_rtti_exceptions,
3303 [-fno-rtti -fno-exceptions], [],
3304 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3305fi
3306_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3307 [Compiler flag to turn off builtin functions])
3308])# _LT_COMPILER_NO_RTTI
3309
3310
3311# _LT_CMD_GLOBAL_SYMBOLS
3312# ----------------------
3313m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3314[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3315AC_REQUIRE([AC_PROG_CC])dnl
3316AC_REQUIRE([LT_PATH_NM])dnl
3317AC_REQUIRE([LT_PATH_LD])dnl
3318m4_require([_LT_DECL_SED])dnl
3319m4_require([_LT_DECL_EGREP])dnl
3320m4_require([_LT_TAG_COMPILER])dnl
3321
3322# Check for command to grab the raw symbol name followed by C symbol from nm.
3323AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3324AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3325[
3326# These are sane defaults that work on at least a few old systems.
3327# [They come from Ultrix. What could be older than Ultrix?!! ;)]
3328
3329# Character class describing NM global symbol codes.
3330symcode='[[BCDEGRST]]'
3331
3332# Regexp to match symbols that can be accessed directly from C.
3333sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3334
3335# Define system-specific variables.
3336case $host_os in
3337aix*)
3338 symcode='[[BCDT]]'
3339 ;;
3340cygwin* | mingw* | pw32* | cegcc*)
3341 symcode='[[ABCDGISTW]]'
3342 ;;
3343hpux*)
3344 if test "$host_cpu" = ia64; then
3345 symcode='[[ABCDEGRST]]'
3346 fi
3347 ;;
3348irix* | nonstopux*)
3349 symcode='[[BCDEGRST]]'
3350 ;;
3351osf*)
3352 symcode='[[BCDEGQRST]]'
3353 ;;
3354solaris*)
3355 symcode='[[BDRT]]'
3356 ;;
3357sco3.2v5*)
3358 symcode='[[DT]]'
3359 ;;
3360sysv4.2uw2*)
3361 symcode='[[DT]]'
3362 ;;
3363sysv5* | sco5v6* | unixware* | OpenUNIX*)
3364 symcode='[[ABDT]]'
3365 ;;
3366sysv4)
3367 symcode='[[DFNSTU]]'
3368 ;;
3369esac
3370
3371# If we're using GNU nm, then use its standard symbol codes.
3372case `$NM -V 2>&1` in
3373*GNU* | *'with BFD'*)
3374 symcode='[[ABCDGIRSTW]]' ;;
3375esac
3376
3377# Transform an extracted symbol line into a proper C declaration.
3378# Some systems (esp. on ia64) link data and code symbols differently,
3379# so use this general approach.
3380lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3381
3382# Transform an extracted symbol line into symbol name and symbol address
3383lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3384lt_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'"
3385
3386# Handle CRLF in mingw tool chain
3387opt_cr=
3388case $build_os in
3389mingw*)
3390 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3391 ;;
3392esac
3393
3394# Try without a prefix underscore, then with it.
3395for ac_symprfx in "" "_"; do
3396
3397 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3398 symxfrm="\\1 $ac_symprfx\\2 \\2"
3399
3400 # Write the raw and C identifiers.
3401 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3402 # Fake it for dumpbin and say T for any non-static function
3403 # and D for any global variable.
3404 # Also find C++ and __fastcall symbols from MSVC++,
3405 # which start with @ or ?.
3406 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3407" {last_section=section; section=\$ 3};"\
3408" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3409" \$ 0!~/External *\|/{next};"\
3410" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3411" {if(hide[section]) next};"\
3412" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3413" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3414" s[1]~/^[@?]/{print s[1], s[1]; next};"\
3415" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3416" ' prfx=^$ac_symprfx]"
3417 else
3418 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3419 fi
3420
3421 # Check to see that the pipe works correctly.
3422 pipe_works=no
3423
3424 rm -f conftest*
3425 cat > conftest.$ac_ext <<_LT_EOF
3426#ifdef __cplusplus
3427extern "C" {
3428#endif
3429char nm_test_var;
3430void nm_test_func(void);
3431void nm_test_func(void){}
3432#ifdef __cplusplus
3433}
3434#endif
3435int main(){nm_test_var='a';nm_test_func();return(0);}
3436_LT_EOF
3437
3438 if AC_TRY_EVAL(ac_compile); then
3439 # Now try to grab the symbols.
3440 nlist=conftest.nm
3441 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3442 # Try sorting and uniquifying the output.
3443 if sort "$nlist" | uniq > "$nlist"T; then
3444 mv -f "$nlist"T "$nlist"
3445 else
3446 rm -f "$nlist"T
3447 fi
3448
3449 # Make sure that we snagged all the symbols we need.
3450 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3451 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3452 cat <<_LT_EOF > conftest.$ac_ext
3453#ifdef __cplusplus
3454extern "C" {
3455#endif
3456
3457_LT_EOF
3458 # Now generate the symbol file.
3459 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3460
3461 cat <<_LT_EOF >> conftest.$ac_ext
3462
3463/* The mapping between symbol names and symbols. */
3464const struct {
3465 const char *name;
3466 void *address;
3467}
3468lt__PROGRAM__LTX_preloaded_symbols[[]] =
3469{
3470 { "@PROGRAM@", (void *) 0 },
3471_LT_EOF
3472 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3473 cat <<\_LT_EOF >> conftest.$ac_ext
3474 {0, (void *) 0}
3475};
3476
3477/* This works around a problem in FreeBSD linker */
3478#ifdef FREEBSD_WORKAROUND
3479static const void *lt_preloaded_setup() {
3480 return lt__PROGRAM__LTX_preloaded_symbols;
3481}
3482#endif
3483
3484#ifdef __cplusplus
3485}
3486#endif
3487_LT_EOF
3488 # Now try linking the two files.
3489 mv conftest.$ac_objext conftstm.$ac_objext
3490 lt_save_LIBS="$LIBS"
3491 lt_save_CFLAGS="$CFLAGS"
3492 LIBS="conftstm.$ac_objext"
3493 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3494 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3495 pipe_works=yes
3496 fi
3497 LIBS="$lt_save_LIBS"
3498 CFLAGS="$lt_save_CFLAGS"
3499 else
3500 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3501 fi
3502 else
3503 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3504 fi
3505 else
3506 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3507 fi
3508 else
3509 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3510 cat conftest.$ac_ext >&5
3511 fi
3512 rm -rf conftest* conftst*
3513
3514 # Do not use the global_symbol_pipe unless it works.
3515 if test "$pipe_works" = yes; then
3516 break
3517 else
3518 lt_cv_sys_global_symbol_pipe=
3519 fi
3520done
3521])
3522if test -z "$lt_cv_sys_global_symbol_pipe"; then
3523 lt_cv_sys_global_symbol_to_cdecl=
3524fi
3525if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3526 AC_MSG_RESULT(failed)
3527else
3528 AC_MSG_RESULT(ok)
3529fi
3530
3531_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3532 [Take the output of nm and produce a listing of raw symbols and C names])
3533_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3534 [Transform the output of nm in a proper C declaration])
3535_LT_DECL([global_symbol_to_c_name_address],
3536 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3537 [Transform the output of nm in a C name address pair])
3538_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3539 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3540 [Transform the output of nm in a C name address pair when lib prefix is needed])
3541]) # _LT_CMD_GLOBAL_SYMBOLS
3542
3543
3544# _LT_COMPILER_PIC([TAGNAME])
3545# ---------------------------
3546m4_defun([_LT_COMPILER_PIC],
3547[m4_require([_LT_TAG_COMPILER])dnl
3548_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3549_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3550_LT_TAGVAR(lt_prog_compiler_static, $1)=
3551
3552AC_MSG_CHECKING([for $compiler option to produce PIC])
3553m4_if([$1], [CXX], [
3554 # C++ specific cases for pic, static, wl, etc.
3555 if test "$GXX" = yes; then
3556 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3558
3559 case $host_os in
3560 aix*)
3561 # All AIX code is PIC.
3562 if test "$host_cpu" = ia64; then
3563 # AIX 5 now supports IA64 processor
3564 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3565 fi
3566 ;;
3567
3568 amigaos*)
3569 case $host_cpu in
3570 powerpc)
3571 # see comment about AmigaOS4 .so support
3572 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3573 ;;
3574 m68k)
3575 # FIXME: we need at least 68020 code to build shared libraries, but
3576 # adding the `-m68020' flag to GCC prevents building anything better,
3577 # like `-m68040'.
3578 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3579 ;;
3580 esac
3581 ;;
3582
3583 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3584 # PIC is the default for these OSes.
3585 ;;
3586 mingw* | cygwin* | os2* | pw32* | cegcc*)
3587 # This hack is so that the source file can tell whether it is being
3588 # built for inclusion in a dll (and should export symbols for example).
3589 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3590 # (--disable-auto-import) libraries
3591 m4_if([$1], [GCJ], [],
3592 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3593 ;;
3594 darwin* | rhapsody*)
3595 # PIC is the default on this platform
3596 # Common symbols not allowed in MH_DYLIB files
3597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3598 ;;
3599 *djgpp*)
3600 # DJGPP does not support shared libraries at all
3601 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3602 ;;
3603 interix[[3-9]]*)
3604 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3605 # Instead, we relocate shared libraries at runtime.
3606 ;;
3607 sysv4*MP*)
3608 if test -d /usr/nec; then
3609 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3610 fi
3611 ;;
3612 hpux*)
3613 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3614 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3615 # sets the default TLS model and affects inlining.
3616 case $host_cpu in
3617 hppa*64*)
3618 ;;
3619 *)
3620 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3621 ;;
3622 esac
3623 ;;
3624 *qnx* | *nto*)
3625 # QNX uses GNU C++, but need to define -shared option too, otherwise
3626 # it will coredump.
3627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3628 ;;
3629 *)
3630 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3631 ;;
3632 esac
3633 else
3634 case $host_os in
3635 aix[[4-9]]*)
3636 # All AIX code is PIC.
3637 if test "$host_cpu" = ia64; then
3638 # AIX 5 now supports IA64 processor
3639 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3640 else
3641 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3642 fi
3643 ;;
3644 chorus*)
3645 case $cc_basename in
3646 cxch68*)
3647 # Green Hills C++ Compiler
3648 # _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"
3649 ;;
3650 esac
3651 ;;
3652 dgux*)
3653 case $cc_basename in
3654 ec++*)
3655 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3656 ;;
3657 ghcx*)
3658 # Green Hills C++ Compiler
3659 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3660 ;;
3661 *)
3662 ;;
3663 esac
3664 ;;
3665 freebsd* | dragonfly*)
3666 # FreeBSD uses GNU C++
3667 ;;
3668 hpux9* | hpux10* | hpux11*)
3669 case $cc_basename in
3670 CC*)
3671 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3672 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3673 if test "$host_cpu" != ia64; then
3674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3675 fi
3676 ;;
3677 aCC*)
3678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3679 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3680 case $host_cpu in
3681 hppa*64*|ia64*)
3682 # +Z the default
3683 ;;
3684 *)
3685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3686 ;;
3687 esac
3688 ;;
3689 *)
3690 ;;
3691 esac
3692 ;;
3693 interix*)
3694 # This is c89, which is MS Visual C++ (no shared libs)
3695 # Anyone wants to do a port?
3696 ;;
3697 irix5* | irix6* | nonstopux*)
3698 case $cc_basename in
3699 CC*)
3700 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3701 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3702 # CC pic flag -KPIC is the default.
3703 ;;
3704 *)
3705 ;;
3706 esac
3707 ;;
3708 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3709 case $cc_basename in
3710 KCC*)
3711 # KAI C++ Compiler
3712 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3714 ;;
3715 ecpc* )
3716 # old Intel C++ for x86_64 which still supported -KPIC.
3717 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3719 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3720 ;;
3721 icpc* )
3722 # Intel C++, used to be incompatible with GCC.
3723 # ICC 10 doesn't accept -KPIC any more.
3724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3725 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3726 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3727 ;;
3728 pgCC* | pgcpp*)
3729 # Portland Group C++ compiler
3730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3732 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3733 ;;
3734 cxx*)
3735 # Compaq C++
3736 # Make sure the PIC flag is empty. It appears that all Alpha
3737 # Linux and Compaq Tru64 Unix objects are PIC.
3738 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3740 ;;
3741 xlc* | xlC*)
3742 # IBM XL 8.0 on PPC
3743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3746 ;;
3747 *)
3748 case `$CC -V 2>&1 | sed 5q` in
3749 *Sun\ C*)
3750 # Sun C++ 5.9
3751 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3752 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3753 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3754 ;;
3755 esac
3756 ;;
3757 esac
3758 ;;
3759 lynxos*)
3760 ;;
3761 m88k*)
3762 ;;
3763 mvs*)
3764 case $cc_basename in
3765 cxx*)
3766 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3767 ;;
3768 *)
3769 ;;
3770 esac
3771 ;;
3772 netbsd* | netbsdelf*-gnu)
3773 ;;
3774 *qnx* | *nto*)
3775 # QNX uses GNU C++, but need to define -shared option too, otherwise
3776 # it will coredump.
3777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3778 ;;
3779 osf3* | osf4* | osf5*)
3780 case $cc_basename in
3781 KCC*)
3782 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3783 ;;
3784 RCC*)
3785 # Rational C++ 2.4.1
3786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3787 ;;
3788 cxx*)
3789 # Digital/Compaq C++
3790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3791 # Make sure the PIC flag is empty. It appears that all Alpha
3792 # Linux and Compaq Tru64 Unix objects are PIC.
3793 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3794 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3795 ;;
3796 *)
3797 ;;
3798 esac
3799 ;;
3800 psos*)
3801 ;;
3802 solaris*)
3803 case $cc_basename in
3804 CC*)
3805 # Sun C++ 4.2, 5.x and Centerline C++
3806 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3808 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3809 ;;
3810 gcx*)
3811 # Green Hills C++ Compiler
3812 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3813 ;;
3814 *)
3815 ;;
3816 esac
3817 ;;
3818 sunos4*)
3819 case $cc_basename in
3820 CC*)
3821 # Sun C++ 4.x
3822 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3823 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3824 ;;
3825 lcc*)
3826 # Lucid
3827 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3828 ;;
3829 *)
3830 ;;
3831 esac
3832 ;;
3833 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3834 case $cc_basename in
3835 CC*)
3836 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3837 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3839 ;;
3840 esac
3841 ;;
3842 tandem*)
3843 case $cc_basename in
3844 NCC*)
3845 # NonStop-UX NCC 3.20
3846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3847 ;;
3848 *)
3849 ;;
3850 esac
3851 ;;
3852 vxworks*)
3853 ;;
3854 *)
3855 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3856 ;;
3857 esac
3858 fi
3859],
3860[
3861 if test "$GCC" = yes; then
3862 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3864
3865 case $host_os in
3866 aix*)
3867 # All AIX code is PIC.
3868 if test "$host_cpu" = ia64; then
3869 # AIX 5 now supports IA64 processor
3870 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3871 fi
3872 ;;
3873
3874 amigaos*)
3875 case $host_cpu in
3876 powerpc)
3877 # see comment about AmigaOS4 .so support
3878 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3879 ;;
3880 m68k)
3881 # FIXME: we need at least 68020 code to build shared libraries, but
3882 # adding the `-m68020' flag to GCC prevents building anything better,
3883 # like `-m68040'.
3884 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3885 ;;
3886 esac
3887 ;;
3888
3889 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3890 # PIC is the default for these OSes.
3891 ;;
3892
3893 mingw* | cygwin* | pw32* | os2* | cegcc*)
3894 # This hack is so that the source file can tell whether it is being
3895 # built for inclusion in a dll (and should export symbols for example).
3896 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3897 # (--disable-auto-import) libraries
3898 m4_if([$1], [GCJ], [],
3899 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3900 ;;
3901
3902 darwin* | rhapsody*)
3903 # PIC is the default on this platform
3904 # Common symbols not allowed in MH_DYLIB files
3905 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3906 ;;
3907
3908 hpux*)
3909 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3910 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3911 # sets the default TLS model and affects inlining.
3912 case $host_cpu in
3913 hppa*64*)
3914 # +Z the default
3915 ;;
3916 *)
3917 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3918 ;;
3919 esac
3920 ;;
3921
3922 interix[[3-9]]*)
3923 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3924 # Instead, we relocate shared libraries at runtime.
3925 ;;
3926
3927 msdosdjgpp*)
3928 # Just because we use GCC doesn't mean we suddenly get shared libraries
3929 # on systems that don't support them.
3930 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3931 enable_shared=no
3932 ;;
3933
3934 *nto* | *qnx*)
3935 # QNX uses GNU C++, but need to define -shared option too, otherwise
3936 # it will coredump.
3937 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3938 ;;
3939
3940 sysv4*MP*)
3941 if test -d /usr/nec; then
3942 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3943 fi
3944 ;;
3945
3946 *)
3947 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3948 ;;
3949 esac
3950 else
3951 # PORTME Check for flag to pass linker flags through the system compiler.
3952 case $host_os in
3953 aix*)
3954 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3955 if test "$host_cpu" = ia64; then
3956 # AIX 5 now supports IA64 processor
3957 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3958 else
3959 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3960 fi
3961 ;;
3962
3963 mingw* | cygwin* | pw32* | os2* | cegcc*)
3964 # This hack is so that the source file can tell whether it is being
3965 # built for inclusion in a dll (and should export symbols for example).
3966 m4_if([$1], [GCJ], [],
3967 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3968 ;;
3969
3970 hpux9* | hpux10* | hpux11*)
3971 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3972 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3973 # not for PA HP-UX.
3974 case $host_cpu in
3975 hppa*64*|ia64*)
3976 # +Z the default
3977 ;;
3978 *)
3979 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3980 ;;
3981 esac
3982 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3983 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3984 ;;
3985
3986 irix5* | irix6* | nonstopux*)
3987 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3988 # PIC (with -KPIC) is the default.
3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3990 ;;
3991
3992 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3993 case $cc_basename in
3994 # old Intel for x86_64 which still supported -KPIC.
3995 ecc*)
3996 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3998 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3999 ;;
4000 # icc used to be incompatible with GCC.
4001 # ICC 10 doesn't accept -KPIC any more.
4002 icc* | ifort*)
4003 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4004 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4005 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4006 ;;
4007 # Lahey Fortran 8.1.
4008 lf95*)
4009 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4011 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4012 ;;
4013 pgcc* | pgf77* | pgf90* | pgf95*)
4014 # Portland Group compilers (*not* the Pentium gcc compiler,
4015 # which looks to be a dead project)
4016 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4018 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4019 ;;
4020 ccc*)
4021 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4022 # All Alpha code is PIC.
4023 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4024 ;;
4025 xl*)
4026 # IBM XL C 8.0/Fortran 10.1 on PPC
4027 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4029 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4030 ;;
4031 *)
4032 case `$CC -V 2>&1 | sed 5q` in
4033 *Sun\ C*)
4034 # Sun C 5.9
4035 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4036 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4037 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4038 ;;
4039 *Sun\ F*)
4040 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4044 ;;
4045 esac
4046 ;;
4047 esac
4048 ;;
4049
4050 newsos6)
4051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4052 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4053 ;;
4054
4055 *nto* | *qnx*)
4056 # QNX uses GNU C++, but need to define -shared option too, otherwise
4057 # it will coredump.
4058 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4059 ;;
4060
4061 osf3* | osf4* | osf5*)
4062 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4063 # All OSF/1 code is PIC.
4064 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4065 ;;
4066
4067 rdos*)
4068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4069 ;;
4070
4071 solaris*)
4072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4073 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4074 case $cc_basename in
4075 f77* | f90* | f95*)
4076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4077 *)
4078 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4079 esac
4080 ;;
4081
4082 sunos4*)
4083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4084 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4085 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4086 ;;
4087
4088 sysv4 | sysv4.2uw2* | sysv4.3*)
4089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4090 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4091 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092 ;;
4093
4094 sysv4*MP*)
4095 if test -d /usr/nec ;then
4096 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4097 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098 fi
4099 ;;
4100
4101 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4102 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4103 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4104 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4105 ;;
4106
4107 unicos*)
4108 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4110 ;;
4111
4112 uts4*)
4113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4114 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4115 ;;
4116
4117 *)
4118 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4119 ;;
4120 esac
4121 fi
4122])
4123case $host_os in
4124 # For platforms which do not support PIC, -DPIC is meaningless:
4125 *djgpp*)
4126 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4127 ;;
4128 *)
4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4130 ;;
4131esac
4132AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4133_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4134 [How to pass a linker flag through the compiler])
4135
4136#
4137# Check to make sure the PIC flag actually works.
4138#
4139if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4140 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4141 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4142 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4143 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4144 "" | " "*) ;;
4145 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4146 esac],
4147 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4148 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4149fi
4150_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4151 [Additional compiler flags for building library objects])
4152
4153#
4154# Check to make sure the static flag actually works.
4155#
4156wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4157_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4158 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4159 $lt_tmp_static_flag,
4160 [],
4161 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4162_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4163 [Compiler flag to prevent dynamic linking])
4164])# _LT_COMPILER_PIC
4165
4166
4167# _LT_LINKER_SHLIBS([TAGNAME])
4168# ----------------------------
4169# See if the linker supports building shared libraries.
4170m4_defun([_LT_LINKER_SHLIBS],
4171[AC_REQUIRE([LT_PATH_LD])dnl
4172AC_REQUIRE([LT_PATH_NM])dnl
4173m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4174m4_require([_LT_DECL_EGREP])dnl
4175m4_require([_LT_DECL_SED])dnl
4176m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4177m4_require([_LT_TAG_COMPILER])dnl
4178AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4179m4_if([$1], [CXX], [
4180 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4181 case $host_os in
4182 aix[[4-9]]*)
4183 # If we're using GNU nm, then we don't want the "-C" option.
4184 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4185 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4186 _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'
4187 else
4188 _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'
4189 fi
4190 ;;
4191 pw32*)
4192 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4193 ;;
4194 cygwin* | mingw* | cegcc*)
4195 _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'
4196 ;;
4197 linux* | k*bsd*-gnu)
4198 _LT_TAGVAR(link_all_deplibs, $1)=no
4199 ;;
4200 *)
4201 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4202 ;;
4203 esac
4204 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4205], [
4206 runpath_var=
4207 _LT_TAGVAR(allow_undefined_flag, $1)=
4208 _LT_TAGVAR(always_export_symbols, $1)=no
4209 _LT_TAGVAR(archive_cmds, $1)=
4210 _LT_TAGVAR(archive_expsym_cmds, $1)=
4211 _LT_TAGVAR(compiler_needs_object, $1)=no
4212 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4213 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4214 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4215 _LT_TAGVAR(hardcode_automatic, $1)=no
4216 _LT_TAGVAR(hardcode_direct, $1)=no
4217 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4219 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4220 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4221 _LT_TAGVAR(hardcode_minus_L, $1)=no
4222 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4223 _LT_TAGVAR(inherit_rpath, $1)=no
4224 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4225 _LT_TAGVAR(module_cmds, $1)=
4226 _LT_TAGVAR(module_expsym_cmds, $1)=
4227 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4228 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4229 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4230 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4231 # include_expsyms should be a list of space-separated symbols to be *always*
4232 # included in the symbol list
4233 _LT_TAGVAR(include_expsyms, $1)=
4234 # exclude_expsyms can be an extended regexp of symbols to exclude
4235 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4236 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4237 # as well as any symbol that contains `d'.
4238 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4239 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4240 # platforms (ab)use it in PIC code, but their linkers get confused if
4241 # the symbol is explicitly referenced. Since portable code cannot
4242 # rely on this symbol name, it's probably fine to never include it in
4243 # preloaded symbol tables.
4244 # Exclude shared library initialization/finalization symbols.
4245dnl Note also adjust exclude_expsyms for C++ above.
4246 extract_expsyms_cmds=
4247
4248 case $host_os in
4249 cygwin* | mingw* | pw32* | cegcc*)
4250 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4251 # When not using gcc, we currently assume that we are using
4252 # Microsoft Visual C++.
4253 if test "$GCC" != yes; then
4254 with_gnu_ld=no
4255 fi
4256 ;;
4257 interix*)
4258 # we just hope/assume this is gcc and not c89 (= MSVC++)
4259 with_gnu_ld=yes
4260 ;;
4261 openbsd*)
4262 with_gnu_ld=no
4263 ;;
4264 linux* | k*bsd*-gnu)
4265 _LT_TAGVAR(link_all_deplibs, $1)=no
4266 ;;
4267 esac
4268
4269 _LT_TAGVAR(ld_shlibs, $1)=yes
4270 if test "$with_gnu_ld" = yes; then
4271 # If archive_cmds runs LD, not CC, wlarc should be empty
4272 wlarc='${wl}'
4273
4274 # Set some defaults for GNU ld with shared library support. These
4275 # are reset later if shared libraries are not supported. Putting them
4276 # here allows them to be overridden if necessary.
4277 runpath_var=LD_RUN_PATH
4278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280 # ancient GNU ld didn't support --whole-archive et. al.
4281 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283 else
4284 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285 fi
4286 supports_anon_versioning=no
4287 case `$LD -v 2>&1` in
4288 *GNU\ gold*) supports_anon_versioning=yes ;;
4289 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4290 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4291 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4292 *\ 2.11.*) ;; # other 2.11 versions
4293 *) supports_anon_versioning=yes ;;
4294 esac
4295
4296 # See if GNU ld supports shared libraries.
4297 case $host_os in
4298 aix[[3-9]]*)
4299 # On AIX/PPC, the GNU linker is very broken
4300 if test "$host_cpu" != ia64; then
4301 _LT_TAGVAR(ld_shlibs, $1)=no
4302 cat <<_LT_EOF 1>&2
4303
4304*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4305*** to be unable to reliably create shared libraries on AIX.
4306*** Therefore, libtool is disabling shared libraries support. If you
4307*** really care for shared libraries, you may want to modify your PATH
4308*** so that a non-GNU linker is found, and then restart.
4309
4310_LT_EOF
4311 fi
4312 ;;
4313
4314 amigaos*)
4315 case $host_cpu in
4316 powerpc)
4317 # see comment about AmigaOS4 .so support
4318 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4319 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4320 ;;
4321 m68k)
4322 _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)'
4323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4324 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4325 ;;
4326 esac
4327 ;;
4328
4329 beos*)
4330 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4331 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4332 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4333 # support --undefined. This deserves some investigation. FIXME
4334 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4335 else
4336 _LT_TAGVAR(ld_shlibs, $1)=no
4337 fi
4338 ;;
4339
4340 cygwin* | mingw* | pw32* | cegcc*)
4341 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4342 # as there is no search path for DLLs.
4343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4344 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4345 _LT_TAGVAR(always_export_symbols, $1)=no
4346 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4347 _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'
4348
4349 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4350 _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'
4351 # If the export-symbols file already is a .def file (1st line
4352 # is EXPORTS), use it as is; otherwise, prepend...
4353 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4354 cp $export_symbols $output_objdir/$soname.def;
4355 else
4356 echo EXPORTS > $output_objdir/$soname.def;
4357 cat $export_symbols >> $output_objdir/$soname.def;
4358 fi~
4359 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4360 else
4361 _LT_TAGVAR(ld_shlibs, $1)=no
4362 fi
4363 ;;
4364
4365 interix[[3-9]]*)
4366 _LT_TAGVAR(hardcode_direct, $1)=no
4367 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4369 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4370 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4371 # Instead, shared libraries are loaded at an image base (0x10000000 by
4372 # default) and relocated if they conflict, which is a slow very memory
4373 # consuming and fragmenting process. To avoid this, we pick a random,
4374 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4375 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4376 _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'
4377 _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'
4378 ;;
4379
4380 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4381 tmp_diet=no
4382 if test "$host_os" = linux-dietlibc; then
4383 case $cc_basename in
4384 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4385 esac
4386 fi
4387 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4388 && test "$tmp_diet" = no
4389 then
4390 tmp_addflag=
4391 tmp_sharedflag='-shared'
4392 case $cc_basename,$host_cpu in
4393 pgcc*) # Portland Group C compiler
4394 _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'
4395 tmp_addflag=' $pic_flag'
4396 ;;
4397 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4398 _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'
4399 tmp_addflag=' $pic_flag -Mnomain' ;;
4400 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4401 tmp_addflag=' -i_dynamic' ;;
4402 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4403 tmp_addflag=' -i_dynamic -nofor_main' ;;
4404 ifc* | ifort*) # Intel Fortran compiler
4405 tmp_addflag=' -nofor_main' ;;
4406 lf95*) # Lahey Fortran 8.1
4407 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4408 tmp_sharedflag='--shared' ;;
4409 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4410 tmp_sharedflag='-qmkshrobj'
4411 tmp_addflag= ;;
4412 esac
4413 case `$CC -V 2>&1 | sed 5q` in
4414 *Sun\ C*) # Sun C 5.9
4415 _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'
4416 _LT_TAGVAR(compiler_needs_object, $1)=yes
4417 tmp_sharedflag='-G' ;;
4418 *Sun\ F*) # Sun Fortran 8.3
4419 tmp_sharedflag='-G' ;;
4420 esac
4421 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4422
4423 if test "x$supports_anon_versioning" = xyes; then
4424 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4425 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4426 echo "local: *; };" >> $output_objdir/$libname.ver~
4427 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4428 fi
4429
4430 case $cc_basename in
4431 xlf*)
4432 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4433 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4435 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4436 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4437 if test "x$supports_anon_versioning" = xyes; then
4438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440 echo "local: *; };" >> $output_objdir/$libname.ver~
4441 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4442 fi
4443 ;;
4444 esac
4445 else
4446 _LT_TAGVAR(ld_shlibs, $1)=no
4447 fi
4448 ;;
4449
4450 netbsd* | netbsdelf*-gnu)
4451 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4452 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4453 wlarc=
4454 else
4455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4456 _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'
4457 fi
4458 ;;
4459
4460 solaris*)
4461 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4462 _LT_TAGVAR(ld_shlibs, $1)=no
4463 cat <<_LT_EOF 1>&2
4464
4465*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4466*** create shared libraries on Solaris systems. Therefore, libtool
4467*** is disabling shared libraries support. We urge you to upgrade GNU
4468*** binutils to release 2.9.1 or newer. Another option is to modify
4469*** your PATH or compiler configuration so that the native linker is
4470*** used, and then restart.
4471
4472_LT_EOF
4473 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4474 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4475 _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'
4476 else
4477 _LT_TAGVAR(ld_shlibs, $1)=no
4478 fi
4479 ;;
4480
4481 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4482 case `$LD -v 2>&1` in
4483 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4484 _LT_TAGVAR(ld_shlibs, $1)=no
4485 cat <<_LT_EOF 1>&2
4486
4487*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4488*** reliably create shared libraries on SCO systems. Therefore, libtool
4489*** is disabling shared libraries support. We urge you to upgrade GNU
4490*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4491*** your PATH or compiler configuration so that the native linker is
4492*** used, and then restart.
4493
4494_LT_EOF
4495 ;;
4496 *)
4497 # For security reasons, it is highly recommended that you always
4498 # use absolute paths for naming shared libraries, and exclude the
4499 # DT_RUNPATH tag from executables and libraries. But doing so
4500 # requires that you compile everything twice, which is a pain.
4501 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4502 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4503 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4504 _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'
4505 else
4506 _LT_TAGVAR(ld_shlibs, $1)=no
4507 fi
4508 ;;
4509 esac
4510 ;;
4511
4512 sunos4*)
4513 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4514 wlarc=
4515 _LT_TAGVAR(hardcode_direct, $1)=yes
4516 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4517 ;;
4518
4519 *)
4520 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4521 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4522 _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'
4523 else
4524 _LT_TAGVAR(ld_shlibs, $1)=no
4525 fi
4526 ;;
4527 esac
4528
4529 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4530 runpath_var=
4531 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4532 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4533 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4534 fi
4535 else
4536 # PORTME fill in a description of your system's linker (not GNU ld)
4537 case $host_os in
4538 aix3*)
4539 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4540 _LT_TAGVAR(always_export_symbols, $1)=yes
4541 _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'
4542 # Note: this linker hardcodes the directories in LIBPATH if there
4543 # are no directories specified by -L.
4544 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4545 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4546 # Neither direct hardcoding nor static linking is supported with a
4547 # broken collect2.
4548 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4549 fi
4550 ;;
4551
4552 aix[[4-9]]*)
4553 if test "$host_cpu" = ia64; then
4554 # On IA64, the linker does run time linking by default, so we don't
4555 # have to do anything special.
4556 aix_use_runtimelinking=no
4557 exp_sym_flag='-Bexport'
4558 no_entry_flag=""
4559 else
4560 # If we're using GNU nm, then we don't want the "-C" option.
4561 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4562 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4563 _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'
4564 else
4565 _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'
4566 fi
4567 aix_use_runtimelinking=no
4568
4569 # Test if we are trying to use run time linking or normal
4570 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4571 # need to do runtime linking.
4572 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4573 for ld_flag in $LDFLAGS; do
4574 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4575 aix_use_runtimelinking=yes
4576 break
4577 fi
4578 done
4579 ;;
4580 esac
4581
4582 exp_sym_flag='-bexport'
4583 no_entry_flag='-bnoentry'
4584 fi
4585
4586 # When large executables or shared objects are built, AIX ld can
4587 # have problems creating the table of contents. If linking a library
4588 # or program results in "error TOC overflow" add -mminimal-toc to
4589 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4590 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4591
4592 _LT_TAGVAR(archive_cmds, $1)=''
4593 _LT_TAGVAR(hardcode_direct, $1)=yes
4594 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4595 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4596 _LT_TAGVAR(link_all_deplibs, $1)=yes
4597 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4598
4599 if test "$GCC" = yes; then
4600 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4601 # We only want to do this on AIX 4.2 and lower, the check
4602 # below for broken collect2 doesn't work under 4.3+
4603 collect2name=`${CC} -print-prog-name=collect2`
4604 if test -f "$collect2name" &&
4605 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4606 then
4607 # We have reworked collect2
4608 :
4609 else
4610 # We have old collect2
4611 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4612 # It fails to find uninstalled libraries when the uninstalled
4613 # path is not listed in the libpath. Setting hardcode_minus_L
4614 # to unsupported forces relinking
4615 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4617 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4618 fi
4619 ;;
4620 esac
4621 shared_flag='-shared'
4622 if test "$aix_use_runtimelinking" = yes; then
4623 shared_flag="$shared_flag "'${wl}-G'
4624 fi
4625 _LT_TAGVAR(link_all_deplibs, $1)=no
4626 else
4627 # not using gcc
4628 if test "$host_cpu" = ia64; then
4629 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4630 # chokes on -Wl,-G. The following line is correct:
4631 shared_flag='-G'
4632 else
4633 if test "$aix_use_runtimelinking" = yes; then
4634 shared_flag='${wl}-G'
4635 else
4636 shared_flag='${wl}-bM:SRE'
4637 fi
4638 fi
4639 fi
4640
4641 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4642 # It seems that -bexpall does not export symbols beginning with
4643 # underscore (_), so it is better to generate a list of symbols to export.
4644 _LT_TAGVAR(always_export_symbols, $1)=yes
4645 if test "$aix_use_runtimelinking" = yes; then
4646 # Warning - without using the other runtime loading flags (-brtl),
4647 # -berok will link without error, but may produce a broken library.
4648 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4649 # Determine the default libpath from the value encoded in an
4650 # empty executable.
4651 _LT_SYS_MODULE_PATH_AIX
4652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4653 _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"
4654 else
4655 if test "$host_cpu" = ia64; then
4656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4657 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4658 _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"
4659 else
4660 # Determine the default libpath from the value encoded in an
4661 # empty executable.
4662 _LT_SYS_MODULE_PATH_AIX
4663 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4664 # Warning - without using the other run time loading flags,
4665 # -berok will link without error, but may produce a broken library.
4666 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4667 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4668 # Exported symbols can be pulled into shared objects from archives
4669 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4670 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4671 # This is similar to how AIX traditionally builds its shared libraries.
4672 _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'
4673 fi
4674 fi
4675 ;;
4676
4677 amigaos*)
4678 case $host_cpu in
4679 powerpc)
4680 # see comment about AmigaOS4 .so support
4681 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4682 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4683 ;;
4684 m68k)
4685 _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)'
4686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4687 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4688 ;;
4689 esac
4690 ;;
4691
4692 bsdi[[45]]*)
4693 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4694 ;;
4695
4696 cygwin* | mingw* | pw32* | cegcc*)
4697 # When not using gcc, we currently assume that we are using
4698 # Microsoft Visual C++.
4699 # hardcode_libdir_flag_spec is actually meaningless, as there is
4700 # no search path for DLLs.
4701 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4702 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4703 # Tell ltmain to make .lib files, not .a files.
4704 libext=lib
4705 # Tell ltmain to make .dll files, not .so files.
4706 shrext_cmds=".dll"
4707 # FIXME: Setting linknames here is a bad hack.
4708 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4709 # The linker will automatically build a .lib file if we build a DLL.
4710 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4711 # FIXME: Should let the user specify the lib program.
4712 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4713 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4714 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4715 ;;
4716
4717 darwin* | rhapsody*)
4718 _LT_DARWIN_LINKER_FEATURES($1)
4719 ;;
4720
4721 dgux*)
4722 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4724 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4725 ;;
4726
4727 freebsd1*)
4728 _LT_TAGVAR(ld_shlibs, $1)=no
4729 ;;
4730
4731 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4732 # support. Future versions do this automatically, but an explicit c++rt0.o
4733 # does not break anything, and helps significantly (at the cost of a little
4734 # extra space).
4735 freebsd2.2*)
4736 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4738 _LT_TAGVAR(hardcode_direct, $1)=yes
4739 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4740 ;;
4741
4742 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4743 freebsd2*)
4744 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4745 _LT_TAGVAR(hardcode_direct, $1)=yes
4746 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4747 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4748 ;;
4749
4750 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4751 freebsd* | dragonfly*)
4752 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4753 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4754 _LT_TAGVAR(hardcode_direct, $1)=yes
4755 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4756 ;;
4757
4758 hpux9*)
4759 if test "$GCC" = yes; then
4760 _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'
4761 else
4762 _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'
4763 fi
4764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4765 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4766 _LT_TAGVAR(hardcode_direct, $1)=yes
4767
4768 # hardcode_minus_L: Not really in the search PATH,
4769 # but as the default location of the library.
4770 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4772 ;;
4773
4774 hpux10*)
4775 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4776 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4777 else
4778 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4779 fi
4780 if test "$with_gnu_ld" = no; then
4781 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4782 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4783 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4784 _LT_TAGVAR(hardcode_direct, $1)=yes
4785 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4786 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4787 # hardcode_minus_L: Not really in the search PATH,
4788 # but as the default location of the library.
4789 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4790 fi
4791 ;;
4792
4793 hpux11*)
4794 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4795 case $host_cpu in
4796 hppa*64*)
4797 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4798 ;;
4799 ia64*)
4800 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4801 ;;
4802 *)
4803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4804 ;;
4805 esac
4806 else
4807 case $host_cpu in
4808 hppa*64*)
4809 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4810 ;;
4811 ia64*)
4812 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4813 ;;
4814 *)
4815 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4816 ;;
4817 esac
4818 fi
4819 if test "$with_gnu_ld" = no; then
4820 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4821 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4822
4823 case $host_cpu in
4824 hppa*64*|ia64*)
4825 _LT_TAGVAR(hardcode_direct, $1)=no
4826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4827 ;;
4828 *)
4829 _LT_TAGVAR(hardcode_direct, $1)=yes
4830 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4831 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4832
4833 # hardcode_minus_L: Not really in the search PATH,
4834 # but as the default location of the library.
4835 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4836 ;;
4837 esac
4838 fi
4839 ;;
4840
4841 irix5* | irix6* | nonstopux*)
4842 if test "$GCC" = yes; then
4843 _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'
4844 # Try to use the -exported_symbol ld option, if it does not
4845 # work, assume that -exports_file does not work either and
4846 # implicitly export all symbols.
4847 save_LDFLAGS="$LDFLAGS"
4848 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4849 AC_LINK_IFELSE(int foo(void) {},
4850 _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'
4851 )
4852 LDFLAGS="$save_LDFLAGS"
4853 else
4854 _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'
4855 _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'
4856 fi
4857 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4859 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4860 _LT_TAGVAR(inherit_rpath, $1)=yes
4861 _LT_TAGVAR(link_all_deplibs, $1)=yes
4862 ;;
4863
4864 netbsd* | netbsdelf*-gnu)
4865 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4866 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4867 else
4868 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4869 fi
4870 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4871 _LT_TAGVAR(hardcode_direct, $1)=yes
4872 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4873 ;;
4874
4875 newsos6)
4876 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4877 _LT_TAGVAR(hardcode_direct, $1)=yes
4878 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4879 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4880 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4881 ;;
4882
4883 *nto* | *qnx*)
4884 ;;
4885
4886 openbsd*)
4887 if test -f /usr/libexec/ld.so; then
4888 _LT_TAGVAR(hardcode_direct, $1)=yes
4889 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4890 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4891 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4892 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4893 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4896 else
4897 case $host_os in
4898 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4899 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4901 ;;
4902 *)
4903 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4905 ;;
4906 esac
4907 fi
4908 else
4909 _LT_TAGVAR(ld_shlibs, $1)=no
4910 fi
4911 ;;
4912
4913 os2*)
4914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4915 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4916 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4917 _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'
4918 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4919 ;;
4920
4921 osf3*)
4922 if test "$GCC" = yes; then
4923 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4924 _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'
4925 else
4926 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4927 _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'
4928 fi
4929 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4930 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4931 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4932 ;;
4933
4934 osf4* | osf5*) # as osf3* with the addition of -msym flag
4935 if test "$GCC" = yes; then
4936 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4937 _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'
4938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4939 else
4940 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _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'
4942 _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~
4943 $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'
4944
4945 # Both c and cxx compiler support -rpath directly
4946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4947 fi
4948 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4949 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4950 ;;
4951
4952 solaris*)
4953 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4954 if test "$GCC" = yes; then
4955 wlarc='${wl}'
4956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4957 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4958 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4959 else
4960 case `$CC -V 2>&1` in
4961 *"Compilers 5.0"*)
4962 wlarc=''
4963 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4964 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4965 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4966 ;;
4967 *)
4968 wlarc='${wl}'
4969 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4970 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4971 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4972 ;;
4973 esac
4974 fi
4975 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4976 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4977 case $host_os in
4978 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4979 *)
4980 # The compiler driver will combine and reorder linker options,
4981 # but understands `-z linker_flag'. GCC discards it without `$wl',
4982 # but is careful enough not to reorder.
4983 # Supported since Solaris 2.6 (maybe 2.5.1?)
4984 if test "$GCC" = yes; then
4985 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4986 else
4987 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4988 fi
4989 ;;
4990 esac
4991 _LT_TAGVAR(link_all_deplibs, $1)=yes
4992 ;;
4993
4994 sunos4*)
4995 if test "x$host_vendor" = xsequent; then
4996 # Use $CC to link under sequent, because it throws in some extra .o
4997 # files that make .init and .fini sections work.
4998 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4999 else
5000 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5001 fi
5002 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5003 _LT_TAGVAR(hardcode_direct, $1)=yes
5004 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5005 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5006 ;;
5007
5008 sysv4)
5009 case $host_vendor in
5010 sni)
5011 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5012 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5013 ;;
5014 siemens)
5015 ## LD is ld it makes a PLAMLIB
5016 ## CC just makes a GrossModule.
5017 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5018 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5019 _LT_TAGVAR(hardcode_direct, $1)=no
5020 ;;
5021 motorola)
5022 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5023 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5024 ;;
5025 esac
5026 runpath_var='LD_RUN_PATH'
5027 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5028 ;;
5029
5030 sysv4.3*)
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5032 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5033 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5034 ;;
5035
5036 sysv4*MP*)
5037 if test -d /usr/nec; then
5038 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5039 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5040 runpath_var=LD_RUN_PATH
5041 hardcode_runpath_var=yes
5042 _LT_TAGVAR(ld_shlibs, $1)=yes
5043 fi
5044 ;;
5045
5046 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5047 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5048 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5049 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5050 runpath_var='LD_RUN_PATH'
5051
5052 if test "$GCC" = yes; then
5053 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5054 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055 else
5056 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5057 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5058 fi
5059 ;;
5060
5061 sysv5* | sco3.2v5* | sco5v6*)
5062 # Note: We can NOT use -z defs as we might desire, because we do not
5063 # link with -lc, and that would cause any symbols used from libc to
5064 # always be unresolved, which means just about no library would
5065 # ever link correctly. If we're not using GNU ld we use -z text
5066 # though, which does catch some bad symbols but isn't as heavy-handed
5067 # as -z defs.
5068 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5069 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5070 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5071 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5072 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5073 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5074 _LT_TAGVAR(link_all_deplibs, $1)=yes
5075 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5076 runpath_var='LD_RUN_PATH'
5077
5078 if test "$GCC" = yes; then
5079 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5080 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081 else
5082 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5083 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5084 fi
5085 ;;
5086
5087 uts4*)
5088 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5090 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5091 ;;
5092
5093 *)
5094 _LT_TAGVAR(ld_shlibs, $1)=no
5095 ;;
5096 esac
5097
5098 if test x$host_vendor = xsni; then
5099 case $host in
5100 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5101 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5102 ;;
5103 esac
5104 fi
5105 fi
5106])
5107AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5108test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5109
5110_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5111
5112_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5113_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5114_LT_DECL([], [extract_expsyms_cmds], [2],
5115 [The commands to extract the exported symbol list from a shared archive])
5116
5117#
5118# Do we need to explicitly link libc?
5119#
5120case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5121x|xyes)
5122 # Assume -lc should be added
5123 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5124
5125 if test "$enable_shared" = yes && test "$GCC" = yes; then
5126 case $_LT_TAGVAR(archive_cmds, $1) in
5127 *'~'*)
5128 # FIXME: we may have to deal with multi-command sequences.
5129 ;;
5130 '$CC '*)
5131 # Test whether the compiler implicitly links with -lc since on some
5132 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5133 # to ld, don't add -lc before -lgcc.
5134 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5135 $RM conftest*
5136 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5137
5138 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5139 soname=conftest
5140 lib=conftest
5141 libobjs=conftest.$ac_objext
5142 deplibs=
5143 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5144 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5145 compiler_flags=-v
5146 linker_flags=-v
5147 verstring=
5148 output_objdir=.
5149 libname=conftest
5150 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5151 _LT_TAGVAR(allow_undefined_flag, $1)=
5152 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5153 then
5154 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5155 else
5156 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5157 fi
5158 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5159 else
5160 cat conftest.err 1>&5
5161 fi
5162 $RM conftest*
5163 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5164 ;;
5165 esac
5166 fi
5167 ;;
5168esac
5169
5170_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5171 [Whether or not to add -lc for building shared libraries])
5172_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5173 [enable_shared_with_static_runtimes], [0],
5174 [Whether or not to disallow shared libs when runtime libs are static])
5175_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5176 [Compiler flag to allow reflexive dlopens])
5177_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5178 [Compiler flag to generate shared objects directly from archives])
5179_LT_TAGDECL([], [compiler_needs_object], [1],
5180 [Whether the compiler copes with passing no objects directly])
5181_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5182 [Create an old-style archive from a shared archive])
5183_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5184 [Create a temporary old-style archive to link instead of a shared archive])
5185_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5186_LT_TAGDECL([], [archive_expsym_cmds], [2])
5187_LT_TAGDECL([], [module_cmds], [2],
5188 [Commands used to build a loadable module if different from building
5189 a shared archive.])
5190_LT_TAGDECL([], [module_expsym_cmds], [2])
5191_LT_TAGDECL([], [with_gnu_ld], [1],
5192 [Whether we are building with GNU ld or not])
5193_LT_TAGDECL([], [allow_undefined_flag], [1],
5194 [Flag that allows shared libraries with undefined symbols to be built])
5195_LT_TAGDECL([], [no_undefined_flag], [1],
5196 [Flag that enforces no undefined symbols])
5197_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5198 [Flag to hardcode $libdir into a binary during linking.
5199 This must work even if $libdir does not exist])
5200_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5201 [[If ld is used when linking, flag to hardcode $libdir into a binary
5202 during linking. This must work even if $libdir does not exist]])
5203_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5204 [Whether we need a single "-rpath" flag with a separated argument])
5205_LT_TAGDECL([], [hardcode_direct], [0],
5206 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5207 DIR into the resulting binary])
5208_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5209 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5210 DIR into the resulting binary and the resulting library dependency is
5211 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5212 library is relocated])
5213_LT_TAGDECL([], [hardcode_minus_L], [0],
5214 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5215 into the resulting binary])
5216_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5217 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5218 into the resulting binary])
5219_LT_TAGDECL([], [hardcode_automatic], [0],
5220 [Set to "yes" if building a shared library automatically hardcodes DIR
5221 into the library and all subsequent libraries and executables linked
5222 against it])
5223_LT_TAGDECL([], [inherit_rpath], [0],
5224 [Set to yes if linker adds runtime paths of dependent libraries
5225 to runtime path list])
5226_LT_TAGDECL([], [link_all_deplibs], [0],
5227 [Whether libtool must link a program against all its dependency libraries])
5228_LT_TAGDECL([], [fix_srcfile_path], [1],
5229 [Fix the shell variable $srcfile for the compiler])
5230_LT_TAGDECL([], [always_export_symbols], [0],
5231 [Set to "yes" if exported symbols are required])
5232_LT_TAGDECL([], [export_symbols_cmds], [2],
5233 [The commands to list exported symbols])
5234_LT_TAGDECL([], [exclude_expsyms], [1],
5235 [Symbols that should not be listed in the preloaded symbols])
5236_LT_TAGDECL([], [include_expsyms], [1],
5237 [Symbols that must always be exported])
5238_LT_TAGDECL([], [prelink_cmds], [2],
5239 [Commands necessary for linking programs (against libraries) with templates])
5240_LT_TAGDECL([], [file_list_spec], [1],
5241 [Specify filename containing input files])
5242dnl FIXME: Not yet implemented
5243dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5244dnl [Compiler flag to generate thread safe objects])
5245])# _LT_LINKER_SHLIBS
5246
5247
5248# _LT_LANG_C_CONFIG([TAG])
5249# ------------------------
5250# Ensure that the configuration variables for a C compiler are suitably
5251# defined. These variables are subsequently used by _LT_CONFIG to write
5252# the compiler configuration to `libtool'.
5253m4_defun([_LT_LANG_C_CONFIG],
5254[m4_require([_LT_DECL_EGREP])dnl
5255lt_save_CC="$CC"
5256AC_LANG_PUSH(C)
5257
5258# Source file extension for C test sources.
5259ac_ext=c
5260
5261# Object file extension for compiled C test sources.
5262objext=o
5263_LT_TAGVAR(objext, $1)=$objext
5264
5265# Code to be used in simple compile tests
5266lt_simple_compile_test_code="int some_variable = 0;"
5267
5268# Code to be used in simple link tests
5269lt_simple_link_test_code='int main(){return(0);}'
5270
5271_LT_TAG_COMPILER
5272# Save the default compiler, since it gets overwritten when the other
5273# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5274compiler_DEFAULT=$CC
5275
5276# save warnings/boilerplate of simple test code
5277_LT_COMPILER_BOILERPLATE
5278_LT_LINKER_BOILERPLATE
5279
5280## CAVEAT EMPTOR:
5281## There is no encapsulation within the following macros, do not change
5282## the running order or otherwise move them around unless you know exactly
5283## what you are doing...
5284if test -n "$compiler"; then
5285 _LT_COMPILER_NO_RTTI($1)
5286 _LT_COMPILER_PIC($1)
5287 _LT_COMPILER_C_O($1)
5288 _LT_COMPILER_FILE_LOCKS($1)
5289 _LT_LINKER_SHLIBS($1)
5290 _LT_SYS_DYNAMIC_LINKER($1)
5291 _LT_LINKER_HARDCODE_LIBPATH($1)
5292 LT_SYS_DLOPEN_SELF
5293 _LT_CMD_STRIPLIB
5294
5295 # Report which library types will actually be built
5296 AC_MSG_CHECKING([if libtool supports shared libraries])
5297 AC_MSG_RESULT([$can_build_shared])
5298
5299 AC_MSG_CHECKING([whether to build shared libraries])
5300 test "$can_build_shared" = "no" && enable_shared=no
5301
5302 # On AIX, shared libraries and static libraries use the same namespace, and
5303 # are all built from PIC.
5304 case $host_os in
5305 aix3*)
5306 test "$enable_shared" = yes && enable_static=no
5307 if test -n "$RANLIB"; then
5308 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5309 postinstall_cmds='$RANLIB $lib'
5310 fi
5311 ;;
5312
5313 aix[[4-9]]*)
5314 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5315 test "$enable_shared" = yes && enable_static=no
5316 fi
5317 ;;
5318 esac
5319 AC_MSG_RESULT([$enable_shared])
5320
5321 AC_MSG_CHECKING([whether to build static libraries])
5322 # Make sure either enable_shared or enable_static is yes.
5323 test "$enable_shared" = yes || enable_static=yes
5324 AC_MSG_RESULT([$enable_static])
5325
5326 _LT_CONFIG($1)
5327fi
5328AC_LANG_POP
5329CC="$lt_save_CC"
5330])# _LT_LANG_C_CONFIG
5331
5332
5333# _LT_PROG_CXX
5334# ------------
5335# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5336# compiler, we have our own version here.
5337m4_defun([_LT_PROG_CXX],
5338[
5339pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5340AC_PROG_CXX
5341if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5342 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5343 (test "X$CXX" != "Xg++"))) ; then
5344 AC_PROG_CXXCPP
5345else
5346 _lt_caught_CXX_error=yes
5347fi
5348popdef([AC_MSG_ERROR])
5349])# _LT_PROG_CXX
5350
5351dnl aclocal-1.4 backwards compatibility:
5352dnl AC_DEFUN([_LT_PROG_CXX], [])
5353
5354
5355# _LT_LANG_CXX_CONFIG([TAG])
5356# --------------------------
5357# Ensure that the configuration variables for a C++ compiler are suitably
5358# defined. These variables are subsequently used by _LT_CONFIG to write
5359# the compiler configuration to `libtool'.
5360m4_defun([_LT_LANG_CXX_CONFIG],
5361[AC_REQUIRE([_LT_PROG_CXX])dnl
5362m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5363m4_require([_LT_DECL_EGREP])dnl
5364
5365AC_LANG_PUSH(C++)
5366_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5367_LT_TAGVAR(allow_undefined_flag, $1)=
5368_LT_TAGVAR(always_export_symbols, $1)=no
5369_LT_TAGVAR(archive_expsym_cmds, $1)=
5370_LT_TAGVAR(compiler_needs_object, $1)=no
5371_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5372_LT_TAGVAR(hardcode_direct, $1)=no
5373_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5374_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5375_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5376_LT_TAGVAR(hardcode_libdir_separator, $1)=
5377_LT_TAGVAR(hardcode_minus_L, $1)=no
5378_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5379_LT_TAGVAR(hardcode_automatic, $1)=no
5380_LT_TAGVAR(inherit_rpath, $1)=no
5381_LT_TAGVAR(module_cmds, $1)=
5382_LT_TAGVAR(module_expsym_cmds, $1)=
5383_LT_TAGVAR(link_all_deplibs, $1)=unknown
5384_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5385_LT_TAGVAR(no_undefined_flag, $1)=
5386_LT_TAGVAR(whole_archive_flag_spec, $1)=
5387_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5388
5389# Source file extension for C++ test sources.
5390ac_ext=cpp
5391
5392# Object file extension for compiled C++ test sources.
5393objext=o
5394_LT_TAGVAR(objext, $1)=$objext
5395
5396# No sense in running all these tests if we already determined that
5397# the CXX compiler isn't working. Some variables (like enable_shared)
5398# are currently assumed to apply to all compilers on this platform,
5399# and will be corrupted by setting them based on a non-working compiler.
5400if test "$_lt_caught_CXX_error" != yes; then
5401 # Code to be used in simple compile tests
5402 lt_simple_compile_test_code="int some_variable = 0;"
5403
5404 # Code to be used in simple link tests
5405 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5406
5407 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5408 _LT_TAG_COMPILER
5409
5410 # save warnings/boilerplate of simple test code
5411 _LT_COMPILER_BOILERPLATE
5412 _LT_LINKER_BOILERPLATE
5413
5414 # Allow CC to be a program name with arguments.
5415 lt_save_CC=$CC
5416 lt_save_LD=$LD
5417 lt_save_GCC=$GCC
5418 GCC=$GXX
5419 lt_save_with_gnu_ld=$with_gnu_ld
5420 lt_save_path_LD=$lt_cv_path_LD
5421 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5422 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5423 else
5424 $as_unset lt_cv_prog_gnu_ld
5425 fi
5426 if test -n "${lt_cv_path_LDCXX+set}"; then
5427 lt_cv_path_LD=$lt_cv_path_LDCXX
5428 else
5429 $as_unset lt_cv_path_LD
5430 fi
5431 test -z "${LDCXX+set}" || LD=$LDCXX
5432 CC=${CXX-"c++"}
5433 compiler=$CC
5434 _LT_TAGVAR(compiler, $1)=$CC
5435 _LT_CC_BASENAME([$compiler])
5436
5437 if test -n "$compiler"; then
5438 # We don't want -fno-exception when compiling C++ code, so set the
5439 # no_builtin_flag separately
5440 if test "$GXX" = yes; then
5441 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5442 else
5443 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5444 fi
5445
5446 if test "$GXX" = yes; then
5447 # Set up default GNU C++ configuration
5448
5449 LT_PATH_LD
5450
5451 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5452 # archiving commands below assume that GNU ld is being used.
5453 if test "$with_gnu_ld" = yes; then
5454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5455 _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'
5456
5457 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5458 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5459
5460 # If archive_cmds runs LD, not CC, wlarc should be empty
5461 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5462 # investigate it a little bit more. (MM)
5463 wlarc='${wl}'
5464
5465 # ancient GNU ld didn't support --whole-archive et. al.
5466 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5467 $GREP 'no-whole-archive' > /dev/null; then
5468 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5469 else
5470 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5471 fi
5472 else
5473 with_gnu_ld=no
5474 wlarc=
5475
5476 # A generic and very simple default shared library creation
5477 # command for GNU C++ for the case where it uses the native
5478 # linker, instead of GNU ld. If possible, this setting should
5479 # overridden to take advantage of the native linker features on
5480 # the platform it is being used on.
5481 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5482 fi
5483
5484 # Commands to make compiler produce verbose output that lists
5485 # what "hidden" libraries, object files and flags are used when
5486 # linking a shared library.
5487 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5488
5489 else
5490 GXX=no
5491 with_gnu_ld=no
5492 wlarc=
5493 fi
5494
5495 # PORTME: fill in a description of your system's C++ link characteristics
5496 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5497 _LT_TAGVAR(ld_shlibs, $1)=yes
5498 case $host_os in
5499 aix3*)
5500 # FIXME: insert proper C++ library support
5501 _LT_TAGVAR(ld_shlibs, $1)=no
5502 ;;
5503 aix[[4-9]]*)
5504 if test "$host_cpu" = ia64; then
5505 # On IA64, the linker does run time linking by default, so we don't
5506 # have to do anything special.
5507 aix_use_runtimelinking=no
5508 exp_sym_flag='-Bexport'
5509 no_entry_flag=""
5510 else
5511 aix_use_runtimelinking=no
5512
5513 # Test if we are trying to use run time linking or normal
5514 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5515 # need to do runtime linking.
5516 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5517 for ld_flag in $LDFLAGS; do
5518 case $ld_flag in
5519 *-brtl*)
5520 aix_use_runtimelinking=yes
5521 break
5522 ;;
5523 esac
5524 done
5525 ;;
5526 esac
5527
5528 exp_sym_flag='-bexport'
5529 no_entry_flag='-bnoentry'
5530 fi
5531
5532 # When large executables or shared objects are built, AIX ld can
5533 # have problems creating the table of contents. If linking a library
5534 # or program results in "error TOC overflow" add -mminimal-toc to
5535 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5536 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5537
5538 _LT_TAGVAR(archive_cmds, $1)=''
5539 _LT_TAGVAR(hardcode_direct, $1)=yes
5540 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5541 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5542 _LT_TAGVAR(link_all_deplibs, $1)=yes
5543 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5544
5545 if test "$GXX" = yes; then
5546 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5547 # We only want to do this on AIX 4.2 and lower, the check
5548 # below for broken collect2 doesn't work under 4.3+
5549 collect2name=`${CC} -print-prog-name=collect2`
5550 if test -f "$collect2name" &&
5551 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5552 then
5553 # We have reworked collect2
5554 :
5555 else
5556 # We have old collect2
5557 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5558 # It fails to find uninstalled libraries when the uninstalled
5559 # path is not listed in the libpath. Setting hardcode_minus_L
5560 # to unsupported forces relinking
5561 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5562 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5563 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5564 fi
5565 esac
5566 shared_flag='-shared'
5567 if test "$aix_use_runtimelinking" = yes; then
5568 shared_flag="$shared_flag "'${wl}-G'
5569 fi
5570 else
5571 # not using gcc
5572 if test "$host_cpu" = ia64; then
5573 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5574 # chokes on -Wl,-G. The following line is correct:
5575 shared_flag='-G'
5576 else
5577 if test "$aix_use_runtimelinking" = yes; then
5578 shared_flag='${wl}-G'
5579 else
5580 shared_flag='${wl}-bM:SRE'
5581 fi
5582 fi
5583 fi
5584
5585 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5586 # It seems that -bexpall does not export symbols beginning with
5587 # underscore (_), so it is better to generate a list of symbols to
5588 # export.
5589 _LT_TAGVAR(always_export_symbols, $1)=yes
5590 if test "$aix_use_runtimelinking" = yes; then
5591 # Warning - without using the other runtime loading flags (-brtl),
5592 # -berok will link without error, but may produce a broken library.
5593 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5594 # Determine the default libpath from the value encoded in an empty
5595 # executable.
5596 _LT_SYS_MODULE_PATH_AIX
5597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5598
5599 _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"
5600 else
5601 if test "$host_cpu" = ia64; then
5602 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5603 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5604 _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"
5605 else
5606 # Determine the default libpath from the value encoded in an
5607 # empty executable.
5608 _LT_SYS_MODULE_PATH_AIX
5609 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5610 # Warning - without using the other run time loading flags,
5611 # -berok will link without error, but may produce a broken library.
5612 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5613 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5614 # Exported symbols can be pulled into shared objects from archives
5615 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5616 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5617 # This is similar to how AIX traditionally builds its shared
5618 # libraries.
5619 _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'
5620 fi
5621 fi
5622 ;;
5623
5624 beos*)
5625 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5626 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5627 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5628 # support --undefined. This deserves some investigation. FIXME
5629 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5630 else
5631 _LT_TAGVAR(ld_shlibs, $1)=no
5632 fi
5633 ;;
5634
5635 chorus*)
5636 case $cc_basename in
5637 *)
5638 # FIXME: insert proper C++ library support
5639 _LT_TAGVAR(ld_shlibs, $1)=no
5640 ;;
5641 esac
5642 ;;
5643
5644 cygwin* | mingw* | pw32* | cegcc*)
5645 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5646 # as there is no search path for DLLs.
5647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5648 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5649 _LT_TAGVAR(always_export_symbols, $1)=no
5650 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5651
5652 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5653 _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'
5654 # If the export-symbols file already is a .def file (1st line
5655 # is EXPORTS), use it as is; otherwise, prepend...
5656 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5657 cp $export_symbols $output_objdir/$soname.def;
5658 else
5659 echo EXPORTS > $output_objdir/$soname.def;
5660 cat $export_symbols >> $output_objdir/$soname.def;
5661 fi~
5662 $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'
5663 else
5664 _LT_TAGVAR(ld_shlibs, $1)=no
5665 fi
5666 ;;
5667 darwin* | rhapsody*)
5668 _LT_DARWIN_LINKER_FEATURES($1)
5669 ;;
5670
5671 dgux*)
5672 case $cc_basename in
5673 ec++*)
5674 # FIXME: insert proper C++ library support
5675 _LT_TAGVAR(ld_shlibs, $1)=no
5676 ;;
5677 ghcx*)
5678 # Green Hills C++ Compiler
5679 # FIXME: insert proper C++ library support
5680 _LT_TAGVAR(ld_shlibs, $1)=no
5681 ;;
5682 *)
5683 # FIXME: insert proper C++ library support
5684 _LT_TAGVAR(ld_shlibs, $1)=no
5685 ;;
5686 esac
5687 ;;
5688
5689 freebsd[[12]]*)
5690 # C++ shared libraries reported to be fairly broken before
5691 # switch to ELF
5692 _LT_TAGVAR(ld_shlibs, $1)=no
5693 ;;
5694
5695 freebsd-elf*)
5696 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5697 ;;
5698
5699 freebsd* | dragonfly*)
5700 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5701 # conventions
5702 _LT_TAGVAR(ld_shlibs, $1)=yes
5703 ;;
5704
5705 gnu*)
5706 ;;
5707
5708 hpux9*)
5709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5710 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5711 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5712 _LT_TAGVAR(hardcode_direct, $1)=yes
5713 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5714 # but as the default
5715 # location of the library.
5716
5717 case $cc_basename in
5718 CC*)
5719 # FIXME: insert proper C++ library support
5720 _LT_TAGVAR(ld_shlibs, $1)=no
5721 ;;
5722 aCC*)
5723 _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'
5724 # Commands to make compiler produce verbose output that lists
5725 # what "hidden" libraries, object files and flags are used when
5726 # linking a shared library.
5727 #
5728 # There doesn't appear to be a way to prevent this compiler from
5729 # explicitly linking system object files so we need to strip them
5730 # from the output so that they don't get included in the library
5731 # dependencies.
5732 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'
5733 ;;
5734 *)
5735 if test "$GXX" = yes; then
5736 _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'
5737 else
5738 # FIXME: insert proper C++ library support
5739 _LT_TAGVAR(ld_shlibs, $1)=no
5740 fi
5741 ;;
5742 esac
5743 ;;
5744
5745 hpux10*|hpux11*)
5746 if test $with_gnu_ld = no; then
5747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5748 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5749
5750 case $host_cpu in
5751 hppa*64*|ia64*)
5752 ;;
5753 *)
5754 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5755 ;;
5756 esac
5757 fi
5758 case $host_cpu in
5759 hppa*64*|ia64*)
5760 _LT_TAGVAR(hardcode_direct, $1)=no
5761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5762 ;;
5763 *)
5764 _LT_TAGVAR(hardcode_direct, $1)=yes
5765 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5766 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5767 # but as the default
5768 # location of the library.
5769 ;;
5770 esac
5771
5772 case $cc_basename in
5773 CC*)
5774 # FIXME: insert proper C++ library support
5775 _LT_TAGVAR(ld_shlibs, $1)=no
5776 ;;
5777 aCC*)
5778 case $host_cpu in
5779 hppa*64*)
5780 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5781 ;;
5782 ia64*)
5783 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5784 ;;
5785 *)
5786 _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'
5787 ;;
5788 esac
5789 # Commands to make compiler produce verbose output that lists
5790 # what "hidden" libraries, object files and flags are used when
5791 # linking a shared library.
5792 #
5793 # There doesn't appear to be a way to prevent this compiler from
5794 # explicitly linking system object files so we need to strip them
5795 # from the output so that they don't get included in the library
5796 # dependencies.
5797 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'
5798 ;;
5799 *)
5800 if test "$GXX" = yes; then
5801 if test $with_gnu_ld = no; then
5802 case $host_cpu in
5803 hppa*64*)
5804 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5805 ;;
5806 ia64*)
5807 _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'
5808 ;;
5809 *)
5810 _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'
5811 ;;
5812 esac
5813 fi
5814 else
5815 # FIXME: insert proper C++ library support
5816 _LT_TAGVAR(ld_shlibs, $1)=no
5817 fi
5818 ;;
5819 esac
5820 ;;
5821
5822 interix[[3-9]]*)
5823 _LT_TAGVAR(hardcode_direct, $1)=no
5824 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5825 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5826 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5827 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5828 # Instead, shared libraries are loaded at an image base (0x10000000 by
5829 # default) and relocated if they conflict, which is a slow very memory
5830 # consuming and fragmenting process. To avoid this, we pick a random,
5831 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5832 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5833 _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'
5834 _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'
5835 ;;
5836 irix5* | irix6*)
5837 case $cc_basename in
5838 CC*)
5839 # SGI C++
5840 _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'
5841
5842 # Archives containing C++ object files must be created using
5843 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5844 # necessary to make sure instantiated templates are included
5845 # in the archive.
5846 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5847 ;;
5848 *)
5849 if test "$GXX" = yes; then
5850 if test "$with_gnu_ld" = no; then
5851 _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'
5852 else
5853 _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'
5854 fi
5855 fi
5856 _LT_TAGVAR(link_all_deplibs, $1)=yes
5857 ;;
5858 esac
5859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5860 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5861 _LT_TAGVAR(inherit_rpath, $1)=yes
5862 ;;
5863
5864 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5865 case $cc_basename in
5866 KCC*)
5867 # Kuck and Associates, Inc. (KAI) C++ Compiler
5868
5869 # KCC will only create a shared library if the output file
5870 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5871 # to its proper name (with version) after linking.
5872 _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'
5873 _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'
5874 # Commands to make compiler produce verbose output that lists
5875 # what "hidden" libraries, object files and flags are used when
5876 # linking a shared library.
5877 #
5878 # There doesn't appear to be a way to prevent this compiler from
5879 # explicitly linking system object files so we need to strip them
5880 # from the output so that they don't get included in the library
5881 # dependencies.
5882 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'
5883
5884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5885 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5886
5887 # Archives containing C++ object files must be created using
5888 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5889 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5890 ;;
5891 icpc* | ecpc* )
5892 # Intel C++
5893 with_gnu_ld=yes
5894 # version 8.0 and above of icpc choke on multiply defined symbols
5895 # if we add $predep_objects and $postdep_objects, however 7.1 and
5896 # earlier do not add the objects themselves.
5897 case `$CC -V 2>&1` in
5898 *"Version 7."*)
5899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5900 _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'
5901 ;;
5902 *) # Version 8.0 or newer
5903 tmp_idyn=
5904 case $host_cpu in
5905 ia64*) tmp_idyn=' -i_dynamic';;
5906 esac
5907 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5908 _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'
5909 ;;
5910 esac
5911 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5912 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5913 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5914 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5915 ;;
5916 pgCC* | pgcpp*)
5917 # Portland Group C++ compiler
5918 case `$CC -V` in
5919 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5920 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5921 rm -rf $tpldir~
5922 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5923 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5924 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5925 rm -rf $tpldir~
5926 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5927 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5928 $RANLIB $oldlib'
5929 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5930 rm -rf $tpldir~
5931 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5932 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5933 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5934 rm -rf $tpldir~
5935 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5936 $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'
5937 ;;
5938 *) # Version 6 will use weak symbols
5939 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5940 _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'
5941 ;;
5942 esac
5943
5944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5946 _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'
5947 ;;
5948 cxx*)
5949 # Compaq C++
5950 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5951 _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'
5952
5953 runpath_var=LD_RUN_PATH
5954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5955 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5956
5957 # Commands to make compiler produce verbose output that lists
5958 # what "hidden" libraries, object files and flags are used when
5959 # linking a shared library.
5960 #
5961 # There doesn't appear to be a way to prevent this compiler from
5962 # explicitly linking system object files so we need to strip them
5963 # from the output so that they don't get included in the library
5964 # dependencies.
5965 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'
5966 ;;
5967 xl*)
5968 # IBM XL 8.0 on PPC, with GNU ld
5969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5970 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5971 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972 if test "x$supports_anon_versioning" = xyes; then
5973 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5974 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5975 echo "local: *; };" >> $output_objdir/$libname.ver~
5976 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5977 fi
5978 ;;
5979 *)
5980 case `$CC -V 2>&1 | sed 5q` in
5981 *Sun\ C*)
5982 # Sun C++ 5.9
5983 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5984 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5985 _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'
5986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5987 _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'
5988 _LT_TAGVAR(compiler_needs_object, $1)=yes
5989
5990 # Not sure whether something based on
5991 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5992 # would be better.
5993 output_verbose_link_cmd='echo'
5994
5995 # Archives containing C++ object files must be created using
5996 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5997 # necessary to make sure instantiated templates are included
5998 # in the archive.
5999 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6000 ;;
6001 esac
6002 ;;
6003 esac
6004 ;;
6005
6006 lynxos*)
6007 # FIXME: insert proper C++ library support
6008 _LT_TAGVAR(ld_shlibs, $1)=no
6009 ;;
6010
6011 m88k*)
6012 # FIXME: insert proper C++ library support
6013 _LT_TAGVAR(ld_shlibs, $1)=no
6014 ;;
6015
6016 mvs*)
6017 case $cc_basename in
6018 cxx*)
6019 # FIXME: insert proper C++ library support
6020 _LT_TAGVAR(ld_shlibs, $1)=no
6021 ;;
6022 *)
6023 # FIXME: insert proper C++ library support
6024 _LT_TAGVAR(ld_shlibs, $1)=no
6025 ;;
6026 esac
6027 ;;
6028
6029 netbsd*)
6030 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6031 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6032 wlarc=
6033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6034 _LT_TAGVAR(hardcode_direct, $1)=yes
6035 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6036 fi
6037 # Workaround some broken pre-1.5 toolchains
6038 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6039 ;;
6040
6041 *nto* | *qnx*)
6042 _LT_TAGVAR(ld_shlibs, $1)=yes
6043 ;;
6044
6045 openbsd2*)
6046 # C++ shared libraries are fairly broken
6047 _LT_TAGVAR(ld_shlibs, $1)=no
6048 ;;
6049
6050 openbsd*)
6051 if test -f /usr/libexec/ld.so; then
6052 _LT_TAGVAR(hardcode_direct, $1)=yes
6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6054 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6055 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6057 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6058 _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'
6059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6060 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6061 fi
6062 output_verbose_link_cmd=echo
6063 else
6064 _LT_TAGVAR(ld_shlibs, $1)=no
6065 fi
6066 ;;
6067
6068 osf3* | osf4* | osf5*)
6069 case $cc_basename in
6070 KCC*)
6071 # Kuck and Associates, Inc. (KAI) C++ Compiler
6072
6073 # KCC will only create a shared library if the output file
6074 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6075 # to its proper name (with version) after linking.
6076 _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'
6077
6078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6079 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6080
6081 # Archives containing C++ object files must be created using
6082 # the KAI C++ compiler.
6083 case $host in
6084 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6085 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6086 esac
6087 ;;
6088 RCC*)
6089 # Rational C++ 2.4.1
6090 # FIXME: insert proper C++ library support
6091 _LT_TAGVAR(ld_shlibs, $1)=no
6092 ;;
6093 cxx*)
6094 case $host in
6095 osf3*)
6096 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6097 _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'
6098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6099 ;;
6100 *)
6101 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6102 _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'
6103 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6104 echo "-hidden">> $lib.exp~
6105 $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~
6106 $RM $lib.exp'
6107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6108 ;;
6109 esac
6110
6111 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6112
6113 # Commands to make compiler produce verbose output that lists
6114 # what "hidden" libraries, object files and flags are used when
6115 # linking a shared library.
6116 #
6117 # There doesn't appear to be a way to prevent this compiler from
6118 # explicitly linking system object files so we need to strip them
6119 # from the output so that they don't get included in the library
6120 # dependencies.
6121 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'
6122 ;;
6123 *)
6124 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6125 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6126 case $host in
6127 osf3*)
6128 _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'
6129 ;;
6130 *)
6131 _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'
6132 ;;
6133 esac
6134
6135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6136 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6137
6138 # Commands to make compiler produce verbose output that lists
6139 # what "hidden" libraries, object files and flags are used when
6140 # linking a shared library.
6141 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6142
6143 else
6144 # FIXME: insert proper C++ library support
6145 _LT_TAGVAR(ld_shlibs, $1)=no
6146 fi
6147 ;;
6148 esac
6149 ;;
6150
6151 psos*)
6152 # FIXME: insert proper C++ library support
6153 _LT_TAGVAR(ld_shlibs, $1)=no
6154 ;;
6155
6156 sunos4*)
6157 case $cc_basename in
6158 CC*)
6159 # Sun C++ 4.x
6160 # FIXME: insert proper C++ library support
6161 _LT_TAGVAR(ld_shlibs, $1)=no
6162 ;;
6163 lcc*)
6164 # Lucid
6165 # FIXME: insert proper C++ library support
6166 _LT_TAGVAR(ld_shlibs, $1)=no
6167 ;;
6168 *)
6169 # FIXME: insert proper C++ library support
6170 _LT_TAGVAR(ld_shlibs, $1)=no
6171 ;;
6172 esac
6173 ;;
6174
6175 solaris*)
6176 case $cc_basename in
6177 CC*)
6178 # Sun C++ 4.2, 5.x and Centerline C++
6179 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6180 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6181 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6182 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6183 $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'
6184
6185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6186 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6187 case $host_os in
6188 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6189 *)
6190 # The compiler driver will combine and reorder linker options,
6191 # but understands `-z linker_flag'.
6192 # Supported since Solaris 2.6 (maybe 2.5.1?)
6193 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6194 ;;
6195 esac
6196 _LT_TAGVAR(link_all_deplibs, $1)=yes
6197
6198 output_verbose_link_cmd='echo'
6199
6200 # Archives containing C++ object files must be created using
6201 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6202 # necessary to make sure instantiated templates are included
6203 # in the archive.
6204 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6205 ;;
6206 gcx*)
6207 # Green Hills C++ Compiler
6208 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6209
6210 # The C++ compiler must be used to create the archive.
6211 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6212 ;;
6213 *)
6214 # GNU C++ compiler with Solaris linker
6215 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6216 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6217 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6220 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6221
6222 # Commands to make compiler produce verbose output that lists
6223 # what "hidden" libraries, object files and flags are used when
6224 # linking a shared library.
6225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6226 else
6227 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6228 # platform.
6229 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6230 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6231 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6232
6233 # Commands to make compiler produce verbose output that lists
6234 # what "hidden" libraries, object files and flags are used when
6235 # linking a shared library.
6236 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6237 fi
6238
6239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6240 case $host_os in
6241 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6242 *)
6243 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6244 ;;
6245 esac
6246 fi
6247 ;;
6248 esac
6249 ;;
6250
6251 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6252 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6253 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6254 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6255 runpath_var='LD_RUN_PATH'
6256
6257 case $cc_basename in
6258 CC*)
6259 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6260 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6261 ;;
6262 *)
6263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6264 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6265 ;;
6266 esac
6267 ;;
6268
6269 sysv5* | sco3.2v5* | sco5v6*)
6270 # Note: We can NOT use -z defs as we might desire, because we do not
6271 # link with -lc, and that would cause any symbols used from libc to
6272 # always be unresolved, which means just about no library would
6273 # ever link correctly. If we're not using GNU ld we use -z text
6274 # though, which does catch some bad symbols but isn't as heavy-handed
6275 # as -z defs.
6276 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6277 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6278 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6280 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6281 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6282 _LT_TAGVAR(link_all_deplibs, $1)=yes
6283 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6284 runpath_var='LD_RUN_PATH'
6285
6286 case $cc_basename in
6287 CC*)
6288 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6289 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6290 ;;
6291 *)
6292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6293 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6294 ;;
6295 esac
6296 ;;
6297
6298 tandem*)
6299 case $cc_basename in
6300 NCC*)
6301 # NonStop-UX NCC 3.20
6302 # FIXME: insert proper C++ library support
6303 _LT_TAGVAR(ld_shlibs, $1)=no
6304 ;;
6305 *)
6306 # FIXME: insert proper C++ library support
6307 _LT_TAGVAR(ld_shlibs, $1)=no
6308 ;;
6309 esac
6310 ;;
6311
6312 vxworks*)
6313 # FIXME: insert proper C++ library support
6314 _LT_TAGVAR(ld_shlibs, $1)=no
6315 ;;
6316
6317 *)
6318 # FIXME: insert proper C++ library support
6319 _LT_TAGVAR(ld_shlibs, $1)=no
6320 ;;
6321 esac
6322
6323 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6324 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6325
6326 _LT_TAGVAR(GCC, $1)="$GXX"
6327 _LT_TAGVAR(LD, $1)="$LD"
6328
6329 ## CAVEAT EMPTOR:
6330 ## There is no encapsulation within the following macros, do not change
6331 ## the running order or otherwise move them around unless you know exactly
6332 ## what you are doing...
6333 _LT_SYS_HIDDEN_LIBDEPS($1)
6334 _LT_COMPILER_PIC($1)
6335 _LT_COMPILER_C_O($1)
6336 _LT_COMPILER_FILE_LOCKS($1)
6337 _LT_LINKER_SHLIBS($1)
6338 _LT_SYS_DYNAMIC_LINKER($1)
6339 _LT_LINKER_HARDCODE_LIBPATH($1)
6340
6341 _LT_CONFIG($1)
6342 fi # test -n "$compiler"
6343
6344 CC=$lt_save_CC
6345 LDCXX=$LD
6346 LD=$lt_save_LD
6347 GCC=$lt_save_GCC
6348 with_gnu_ld=$lt_save_with_gnu_ld
6349 lt_cv_path_LDCXX=$lt_cv_path_LD
6350 lt_cv_path_LD=$lt_save_path_LD
6351 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6352 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6353fi # test "$_lt_caught_CXX_error" != yes
6354
6355AC_LANG_POP
6356])# _LT_LANG_CXX_CONFIG
6357
6358
6359# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6360# ---------------------------------
6361# Figure out "hidden" library dependencies from verbose
6362# compiler output when linking a shared library.
6363# Parse the compiler output and extract the necessary
6364# objects, libraries and library flags.
6365m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6366[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6367# Dependencies to place before and after the object being linked:
6368_LT_TAGVAR(predep_objects, $1)=
6369_LT_TAGVAR(postdep_objects, $1)=
6370_LT_TAGVAR(predeps, $1)=
6371_LT_TAGVAR(postdeps, $1)=
6372_LT_TAGVAR(compiler_lib_search_path, $1)=
6373
6374dnl we can't use the lt_simple_compile_test_code here,
6375dnl because it contains code intended for an executable,
6376dnl not a library. It's possible we should let each
6377dnl tag define a new lt_????_link_test_code variable,
6378dnl but it's only used here...
6379m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6380int a;
6381void foo (void) { a = 0; }
6382_LT_EOF
6383], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6384class Foo
6385{
6386public:
6387 Foo (void) { a = 0; }
6388private:
6389 int a;
6390};
6391_LT_EOF
6392], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6393 subroutine foo
6394 implicit none
6395 integer*4 a
6396 a=0
6397 return
6398 end
6399_LT_EOF
6400], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6401 subroutine foo
6402 implicit none
6403 integer a
6404 a=0
6405 return
6406 end
6407_LT_EOF
6408], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6409public class foo {
6410 private int a;
6411 public void bar (void) {
6412 a = 0;
6413 }
6414};
6415_LT_EOF
6416])
6417dnl Parse the compiler output and extract the necessary
6418dnl objects, libraries and library flags.
6419if AC_TRY_EVAL(ac_compile); then
6420 # Parse the compiler output and extract the necessary
6421 # objects, libraries and library flags.
6422
6423 # Sentinel used to keep track of whether or not we are before
6424 # the conftest object file.
6425 pre_test_object_deps_done=no
6426
6427 for p in `eval "$output_verbose_link_cmd"`; do
6428 case $p in
6429
6430 -L* | -R* | -l*)
6431 # Some compilers place space between "-{L,R}" and the path.
6432 # Remove the space.
6433 if test $p = "-L" ||
6434 test $p = "-R"; then
6435 prev=$p
6436 continue
6437 else
6438 prev=
6439 fi
6440
6441 if test "$pre_test_object_deps_done" = no; then
6442 case $p in
6443 -L* | -R*)
6444 # Internal compiler library paths should come after those
6445 # provided the user. The postdeps already come after the
6446 # user supplied libs so there is no need to process them.
6447 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6448 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6449 else
6450 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6451 fi
6452 ;;
6453 # The "-l" case would never come before the object being
6454 # linked, so don't bother handling this case.
6455 esac
6456 else
6457 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6458 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6459 else
6460 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6461 fi
6462 fi
6463 ;;
6464
6465 *.$objext)
6466 # This assumes that the test object file only shows up
6467 # once in the compiler output.
6468 if test "$p" = "conftest.$objext"; then
6469 pre_test_object_deps_done=yes
6470 continue
6471 fi
6472
6473 if test "$pre_test_object_deps_done" = no; then
6474 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6475 _LT_TAGVAR(predep_objects, $1)="$p"
6476 else
6477 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6478 fi
6479 else
6480 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6481 _LT_TAGVAR(postdep_objects, $1)="$p"
6482 else
6483 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6484 fi
6485 fi
6486 ;;
6487
6488 *) ;; # Ignore the rest.
6489
6490 esac
6491 done
6492
6493 # Clean up.
6494 rm -f a.out a.exe
6495else
6496 echo "libtool.m4: error: problem compiling $1 test program"
6497fi
6498
6499$RM -f confest.$objext
6500
6501# PORTME: override above test on systems where it is broken
6502m4_if([$1], [CXX],
6503[case $host_os in
6504interix[[3-9]]*)
6505 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6506 # hack all around it, let's just trust "g++" to DTRT.
6507 _LT_TAGVAR(predep_objects,$1)=
6508 _LT_TAGVAR(postdep_objects,$1)=
6509 _LT_TAGVAR(postdeps,$1)=
6510 ;;
6511
6512linux*)
6513 case `$CC -V 2>&1 | sed 5q` in
6514 *Sun\ C*)
6515 # Sun C++ 5.9
6516
6517 # The more standards-conforming stlport4 library is
6518 # incompatible with the Cstd library. Avoid specifying
6519 # it if it's in CXXFLAGS. Ignore libCrun as
6520 # -library=stlport4 depends on it.
6521 case " $CXX $CXXFLAGS " in
6522 *" -library=stlport4 "*)
6523 solaris_use_stlport4=yes
6524 ;;
6525 esac
6526
6527 if test "$solaris_use_stlport4" != yes; then
6528 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6529 fi
6530 ;;
6531 esac
6532 ;;
6533
6534solaris*)
6535 case $cc_basename in
6536 CC*)
6537 # The more standards-conforming stlport4 library is
6538 # incompatible with the Cstd library. Avoid specifying
6539 # it if it's in CXXFLAGS. Ignore libCrun as
6540 # -library=stlport4 depends on it.
6541 case " $CXX $CXXFLAGS " in
6542 *" -library=stlport4 "*)
6543 solaris_use_stlport4=yes
6544 ;;
6545 esac
6546
6547 # Adding this requires a known-good setup of shared libraries for
6548 # Sun compiler versions before 5.6, else PIC objects from an old
6549 # archive will be linked into the output, leading to subtle bugs.
6550 if test "$solaris_use_stlport4" != yes; then
6551 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6552 fi
6553 ;;
6554 esac
6555 ;;
6556esac
6557])
6558
6559case " $_LT_TAGVAR(postdeps, $1) " in
6560*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6561esac
6562 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6563if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6564 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6565fi
6566_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6567 [The directories searched by this compiler when creating a shared library])
6568_LT_TAGDECL([], [predep_objects], [1],
6569 [Dependencies to place before and after the objects being linked to
6570 create a shared library])
6571_LT_TAGDECL([], [postdep_objects], [1])
6572_LT_TAGDECL([], [predeps], [1])
6573_LT_TAGDECL([], [postdeps], [1])
6574_LT_TAGDECL([], [compiler_lib_search_path], [1],
6575 [The library search path used internally by the compiler when linking
6576 a shared library])
6577])# _LT_SYS_HIDDEN_LIBDEPS
6578
6579
6580# _LT_PROG_F77
6581# ------------
6582# Since AC_PROG_F77 is broken, in that it returns the empty string
6583# if there is no fortran compiler, we have our own version here.
6584m4_defun([_LT_PROG_F77],
6585[
6586pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6587AC_PROG_F77
6588if test -z "$F77" || test "X$F77" = "Xno"; then
6589 _lt_disable_F77=yes
6590fi
6591popdef([AC_MSG_ERROR])
6592])# _LT_PROG_F77
6593
6594dnl aclocal-1.4 backwards compatibility:
6595dnl AC_DEFUN([_LT_PROG_F77], [])
6596
6597
6598# _LT_LANG_F77_CONFIG([TAG])
6599# --------------------------
6600# Ensure that the configuration variables for a Fortran 77 compiler are
6601# suitably defined. These variables are subsequently used by _LT_CONFIG
6602# to write the compiler configuration to `libtool'.
6603m4_defun([_LT_LANG_F77_CONFIG],
6604[AC_REQUIRE([_LT_PROG_F77])dnl
6605AC_LANG_PUSH(Fortran 77)
6606
6607_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6608_LT_TAGVAR(allow_undefined_flag, $1)=
6609_LT_TAGVAR(always_export_symbols, $1)=no
6610_LT_TAGVAR(archive_expsym_cmds, $1)=
6611_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6612_LT_TAGVAR(hardcode_direct, $1)=no
6613_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6614_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6615_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6616_LT_TAGVAR(hardcode_libdir_separator, $1)=
6617_LT_TAGVAR(hardcode_minus_L, $1)=no
6618_LT_TAGVAR(hardcode_automatic, $1)=no
6619_LT_TAGVAR(inherit_rpath, $1)=no
6620_LT_TAGVAR(module_cmds, $1)=
6621_LT_TAGVAR(module_expsym_cmds, $1)=
6622_LT_TAGVAR(link_all_deplibs, $1)=unknown
6623_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6624_LT_TAGVAR(no_undefined_flag, $1)=
6625_LT_TAGVAR(whole_archive_flag_spec, $1)=
6626_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6627
6628# Source file extension for f77 test sources.
6629ac_ext=f
6630
6631# Object file extension for compiled f77 test sources.
6632objext=o
6633_LT_TAGVAR(objext, $1)=$objext
6634
6635# No sense in running all these tests if we already determined that
6636# the F77 compiler isn't working. Some variables (like enable_shared)
6637# are currently assumed to apply to all compilers on this platform,
6638# and will be corrupted by setting them based on a non-working compiler.
6639if test "$_lt_disable_F77" != yes; then
6640 # Code to be used in simple compile tests
6641 lt_simple_compile_test_code="\
6642 subroutine t
6643 return
6644 end
6645"
6646
6647 # Code to be used in simple link tests
6648 lt_simple_link_test_code="\
6649 program t
6650 end
6651"
6652
6653 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6654 _LT_TAG_COMPILER
6655
6656 # save warnings/boilerplate of simple test code
6657 _LT_COMPILER_BOILERPLATE
6658 _LT_LINKER_BOILERPLATE
6659
6660 # Allow CC to be a program name with arguments.
6661 lt_save_CC="$CC"
6662 lt_save_GCC=$GCC
6663 CC=${F77-"f77"}
6664 compiler=$CC
6665 _LT_TAGVAR(compiler, $1)=$CC
6666 _LT_CC_BASENAME([$compiler])
6667 GCC=$G77
6668 if test -n "$compiler"; then
6669 AC_MSG_CHECKING([if libtool supports shared libraries])
6670 AC_MSG_RESULT([$can_build_shared])
6671
6672 AC_MSG_CHECKING([whether to build shared libraries])
6673 test "$can_build_shared" = "no" && enable_shared=no
6674
6675 # On AIX, shared libraries and static libraries use the same namespace, and
6676 # are all built from PIC.
6677 case $host_os in
6678 aix3*)
6679 test "$enable_shared" = yes && enable_static=no
6680 if test -n "$RANLIB"; then
6681 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6682 postinstall_cmds='$RANLIB $lib'
6683 fi
6684 ;;
6685 aix[[4-9]]*)
6686 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6687 test "$enable_shared" = yes && enable_static=no
6688 fi
6689 ;;
6690 esac
6691 AC_MSG_RESULT([$enable_shared])
6692
6693 AC_MSG_CHECKING([whether to build static libraries])
6694 # Make sure either enable_shared or enable_static is yes.
6695 test "$enable_shared" = yes || enable_static=yes
6696 AC_MSG_RESULT([$enable_static])
6697
6698 _LT_TAGVAR(GCC, $1)="$G77"
6699 _LT_TAGVAR(LD, $1)="$LD"
6700
6701 ## CAVEAT EMPTOR:
6702 ## There is no encapsulation within the following macros, do not change
6703 ## the running order or otherwise move them around unless you know exactly
6704 ## what you are doing...
6705 _LT_COMPILER_PIC($1)
6706 _LT_COMPILER_C_O($1)
6707 _LT_COMPILER_FILE_LOCKS($1)
6708 _LT_LINKER_SHLIBS($1)
6709 _LT_SYS_DYNAMIC_LINKER($1)
6710 _LT_LINKER_HARDCODE_LIBPATH($1)
6711
6712 _LT_CONFIG($1)
6713 fi # test -n "$compiler"
6714
6715 GCC=$lt_save_GCC
6716 CC="$lt_save_CC"
6717fi # test "$_lt_disable_F77" != yes
6718
6719AC_LANG_POP
6720])# _LT_LANG_F77_CONFIG
6721
6722
6723# _LT_PROG_FC
6724# -----------
6725# Since AC_PROG_FC is broken, in that it returns the empty string
6726# if there is no fortran compiler, we have our own version here.
6727m4_defun([_LT_PROG_FC],
6728[
6729pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6730AC_PROG_FC
6731if test -z "$FC" || test "X$FC" = "Xno"; then
6732 _lt_disable_FC=yes
6733fi
6734popdef([AC_MSG_ERROR])
6735])# _LT_PROG_FC
6736
6737dnl aclocal-1.4 backwards compatibility:
6738dnl AC_DEFUN([_LT_PROG_FC], [])
6739
6740
6741# _LT_LANG_FC_CONFIG([TAG])
6742# -------------------------
6743# Ensure that the configuration variables for a Fortran compiler are
6744# suitably defined. These variables are subsequently used by _LT_CONFIG
6745# to write the compiler configuration to `libtool'.
6746m4_defun([_LT_LANG_FC_CONFIG],
6747[AC_REQUIRE([_LT_PROG_FC])dnl
6748AC_LANG_PUSH(Fortran)
6749
6750_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6751_LT_TAGVAR(allow_undefined_flag, $1)=
6752_LT_TAGVAR(always_export_symbols, $1)=no
6753_LT_TAGVAR(archive_expsym_cmds, $1)=
6754_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6755_LT_TAGVAR(hardcode_direct, $1)=no
6756_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6757_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6758_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6759_LT_TAGVAR(hardcode_libdir_separator, $1)=
6760_LT_TAGVAR(hardcode_minus_L, $1)=no
6761_LT_TAGVAR(hardcode_automatic, $1)=no
6762_LT_TAGVAR(inherit_rpath, $1)=no
6763_LT_TAGVAR(module_cmds, $1)=
6764_LT_TAGVAR(module_expsym_cmds, $1)=
6765_LT_TAGVAR(link_all_deplibs, $1)=unknown
6766_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6767_LT_TAGVAR(no_undefined_flag, $1)=
6768_LT_TAGVAR(whole_archive_flag_spec, $1)=
6769_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6770
6771# Source file extension for fc test sources.
6772ac_ext=${ac_fc_srcext-f}
6773
6774# Object file extension for compiled fc test sources.
6775objext=o
6776_LT_TAGVAR(objext, $1)=$objext
6777
6778# No sense in running all these tests if we already determined that
6779# the FC compiler isn't working. Some variables (like enable_shared)
6780# are currently assumed to apply to all compilers on this platform,
6781# and will be corrupted by setting them based on a non-working compiler.
6782if test "$_lt_disable_FC" != yes; then
6783 # Code to be used in simple compile tests
6784 lt_simple_compile_test_code="\
6785 subroutine t
6786 return
6787 end
6788"
6789
6790 # Code to be used in simple link tests
6791 lt_simple_link_test_code="\
6792 program t
6793 end
6794"
6795
6796 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6797 _LT_TAG_COMPILER
6798
6799 # save warnings/boilerplate of simple test code
6800 _LT_COMPILER_BOILERPLATE
6801 _LT_LINKER_BOILERPLATE
6802
6803 # Allow CC to be a program name with arguments.
6804 lt_save_CC="$CC"
6805 lt_save_GCC=$GCC
6806 CC=${FC-"f95"}
6807 compiler=$CC
6808 GCC=$ac_cv_fc_compiler_gnu
6809
6810 _LT_TAGVAR(compiler, $1)=$CC
6811 _LT_CC_BASENAME([$compiler])
6812
6813 if test -n "$compiler"; then
6814 AC_MSG_CHECKING([if libtool supports shared libraries])
6815 AC_MSG_RESULT([$can_build_shared])
6816
6817 AC_MSG_CHECKING([whether to build shared libraries])
6818 test "$can_build_shared" = "no" && enable_shared=no
6819
6820 # On AIX, shared libraries and static libraries use the same namespace, and
6821 # are all built from PIC.
6822 case $host_os in
6823 aix3*)
6824 test "$enable_shared" = yes && enable_static=no
6825 if test -n "$RANLIB"; then
6826 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6827 postinstall_cmds='$RANLIB $lib'
6828 fi
6829 ;;
6830 aix[[4-9]]*)
6831 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6832 test "$enable_shared" = yes && enable_static=no
6833 fi
6834 ;;
6835 esac
6836 AC_MSG_RESULT([$enable_shared])
6837
6838 AC_MSG_CHECKING([whether to build static libraries])
6839 # Make sure either enable_shared or enable_static is yes.
6840 test "$enable_shared" = yes || enable_static=yes
6841 AC_MSG_RESULT([$enable_static])
6842
6843 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6844 _LT_TAGVAR(LD, $1)="$LD"
6845
6846 ## CAVEAT EMPTOR:
6847 ## There is no encapsulation within the following macros, do not change
6848 ## the running order or otherwise move them around unless you know exactly
6849 ## what you are doing...
6850 _LT_SYS_HIDDEN_LIBDEPS($1)
6851 _LT_COMPILER_PIC($1)
6852 _LT_COMPILER_C_O($1)
6853 _LT_COMPILER_FILE_LOCKS($1)
6854 _LT_LINKER_SHLIBS($1)
6855 _LT_SYS_DYNAMIC_LINKER($1)
6856 _LT_LINKER_HARDCODE_LIBPATH($1)
6857
6858 _LT_CONFIG($1)
6859 fi # test -n "$compiler"
6860
6861 GCC=$lt_save_GCC
6862 CC="$lt_save_CC"
6863fi # test "$_lt_disable_FC" != yes
6864
6865AC_LANG_POP
6866])# _LT_LANG_FC_CONFIG
6867
6868
6869# _LT_LANG_GCJ_CONFIG([TAG])
6870# --------------------------
6871# Ensure that the configuration variables for the GNU Java Compiler compiler
6872# are suitably defined. These variables are subsequently used by _LT_CONFIG
6873# to write the compiler configuration to `libtool'.
6874m4_defun([_LT_LANG_GCJ_CONFIG],
6875[AC_REQUIRE([LT_PROG_GCJ])dnl
6876AC_LANG_SAVE
6877
6878# Source file extension for Java test sources.
6879ac_ext=java
6880
6881# Object file extension for compiled Java test sources.
6882objext=o
6883_LT_TAGVAR(objext, $1)=$objext
6884
6885# Code to be used in simple compile tests
6886lt_simple_compile_test_code="class foo {}"
6887
6888# Code to be used in simple link tests
6889lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6890
6891# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6892_LT_TAG_COMPILER
6893
6894# save warnings/boilerplate of simple test code
6895_LT_COMPILER_BOILERPLATE
6896_LT_LINKER_BOILERPLATE
6897
6898# Allow CC to be a program name with arguments.
6899lt_save_CC="$CC"
6900lt_save_GCC=$GCC
6901GCC=yes
6902CC=${GCJ-"gcj"}
6903compiler=$CC
6904_LT_TAGVAR(compiler, $1)=$CC
6905_LT_TAGVAR(LD, $1)="$LD"
6906_LT_CC_BASENAME([$compiler])
6907
6908# GCJ did not exist at the time GCC didn't implicitly link libc in.
6909_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6910
6911_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6912
6913## CAVEAT EMPTOR:
6914## There is no encapsulation within the following macros, do not change
6915## the running order or otherwise move them around unless you know exactly
6916## what you are doing...
6917if test -n "$compiler"; then
6918 _LT_COMPILER_NO_RTTI($1)
6919 _LT_COMPILER_PIC($1)
6920 _LT_COMPILER_C_O($1)
6921 _LT_COMPILER_FILE_LOCKS($1)
6922 _LT_LINKER_SHLIBS($1)
6923 _LT_LINKER_HARDCODE_LIBPATH($1)
6924
6925 _LT_CONFIG($1)
6926fi
6927
6928AC_LANG_RESTORE
6929
6930GCC=$lt_save_GCC
6931CC="$lt_save_CC"
6932])# _LT_LANG_GCJ_CONFIG
6933
6934
6935# _LT_LANG_RC_CONFIG([TAG])
6936# -------------------------
6937# Ensure that the configuration variables for the Windows resource compiler
6938# are suitably defined. These variables are subsequently used by _LT_CONFIG
6939# to write the compiler configuration to `libtool'.
6940m4_defun([_LT_LANG_RC_CONFIG],
6941[AC_REQUIRE([LT_PROG_RC])dnl
6942AC_LANG_SAVE
6943
6944# Source file extension for RC test sources.
6945ac_ext=rc
6946
6947# Object file extension for compiled RC test sources.
6948objext=o
6949_LT_TAGVAR(objext, $1)=$objext
6950
6951# Code to be used in simple compile tests
6952lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6953
6954# Code to be used in simple link tests
6955lt_simple_link_test_code="$lt_simple_compile_test_code"
6956
6957# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6958_LT_TAG_COMPILER
6959
6960# save warnings/boilerplate of simple test code
6961_LT_COMPILER_BOILERPLATE
6962_LT_LINKER_BOILERPLATE
6963
6964# Allow CC to be a program name with arguments.
6965lt_save_CC="$CC"
6966lt_save_GCC=$GCC
6967GCC=
6968CC=${RC-"windres"}
6969compiler=$CC
6970_LT_TAGVAR(compiler, $1)=$CC
6971_LT_CC_BASENAME([$compiler])
6972_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6973
6974if test -n "$compiler"; then
6975 :
6976 _LT_CONFIG($1)
6977fi
6978
6979GCC=$lt_save_GCC
6980AC_LANG_RESTORE
6981CC="$lt_save_CC"
6982])# _LT_LANG_RC_CONFIG
6983
6984
6985# LT_PROG_GCJ
6986# -----------
6987AC_DEFUN([LT_PROG_GCJ],
6988[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6989 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6990 [AC_CHECK_TOOL(GCJ, gcj,)
6991 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6992 AC_SUBST(GCJFLAGS)])])[]dnl
6993])
6994
6995# Old name:
6996AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6997dnl aclocal-1.4 backwards compatibility:
6998dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6999
7000
7001# LT_PROG_RC
7002# ----------
7003AC_DEFUN([LT_PROG_RC],
7004[AC_CHECK_TOOL(RC, windres,)
7005])
7006
7007# Old name:
7008AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7009dnl aclocal-1.4 backwards compatibility:
7010dnl AC_DEFUN([LT_AC_PROG_RC], [])
7011
7012
7013# _LT_DECL_EGREP
7014# --------------
7015# If we don't have a new enough Autoconf to choose the best grep
7016# available, choose the one first in the user's PATH.
7017m4_defun([_LT_DECL_EGREP],
7018[AC_REQUIRE([AC_PROG_EGREP])dnl
7019AC_REQUIRE([AC_PROG_FGREP])dnl
7020test -z "$GREP" && GREP=grep
7021_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7022_LT_DECL([], [EGREP], [1], [An ERE matcher])
7023_LT_DECL([], [FGREP], [1], [A literal string matcher])
7024dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7025AC_SUBST([GREP])
7026])
7027
7028
7029# _LT_DECL_OBJDUMP
7030# --------------
7031# If we don't have a new enough Autoconf to choose the best objdump
7032# available, choose the one first in the user's PATH.
7033m4_defun([_LT_DECL_OBJDUMP],
7034[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7035test -z "$OBJDUMP" && OBJDUMP=objdump
7036_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7037AC_SUBST([OBJDUMP])
7038])
7039
7040
7041# _LT_DECL_SED
7042# ------------
7043# Check for a fully-functional sed program, that truncates
7044# as few characters as possible. Prefer GNU sed if found.
7045m4_defun([_LT_DECL_SED],
7046[AC_PROG_SED
7047test -z "$SED" && SED=sed
7048Xsed="$SED -e 1s/^X//"
7049_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7050_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7051 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7052])# _LT_DECL_SED
7053
7054m4_ifndef([AC_PROG_SED], [
7055############################################################
7056# NOTE: This macro has been submitted for inclusion into #
7057# GNU Autoconf as AC_PROG_SED. When it is available in #
7058# a released version of Autoconf we should remove this #
7059# macro and use it instead. #
7060############################################################
7061
7062m4_defun([AC_PROG_SED],
7063[AC_MSG_CHECKING([for a sed that does not truncate output])
7064AC_CACHE_VAL(lt_cv_path_SED,
7065[# Loop through the user's path and test for sed and gsed.
7066# Then use that list of sed's as ones to test for truncation.
7067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070 IFS=$as_save_IFS
7071 test -z "$as_dir" && as_dir=.
7072 for lt_ac_prog in sed gsed; do
7073 for ac_exec_ext in '' $ac_executable_extensions; do
7074 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7075 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7076 fi
7077 done
7078 done
7079done
7080IFS=$as_save_IFS
7081lt_ac_max=0
7082lt_ac_count=0
7083# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7084# along with /bin/sed that truncates output.
7085for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7086 test ! -f $lt_ac_sed && continue
7087 cat /dev/null > conftest.in
7088 lt_ac_count=0
7089 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7090 # Check for GNU sed and select it if it is found.
7091 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7092 lt_cv_path_SED=$lt_ac_sed
7093 break
7094 fi
7095 while true; do
7096 cat conftest.in conftest.in >conftest.tmp
7097 mv conftest.tmp conftest.in
7098 cp conftest.in conftest.nl
7099 echo >>conftest.nl
7100 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7101 cmp -s conftest.out conftest.nl || break
7102 # 10000 chars as input seems more than enough
7103 test $lt_ac_count -gt 10 && break
7104 lt_ac_count=`expr $lt_ac_count + 1`
7105 if test $lt_ac_count -gt $lt_ac_max; then
7106 lt_ac_max=$lt_ac_count
7107 lt_cv_path_SED=$lt_ac_sed
7108 fi
7109 done
7110done
7111])
7112SED=$lt_cv_path_SED
7113AC_SUBST([SED])
7114AC_MSG_RESULT([$SED])
7115])#AC_PROG_SED
7116])#m4_ifndef
7117
7118# Old name:
7119AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7120dnl aclocal-1.4 backwards compatibility:
7121dnl AC_DEFUN([LT_AC_PROG_SED], [])
7122
7123
7124# _LT_CHECK_SHELL_FEATURES
7125# ------------------------
7126# Find out whether the shell is Bourne or XSI compatible,
7127# or has some other useful features.
7128m4_defun([_LT_CHECK_SHELL_FEATURES],
7129[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7130# Try some XSI features
7131xsi_shell=no
7132( _lt_dummy="a/b/c"
7133 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7134 = c,a/b,, \
7135 && eval 'test $(( 1 + 1 )) -eq 2 \
7136 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7137 && xsi_shell=yes
7138AC_MSG_RESULT([$xsi_shell])
7139_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7140
7141AC_MSG_CHECKING([whether the shell understands "+="])
7142lt_shell_append=no
7143( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7144 >/dev/null 2>&1 \
7145 && lt_shell_append=yes
7146AC_MSG_RESULT([$lt_shell_append])
7147_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7148
7149if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7150 lt_unset=unset
7151else
7152 lt_unset=false
7153fi
7154_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7155
7156# test EBCDIC or ASCII
7157case `echo X|tr X '\101'` in
7158 A) # ASCII based system
7159 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7160 lt_SP2NL='tr \040 \012'
7161 lt_NL2SP='tr \015\012 \040\040'
7162 ;;
7163 *) # EBCDIC based system
7164 lt_SP2NL='tr \100 \n'
7165 lt_NL2SP='tr \r\n \100\100'
7166 ;;
7167esac
7168_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7169_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7170])# _LT_CHECK_SHELL_FEATURES
7171
7172
7173# _LT_PROG_XSI_SHELLFNS
7174# ---------------------
7175# Bourne and XSI compatible variants of some useful shell functions.
7176m4_defun([_LT_PROG_XSI_SHELLFNS],
7177[case $xsi_shell in
7178 yes)
7179 cat << \_LT_EOF >> "$cfgfile"
7180
7181# func_dirname file append nondir_replacement
7182# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7183# otherwise set result to NONDIR_REPLACEMENT.
7184func_dirname ()
7185{
7186 case ${1} in
7187 */*) func_dirname_result="${1%/*}${2}" ;;
7188 * ) func_dirname_result="${3}" ;;
7189 esac
7190}
7191
7192# func_basename file
7193func_basename ()
7194{
7195 func_basename_result="${1##*/}"
7196}
7197
7198# func_dirname_and_basename file append nondir_replacement
7199# perform func_basename and func_dirname in a single function
7200# call:
7201# dirname: Compute the dirname of FILE. If nonempty,
7202# add APPEND to the result, otherwise set result
7203# to NONDIR_REPLACEMENT.
7204# value returned in "$func_dirname_result"
7205# basename: Compute filename of FILE.
7206# value retuned in "$func_basename_result"
7207# Implementation must be kept synchronized with func_dirname
7208# and func_basename. For efficiency, we do not delegate to
7209# those functions but instead duplicate the functionality here.
7210func_dirname_and_basename ()
7211{
7212 case ${1} in
7213 */*) func_dirname_result="${1%/*}${2}" ;;
7214 * ) func_dirname_result="${3}" ;;
7215 esac
7216 func_basename_result="${1##*/}"
7217}
7218
7219# func_stripname prefix suffix name
7220# strip PREFIX and SUFFIX off of NAME.
7221# PREFIX and SUFFIX must not contain globbing or regex special
7222# characters, hashes, percent signs, but SUFFIX may contain a leading
7223# dot (in which case that matches only a dot).
7224func_stripname ()
7225{
7226 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7227 # positional parameters, so assign one to ordinary parameter first.
7228 func_stripname_result=${3}
7229 func_stripname_result=${func_stripname_result#"${1}"}
7230 func_stripname_result=${func_stripname_result%"${2}"}
7231}
7232
7233# func_opt_split
7234func_opt_split ()
7235{
7236 func_opt_split_opt=${1%%=*}
7237 func_opt_split_arg=${1#*=}
7238}
7239
7240# func_lo2o object
7241func_lo2o ()
7242{
7243 case ${1} in
7244 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7245 *) func_lo2o_result=${1} ;;
7246 esac
7247}
7248
7249# func_xform libobj-or-source
7250func_xform ()
7251{
7252 func_xform_result=${1%.*}.lo
7253}
7254
7255# func_arith arithmetic-term...
7256func_arith ()
7257{
7258 func_arith_result=$(( $[*] ))
7259}
7260
7261# func_len string
7262# STRING may not start with a hyphen.
7263func_len ()
7264{
7265 func_len_result=${#1}
7266}
7267
7268_LT_EOF
7269 ;;
7270 *) # Bourne compatible functions.
7271 cat << \_LT_EOF >> "$cfgfile"
7272
7273# func_dirname file append nondir_replacement
7274# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7275# otherwise set result to NONDIR_REPLACEMENT.
7276func_dirname ()
7277{
7278 # Extract subdirectory from the argument.
7279 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7280 if test "X$func_dirname_result" = "X${1}"; then
7281 func_dirname_result="${3}"
7282 else
7283 func_dirname_result="$func_dirname_result${2}"
7284 fi
7285}
7286
7287# func_basename file
7288func_basename ()
7289{
7290 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7291}
7292
7293dnl func_dirname_and_basename
7294dnl A portable version of this function is already defined in general.m4sh
7295dnl so there is no need for it here.
7296
7297# func_stripname prefix suffix name
7298# strip PREFIX and SUFFIX off of NAME.
7299# PREFIX and SUFFIX must not contain globbing or regex special
7300# characters, hashes, percent signs, but SUFFIX may contain a leading
7301# dot (in which case that matches only a dot).
7302# func_strip_suffix prefix name
7303func_stripname ()
7304{
7305 case ${2} in
7306 .*) func_stripname_result=`$ECHO "X${3}" \
7307 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7308 *) func_stripname_result=`$ECHO "X${3}" \
7309 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7310 esac
7311}
7312
7313# sed scripts:
7314my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7315my_sed_long_arg='1s/^-[[^=]]*=//'
7316
7317# func_opt_split
7318func_opt_split ()
7319{
7320 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7321 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7322}
7323
7324# func_lo2o object
7325func_lo2o ()
7326{
7327 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7328}
7329
7330# func_xform libobj-or-source
7331func_xform ()
7332{
7333 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7334}
7335
7336# func_arith arithmetic-term...
7337func_arith ()
7338{
7339 func_arith_result=`expr "$[@]"`
7340}
7341
7342# func_len string
7343# STRING may not start with a hyphen.
7344func_len ()
7345{
7346 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7347}
7348
7349_LT_EOF
7350esac
7351
7352case $lt_shell_append in
7353 yes)
7354 cat << \_LT_EOF >> "$cfgfile"
7355
7356# func_append var value
7357# Append VALUE to the end of shell variable VAR.
7358func_append ()
7359{
7360 eval "$[1]+=\$[2]"
7361}
7362_LT_EOF
7363 ;;
7364 *)
7365 cat << \_LT_EOF >> "$cfgfile"
7366
7367# func_append var value
7368# Append VALUE to the end of shell variable VAR.
7369func_append ()
7370{
7371 eval "$[1]=\$$[1]\$[2]"
7372}
7373
7374_LT_EOF
7375 ;;
7376 esac
7377])
diff --git a/libraries/embryo/m4/ltoptions.m4 b/libraries/embryo/m4/ltoptions.m4
deleted file mode 100644
index 34151a3..0000000
--- a/libraries/embryo/m4/ltoptions.m4
+++ /dev/null
@@ -1,368 +0,0 @@
1# Helper functions for option handling. -*- Autoconf -*-
2#
3# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4# Written by Gary V. Vaughan, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 6 ltoptions.m4
11
12# This is to help aclocal find these macros, as it can't see m4_define.
13AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17# ------------------------------------------
18m4_define([_LT_MANGLE_OPTION],
19[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23# ---------------------------------------
24# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25# matching handler defined, dispatch to it. Other OPTION-NAMEs are
26# saved as a flag.
27m4_define([_LT_SET_OPTION],
28[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32])
33
34
35# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36# ------------------------------------------------------------
37# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38m4_define([_LT_IF_OPTION],
39[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43# -------------------------------------------------------
44# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45# are set.
46m4_define([_LT_UNLESS_OPTIONS],
47[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51])[]dnl
52])
53
54
55# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56# ----------------------------------------
57# OPTION-LIST is a space-separated list of Libtool options associated
58# with MACRO-NAME. If any OPTION has a matching handler declared with
59# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60# the unknown option and exit.
61m4_defun([_LT_SET_OPTIONS],
62[# Set options
63m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85])# _LT_SET_OPTIONS
86
87
88## --------------------------------- ##
89## Macros to handle LT_INIT options. ##
90## --------------------------------- ##
91
92# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93# -----------------------------------------
94m4_define([_LT_MANGLE_DEFUN],
95[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99# -----------------------------------------------
100m4_define([LT_OPTION_DEFINE],
101[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102])# LT_OPTION_DEFINE
103
104
105# dlopen
106# ------
107LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108])
109
110AU_DEFUN([AC_LIBTOOL_DLOPEN],
111[_LT_SET_OPTION([LT_INIT], [dlopen])
112AC_DIAGNOSE([obsolete],
113[$0: Remove this warning and the call to _LT_SET_OPTION when you
114put the `dlopen' option into LT_INIT's first parameter.])
115])
116
117dnl aclocal-1.4 backwards compatibility:
118dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121# win32-dll
122# ---------
123# Declare package support for building win32 dll's.
124LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125[enable_win32_dll=yes
126
127case $host in
128*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133esac
134
135test -z "$AS" && AS=as
136_LT_DECL([], [AS], [0], [Assembler program])dnl
137
138test -z "$DLLTOOL" && DLLTOOL=dlltool
139_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
140
141test -z "$OBJDUMP" && OBJDUMP=objdump
142_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
143])# win32-dll
144
145AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146[AC_REQUIRE([AC_CANONICAL_HOST])dnl
147_LT_SET_OPTION([LT_INIT], [win32-dll])
148AC_DIAGNOSE([obsolete],
149[$0: Remove this warning and the call to _LT_SET_OPTION when you
150put the `win32-dll' option into LT_INIT's first parameter.])
151])
152
153dnl aclocal-1.4 backwards compatibility:
154dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157# _LT_ENABLE_SHARED([DEFAULT])
158# ----------------------------
159# implement the --enable-shared flag, and supports the `shared' and
160# `disable-shared' LT_INIT options.
161# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162m4_define([_LT_ENABLE_SHARED],
163[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188])# _LT_ENABLE_SHARED
189
190LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193# Old names:
194AC_DEFUN([AC_ENABLE_SHARED],
195[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196])
197
198AC_DEFUN([AC_DISABLE_SHARED],
199[_LT_SET_OPTION([LT_INIT], [disable-shared])
200])
201
202AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205dnl aclocal-1.4 backwards compatibility:
206dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211# _LT_ENABLE_STATIC([DEFAULT])
212# ----------------------------
213# implement the --enable-static flag, and support the `static' and
214# `disable-static' LT_INIT options.
215# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216m4_define([_LT_ENABLE_STATIC],
217[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242])# _LT_ENABLE_STATIC
243
244LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247# Old names:
248AC_DEFUN([AC_ENABLE_STATIC],
249[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250])
251
252AC_DEFUN([AC_DISABLE_STATIC],
253[_LT_SET_OPTION([LT_INIT], [disable-static])
254])
255
256AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259dnl aclocal-1.4 backwards compatibility:
260dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265# _LT_ENABLE_FAST_INSTALL([DEFAULT])
266# ----------------------------------
267# implement the --enable-fast-install flag, and support the `fast-install'
268# and `disable-fast-install' LT_INIT options.
269# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270m4_define([_LT_ENABLE_FAST_INSTALL],
271[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294_LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296])# _LT_ENABLE_FAST_INSTALL
297
298LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301# Old names:
302AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304AC_DIAGNOSE([obsolete],
305[$0: Remove this warning and the call to _LT_SET_OPTION when you put
306the `fast-install' option into LT_INIT's first parameter.])
307])
308
309AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311AC_DIAGNOSE([obsolete],
312[$0: Remove this warning and the call to _LT_SET_OPTION when you put
313the `disable-fast-install' option into LT_INIT's first parameter.])
314])
315
316dnl aclocal-1.4 backwards compatibility:
317dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321# _LT_WITH_PIC([MODE])
322# --------------------
323# implement the --with-pic flag, and support the `pic-only' and `no-pic'
324# LT_INIT options.
325# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326m4_define([_LT_WITH_PIC],
327[AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [pic_mode="$withval"],
331 [pic_mode=default])
332
333test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
335_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336])# _LT_WITH_PIC
337
338LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
341# Old name:
342AU_DEFUN([AC_LIBTOOL_PICMODE],
343[_LT_SET_OPTION([LT_INIT], [pic-only])
344AC_DIAGNOSE([obsolete],
345[$0: Remove this warning and the call to _LT_SET_OPTION when you
346put the `pic-only' option into LT_INIT's first parameter.])
347])
348
349dnl aclocal-1.4 backwards compatibility:
350dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
352## ----------------- ##
353## LTDL_INIT Options ##
354## ----------------- ##
355
356m4_define([_LTDL_MODE], [])
357LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358 [m4_define([_LTDL_MODE], [nonrecursive])])
359LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360 [m4_define([_LTDL_MODE], [recursive])])
361LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362 [m4_define([_LTDL_MODE], [subproject])])
363
364m4_define([_LTDL_TYPE], [])
365LT_OPTION_DEFINE([LTDL_INIT], [installable],
366 [m4_define([_LTDL_TYPE], [installable])])
367LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368 [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/libraries/embryo/m4/ltsugar.m4 b/libraries/embryo/m4/ltsugar.m4
deleted file mode 100644
index 9000a05..0000000
--- a/libraries/embryo/m4/ltsugar.m4
+++ /dev/null
@@ -1,123 +0,0 @@
1# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
2#
3# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4# Written by Gary V. Vaughan, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 6 ltsugar.m4
11
12# This is to help aclocal find these macros, as it can't see m4_define.
13AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
15
16# lt_join(SEP, ARG1, [ARG2...])
17# -----------------------------
18# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19# associated separator.
20# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21# versions in m4sugar had bugs.
22m4_define([lt_join],
23[m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26m4_define([_lt_join],
27[m4_if([$#$2], [2], [],
28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
30
31# lt_car(LIST)
32# lt_cdr(LIST)
33# ------------
34# Manipulate m4 lists.
35# These macros are necessary as long as will still need to support
36# Autoconf-2.59 which quotes differently.
37m4_define([lt_car], [[$1]])
38m4_define([lt_cdr],
39[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42m4_define([lt_unquote], $1)
43
44
45# lt_append(MACRO-NAME, STRING, [SEPARATOR])
46# ------------------------------------------
47# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
48# Note that neither SEPARATOR nor STRING are expanded; they are appended
49# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50# No SEPARATOR is output if MACRO-NAME was previously undefined (different
51# than defined and empty).
52#
53# This macro is needed until we can rely on Autoconf 2.62, since earlier
54# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55m4_define([lt_append],
56[m4_define([$1],
57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
59
60
61# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62# ----------------------------------------------------------
63# Produce a SEP delimited list of all paired combinations of elements of
64# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65# has the form PREFIXmINFIXSUFFIXn.
66# Needed until we can rely on m4_combine added in Autoconf 2.62.
67m4_define([lt_combine],
68[m4_if(m4_eval([$# > 3]), [1],
69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70[[m4_foreach([_Lt_prefix], [$2],
71 [m4_foreach([_Lt_suffix],
72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
75
76# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77# -----------------------------------------------------------------------
78# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80m4_define([lt_if_append_uniq],
81[m4_ifdef([$1],
82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83 [lt_append([$1], [$2], [$3])$4],
84 [$5])],
85 [lt_append([$1], [$2], [$3])$4])])
86
87
88# lt_dict_add(DICT, KEY, VALUE)
89# -----------------------------
90m4_define([lt_dict_add],
91[m4_define([$1($2)], [$3])])
92
93
94# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95# --------------------------------------------
96m4_define([lt_dict_add_subkey],
97[m4_define([$1($2:$3)], [$4])])
98
99
100# lt_dict_fetch(DICT, KEY, [SUBKEY])
101# ----------------------------------
102m4_define([lt_dict_fetch],
103[m4_ifval([$3],
104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
107
108# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109# -----------------------------------------------------------------
110m4_define([lt_if_dict_fetch],
111[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112 [$5],
113 [$6])])
114
115
116# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117# --------------------------------------------------------------
118m4_define([lt_dict_filter],
119[m4_if([$5], [], [],
120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123])
diff --git a/libraries/embryo/m4/ltversion.m4 b/libraries/embryo/m4/ltversion.m4
deleted file mode 100644
index f3c5309..0000000
--- a/libraries/embryo/m4/ltversion.m4
+++ /dev/null
@@ -1,23 +0,0 @@
1# ltversion.m4 -- version numbers -*- Autoconf -*-
2#
3# Copyright (C) 2004 Free Software Foundation, Inc.
4# Written by Scott James Remnant, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# Generated from ltversion.in.
11
12# serial 3017 ltversion.m4
13# This file is part of GNU Libtool
14
15m4_define([LT_PACKAGE_VERSION], [2.2.6b])
16m4_define([LT_PACKAGE_REVISION], [1.3017])
17
18AC_DEFUN([LTVERSION_VERSION],
19[macro_version='2.2.6b'
20macro_revision='1.3017'
21_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22_LT_DECL(, macro_revision, 0)
23])
diff --git a/libraries/embryo/m4/lt~obsolete.m4 b/libraries/embryo/m4/lt~obsolete.m4
deleted file mode 100644
index 637bb20..0000000
--- a/libraries/embryo/m4/lt~obsolete.m4
+++ /dev/null
@@ -1,92 +0,0 @@
1# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
2#
3# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
4# Written by Scott James Remnant, 2004.
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 4 lt~obsolete.m4
11
12# These exist entirely to fool aclocal when bootstrapping libtool.
13#
14# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
15# which have later been changed to m4_define as they aren't part of the
16# exported API, or moved to Autoconf or Automake where they belong.
17#
18# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
19# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
20# using a macro with the same name in our local m4/libtool.m4 it'll
21# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
22# and doesn't know about Autoconf macros at all.)
23#
24# So we provide this file, which has a silly filename so it's always
25# included after everything else. This provides aclocal with the
26# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
27# because those macros already exist, or will be overwritten later.
28# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
29#
30# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31# Yes, that means every name once taken will need to remain here until
32# we give up compatibility with versions before 1.7, at which point
33# we need to keep only those names which we still refer to.
34
35# This is to help aclocal find these macros, as it can't see m4_define.
36AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
80m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
81m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
82m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
83m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
84m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
85m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
86m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
87m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
88m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
89m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
90m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
91m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
92m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/libraries/embryo/missing b/libraries/embryo/missing
deleted file mode 100755
index 28055d2..0000000
--- a/libraries/embryo/missing
+++ /dev/null
@@ -1,376 +0,0 @@
1#! /bin/sh
2# Common stub for a few missing GNU programs while installing.
3
4scriptversion=2009-04-28.21; # UTC
5
6# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
7# 2008, 2009 Free Software Foundation, Inc.
8# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2, or (at your option)
13# any later version.
14
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program.
27
28if test $# -eq 0; then
29 echo 1>&2 "Try \`$0 --help' for more information"
30 exit 1
31fi
32
33run=:
34sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
35sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
36
37# In the cases where this matters, `missing' is being run in the
38# srcdir already.
39if test -f configure.ac; then
40 configure_ac=configure.ac
41else
42 configure_ac=configure.in
43fi
44
45msg="missing on your system"
46
47case $1 in
48--run)
49 # Try to run requested program, and just exit if it succeeds.
50 run=
51 shift
52 "$@" && exit 0
53 # Exit code 63 means version mismatch. This often happens
54 # when the user try to use an ancient version of a tool on
55 # a file that requires a minimum version. In this case we
56 # we should proceed has if the program had been absent, or
57 # if --run hadn't been passed.
58 if test $? = 63; then
59 run=:
60 msg="probably too old"
61 fi
62 ;;
63
64 -h|--h|--he|--hel|--help)
65 echo "\
66$0 [OPTION]... PROGRAM [ARGUMENT]...
67
68Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
69error status if there is no known handling for PROGRAM.
70
71Options:
72 -h, --help display this help and exit
73 -v, --version output version information and exit
74 --run try to run the given command, and emulate it if it fails
75
76Supported PROGRAM values:
77 aclocal touch file \`aclocal.m4'
78 autoconf touch file \`configure'
79 autoheader touch file \`config.h.in'
80 autom4te touch the output file, or create a stub one
81 automake touch all \`Makefile.in' files
82 bison create \`y.tab.[ch]', if possible, from existing .[ch]
83 flex create \`lex.yy.c', if possible, from existing .c
84 help2man touch the output file
85 lex create \`lex.yy.c', if possible, from existing .c
86 makeinfo touch the output file
87 tar try tar, gnutar, gtar, then tar without non-portable flags
88 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
89
90Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
91\`g' are ignored when checking the name.
92
93Send bug reports to <bug-automake@gnu.org>."
94 exit $?
95 ;;
96
97 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
98 echo "missing $scriptversion (GNU Automake)"
99 exit $?
100 ;;
101
102 -*)
103 echo 1>&2 "$0: Unknown \`$1' option"
104 echo 1>&2 "Try \`$0 --help' for more information"
105 exit 1
106 ;;
107
108esac
109
110# normalize program name to check for.
111program=`echo "$1" | sed '
112 s/^gnu-//; t
113 s/^gnu//; t
114 s/^g//; t'`
115
116# Now exit if we have it, but it failed. Also exit now if we
117# don't have it and --version was passed (most likely to detect
118# the program). This is about non-GNU programs, so use $1 not
119# $program.
120case $1 in
121 lex*|yacc*)
122 # Not GNU programs, they don't have --version.
123 ;;
124
125 tar*)
126 if test -n "$run"; then
127 echo 1>&2 "ERROR: \`tar' requires --run"
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 exit 1
131 fi
132 ;;
133
134 *)
135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
136 # We have it, but it failed.
137 exit 1
138 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
139 # Could not run --version or --help. This is probably someone
140 # running `$TOOL --version' or `$TOOL --help' to check whether
141 # $TOOL exists and not knowing $TOOL uses missing.
142 exit 1
143 fi
144 ;;
145esac
146
147# If it does not exist, or fails to run (possibly an outdated version),
148# try to emulate it.
149case $program in
150 aclocal*)
151 echo 1>&2 "\
152WARNING: \`$1' is $msg. You should only need it if
153 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
154 to install the \`Automake' and \`Perl' packages. Grab them from
155 any GNU archive site."
156 touch aclocal.m4
157 ;;
158
159 autoconf*)
160 echo 1>&2 "\
161WARNING: \`$1' is $msg. You should only need it if
162 you modified \`${configure_ac}'. You might want to install the
163 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
164 archive site."
165 touch configure
166 ;;
167
168 autoheader*)
169 echo 1>&2 "\
170WARNING: \`$1' is $msg. You should only need it if
171 you modified \`acconfig.h' or \`${configure_ac}'. You might want
172 to install the \`Autoconf' and \`GNU m4' packages. Grab them
173 from any GNU archive site."
174 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
175 test -z "$files" && files="config.h"
176 touch_files=
177 for f in $files; do
178 case $f in
179 *:*) touch_files="$touch_files "`echo "$f" |
180 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
181 *) touch_files="$touch_files $f.in";;
182 esac
183 done
184 touch $touch_files
185 ;;
186
187 automake*)
188 echo 1>&2 "\
189WARNING: \`$1' is $msg. You should only need it if
190 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
191 You might want to install the \`Automake' and \`Perl' packages.
192 Grab them from any GNU archive site."
193 find . -type f -name Makefile.am -print |
194 sed 's/\.am$/.in/' |
195 while read f; do touch "$f"; done
196 ;;
197
198 autom4te*)
199 echo 1>&2 "\
200WARNING: \`$1' is needed, but is $msg.
201 You might have modified some files without having the
202 proper tools for further handling them.
203 You can get \`$1' as part of \`Autoconf' from any GNU
204 archive site."
205
206 file=`echo "$*" | sed -n "$sed_output"`
207 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
208 if test -f "$file"; then
209 touch $file
210 else
211 test -z "$file" || exec >$file
212 echo "#! /bin/sh"
213 echo "# Created by GNU Automake missing as a replacement of"
214 echo "# $ $@"
215 echo "exit 0"
216 chmod +x $file
217 exit 1
218 fi
219 ;;
220
221 bison*|yacc*)
222 echo 1>&2 "\
223WARNING: \`$1' $msg. You should only need it if
224 you modified a \`.y' file. You may need the \`Bison' package
225 in order for those modifications to take effect. You can get
226 \`Bison' from any GNU archive site."
227 rm -f y.tab.c y.tab.h
228 if test $# -ne 1; then
229 eval LASTARG="\${$#}"
230 case $LASTARG in
231 *.y)
232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
233 if test -f "$SRCFILE"; then
234 cp "$SRCFILE" y.tab.c
235 fi
236 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
237 if test -f "$SRCFILE"; then
238 cp "$SRCFILE" y.tab.h
239 fi
240 ;;
241 esac
242 fi
243 if test ! -f y.tab.h; then
244 echo >y.tab.h
245 fi
246 if test ! -f y.tab.c; then
247 echo 'main() { return 0; }' >y.tab.c
248 fi
249 ;;
250
251 lex*|flex*)
252 echo 1>&2 "\
253WARNING: \`$1' is $msg. You should only need it if
254 you modified a \`.l' file. You may need the \`Flex' package
255 in order for those modifications to take effect. You can get
256 \`Flex' from any GNU archive site."
257 rm -f lex.yy.c
258 if test $# -ne 1; then
259 eval LASTARG="\${$#}"
260 case $LASTARG in
261 *.l)
262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
263 if test -f "$SRCFILE"; then
264 cp "$SRCFILE" lex.yy.c
265 fi
266 ;;
267 esac
268 fi
269 if test ! -f lex.yy.c; then
270 echo 'main() { return 0; }' >lex.yy.c
271 fi
272 ;;
273
274 help2man*)
275 echo 1>&2 "\
276WARNING: \`$1' is $msg. You should only need it if
277 you modified a dependency of a manual page. You may need the
278 \`Help2man' package in order for those modifications to take
279 effect. You can get \`Help2man' from any GNU archive site."
280
281 file=`echo "$*" | sed -n "$sed_output"`
282 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
283 if test -f "$file"; then
284 touch $file
285 else
286 test -z "$file" || exec >$file
287 echo ".ab help2man is required to generate this page"
288 exit $?
289 fi
290 ;;
291
292 makeinfo*)
293 echo 1>&2 "\
294WARNING: \`$1' is $msg. You should only need it if
295 you modified a \`.texi' or \`.texinfo' file, or any other file
296 indirectly affecting the aspect of the manual. The spurious
297 call might also be the consequence of using a buggy \`make' (AIX,
298 DU, IRIX). You might want to install the \`Texinfo' package or
299 the \`GNU make' package. Grab either from any GNU archive site."
300 # The file to touch is that specified with -o ...
301 file=`echo "$*" | sed -n "$sed_output"`
302 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
303 if test -z "$file"; then
304 # ... or it is the one specified with @setfilename ...
305 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
306 file=`sed -n '
307 /^@setfilename/{
308 s/.* \([^ ]*\) *$/\1/
309 p
310 q
311 }' $infile`
312 # ... or it is derived from the source name (dir/f.texi becomes f.info)
313 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
314 fi
315 # If the file does not exist, the user really needs makeinfo;
316 # let's fail without touching anything.
317 test -f $file || exit 1
318 touch $file
319 ;;
320
321 tar*)
322 shift
323
324 # We have already tried tar in the generic part.
325 # Look for gnutar/gtar before invocation to avoid ugly error
326 # messages.
327 if (gnutar --version > /dev/null 2>&1); then
328 gnutar "$@" && exit 0
329 fi
330 if (gtar --version > /dev/null 2>&1); then
331 gtar "$@" && exit 0
332 fi
333 firstarg="$1"
334 if shift; then
335 case $firstarg in
336 *o*)
337 firstarg=`echo "$firstarg" | sed s/o//`
338 tar "$firstarg" "$@" && exit 0
339 ;;
340 esac
341 case $firstarg in
342 *h*)
343 firstarg=`echo "$firstarg" | sed s/h//`
344 tar "$firstarg" "$@" && exit 0
345 ;;
346 esac
347 fi
348
349 echo 1>&2 "\
350WARNING: I can't seem to be able to run \`tar' with the given arguments.
351 You may want to install GNU tar or Free paxutils, or check the
352 command line arguments."
353 exit 1
354 ;;
355
356 *)
357 echo 1>&2 "\
358WARNING: \`$1' is needed, and is $msg.
359 You might have modified some files without having the
360 proper tools for further handling them. Check the \`README' file,
361 it often tells you about the needed prerequisites for installing
362 this package. You may also peek at any GNU archive site, in case
363 some other package would contain this missing \`$1' program."
364 exit 1
365 ;;
366esac
367
368exit 0
369
370# Local variables:
371# eval: (add-hook 'write-file-hooks 'time-stamp)
372# time-stamp-start: "scriptversion="
373# time-stamp-format: "%:y-%02m-%02d.%02H"
374# time-stamp-time-zone: "UTC"
375# time-stamp-end: "; # UTC"
376# End:
diff --git a/libraries/embryo/sha1-for-source.txt b/libraries/embryo/sha1-for-source.txt
deleted file mode 100644
index f662097..0000000
--- a/libraries/embryo/sha1-for-source.txt
+++ /dev/null
@@ -1 +0,0 @@
1cb3401a552719a91ef163a28a78c0c5d5180ec24
diff --git a/libraries/embryo/src/Makefile.am b/libraries/embryo/src/Makefile.am
deleted file mode 100644
index a8590b2..0000000
--- a/libraries/embryo/src/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = lib bin
diff --git a/libraries/embryo/src/Makefile.in b/libraries/embryo/src/Makefile.in
deleted file mode 100644
index e060803..0000000
--- a/libraries/embryo/src/Makefile.in
+++ /dev/null
@@ -1,592 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
40 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
41 $(top_srcdir)/m4/efl_fnmatch.m4 \
42 $(top_srcdir)/m4/efl_gettimeofday.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
44 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
45 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
46 $(top_srcdir)/configure.ac
47am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
48 $(ACLOCAL_M4)
49mkinstalldirs = $(install_sh) -d
50CONFIG_HEADER = $(top_builddir)/config.h
51CONFIG_CLEAN_FILES =
52CONFIG_CLEAN_VPATH_FILES =
53AM_V_GEN = $(am__v_GEN_$(V))
54am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
55am__v_GEN_0 = @echo " GEN " $@;
56AM_V_at = $(am__v_at_$(V))
57am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
58am__v_at_0 = @
59SOURCES =
60DIST_SOURCES =
61RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
62 html-recursive info-recursive install-data-recursive \
63 install-dvi-recursive install-exec-recursive \
64 install-html-recursive install-info-recursive \
65 install-pdf-recursive install-ps-recursive install-recursive \
66 installcheck-recursive installdirs-recursive pdf-recursive \
67 ps-recursive uninstall-recursive
68RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
69 distclean-recursive maintainer-clean-recursive
70AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
71 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
72 distdir
73ETAGS = etags
74CTAGS = ctags
75DIST_SUBDIRS = $(SUBDIRS)
76DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
77am__relativize = \
78 dir0=`pwd`; \
79 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
80 sed_rest='s,^[^/]*/*,,'; \
81 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
82 sed_butlast='s,/*[^/]*$$,,'; \
83 while test -n "$$dir1"; do \
84 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
85 if test "$$first" != "."; then \
86 if test "$$first" = ".."; then \
87 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
88 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
89 else \
90 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
91 if test "$$first2" = "$$first"; then \
92 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
93 else \
94 dir2="../$$dir2"; \
95 fi; \
96 dir0="$$dir0"/"$$first"; \
97 fi; \
98 fi; \
99 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
100 done; \
101 reldir="$$dir2"
102ACLOCAL = @ACLOCAL@
103ALLOCA = @ALLOCA@
104AMTAR = @AMTAR@
105AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
106AR = @AR@
107AS = @AS@
108AUTOCONF = @AUTOCONF@
109AUTOHEADER = @AUTOHEADER@
110AUTOMAKE = @AUTOMAKE@
111AWK = @AWK@
112CC = @CC@
113CCDEPMODE = @CCDEPMODE@
114CFLAGS = @CFLAGS@
115CPP = @CPP@
116CPPFLAGS = @CPPFLAGS@
117CYGPATH_W = @CYGPATH_W@
118DEFS = @DEFS@
119DEPDIR = @DEPDIR@
120DLLTOOL = @DLLTOOL@
121DSYMUTIL = @DSYMUTIL@
122DUMPBIN = @DUMPBIN@
123ECHO_C = @ECHO_C@
124ECHO_N = @ECHO_N@
125ECHO_T = @ECHO_T@
126EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
127EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
128EGREP = @EGREP@
129EINA_CFLAGS = @EINA_CFLAGS@
130EINA_LIBS = @EINA_LIBS@
131EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
132EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
133EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
134EVIL_CFLAGS = @EVIL_CFLAGS@
135EVIL_LIBS = @EVIL_LIBS@
136EXEEXT = @EXEEXT@
137EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
138EXOTIC_LIBS = @EXOTIC_LIBS@
139FGREP = @FGREP@
140GREP = @GREP@
141INSTALL = @INSTALL@
142INSTALL_DATA = @INSTALL_DATA@
143INSTALL_PROGRAM = @INSTALL_PROGRAM@
144INSTALL_SCRIPT = @INSTALL_SCRIPT@
145INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
146LD = @LD@
147LDFLAGS = @LDFLAGS@
148LIBOBJS = @LIBOBJS@
149LIBS = @LIBS@
150LIBTOOL = @LIBTOOL@
151LIPO = @LIPO@
152LN_S = @LN_S@
153LTLIBOBJS = @LTLIBOBJS@
154MAKEINFO = @MAKEINFO@
155MKDIR_P = @MKDIR_P@
156NM = @NM@
157NMEDIT = @NMEDIT@
158OBJDUMP = @OBJDUMP@
159OBJEXT = @OBJEXT@
160OTOOL = @OTOOL@
161OTOOL64 = @OTOOL64@
162PACKAGE = @PACKAGE@
163PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
164PACKAGE_NAME = @PACKAGE_NAME@
165PACKAGE_STRING = @PACKAGE_STRING@
166PACKAGE_TARNAME = @PACKAGE_TARNAME@
167PACKAGE_URL = @PACKAGE_URL@
168PACKAGE_VERSION = @PACKAGE_VERSION@
169PATH_SEPARATOR = @PATH_SEPARATOR@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173RANLIB = @RANLIB@
174SED = @SED@
175SET_MAKE = @SET_MAKE@
176SHELL = @SHELL@
177STRIP = @STRIP@
178VERSION = @VERSION@
179VMAJ = @VMAJ@
180abs_builddir = @abs_builddir@
181abs_srcdir = @abs_srcdir@
182abs_top_builddir = @abs_top_builddir@
183abs_top_srcdir = @abs_top_srcdir@
184ac_ct_CC = @ac_ct_CC@
185ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
186am__include = @am__include@
187am__leading_dot = @am__leading_dot@
188am__quote = @am__quote@
189am__tar = @am__tar@
190am__untar = @am__untar@
191bindir = @bindir@
192build = @build@
193build_alias = @build_alias@
194build_cpu = @build_cpu@
195build_os = @build_os@
196build_vendor = @build_vendor@
197builddir = @builddir@
198datadir = @datadir@
199datarootdir = @datarootdir@
200docdir = @docdir@
201dvidir = @dvidir@
202efl_doxygen = @efl_doxygen@
203efl_have_doxygen = @efl_have_doxygen@
204embryoincludedir = @embryoincludedir@
205exec_prefix = @exec_prefix@
206host = @host@
207host_alias = @host_alias@
208host_cpu = @host_cpu@
209host_os = @host_os@
210host_vendor = @host_vendor@
211htmldir = @htmldir@
212includedir = @includedir@
213infodir = @infodir@
214install_sh = @install_sh@
215libdir = @libdir@
216libexecdir = @libexecdir@
217localedir = @localedir@
218localstatedir = @localstatedir@
219lt_ECHO = @lt_ECHO@
220lt_enable_auto_import = @lt_enable_auto_import@
221mandir = @mandir@
222mkdir_p = @mkdir_p@
223oldincludedir = @oldincludedir@
224pdfdir = @pdfdir@
225pkgconfig_requires_private = @pkgconfig_requires_private@
226prefix = @prefix@
227program_transform_name = @program_transform_name@
228psdir = @psdir@
229release_info = @release_info@
230requirement_embryo = @requirement_embryo@
231sbindir = @sbindir@
232sharedstatedir = @sharedstatedir@
233srcdir = @srcdir@
234sysconfdir = @sysconfdir@
235target_alias = @target_alias@
236top_build_prefix = @top_build_prefix@
237top_builddir = @top_builddir@
238top_srcdir = @top_srcdir@
239version_info = @version_info@
240MAINTAINERCLEANFILES = Makefile.in
241SUBDIRS = lib bin
242all: all-recursive
243
244.SUFFIXES:
245$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
246 @for dep in $?; do \
247 case '$(am__configure_deps)' in \
248 *$$dep*) \
249 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
250 && { if test -f $@; then exit 0; else break; fi; }; \
251 exit 1;; \
252 esac; \
253 done; \
254 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
255 $(am__cd) $(top_srcdir) && \
256 $(AUTOMAKE) --gnu src/Makefile
257.PRECIOUS: Makefile
258Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
259 @case '$?' in \
260 *config.status*) \
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
262 *) \
263 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
264 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
265 esac;
266
267$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
268 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
269
270$(top_srcdir)/configure: $(am__configure_deps)
271 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
272$(ACLOCAL_M4): $(am__aclocal_m4_deps)
273 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
274$(am__aclocal_m4_deps):
275
276mostlyclean-libtool:
277 -rm -f *.lo
278
279clean-libtool:
280 -rm -rf .libs _libs
281
282# This directory's subdirectories are mostly independent; you can cd
283# into them and run `make' without going through this Makefile.
284# To change the values of `make' variables: instead of editing Makefiles,
285# (1) if the variable is set in `config.status', edit `config.status'
286# (which will cause the Makefiles to be regenerated when you run `make');
287# (2) otherwise, pass the desired values on the `make' command line.
288$(RECURSIVE_TARGETS):
289 @fail= failcom='exit 1'; \
290 for f in x $$MAKEFLAGS; do \
291 case $$f in \
292 *=* | --[!k]*);; \
293 *k*) failcom='fail=yes';; \
294 esac; \
295 done; \
296 dot_seen=no; \
297 target=`echo $@ | sed s/-recursive//`; \
298 list='$(SUBDIRS)'; for subdir in $$list; do \
299 echo "Making $$target in $$subdir"; \
300 if test "$$subdir" = "."; then \
301 dot_seen=yes; \
302 local_target="$$target-am"; \
303 else \
304 local_target="$$target"; \
305 fi; \
306 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
307 || eval $$failcom; \
308 done; \
309 if test "$$dot_seen" = "no"; then \
310 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
311 fi; test -z "$$fail"
312
313$(RECURSIVE_CLEAN_TARGETS):
314 @fail= failcom='exit 1'; \
315 for f in x $$MAKEFLAGS; do \
316 case $$f in \
317 *=* | --[!k]*);; \
318 *k*) failcom='fail=yes';; \
319 esac; \
320 done; \
321 dot_seen=no; \
322 case "$@" in \
323 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
324 *) list='$(SUBDIRS)' ;; \
325 esac; \
326 rev=''; for subdir in $$list; do \
327 if test "$$subdir" = "."; then :; else \
328 rev="$$subdir $$rev"; \
329 fi; \
330 done; \
331 rev="$$rev ."; \
332 target=`echo $@ | sed s/-recursive//`; \
333 for subdir in $$rev; do \
334 echo "Making $$target in $$subdir"; \
335 if test "$$subdir" = "."; then \
336 local_target="$$target-am"; \
337 else \
338 local_target="$$target"; \
339 fi; \
340 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
341 || eval $$failcom; \
342 done && test -z "$$fail"
343tags-recursive:
344 list='$(SUBDIRS)'; for subdir in $$list; do \
345 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
346 done
347ctags-recursive:
348 list='$(SUBDIRS)'; for subdir in $$list; do \
349 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
350 done
351
352ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
353 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
354 unique=`for i in $$list; do \
355 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
356 done | \
357 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
358 END { if (nonempty) { for (i in files) print i; }; }'`; \
359 mkid -fID $$unique
360tags: TAGS
361
362TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
363 $(TAGS_FILES) $(LISP)
364 set x; \
365 here=`pwd`; \
366 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
367 include_option=--etags-include; \
368 empty_fix=.; \
369 else \
370 include_option=--include; \
371 empty_fix=; \
372 fi; \
373 list='$(SUBDIRS)'; for subdir in $$list; do \
374 if test "$$subdir" = .; then :; else \
375 test ! -f $$subdir/TAGS || \
376 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
377 fi; \
378 done; \
379 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
380 unique=`for i in $$list; do \
381 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
382 done | \
383 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
384 END { if (nonempty) { for (i in files) print i; }; }'`; \
385 shift; \
386 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
387 test -n "$$unique" || unique=$$empty_fix; \
388 if test $$# -gt 0; then \
389 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
390 "$$@" $$unique; \
391 else \
392 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
393 $$unique; \
394 fi; \
395 fi
396ctags: CTAGS
397CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
398 $(TAGS_FILES) $(LISP)
399 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
400 unique=`for i in $$list; do \
401 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
402 done | \
403 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
404 END { if (nonempty) { for (i in files) print i; }; }'`; \
405 test -z "$(CTAGS_ARGS)$$unique" \
406 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
407 $$unique
408
409GTAGS:
410 here=`$(am__cd) $(top_builddir) && pwd` \
411 && $(am__cd) $(top_srcdir) \
412 && gtags -i $(GTAGS_ARGS) "$$here"
413
414distclean-tags:
415 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
416
417distdir: $(DISTFILES)
418 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
419 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
420 list='$(DISTFILES)'; \
421 dist_files=`for file in $$list; do echo $$file; done | \
422 sed -e "s|^$$srcdirstrip/||;t" \
423 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
424 case $$dist_files in \
425 */*) $(MKDIR_P) `echo "$$dist_files" | \
426 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
427 sort -u` ;; \
428 esac; \
429 for file in $$dist_files; do \
430 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
431 if test -d $$d/$$file; then \
432 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
433 if test -d "$(distdir)/$$file"; then \
434 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
435 fi; \
436 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
437 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
438 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
439 fi; \
440 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
441 else \
442 test -f "$(distdir)/$$file" \
443 || cp -p $$d/$$file "$(distdir)/$$file" \
444 || exit 1; \
445 fi; \
446 done
447 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
448 if test "$$subdir" = .; then :; else \
449 test -d "$(distdir)/$$subdir" \
450 || $(MKDIR_P) "$(distdir)/$$subdir" \
451 || exit 1; \
452 fi; \
453 done
454 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
455 if test "$$subdir" = .; then :; else \
456 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
457 $(am__relativize); \
458 new_distdir=$$reldir; \
459 dir1=$$subdir; dir2="$(top_distdir)"; \
460 $(am__relativize); \
461 new_top_distdir=$$reldir; \
462 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
463 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
464 ($(am__cd) $$subdir && \
465 $(MAKE) $(AM_MAKEFLAGS) \
466 top_distdir="$$new_top_distdir" \
467 distdir="$$new_distdir" \
468 am__remove_distdir=: \
469 am__skip_length_check=: \
470 am__skip_mode_fix=: \
471 distdir) \
472 || exit 1; \
473 fi; \
474 done
475check-am: all-am
476check: check-recursive
477all-am: Makefile
478installdirs: installdirs-recursive
479installdirs-am:
480install: install-recursive
481install-exec: install-exec-recursive
482install-data: install-data-recursive
483uninstall: uninstall-recursive
484
485install-am: all-am
486 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
487
488installcheck: installcheck-recursive
489install-strip:
490 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
491 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
492 `test -z '$(STRIP)' || \
493 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
494mostlyclean-generic:
495
496clean-generic:
497
498distclean-generic:
499 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
500 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
501
502maintainer-clean-generic:
503 @echo "This command is intended for maintainers to use"
504 @echo "it deletes files that may require special tools to rebuild."
505 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
506clean: clean-recursive
507
508clean-am: clean-generic clean-libtool mostlyclean-am
509
510distclean: distclean-recursive
511 -rm -f Makefile
512distclean-am: clean-am distclean-generic distclean-tags
513
514dvi: dvi-recursive
515
516dvi-am:
517
518html: html-recursive
519
520html-am:
521
522info: info-recursive
523
524info-am:
525
526install-data-am:
527
528install-dvi: install-dvi-recursive
529
530install-dvi-am:
531
532install-exec-am:
533
534install-html: install-html-recursive
535
536install-html-am:
537
538install-info: install-info-recursive
539
540install-info-am:
541
542install-man:
543
544install-pdf: install-pdf-recursive
545
546install-pdf-am:
547
548install-ps: install-ps-recursive
549
550install-ps-am:
551
552installcheck-am:
553
554maintainer-clean: maintainer-clean-recursive
555 -rm -f Makefile
556maintainer-clean-am: distclean-am maintainer-clean-generic
557
558mostlyclean: mostlyclean-recursive
559
560mostlyclean-am: mostlyclean-generic mostlyclean-libtool
561
562pdf: pdf-recursive
563
564pdf-am:
565
566ps: ps-recursive
567
568ps-am:
569
570uninstall-am:
571
572.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
573 install-am install-strip tags-recursive
574
575.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
576 all all-am check check-am clean clean-generic clean-libtool \
577 ctags ctags-recursive distclean distclean-generic \
578 distclean-libtool distclean-tags distdir dvi dvi-am html \
579 html-am info info-am install install-am install-data \
580 install-data-am install-dvi install-dvi-am install-exec \
581 install-exec-am install-html install-html-am install-info \
582 install-info-am install-man install-pdf install-pdf-am \
583 install-ps install-ps-am install-strip installcheck \
584 installcheck-am installdirs installdirs-am maintainer-clean \
585 maintainer-clean-generic mostlyclean mostlyclean-generic \
586 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
587 uninstall uninstall-am
588
589
590# Tell versions [3.59,3.63) of GNU make to not export all variables.
591# Otherwise a system limit (for SysV at least) may be exceeded.
592.NOEXPORT:
diff --git a/libraries/embryo/src/bin/Makefile.am b/libraries/embryo/src/bin/Makefile.am
deleted file mode 100644
index 09f6ffd..0000000
--- a/libraries/embryo/src/bin/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir) \
8-I$(top_builddir) \
9-DPACKAGE_BIN_DIR=\"$(bindir)\" \
10-DPACKAGE_LIB_DIR=\"$(libdir)\" \
11-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
12@EINA_CFLAGS@ \
13@EVIL_CFLAGS@
14
15bin_PROGRAMS = @EMBRYO_CC_PRG@
16EXTRA_PROGRAMS = embryo_cc
17
18embryo_cc_SOURCES = \
19embryo_cc_amx.h \
20embryo_cc_sc.h \
21embryo_cc_sc1.c \
22embryo_cc_sc2.c \
23embryo_cc_sc3.c \
24embryo_cc_sc4.c \
25embryo_cc_sc5.c \
26embryo_cc_sc6.c \
27embryo_cc_sc7.c \
28embryo_cc_scexpand.c \
29embryo_cc_sclist.c \
30embryo_cc_scvars.c \
31embryo_cc_prefix.c \
32embryo_cc_prefix.h
33
34embryo_cc_CFLAGS = @EMBRYO_CFLAGS@
35embryo_cc_LDADD = $(top_builddir)/src/lib/libembryo.la @EVIL_LIBS@ @EINA_LIBS@ -lm
36embryo_cc_LDFLAGS = @lt_enable_auto_import@
37
38EXTRA_DIST = \
39embryo_cc_sc5.scp \
40embryo_cc_sc7.scp
diff --git a/libraries/embryo/src/bin/Makefile.in b/libraries/embryo/src/bin/Makefile.in
deleted file mode 100644
index 4eaa4b2..0000000
--- a/libraries/embryo/src/bin/Makefile.in
+++ /dev/null
@@ -1,790 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37EXTRA_PROGRAMS = embryo_cc$(EXEEXT)
38subdir = src/bin
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
42 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_gettimeofday.m4 \
45 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
46 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
47 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
48 $(top_srcdir)/configure.ac
49am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
50 $(ACLOCAL_M4)
51mkinstalldirs = $(install_sh) -d
52CONFIG_HEADER = $(top_builddir)/config.h
53CONFIG_CLEAN_FILES =
54CONFIG_CLEAN_VPATH_FILES =
55am__installdirs = "$(DESTDIR)$(bindir)"
56PROGRAMS = $(bin_PROGRAMS)
57am_embryo_cc_OBJECTS = embryo_cc-embryo_cc_sc1.$(OBJEXT) \
58 embryo_cc-embryo_cc_sc2.$(OBJEXT) \
59 embryo_cc-embryo_cc_sc3.$(OBJEXT) \
60 embryo_cc-embryo_cc_sc4.$(OBJEXT) \
61 embryo_cc-embryo_cc_sc5.$(OBJEXT) \
62 embryo_cc-embryo_cc_sc6.$(OBJEXT) \
63 embryo_cc-embryo_cc_sc7.$(OBJEXT) \
64 embryo_cc-embryo_cc_scexpand.$(OBJEXT) \
65 embryo_cc-embryo_cc_sclist.$(OBJEXT) \
66 embryo_cc-embryo_cc_scvars.$(OBJEXT) \
67 embryo_cc-embryo_cc_prefix.$(OBJEXT)
68embryo_cc_OBJECTS = $(am_embryo_cc_OBJECTS)
69embryo_cc_DEPENDENCIES = $(top_builddir)/src/lib/libembryo.la
70AM_V_lt = $(am__v_lt_$(V))
71am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
72am__v_lt_0 = --silent
73embryo_cc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
74 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(embryo_cc_CFLAGS) \
75 $(CFLAGS) $(embryo_cc_LDFLAGS) $(LDFLAGS) -o $@
76DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
77depcomp = $(SHELL) $(top_srcdir)/depcomp
78am__depfiles_maybe = depfiles
79am__mv = mv -f
80COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
81 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
82LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
83 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
84 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
85 $(AM_CFLAGS) $(CFLAGS)
86AM_V_CC = $(am__v_CC_$(V))
87am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
88am__v_CC_0 = @echo " CC " $@;
89AM_V_at = $(am__v_at_$(V))
90am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
91am__v_at_0 = @
92CCLD = $(CC)
93LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
94 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
95 $(AM_LDFLAGS) $(LDFLAGS) -o $@
96AM_V_CCLD = $(am__v_CCLD_$(V))
97am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
98am__v_CCLD_0 = @echo " CCLD " $@;
99AM_V_GEN = $(am__v_GEN_$(V))
100am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
101am__v_GEN_0 = @echo " GEN " $@;
102SOURCES = $(embryo_cc_SOURCES)
103DIST_SOURCES = $(embryo_cc_SOURCES)
104ETAGS = etags
105CTAGS = ctags
106DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
107ACLOCAL = @ACLOCAL@
108ALLOCA = @ALLOCA@
109AMTAR = @AMTAR@
110AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
111AR = @AR@
112AS = @AS@
113AUTOCONF = @AUTOCONF@
114AUTOHEADER = @AUTOHEADER@
115AUTOMAKE = @AUTOMAKE@
116AWK = @AWK@
117CC = @CC@
118CCDEPMODE = @CCDEPMODE@
119CFLAGS = @CFLAGS@
120CPP = @CPP@
121CPPFLAGS = @CPPFLAGS@
122CYGPATH_W = @CYGPATH_W@
123DEFS = @DEFS@
124DEPDIR = @DEPDIR@
125DLLTOOL = @DLLTOOL@
126DSYMUTIL = @DSYMUTIL@
127DUMPBIN = @DUMPBIN@
128ECHO_C = @ECHO_C@
129ECHO_N = @ECHO_N@
130ECHO_T = @ECHO_T@
131EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
132EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
133EGREP = @EGREP@
134EINA_CFLAGS = @EINA_CFLAGS@
135EINA_LIBS = @EINA_LIBS@
136EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
137EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
138EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
139EVIL_CFLAGS = @EVIL_CFLAGS@
140EVIL_LIBS = @EVIL_LIBS@
141EXEEXT = @EXEEXT@
142EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
143EXOTIC_LIBS = @EXOTIC_LIBS@
144FGREP = @FGREP@
145GREP = @GREP@
146INSTALL = @INSTALL@
147INSTALL_DATA = @INSTALL_DATA@
148INSTALL_PROGRAM = @INSTALL_PROGRAM@
149INSTALL_SCRIPT = @INSTALL_SCRIPT@
150INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
151LD = @LD@
152LDFLAGS = @LDFLAGS@
153LIBOBJS = @LIBOBJS@
154LIBS = @LIBS@
155LIBTOOL = @LIBTOOL@
156LIPO = @LIPO@
157LN_S = @LN_S@
158LTLIBOBJS = @LTLIBOBJS@
159MAKEINFO = @MAKEINFO@
160MKDIR_P = @MKDIR_P@
161NM = @NM@
162NMEDIT = @NMEDIT@
163OBJDUMP = @OBJDUMP@
164OBJEXT = @OBJEXT@
165OTOOL = @OTOOL@
166OTOOL64 = @OTOOL64@
167PACKAGE = @PACKAGE@
168PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
169PACKAGE_NAME = @PACKAGE_NAME@
170PACKAGE_STRING = @PACKAGE_STRING@
171PACKAGE_TARNAME = @PACKAGE_TARNAME@
172PACKAGE_URL = @PACKAGE_URL@
173PACKAGE_VERSION = @PACKAGE_VERSION@
174PATH_SEPARATOR = @PATH_SEPARATOR@
175PKG_CONFIG = @PKG_CONFIG@
176PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
177PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
178RANLIB = @RANLIB@
179SED = @SED@
180SET_MAKE = @SET_MAKE@
181SHELL = @SHELL@
182STRIP = @STRIP@
183VERSION = @VERSION@
184VMAJ = @VMAJ@
185abs_builddir = @abs_builddir@
186abs_srcdir = @abs_srcdir@
187abs_top_builddir = @abs_top_builddir@
188abs_top_srcdir = @abs_top_srcdir@
189ac_ct_CC = @ac_ct_CC@
190ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
191am__include = @am__include@
192am__leading_dot = @am__leading_dot@
193am__quote = @am__quote@
194am__tar = @am__tar@
195am__untar = @am__untar@
196bindir = @bindir@
197build = @build@
198build_alias = @build_alias@
199build_cpu = @build_cpu@
200build_os = @build_os@
201build_vendor = @build_vendor@
202builddir = @builddir@
203datadir = @datadir@
204datarootdir = @datarootdir@
205docdir = @docdir@
206dvidir = @dvidir@
207efl_doxygen = @efl_doxygen@
208efl_have_doxygen = @efl_have_doxygen@
209embryoincludedir = @embryoincludedir@
210exec_prefix = @exec_prefix@
211host = @host@
212host_alias = @host_alias@
213host_cpu = @host_cpu@
214host_os = @host_os@
215host_vendor = @host_vendor@
216htmldir = @htmldir@
217includedir = @includedir@
218infodir = @infodir@
219install_sh = @install_sh@
220libdir = @libdir@
221libexecdir = @libexecdir@
222localedir = @localedir@
223localstatedir = @localstatedir@
224lt_ECHO = @lt_ECHO@
225lt_enable_auto_import = @lt_enable_auto_import@
226mandir = @mandir@
227mkdir_p = @mkdir_p@
228oldincludedir = @oldincludedir@
229pdfdir = @pdfdir@
230pkgconfig_requires_private = @pkgconfig_requires_private@
231prefix = @prefix@
232program_transform_name = @program_transform_name@
233psdir = @psdir@
234release_info = @release_info@
235requirement_embryo = @requirement_embryo@
236sbindir = @sbindir@
237sharedstatedir = @sharedstatedir@
238srcdir = @srcdir@
239sysconfdir = @sysconfdir@
240target_alias = @target_alias@
241top_build_prefix = @top_build_prefix@
242top_builddir = @top_builddir@
243top_srcdir = @top_srcdir@
244version_info = @version_info@
245MAINTAINERCLEANFILES = Makefile.in
246AM_CPPFLAGS = \
247-I. \
248-I$(top_srcdir)/src/lib \
249-I$(top_srcdir) \
250-I$(top_builddir) \
251-DPACKAGE_BIN_DIR=\"$(bindir)\" \
252-DPACKAGE_LIB_DIR=\"$(libdir)\" \
253-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
254@EINA_CFLAGS@ \
255@EVIL_CFLAGS@
256
257bin_PROGRAMS = @EMBRYO_CC_PRG@
258embryo_cc_SOURCES = \
259embryo_cc_amx.h \
260embryo_cc_sc.h \
261embryo_cc_sc1.c \
262embryo_cc_sc2.c \
263embryo_cc_sc3.c \
264embryo_cc_sc4.c \
265embryo_cc_sc5.c \
266embryo_cc_sc6.c \
267embryo_cc_sc7.c \
268embryo_cc_scexpand.c \
269embryo_cc_sclist.c \
270embryo_cc_scvars.c \
271embryo_cc_prefix.c \
272embryo_cc_prefix.h
273
274embryo_cc_CFLAGS = @EMBRYO_CFLAGS@
275embryo_cc_LDADD = $(top_builddir)/src/lib/libembryo.la @EVIL_LIBS@ @EINA_LIBS@ -lm
276embryo_cc_LDFLAGS = @lt_enable_auto_import@
277EXTRA_DIST = \
278embryo_cc_sc5.scp \
279embryo_cc_sc7.scp
280
281all: all-am
282
283.SUFFIXES:
284.SUFFIXES: .c .lo .o .obj
285$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
286 @for dep in $?; do \
287 case '$(am__configure_deps)' in \
288 *$$dep*) \
289 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
290 && { if test -f $@; then exit 0; else break; fi; }; \
291 exit 1;; \
292 esac; \
293 done; \
294 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \
295 $(am__cd) $(top_srcdir) && \
296 $(AUTOMAKE) --gnu src/bin/Makefile
297.PRECIOUS: Makefile
298Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
299 @case '$?' in \
300 *config.status*) \
301 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
302 *) \
303 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
304 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
305 esac;
306
307$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309
310$(top_srcdir)/configure: $(am__configure_deps)
311 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
312$(ACLOCAL_M4): $(am__aclocal_m4_deps)
313 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
314$(am__aclocal_m4_deps):
315install-binPROGRAMS: $(bin_PROGRAMS)
316 @$(NORMAL_INSTALL)
317 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
318 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
319 for p in $$list; do echo "$$p $$p"; done | \
320 sed 's/$(EXEEXT)$$//' | \
321 while read p p1; do if test -f $$p || test -f $$p1; \
322 then echo "$$p"; echo "$$p"; else :; fi; \
323 done | \
324 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
325 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
326 sed 'N;N;N;s,\n, ,g' | \
327 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
328 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
329 if ($$2 == $$4) files[d] = files[d] " " $$1; \
330 else { print "f", $$3 "/" $$4, $$1; } } \
331 END { for (d in files) print "f", d, files[d] }' | \
332 while read type dir files; do \
333 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
334 test -z "$$files" || { \
335 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
336 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
337 } \
338 ; done
339
340uninstall-binPROGRAMS:
341 @$(NORMAL_UNINSTALL)
342 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
343 files=`for p in $$list; do echo "$$p"; done | \
344 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
345 -e 's/$$/$(EXEEXT)/' `; \
346 test -n "$$list" || exit 0; \
347 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
348 cd "$(DESTDIR)$(bindir)" && rm -f $$files
349
350clean-binPROGRAMS:
351 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
352 echo " rm -f" $$list; \
353 rm -f $$list || exit $$?; \
354 test -n "$(EXEEXT)" || exit 0; \
355 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
356 echo " rm -f" $$list; \
357 rm -f $$list
358embryo_cc$(EXEEXT): $(embryo_cc_OBJECTS) $(embryo_cc_DEPENDENCIES)
359 @rm -f embryo_cc$(EXEEXT)
360 $(AM_V_CCLD)$(embryo_cc_LINK) $(embryo_cc_OBJECTS) $(embryo_cc_LDADD) $(LIBS)
361
362mostlyclean-compile:
363 -rm -f *.$(OBJEXT)
364
365distclean-compile:
366 -rm -f *.tab.c
367
368@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_prefix.Po@am__quote@
369@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc1.Po@am__quote@
370@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc2.Po@am__quote@
371@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc3.Po@am__quote@
372@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc4.Po@am__quote@
373@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc5.Po@am__quote@
374@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc6.Po@am__quote@
375@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sc7.Po@am__quote@
376@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_scexpand.Po@am__quote@
377@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_sclist.Po@am__quote@
378@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embryo_cc-embryo_cc_scvars.Po@am__quote@
379
380.c.o:
381@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
382@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
383@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
384@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
385@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
386@am__fastdepCC_FALSE@ $(COMPILE) -c $<
387
388.c.obj:
389@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
390@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
391@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
392@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
393@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
394@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
395
396.c.lo:
397@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
398@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
399@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
400@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
401@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
402@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
403
404embryo_cc-embryo_cc_sc1.o: embryo_cc_sc1.c
405@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc1.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc1.Tpo -c -o embryo_cc-embryo_cc_sc1.o `test -f 'embryo_cc_sc1.c' || echo '$(srcdir)/'`embryo_cc_sc1.c
406@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc1.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc1.Po
407@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
408@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc1.c' object='embryo_cc-embryo_cc_sc1.o' libtool=no @AMDEPBACKSLASH@
409@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
410@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc1.o `test -f 'embryo_cc_sc1.c' || echo '$(srcdir)/'`embryo_cc_sc1.c
411
412embryo_cc-embryo_cc_sc1.obj: embryo_cc_sc1.c
413@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc1.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc1.Tpo -c -o embryo_cc-embryo_cc_sc1.obj `if test -f 'embryo_cc_sc1.c'; then $(CYGPATH_W) 'embryo_cc_sc1.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc1.c'; fi`
414@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc1.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc1.Po
415@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
416@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc1.c' object='embryo_cc-embryo_cc_sc1.obj' libtool=no @AMDEPBACKSLASH@
417@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
418@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc1.obj `if test -f 'embryo_cc_sc1.c'; then $(CYGPATH_W) 'embryo_cc_sc1.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc1.c'; fi`
419
420embryo_cc-embryo_cc_sc2.o: embryo_cc_sc2.c
421@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc2.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc2.Tpo -c -o embryo_cc-embryo_cc_sc2.o `test -f 'embryo_cc_sc2.c' || echo '$(srcdir)/'`embryo_cc_sc2.c
422@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc2.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc2.Po
423@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
424@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc2.c' object='embryo_cc-embryo_cc_sc2.o' libtool=no @AMDEPBACKSLASH@
425@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
426@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc2.o `test -f 'embryo_cc_sc2.c' || echo '$(srcdir)/'`embryo_cc_sc2.c
427
428embryo_cc-embryo_cc_sc2.obj: embryo_cc_sc2.c
429@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc2.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc2.Tpo -c -o embryo_cc-embryo_cc_sc2.obj `if test -f 'embryo_cc_sc2.c'; then $(CYGPATH_W) 'embryo_cc_sc2.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc2.c'; fi`
430@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc2.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc2.Po
431@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
432@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc2.c' object='embryo_cc-embryo_cc_sc2.obj' libtool=no @AMDEPBACKSLASH@
433@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
434@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc2.obj `if test -f 'embryo_cc_sc2.c'; then $(CYGPATH_W) 'embryo_cc_sc2.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc2.c'; fi`
435
436embryo_cc-embryo_cc_sc3.o: embryo_cc_sc3.c
437@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc3.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc3.Tpo -c -o embryo_cc-embryo_cc_sc3.o `test -f 'embryo_cc_sc3.c' || echo '$(srcdir)/'`embryo_cc_sc3.c
438@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc3.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc3.Po
439@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
440@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc3.c' object='embryo_cc-embryo_cc_sc3.o' libtool=no @AMDEPBACKSLASH@
441@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
442@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc3.o `test -f 'embryo_cc_sc3.c' || echo '$(srcdir)/'`embryo_cc_sc3.c
443
444embryo_cc-embryo_cc_sc3.obj: embryo_cc_sc3.c
445@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc3.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc3.Tpo -c -o embryo_cc-embryo_cc_sc3.obj `if test -f 'embryo_cc_sc3.c'; then $(CYGPATH_W) 'embryo_cc_sc3.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc3.c'; fi`
446@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc3.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc3.Po
447@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
448@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc3.c' object='embryo_cc-embryo_cc_sc3.obj' libtool=no @AMDEPBACKSLASH@
449@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
450@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc3.obj `if test -f 'embryo_cc_sc3.c'; then $(CYGPATH_W) 'embryo_cc_sc3.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc3.c'; fi`
451
452embryo_cc-embryo_cc_sc4.o: embryo_cc_sc4.c
453@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc4.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc4.Tpo -c -o embryo_cc-embryo_cc_sc4.o `test -f 'embryo_cc_sc4.c' || echo '$(srcdir)/'`embryo_cc_sc4.c
454@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc4.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc4.Po
455@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
456@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc4.c' object='embryo_cc-embryo_cc_sc4.o' libtool=no @AMDEPBACKSLASH@
457@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
458@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc4.o `test -f 'embryo_cc_sc4.c' || echo '$(srcdir)/'`embryo_cc_sc4.c
459
460embryo_cc-embryo_cc_sc4.obj: embryo_cc_sc4.c
461@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc4.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc4.Tpo -c -o embryo_cc-embryo_cc_sc4.obj `if test -f 'embryo_cc_sc4.c'; then $(CYGPATH_W) 'embryo_cc_sc4.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc4.c'; fi`
462@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc4.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc4.Po
463@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
464@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc4.c' object='embryo_cc-embryo_cc_sc4.obj' libtool=no @AMDEPBACKSLASH@
465@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
466@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc4.obj `if test -f 'embryo_cc_sc4.c'; then $(CYGPATH_W) 'embryo_cc_sc4.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc4.c'; fi`
467
468embryo_cc-embryo_cc_sc5.o: embryo_cc_sc5.c
469@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc5.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc5.Tpo -c -o embryo_cc-embryo_cc_sc5.o `test -f 'embryo_cc_sc5.c' || echo '$(srcdir)/'`embryo_cc_sc5.c
470@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc5.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc5.Po
471@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
472@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc5.c' object='embryo_cc-embryo_cc_sc5.o' libtool=no @AMDEPBACKSLASH@
473@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
474@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc5.o `test -f 'embryo_cc_sc5.c' || echo '$(srcdir)/'`embryo_cc_sc5.c
475
476embryo_cc-embryo_cc_sc5.obj: embryo_cc_sc5.c
477@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc5.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc5.Tpo -c -o embryo_cc-embryo_cc_sc5.obj `if test -f 'embryo_cc_sc5.c'; then $(CYGPATH_W) 'embryo_cc_sc5.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc5.c'; fi`
478@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc5.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc5.Po
479@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
480@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc5.c' object='embryo_cc-embryo_cc_sc5.obj' libtool=no @AMDEPBACKSLASH@
481@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
482@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc5.obj `if test -f 'embryo_cc_sc5.c'; then $(CYGPATH_W) 'embryo_cc_sc5.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc5.c'; fi`
483
484embryo_cc-embryo_cc_sc6.o: embryo_cc_sc6.c
485@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc6.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc6.Tpo -c -o embryo_cc-embryo_cc_sc6.o `test -f 'embryo_cc_sc6.c' || echo '$(srcdir)/'`embryo_cc_sc6.c
486@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc6.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc6.Po
487@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
488@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc6.c' object='embryo_cc-embryo_cc_sc6.o' libtool=no @AMDEPBACKSLASH@
489@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
490@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc6.o `test -f 'embryo_cc_sc6.c' || echo '$(srcdir)/'`embryo_cc_sc6.c
491
492embryo_cc-embryo_cc_sc6.obj: embryo_cc_sc6.c
493@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc6.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc6.Tpo -c -o embryo_cc-embryo_cc_sc6.obj `if test -f 'embryo_cc_sc6.c'; then $(CYGPATH_W) 'embryo_cc_sc6.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc6.c'; fi`
494@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc6.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc6.Po
495@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
496@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc6.c' object='embryo_cc-embryo_cc_sc6.obj' libtool=no @AMDEPBACKSLASH@
497@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
498@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc6.obj `if test -f 'embryo_cc_sc6.c'; then $(CYGPATH_W) 'embryo_cc_sc6.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc6.c'; fi`
499
500embryo_cc-embryo_cc_sc7.o: embryo_cc_sc7.c
501@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc7.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc7.Tpo -c -o embryo_cc-embryo_cc_sc7.o `test -f 'embryo_cc_sc7.c' || echo '$(srcdir)/'`embryo_cc_sc7.c
502@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc7.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc7.Po
503@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
504@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc7.c' object='embryo_cc-embryo_cc_sc7.o' libtool=no @AMDEPBACKSLASH@
505@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
506@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc7.o `test -f 'embryo_cc_sc7.c' || echo '$(srcdir)/'`embryo_cc_sc7.c
507
508embryo_cc-embryo_cc_sc7.obj: embryo_cc_sc7.c
509@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sc7.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sc7.Tpo -c -o embryo_cc-embryo_cc_sc7.obj `if test -f 'embryo_cc_sc7.c'; then $(CYGPATH_W) 'embryo_cc_sc7.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc7.c'; fi`
510@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sc7.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sc7.Po
511@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
512@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sc7.c' object='embryo_cc-embryo_cc_sc7.obj' libtool=no @AMDEPBACKSLASH@
513@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
514@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sc7.obj `if test -f 'embryo_cc_sc7.c'; then $(CYGPATH_W) 'embryo_cc_sc7.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sc7.c'; fi`
515
516embryo_cc-embryo_cc_scexpand.o: embryo_cc_scexpand.c
517@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_scexpand.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Tpo -c -o embryo_cc-embryo_cc_scexpand.o `test -f 'embryo_cc_scexpand.c' || echo '$(srcdir)/'`embryo_cc_scexpand.c
518@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Tpo $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Po
519@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
520@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_scexpand.c' object='embryo_cc-embryo_cc_scexpand.o' libtool=no @AMDEPBACKSLASH@
521@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
522@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_scexpand.o `test -f 'embryo_cc_scexpand.c' || echo '$(srcdir)/'`embryo_cc_scexpand.c
523
524embryo_cc-embryo_cc_scexpand.obj: embryo_cc_scexpand.c
525@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_scexpand.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Tpo -c -o embryo_cc-embryo_cc_scexpand.obj `if test -f 'embryo_cc_scexpand.c'; then $(CYGPATH_W) 'embryo_cc_scexpand.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_scexpand.c'; fi`
526@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Tpo $(DEPDIR)/embryo_cc-embryo_cc_scexpand.Po
527@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
528@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_scexpand.c' object='embryo_cc-embryo_cc_scexpand.obj' libtool=no @AMDEPBACKSLASH@
529@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
530@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_scexpand.obj `if test -f 'embryo_cc_scexpand.c'; then $(CYGPATH_W) 'embryo_cc_scexpand.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_scexpand.c'; fi`
531
532embryo_cc-embryo_cc_sclist.o: embryo_cc_sclist.c
533@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sclist.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sclist.Tpo -c -o embryo_cc-embryo_cc_sclist.o `test -f 'embryo_cc_sclist.c' || echo '$(srcdir)/'`embryo_cc_sclist.c
534@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sclist.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sclist.Po
535@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
536@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sclist.c' object='embryo_cc-embryo_cc_sclist.o' libtool=no @AMDEPBACKSLASH@
537@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
538@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sclist.o `test -f 'embryo_cc_sclist.c' || echo '$(srcdir)/'`embryo_cc_sclist.c
539
540embryo_cc-embryo_cc_sclist.obj: embryo_cc_sclist.c
541@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_sclist.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_sclist.Tpo -c -o embryo_cc-embryo_cc_sclist.obj `if test -f 'embryo_cc_sclist.c'; then $(CYGPATH_W) 'embryo_cc_sclist.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sclist.c'; fi`
542@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_sclist.Tpo $(DEPDIR)/embryo_cc-embryo_cc_sclist.Po
543@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
544@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_sclist.c' object='embryo_cc-embryo_cc_sclist.obj' libtool=no @AMDEPBACKSLASH@
545@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
546@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_sclist.obj `if test -f 'embryo_cc_sclist.c'; then $(CYGPATH_W) 'embryo_cc_sclist.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_sclist.c'; fi`
547
548embryo_cc-embryo_cc_scvars.o: embryo_cc_scvars.c
549@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_scvars.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_scvars.Tpo -c -o embryo_cc-embryo_cc_scvars.o `test -f 'embryo_cc_scvars.c' || echo '$(srcdir)/'`embryo_cc_scvars.c
550@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_scvars.Tpo $(DEPDIR)/embryo_cc-embryo_cc_scvars.Po
551@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
552@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_scvars.c' object='embryo_cc-embryo_cc_scvars.o' libtool=no @AMDEPBACKSLASH@
553@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
554@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_scvars.o `test -f 'embryo_cc_scvars.c' || echo '$(srcdir)/'`embryo_cc_scvars.c
555
556embryo_cc-embryo_cc_scvars.obj: embryo_cc_scvars.c
557@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_scvars.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_scvars.Tpo -c -o embryo_cc-embryo_cc_scvars.obj `if test -f 'embryo_cc_scvars.c'; then $(CYGPATH_W) 'embryo_cc_scvars.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_scvars.c'; fi`
558@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_scvars.Tpo $(DEPDIR)/embryo_cc-embryo_cc_scvars.Po
559@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
560@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_scvars.c' object='embryo_cc-embryo_cc_scvars.obj' libtool=no @AMDEPBACKSLASH@
561@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
562@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_scvars.obj `if test -f 'embryo_cc_scvars.c'; then $(CYGPATH_W) 'embryo_cc_scvars.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_scvars.c'; fi`
563
564embryo_cc-embryo_cc_prefix.o: embryo_cc_prefix.c
565@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_prefix.o -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_prefix.Tpo -c -o embryo_cc-embryo_cc_prefix.o `test -f 'embryo_cc_prefix.c' || echo '$(srcdir)/'`embryo_cc_prefix.c
566@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_prefix.Tpo $(DEPDIR)/embryo_cc-embryo_cc_prefix.Po
567@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
568@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_prefix.c' object='embryo_cc-embryo_cc_prefix.o' libtool=no @AMDEPBACKSLASH@
569@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
570@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_prefix.o `test -f 'embryo_cc_prefix.c' || echo '$(srcdir)/'`embryo_cc_prefix.c
571
572embryo_cc-embryo_cc_prefix.obj: embryo_cc_prefix.c
573@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -MT embryo_cc-embryo_cc_prefix.obj -MD -MP -MF $(DEPDIR)/embryo_cc-embryo_cc_prefix.Tpo -c -o embryo_cc-embryo_cc_prefix.obj `if test -f 'embryo_cc_prefix.c'; then $(CYGPATH_W) 'embryo_cc_prefix.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_prefix.c'; fi`
574@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/embryo_cc-embryo_cc_prefix.Tpo $(DEPDIR)/embryo_cc-embryo_cc_prefix.Po
575@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
576@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_cc_prefix.c' object='embryo_cc-embryo_cc_prefix.obj' libtool=no @AMDEPBACKSLASH@
577@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
578@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(embryo_cc_CFLAGS) $(CFLAGS) -c -o embryo_cc-embryo_cc_prefix.obj `if test -f 'embryo_cc_prefix.c'; then $(CYGPATH_W) 'embryo_cc_prefix.c'; else $(CYGPATH_W) '$(srcdir)/embryo_cc_prefix.c'; fi`
579
580mostlyclean-libtool:
581 -rm -f *.lo
582
583clean-libtool:
584 -rm -rf .libs _libs
585
586ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
587 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
588 unique=`for i in $$list; do \
589 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
590 done | \
591 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
592 END { if (nonempty) { for (i in files) print i; }; }'`; \
593 mkid -fID $$unique
594tags: TAGS
595
596TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
597 $(TAGS_FILES) $(LISP)
598 set x; \
599 here=`pwd`; \
600 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
601 unique=`for i in $$list; do \
602 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
603 done | \
604 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
605 END { if (nonempty) { for (i in files) print i; }; }'`; \
606 shift; \
607 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
608 test -n "$$unique" || unique=$$empty_fix; \
609 if test $$# -gt 0; then \
610 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
611 "$$@" $$unique; \
612 else \
613 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
614 $$unique; \
615 fi; \
616 fi
617ctags: CTAGS
618CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
619 $(TAGS_FILES) $(LISP)
620 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
621 unique=`for i in $$list; do \
622 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
623 done | \
624 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
625 END { if (nonempty) { for (i in files) print i; }; }'`; \
626 test -z "$(CTAGS_ARGS)$$unique" \
627 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
628 $$unique
629
630GTAGS:
631 here=`$(am__cd) $(top_builddir) && pwd` \
632 && $(am__cd) $(top_srcdir) \
633 && gtags -i $(GTAGS_ARGS) "$$here"
634
635distclean-tags:
636 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
637
638distdir: $(DISTFILES)
639 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
640 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
641 list='$(DISTFILES)'; \
642 dist_files=`for file in $$list; do echo $$file; done | \
643 sed -e "s|^$$srcdirstrip/||;t" \
644 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
645 case $$dist_files in \
646 */*) $(MKDIR_P) `echo "$$dist_files" | \
647 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
648 sort -u` ;; \
649 esac; \
650 for file in $$dist_files; do \
651 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
652 if test -d $$d/$$file; then \
653 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
654 if test -d "$(distdir)/$$file"; then \
655 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
656 fi; \
657 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
658 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
659 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
660 fi; \
661 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
662 else \
663 test -f "$(distdir)/$$file" \
664 || cp -p $$d/$$file "$(distdir)/$$file" \
665 || exit 1; \
666 fi; \
667 done
668check-am: all-am
669check: check-am
670all-am: Makefile $(PROGRAMS)
671installdirs:
672 for dir in "$(DESTDIR)$(bindir)"; do \
673 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
674 done
675install: install-am
676install-exec: install-exec-am
677install-data: install-data-am
678uninstall: uninstall-am
679
680install-am: all-am
681 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
682
683installcheck: installcheck-am
684install-strip:
685 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
686 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
687 `test -z '$(STRIP)' || \
688 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
689mostlyclean-generic:
690
691clean-generic:
692
693distclean-generic:
694 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
695 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
696
697maintainer-clean-generic:
698 @echo "This command is intended for maintainers to use"
699 @echo "it deletes files that may require special tools to rebuild."
700 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
701clean: clean-am
702
703clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
704
705distclean: distclean-am
706 -rm -rf ./$(DEPDIR)
707 -rm -f Makefile
708distclean-am: clean-am distclean-compile distclean-generic \
709 distclean-tags
710
711dvi: dvi-am
712
713dvi-am:
714
715html: html-am
716
717html-am:
718
719info: info-am
720
721info-am:
722
723install-data-am:
724
725install-dvi: install-dvi-am
726
727install-dvi-am:
728
729install-exec-am: install-binPROGRAMS
730
731install-html: install-html-am
732
733install-html-am:
734
735install-info: install-info-am
736
737install-info-am:
738
739install-man:
740
741install-pdf: install-pdf-am
742
743install-pdf-am:
744
745install-ps: install-ps-am
746
747install-ps-am:
748
749installcheck-am:
750
751maintainer-clean: maintainer-clean-am
752 -rm -rf ./$(DEPDIR)
753 -rm -f Makefile
754maintainer-clean-am: distclean-am maintainer-clean-generic
755
756mostlyclean: mostlyclean-am
757
758mostlyclean-am: mostlyclean-compile mostlyclean-generic \
759 mostlyclean-libtool
760
761pdf: pdf-am
762
763pdf-am:
764
765ps: ps-am
766
767ps-am:
768
769uninstall-am: uninstall-binPROGRAMS
770
771.MAKE: install-am install-strip
772
773.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
774 clean-generic clean-libtool ctags distclean distclean-compile \
775 distclean-generic distclean-libtool distclean-tags distdir dvi \
776 dvi-am html html-am info info-am install install-am \
777 install-binPROGRAMS install-data install-data-am install-dvi \
778 install-dvi-am install-exec install-exec-am install-html \
779 install-html-am install-info install-info-am install-man \
780 install-pdf install-pdf-am install-ps install-ps-am \
781 install-strip installcheck installcheck-am installdirs \
782 maintainer-clean maintainer-clean-generic mostlyclean \
783 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
784 pdf pdf-am ps ps-am tags uninstall uninstall-am \
785 uninstall-binPROGRAMS
786
787
788# Tell versions [3.59,3.63) of GNU make to not export all variables.
789# Otherwise a system limit (for SysV at least) may be exceeded.
790.NOEXPORT:
diff --git a/libraries/embryo/src/bin/embryo_cc_amx.h b/libraries/embryo/src/bin/embryo_cc_amx.h
deleted file mode 100644
index c31b1cd..0000000
--- a/libraries/embryo/src/bin/embryo_cc_amx.h
+++ /dev/null
@@ -1,226 +0,0 @@
1/* Abstract Machine for the Small compiler
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_amx.h 51650 2010-08-26 01:34:13Z lucas $
22 */
23
24#ifndef EMBRYO_CC_AMX_H
25#define EMBRYO_CC_AMX_H
26
27#include <sys/types.h>
28
29/* calling convention for all interface functions and callback functions */
30
31/* File format version Required AMX version
32 * 0 (original version) 0
33 * 1 (opcodes JUMP.pri, SWITCH and CASETBL) 1
34 * 2 (compressed files) 2
35 * 3 (public variables) 2
36 * 4 (opcodes SWAP.pri/alt and PUSHADDR) 4
37 * 5 (tagnames table) 4
38 * 6 (reformatted header) 6
39 * 7 (name table, opcodes SYMTAG & SYSREQ.D) 7
40 */
41#define CUR_FILE_VERSION 7 /* current file version; also the current AMX version */
42#define MIN_FILE_VERSION 6 /* lowest supported file format version for the current AMX version */
43#define MIN_AMX_VERSION 7 /* minimum AMX version needed to support the current file format */
44
45#if !defined CELL_TYPE
46#define CELL_TYPE
47 typedef unsigned int ucell;
48 typedef int cell;
49#endif
50
51 struct tagAMX;
52 typedef cell(*AMX_NATIVE) (struct tagAMX * amx,
53 cell * params);
54 typedef int (* AMX_CALLBACK) (struct tagAMX * amx, cell index,
55 cell * result, cell * params);
56 typedef int (* AMX_DEBUG) (struct tagAMX * amx);
57
58 typedef struct
59 {
60 char *name;
61 AMX_NATIVE func ;
62 } AMX_NATIVE_INFO ;
63
64#define AMX_USERNUM 4
65#define sEXPMAX 19 /* maximum name length for file version <= 6 */
66#define sNAMEMAX 31 /* maximum name length of symbol name */
67
68#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
69# pragma pack(1)
70# define EMBRYO_STRUCT_PACKED
71#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
72# define EMBRYO_STRUCT_PACKED __attribute__((packed))
73#else
74# define EMBRYO_STRUCT_PACKED
75#endif
76
77 typedef struct tagAMX_FUNCSTUB
78 {
79 unsigned int address;
80 char name[sEXPMAX + 1];
81 } EMBRYO_STRUCT_PACKED AMX_FUNCSTUB;
82
83/* The AMX structure is the internal structure for many functions. Not all
84 * fields are valid at all times; many fields are cached in local variables.
85 */
86 typedef struct tagAMX
87 {
88 unsigned char *base; /* points to the AMX header ("amxhdr") plus the code, optionally also the data */
89 unsigned char *data; /* points to separate data+stack+heap, may be NULL */
90 AMX_CALLBACK callback;
91 AMX_DEBUG debug ; /* debug callback */
92 /* for external functions a few registers must be accessible from the outside */
93 cell cip ; /* instruction pointer: relative to base + amxhdr->cod */
94 cell frm ; /* stack frame base: relative to base + amxhdr->dat */
95 cell hea ; /* top of the heap: relative to base + amxhdr->dat */
96 cell hlw ; /* bottom of the heap: relative to base + amxhdr->dat */
97 cell stk ; /* stack pointer: relative to base + amxhdr->dat */
98 cell stp ; /* top of the stack: relative to base + amxhdr->dat */
99 int flags ; /* current status, see amx_Flags() */
100 /* for assertions and debug hook */
101 cell curline ;
102 cell curfile ;
103 int dbgcode ;
104 cell dbgaddr ;
105 cell dbgparam ;
106 char *dbgname;
107 /* user data */
108 long usertags[AMX_USERNUM];
109 void *userdata[AMX_USERNUM];
110 /* native functions can raise an error */
111 int error ;
112 /* the sleep opcode needs to store the full AMX status */
113 cell pri ;
114 cell alt ;
115 cell reset_stk ;
116 cell reset_hea ;
117 cell *syscall_d; /* relocated value/address for the SYSCALL.D opcode */
118 } EMBRYO_STRUCT_PACKED AMX;
119
120/* The AMX_HEADER structure is both the memory format as the file format. The
121 * structure is used internaly.
122 */
123 typedef struct tagAMX_HEADER
124 {
125 int size ; /* size of the "file" */
126 unsigned short magic ; /* signature */
127 char file_version ; /* file format version */
128 char amx_version ; /* required version of the AMX */
129 unsigned short flags ;
130 unsigned short defsize ; /* size of a definition record */
131 int cod ; /* initial value of COD - code block */
132 int dat ; /* initial value of DAT - data block */
133 int hea ; /* initial value of HEA - start of the heap */
134 int stp ; /* initial value of STP - stack top */
135 int cip ; /* initial value of CIP - the instruction pointer */
136 int publics ; /* offset to the "public functions" table */
137 int natives ; /* offset to the "native functions" table */
138 int libraries ; /* offset to the table of libraries */
139 int pubvars ; /* the "public variables" table */
140 int tags ; /* the "public tagnames" table */
141 int nametable ; /* name table, file version 7 only */
142 } EMBRYO_STRUCT_PACKED AMX_HEADER;
143
144#if defined _MSC_VER || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
145# pragma pack()
146#endif
147
148#define AMX_MAGIC 0xf1e0
149
150 enum
151 {
152 AMX_ERR_NONE,
153 /* reserve the first 15 error codes for exit codes of the abstract machine */
154 AMX_ERR_EXIT, /* forced exit */
155 AMX_ERR_ASSERT, /* assertion failed */
156 AMX_ERR_STACKERR, /* stack/heap collision */
157 AMX_ERR_BOUNDS, /* index out of bounds */
158 AMX_ERR_MEMACCESS, /* invalid memory access */
159 AMX_ERR_INVINSTR, /* invalid instruction */
160 AMX_ERR_STACKLOW, /* stack underflow */
161 AMX_ERR_HEAPLOW, /* heap underflow */
162 AMX_ERR_CALLBACK, /* no callback, or invalid callback */
163 AMX_ERR_NATIVE, /* native function failed */
164 AMX_ERR_DIVIDE, /* divide by zero */
165 AMX_ERR_SLEEP, /* go into sleepmode - code can be restarted */
166
167 AMX_ERR_MEMORY = 16, /* out of memory */
168 AMX_ERR_FORMAT, /* invalid file format */
169 AMX_ERR_VERSION, /* file is for a newer version of the AMX */
170 AMX_ERR_NOTFOUND, /* function not found */
171 AMX_ERR_INDEX, /* invalid index parameter (bad entry point) */
172 AMX_ERR_DEBUG, /* debugger cannot run */
173 AMX_ERR_INIT, /* AMX not initialized (or doubly initialized) */
174 AMX_ERR_USERDATA, /* unable to set user data field (table full) */
175 AMX_ERR_INIT_JIT, /* cannot initialize the JIT */
176 AMX_ERR_PARAMS, /* parameter error */
177 AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */
178 };
179
180 enum
181 {
182 DBG_INIT, /* query/initialize */
183 DBG_FILE, /* file number in curfile, filename in name */
184 DBG_LINE, /* line number in curline, file number in curfile */
185 DBG_SYMBOL, /* address in dbgaddr, class/type in dbgparam */
186 DBG_CLRSYM, /* stack address below which locals should be removed. stack address in stk */
187 DBG_CALL, /* function call, address jumped to in dbgaddr */
188 DBG_RETURN, /* function returns */
189 DBG_TERMINATE, /* program ends, code address in dbgaddr, reason in dbgparam */
190 DBG_SRANGE, /* symbol size and dimensions (arrays); level in dbgaddr (!); length in dbgparam */
191 DBG_SYMTAG, /* tag of the most recent symbol (if non-zero), tag in dbgparam */
192 };
193
194#define AMX_FLAG_CHAR16 0x01 /* characters are 16-bit */
195#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */
196#define AMX_FLAG_COMPACT 0x04 /* compact encoding */
197#define AMX_FLAG_BIGENDIAN 0x08 /* big endian encoding */
198#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking */
199#define AMX_FLAG_BROWSE 0x4000 /* browsing/relocating or executing */
200#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
201
202#define AMX_EXEC_MAIN -1 /* start at program entry point */
203#define AMX_EXEC_CONT -2 /* continue from last address */
204
205#define AMX_USERTAG(a,b,c,d) ((a) | ((b)<<8) | ((long)(c)<<16) | ((long)(d)<<24))
206
207#define AMX_EXPANDMARGIN 64
208
209/* for native functions that use floating point parameters, the following
210 * two macros are convenient for casting a "cell" into a "float" type _without_
211 * changing the bit pattern
212 */
213#define amx_ftoc(f) ( * ((cell*)&f) ) /* float to cell */
214#define amx_ctof(c) ( * ((float*)&c) ) /* cell to float */
215
216#define amx_StrParam(amx,param,result) { \
217 cell *amx_cstr_; int amx_length_; \
218 amx_GetAddr((amx), (param), &amx_cstr_); \
219 amx_StrLen(amx_cstr_, &amx_length_); \
220 if (amx_length_ > 0 && \
221 ((result) = (char *)alloca(amx_length_ + 1))) \
222 amx_GetString((result), amx_cstr_); \
223 else (result) = NULL; \
224}
225
226#endif /* __AMX_H */
diff --git a/libraries/embryo/src/bin/embryo_cc_prefix.c b/libraries/embryo/src/bin/embryo_cc_prefix.c
deleted file mode 100644
index 9b57704..0000000
--- a/libraries/embryo/src/bin/embryo_cc_prefix.c
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Eina.h>
6
7#include "embryo_cc_prefix.h"
8
9/* local subsystem functions */
10
11/* local subsystem globals */
12
13static Eina_Prefix *pfx = NULL;
14
15/* externally accessible functions */
16int
17e_prefix_determine(char *argv0)
18{
19 if (pfx) return 1;
20 eina_init();
21 pfx = eina_prefix_new(argv0, e_prefix_determine,
22 "EMBRYO", "embryo", "include/default.inc",
23 PACKAGE_BIN_DIR,
24 PACKAGE_LIB_DIR,
25 PACKAGE_DATA_DIR,
26 PACKAGE_DATA_DIR);
27 if (!pfx) return 0;
28 return 1;
29}
30
31void
32e_prefix_shutdown(void)
33{
34 eina_prefix_free(pfx);
35 pfx = NULL;
36 eina_shutdown();
37}
38
39const char *
40e_prefix_get(void)
41{
42 return eina_prefix_get(pfx);
43}
44
45const char *
46e_prefix_bin_get(void)
47{
48 return eina_prefix_bin_get(pfx);
49}
50
51const char *
52e_prefix_data_get(void)
53{
54 return eina_prefix_data_get(pfx);
55}
56
57const char *
58e_prefix_lib_get(void)
59{
60 return eina_prefix_lib_get(pfx);
61}
diff --git a/libraries/embryo/src/bin/embryo_cc_prefix.h b/libraries/embryo/src/bin/embryo_cc_prefix.h
deleted file mode 100644
index d6dc7b2..0000000
--- a/libraries/embryo/src/bin/embryo_cc_prefix.h
+++ /dev/null
@@ -1,6 +0,0 @@
1int e_prefix_determine(char *argv0);
2void e_prefix_shutdown(void);
3const char *e_prefix_get(void);
4const char *e_prefix_bin_get(void);
5const char *e_prefix_data_get(void);
6const char *e_prefix_lib_get(void);
diff --git a/libraries/embryo/src/bin/embryo_cc_sc.h b/libraries/embryo/src/bin/embryo_cc_sc.h
deleted file mode 100644
index e62cbc3..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc.h
+++ /dev/null
@@ -1,667 +0,0 @@
1/* Small compiler
2 *
3 * Drafted after the Small-C compiler Version 2.01, originally created
4 * by Ron Cain, july 1980, and enhanced by James E. Hendrix.
5 *
6 * This version comes close to a complete rewrite.
7 *
8 * Copyright R. Cain, 1980
9 * Copyright J.E. Hendrix, 1982, 1983
10 * Copyright T. Riemersma, 1997-2003
11 *
12 * Version: $Id: embryo_cc_sc.h 59489 2011-05-18 08:37:38Z raster $
13 *
14 * This software is provided "as-is", without any express or implied warranty.
15 * In no event will the authors be held liable for any damages arising from
16 * the use of this software.
17 *
18 * Permission is granted to anyone to use this software for any purpose,
19 * including commercial applications, and to alter it and redistribute it
20 * freely, subject to the following restrictions:
21 *
22 * 1. The origin of this software must not be misrepresented; you must not
23 * claim that you wrote the original software. If you use this software in
24 * a product, an acknowledgment in the product documentation would be
25 * appreciated but is not required.
26 * 2. Altered source versions must be plainly marked as such, and must not be
27 * misrepresented as being the original software.
28 * 3. This notice may not be removed or altered from any source distribution.
29 */
30
31#ifndef EMBRYO_CC_SC_H
32#define EMBRYO_CC_SC_H
33
34#include <limits.h>
35#include <stdarg.h>
36#include <stdio.h>
37#include <setjmp.h>
38
39#ifndef _MSC_VER
40# include <stdint.h>
41#else
42# include <stddef.h>
43# include <Evil.h>
44#endif
45
46#include "embryo_cc_amx.h"
47
48/* Note: the "cell" and "ucell" types are defined in AMX.H */
49
50#define PUBLIC_CHAR '@' /* character that defines a function "public" */
51#define CTRL_CHAR '\\' /* default control character */
52
53#define DIRSEP_CHAR '/' /* directory separator character */
54
55#define sDIMEN_MAX 2 /* maximum number of array dimensions */
56#define sDEF_LITMAX 500 /* initial size of the literal pool, in "cells" */
57#define sLINEMAX (640 * 1024) /* input line length (in characters) */
58#define sDEF_AMXSTACK 4096 /* default stack size for AMX files */
59#define sSTKMAX 80 /* stack for nested #includes and other uses */
60#define PREPROC_TERM '\x7f' /* termination character for preprocessor expressions (the "DEL" code) */
61#define sDEF_PREFIX "default.inc" /* default prefix filename */
62
63typedef intptr_t stkitem; /* type of items stored on the stack */
64
65typedef struct __s_arginfo
66{ /* function argument info */
67 char name[sNAMEMAX + 1];
68 char ident; /* iVARIABLE, iREFERENCE, iREFARRAY or iVARARGS */
69 char usage; /* uCONST */
70 int *tags; /* argument tag id. list */
71 int numtags; /* number of tags in the tag list */
72 int dim[sDIMEN_MAX];
73 int numdim; /* number of dimensions */
74 unsigned char hasdefault; /* bit0: is there a default value? bit6: "tagof"; bit7: "sizeof" */
75 union
76 {
77 cell val; /* default value */
78 struct
79 {
80 char *symname; /* name of another symbol */
81 short level; /* indirection level for that symbol */
82 } size; /* used for "sizeof" default value */
83 struct
84 {
85 cell *data; /* values of default array */
86 int size; /* complete length of default array */
87 int arraysize; /* size to reserve on the heap */
88 cell addr; /* address of the default array in the data segment */
89 } array;
90 } defvalue; /* default value, or pointer to default array */
91 int defvalue_tag; /* tag of the default value */
92} arginfo;
93
94/* Equate table, tagname table, library table */
95typedef struct __s_constvalue
96{
97 struct __s_constvalue *next;
98 char name[sNAMEMAX + 1];
99 cell value;
100 short index;
101} constvalue;
102
103/* Symbol table format
104 *
105 * The symbol name read from the input file is stored in "name", the
106 * value of "addr" is written to the output file. The address in "addr"
107 * depends on the class of the symbol:
108 * global offset into the data segment
109 * local offset relative to the stack frame
110 * label generated hexadecimal number
111 * function offset into code segment
112 */
113typedef struct __s_symbol
114{
115 struct __s_symbol *next;
116 struct __s_symbol *parent; /* hierarchical types (multi-dimensional arrays) */
117 char name[sNAMEMAX + 1];
118 unsigned int hash; /* value derived from name, for quicker searching */
119 cell addr; /* address or offset (or value for constant, index for native function) */
120 char vclass; /* sLOCAL if "addr" refers to a local symbol */
121 char ident; /* see below for possible values */
122 char usage; /* see below for possible values */
123 int compound; /* compound level (braces nesting level) */
124 int tag; /* tagname id */
125 union
126 {
127 int declared; /* label: how many local variables are declared */
128 int idxtag; /* array: tag of array indices */
129 constvalue *lib; /* native function: library it is part of *///??? use "stringlist"
130 } x; /* 'x' for 'extra' */
131 union
132 {
133 arginfo *arglist; /* types of all parameters for functions */
134 struct
135 {
136 cell length; /* arrays: length (size) */
137 short level; /* number of dimensions below this level */
138 } array;
139 } dim; /* for 'dimension', both functions and arrays */
140 int fnumber; /* static global variables: file number in which the declaration is visible */
141 struct __s_symbol **refer; /* referrer list, functions that "use" this symbol */
142 int numrefers; /* number of entries in the referrer list */
143} symbol;
144
145/* Possible entries for "ident". These are used in the "symbol", "value"
146 * and arginfo structures. Not every constant is valid for every use.
147 * In an argument list, the list is terminated with a "zero" ident; labels
148 * cannot be passed as function arguments, so the value 0 is overloaded.
149 */
150#define iLABEL 0
151#define iVARIABLE 1 /* cell that has an address and that can be fetched directly (lvalue) */
152#define iREFERENCE 2 /* iVARIABLE, but must be dereferenced */
153#define iARRAY 3
154#define iREFARRAY 4 /* an array passed by reference (i.e. a pointer) */
155#define iARRAYCELL 5 /* array element, cell that must be fetched indirectly */
156#define iARRAYCHAR 6 /* array element, character from cell from array */
157#define iEXPRESSION 7 /* expression result, has no address (rvalue) */
158#define iCONSTEXPR 8 /* constant expression (or constant symbol) */
159#define iFUNCTN 9
160#define iREFFUNC 10 /* function passed as a parameter */
161#define iVARARGS 11 /* function specified ... as argument(s) */
162
163/* Possible entries for "usage"
164 *
165 * This byte is used as a serie of bits, the syntax is different for
166 * functions and other symbols:
167 *
168 * VARIABLE
169 * bits: 0 (uDEFINE) the variable is defined in the source file
170 * 1 (uREAD) the variable is "read" (accessed) in the source file
171 * 2 (uWRITTEN) the variable is altered (assigned a value)
172 * 3 (uCONST) the variable is constant (may not be assigned to)
173 * 4 (uPUBLIC) the variable is public
174 * 6 (uSTOCK) the variable is discardable (without warning)
175 *
176 * FUNCTION
177 * bits: 0 (uDEFINE) the function is defined ("implemented") in the source file
178 * 1 (uREAD) the function is invoked in the source file
179 * 2 (uRETVALUE) the function returns a value (or should return a value)
180 * 3 (uPROTOTYPED) the function was prototyped
181 * 4 (uPUBLIC) the function is public
182 * 5 (uNATIVE) the function is native
183 * 6 (uSTOCK) the function is discardable (without warning)
184 * 7 (uMISSING) the function is not implemented in this source file
185 *
186 * CONSTANT
187 * bits: 0 (uDEFINE) the symbol is defined in the source file
188 * 1 (uREAD) the constant is "read" (accessed) in the source file
189 * 3 (uPREDEF) the constant is pre-defined and should be kept between passes
190 */
191#define uDEFINE 0x01
192#define uREAD 0x02
193#define uWRITTEN 0x04
194#define uRETVALUE 0x04 /* function returns (or should return) a value */
195#define uCONST 0x08
196#define uPROTOTYPED 0x08
197#define uPREDEF 0x08 /* constant is pre-defined */
198#define uPUBLIC 0x10
199#define uNATIVE 0x20
200#define uSTOCK 0x40
201#define uMISSING 0x80
202/* uRETNONE is not stored in the "usage" field of a symbol. It is
203 * used during parsing a function, to detect a mix of "return;" and
204 * "return value;" in a few special cases.
205 */
206#define uRETNONE 0x10
207
208#define uTAGOF 0x40 /* set in the "hasdefault" field of the arginfo struct */
209#define uSIZEOF 0x80 /* set in the "hasdefault" field of the arginfo struct */
210
211#define uMAINFUNC "main"
212
213#define sGLOBAL 0 /* global/local variable/constant class */
214#define sLOCAL 1
215#define sSTATIC 2 /* global life, local scope */
216
217typedef struct
218{
219 symbol *sym; /* symbol in symbol table, NULL for (constant) expression */
220 cell constval; /* value of the constant expression (if ident==iCONSTEXPR)
221 * also used for the size of a literal array */
222 int tag; /* tagname id (of the expression) */
223 char ident; /* iCONSTEXPR, iVARIABLE, iARRAY, iARRAYCELL,
224 * iEXPRESSION or iREFERENCE */
225 char boolresult; /* boolean result for relational operators */
226 cell *arrayidx; /* last used array indices, for checking self assignment */
227} value;
228
229/* "while" statement queue (also used for "for" and "do - while" loops) */
230enum
231{
232 wqBRK, /* used to restore stack for "break" */
233 wqCONT, /* used to restore stack for "continue" */
234 wqLOOP, /* loop start label number */
235 wqEXIT, /* loop exit label number (jump if false) */
236 /* --- */
237 wqSIZE /* "while queue" size */
238};
239
240#define wqTABSZ (24*wqSIZE) /* 24 nested loop statements */
241
242enum
243{
244 statIDLE, /* not compiling yet */
245 statFIRST, /* first pass */
246 statWRITE, /* writing output */
247 statSKIP, /* skipping output */
248};
249
250typedef struct __s_stringlist
251{
252 struct __s_stringlist *next;
253 char *line;
254} stringlist;
255
256typedef struct __s_stringpair
257{
258 struct __s_stringpair *next;
259 char *first;
260 char *second;
261 int matchlength;
262} stringpair;
263
264/* macros for code generation */
265#define opcodes(n) ((n)*sizeof(cell)) /* opcode size */
266#define opargs(n) ((n)*sizeof(cell)) /* size of typical argument */
267
268/* Tokens recognized by lex()
269 * Some of these constants are assigned as well to the variable "lastst"
270 */
271#define tFIRST 256 /* value of first multi-character operator */
272#define tMIDDLE 279 /* value of last multi-character operator */
273#define tLAST 320 /* value of last multi-character match-able token */
274/* multi-character operators */
275#define taMULT 256 /* *= */
276#define taDIV 257 /* /= */
277#define taMOD 258 /* %= */
278#define taADD 259 /* += */
279#define taSUB 260 /* -= */
280#define taSHL 261 /* <<= */
281#define taSHRU 262 /* >>>= */
282#define taSHR 263 /* >>= */
283#define taAND 264 /* &= */
284#define taXOR 265 /* ^= */
285#define taOR 266 /* |= */
286#define tlOR 267 /* || */
287#define tlAND 268 /* && */
288#define tlEQ 269 /* == */
289#define tlNE 270 /* != */
290#define tlLE 271 /* <= */
291#define tlGE 272 /* >= */
292#define tSHL 273 /* << */
293#define tSHRU 274 /* >>> */
294#define tSHR 275 /* >> */
295#define tINC 276 /* ++ */
296#define tDEC 277 /* -- */
297#define tELLIPS 278 /* ... */
298#define tDBLDOT 279 /* .. */
299/* reserved words (statements) */
300#define tASSERT 280
301#define tBREAK 281
302#define tCASE 282
303#define tCHAR 283
304#define tCONST 284
305#define tCONTINUE 285
306#define tDEFAULT 286
307#define tDEFINED 287
308#define tDO 288
309#define tELSE 289
310#define tENUM 290
311#define tEXIT 291
312#define tFOR 292
313#define tFORWARD 293
314#define tGOTO 294
315#define tIF 295
316#define tNATIVE 296
317#define tNEW 297
318#define tOPERATOR 298
319#define tPUBLIC 299
320#define tRETURN 300
321#define tSIZEOF 301
322#define tSLEEP 302
323#define tSTATIC 303
324#define tSTOCK 304
325#define tSWITCH 305
326#define tTAGOF 306
327#define tWHILE 307
328/* compiler directives */
329#define tpASSERT 308 /* #assert */
330#define tpDEFINE 309
331#define tpELSE 310 /* #else */
332#define tpEMIT 311
333#define tpENDIF 312
334#define tpENDINPUT 313
335#define tpENDSCRPT 314
336#define tpFILE 315
337#define tpIF 316 /* #if */
338#define tINCLUDE 317
339#define tpLINE 318
340#define tpPRAGMA 319
341#define tpUNDEF 320
342/* semicolon is a special case, because it can be optional */
343#define tTERM 321 /* semicolon or newline */
344#define tENDEXPR 322 /* forced end of expression */
345/* other recognized tokens */
346#define tNUMBER 323 /* integer number */
347#define tRATIONAL 324 /* rational number */
348#define tSYMBOL 325
349#define tLABEL 326
350#define tSTRING 327
351#define tEXPR 328 /* for assigment to "lastst" only */
352
353/* (reversed) evaluation of staging buffer */
354#define sSTARTREORDER 1
355#define sENDREORDER 2
356#define sEXPRSTART 0xc0 /* top 2 bits set, rest is free */
357#define sMAXARGS 64 /* relates to the bit pattern of sEXPRSTART */
358
359/* codes for ffabort() */
360#define xEXIT 1 /* exit code in PRI */
361#define xASSERTION 2 /* abort caused by failing assertion */
362#define xSTACKERROR 3 /* stack/heap overflow */
363#define xBOUNDSERROR 4 /* array index out of bounds */
364#define xMEMACCESS 5 /* data access error */
365#define xINVINSTR 6 /* invalid instruction */
366#define xSTACKUNDERFLOW 7 /* stack underflow */
367#define xHEAPUNDERFLOW 8 /* heap underflow */
368#define xCALLBACKERR 9 /* no, or invalid, callback */
369#define xSLEEP 12 /* sleep, exit code in PRI, tag in ALT */
370
371/* Miscellaneous */
372#if !defined TRUE
373#define FALSE 0
374#define TRUE 1
375#endif
376#define sIN_CSEG 1 /* if parsing CODE */
377#define sIN_DSEG 2 /* if parsing DATA */
378#define sCHKBOUNDS 1 /* bit position in "debug" variable: check bounds */
379#define sSYMBOLIC 2 /* bit position in "debug" variable: symbolic info */
380#define sNOOPTIMIZE 4 /* bit position in "debug" variable: no optimization */
381#define sRESET 0 /* reset error flag */
382#define sFORCESET 1 /* force error flag on */
383#define sEXPRMARK 2 /* mark start of expression */
384#define sEXPRRELEASE 3 /* mark end of expression */
385
386#if INT_MAX<0x8000u
387#define PUBLICTAG 0x8000u
388#define FIXEDTAG 0x4000u
389#else
390#define PUBLICTAG 0x80000000Lu
391#define FIXEDTAG 0x40000000Lu
392#endif
393#define TAGMASK (~PUBLICTAG)
394
395
396/*
397 * Functions you call from the "driver" program
398 */
399 int sc_compile(int argc, char **argv);
400 int sc_addconstant(char *name, cell value, int tag);
401 int sc_addtag(char *name);
402
403/*
404 * Functions called from the compiler (to be implemented by you)
405 */
406
407/* general console output */
408 int sc_printf(const char *message, ...);
409
410/* error report function */
411 int sc_error(int number, char *message, char *filename,
412 int firstline, int lastline, va_list argptr);
413
414/* input from source file */
415 void *sc_opensrc(char *filename); /* reading only */
416 void sc_closesrc(void *handle); /* never delete */
417 void sc_resetsrc(void *handle, void *position); /* reset to a position marked earlier */
418 char *sc_readsrc(void *handle, char *target, int maxchars);
419 void *sc_getpossrc(void *handle); /* mark the current position */
420 int sc_eofsrc(void *handle);
421
422/* output to intermediate (.ASM) file */
423 void *sc_openasm(int fd); /* read/write */
424 void sc_closeasm(void *handle);
425 void sc_resetasm(void *handle);
426 int sc_writeasm(void *handle, char *str);
427 char *sc_readasm(void *handle, char *target, int maxchars);
428
429/* output to binary (.AMX) file */
430 void *sc_openbin(char *filename);
431 void sc_closebin(void *handle, int deletefile);
432 void sc_resetbin(void *handle);
433 int sc_writebin(void *handle, void *buffer, int size);
434 long sc_lengthbin(void *handle); /* return the length of the file */
435
436/* function prototypes in SC1.C */
437symbol *fetchfunc(char *name, int tag);
438char *operator_symname(char *symname, char *opername, int tag1,
439 int tag2, int numtags, int resulttag);
440char *funcdisplayname(char *dest, char *funcname);
441int constexpr(cell * val, int *tag);
442constvalue *append_constval(constvalue * table, char *name, cell val,
443 short index);
444constvalue *find_constval(constvalue * table, char *name, short index);
445void delete_consttable(constvalue * table);
446void add_constant(char *name, cell val, int vclass, int tag);
447void exporttag(int tag);
448
449/* function prototypes in SC2.C */
450void pushstk(stkitem val);
451stkitem popstk(void);
452int plungequalifiedfile(char *name); /* explicit path included */
453int plungefile(char *name, int try_currentpath, int try_includepaths); /* search through "include" paths */
454void preprocess(void);
455void lexinit(void);
456int lex(cell * lexvalue, char **lexsym);
457void lexpush(void);
458void lexclr(int clreol);
459int matchtoken(int token);
460int tokeninfo(cell * val, char **str);
461int needtoken(int token);
462void stowlit(cell value);
463int alphanum(char c);
464void delete_symbol(symbol * root, symbol * sym);
465void delete_symbols(symbol * root, int level, int del_labels,
466 int delete_functions);
467int refer_symbol(symbol * entry, symbol * bywhom);
468void markusage(symbol * sym, int usage);
469unsigned int namehash(char *name);
470symbol *findglb(char *name);
471symbol *findloc(char *name);
472symbol *findconst(char *name);
473symbol *finddepend(symbol * parent);
474symbol *addsym(char *name, cell addr, int ident, int vclass,
475 int tag, int usage);
476symbol *addvariable(char *name, cell addr, int ident, int vclass,
477 int tag, int dim[], int numdim, int idxtag[]);
478int getlabel(void);
479char *itoh(ucell val);
480
481/* function prototypes in SC3.C */
482int check_userop(void (*oper) (void), int tag1, int tag2,
483 int numparam, value * lval, int *resulttag);
484int matchtag(int formaltag, int actualtag, int allowcoerce);
485int expression(int *constant, cell * val, int *tag,
486 int chkfuncresult);
487int hier14(value * lval1); /* the highest expression level */
488
489/* function prototypes in SC4.C */
490void writeleader(void);
491void writetrailer(void);
492void begcseg(void);
493void begdseg(void);
494void setactivefile(int fnumber);
495cell nameincells(char *name);
496void setfile(char *name, int fileno);
497void setline(int line, int fileno);
498void setlabel(int index);
499void endexpr(int fullexpr);
500void startfunc(char *fname);
501void endfunc(void);
502void alignframe(int numbytes);
503void defsymbol(char *name, int ident, int vclass, cell offset,
504 int tag);
505void symbolrange(int level, cell size);
506void rvalue(value * lval);
507void address(symbol * ptr);
508void store(value * lval);
509void memcopy(cell size);
510void copyarray(symbol * sym, cell size);
511void fillarray(symbol * sym, cell size, cell value);
512void const1(cell val);
513void const2(cell val);
514void moveto1(void);
515void push1(void);
516void push2(void);
517void pushval(cell val);
518void pop1(void);
519void pop2(void);
520void swap1(void);
521void ffswitch(int label);
522void ffcase(cell value, char *labelname, int newtable);
523void ffcall(symbol * sym, int numargs);
524void ffret(void);
525void ffabort(int reason);
526void ffbounds(cell size);
527void jumplabel(int number);
528void defstorage(void);
529void modstk(int delta);
530void setstk(cell value);
531void modheap(int delta);
532void setheap_pri(void);
533void setheap(cell value);
534void cell2addr(void);
535void cell2addr_alt(void);
536void addr2cell(void);
537void char2addr(void);
538void charalign(void);
539void addconst(cell value);
540
541/* Code generation functions for arithmetic operators.
542 *
543 * Syntax: o[u|s|b]_name
544 * | | | +--- name of operator
545 * | | +----- underscore
546 * | +--------- "u"nsigned operator, "s"igned operator or "b"oth
547 * +------------- "o"perator
548 */
549void os_mult(void); /* multiplication (signed) */
550void os_div(void); /* division (signed) */
551void os_mod(void); /* modulus (signed) */
552void ob_add(void); /* addition */
553void ob_sub(void); /* subtraction */
554void ob_sal(void); /* shift left (arithmetic) */
555void os_sar(void); /* shift right (arithmetic, signed) */
556void ou_sar(void); /* shift right (logical, unsigned) */
557void ob_or(void); /* bitwise or */
558void ob_xor(void); /* bitwise xor */
559void ob_and(void); /* bitwise and */
560void ob_eq(void); /* equality */
561void ob_ne(void); /* inequality */
562void relop_prefix(void);
563void relop_suffix(void);
564void os_le(void); /* less or equal (signed) */
565void os_ge(void); /* greater or equal (signed) */
566void os_lt(void); /* less (signed) */
567void os_gt(void); /* greater (signed) */
568
569void lneg(void);
570void neg(void);
571void invert(void);
572void nooperation(void);
573void inc(value * lval);
574void dec(value * lval);
575void jmp_ne0(int number);
576void jmp_eq0(int number);
577void outval(cell val, int newline);
578
579/* function prototypes in SC5.C */
580int error(int number, ...);
581void errorset(int code);
582
583/* function prototypes in SC6.C */
584void assemble(FILE * fout, FILE * fin);
585
586/* function prototypes in SC7.C */
587void stgbuffer_cleanup(void);
588void stgmark(char mark);
589void stgwrite(char *st);
590void stgout(int index);
591void stgdel(int index, cell code_index);
592int stgget(int *index, cell * code_index);
593void stgset(int onoff);
594int phopt_init(void);
595int phopt_cleanup(void);
596
597/* function prototypes in SCLIST.C */
598stringpair *insert_alias(char *name, char *alias);
599stringpair *find_alias(char *name);
600int lookup_alias(char *target, char *name);
601void delete_aliastable(void);
602stringlist *insert_path(char *path);
603char *get_path(int index);
604void delete_pathtable(void);
605stringpair *insert_subst(char *pattern, char *substitution,
606 int prefixlen);
607int get_subst(int index, char **pattern, char **substitution);
608stringpair *find_subst(char *name, int length);
609int delete_subst(char *name, int length);
610void delete_substtable(void);
611
612/* external variables (defined in scvars.c) */
613extern symbol loctab; /* local symbol table */
614extern symbol glbtab; /* global symbol table */
615extern cell *litq; /* the literal queue */
616extern char pline[]; /* the line read from the input file */
617extern char *lptr; /* points to the current position in "pline" */
618extern constvalue tagname_tab; /* tagname table */
619extern constvalue libname_tab; /* library table (#pragma library "..." syntax) *///??? use "stringlist" type
620extern constvalue *curlibrary; /* current library */
621extern symbol *curfunc; /* pointer to current function */
622extern char *inpfname; /* name of the file currently read from */
623extern char outfname[]; /* output file name */
624extern char sc_ctrlchar; /* the control character (or escape character) */
625extern int litidx; /* index to literal table */
626extern int litmax; /* current size of the literal table */
627extern int stgidx; /* index to the staging buffer */
628extern int labnum; /* number of (internal) labels */
629extern int staging; /* true if staging output */
630extern cell declared; /* number of local cells declared */
631extern cell glb_declared; /* number of global cells declared */
632extern cell code_idx; /* number of bytes with generated code */
633extern int ntv_funcid; /* incremental number of native function */
634extern int errnum; /* number of errors */
635extern int warnnum; /* number of warnings */
636extern int sc_debug; /* debug/optimization options (bit field) */
637extern int charbits; /* number of bits for a character */
638extern int sc_packstr; /* strings are packed by default? */
639extern int sc_asmfile; /* create .ASM file? */
640extern int sc_listing; /* create .LST file? */
641extern int sc_compress; /* compress bytecode? */
642extern int sc_needsemicolon; /* semicolon required to terminate expressions? */
643extern int sc_dataalign; /* data alignment value */
644extern int sc_alignnext; /* must frame of the next function be aligned? */
645extern int curseg; /* 1 if currently parsing CODE, 2 if parsing DATA */
646extern cell sc_stksize; /* stack size */
647extern int freading; /* is there an input file ready for reading? */
648extern int fline; /* the line number in the current file */
649extern int fnumber; /* number of files in the file table (debugging) */
650extern int fcurrent; /* current file being processed (debugging) */
651extern int intest; /* true if inside a test */
652extern int sideeffect; /* true if an expression causes a side-effect */
653extern int stmtindent; /* current indent of the statement */
654extern int indent_nowarn; /* skip warning "217 loose indentation" */
655extern int sc_tabsize; /* number of spaces that a TAB represents */
656extern int sc_allowtags; /* allow/detect tagnames in lex() */
657extern int sc_status; /* read/write status */
658extern int sc_rationaltag; /* tag for rational numbers */
659extern int rational_digits; /* number of fractional digits */
660
661extern FILE *inpf; /* file read from (source or include) */
662extern FILE *inpf_org; /* main source file */
663extern FILE *outf; /* file written to */
664
665extern jmp_buf errbuf; /* target of longjmp() on a fatal error */
666
667#endif
diff --git a/libraries/embryo/src/bin/embryo_cc_sc1.c b/libraries/embryo/src/bin/embryo_cc_sc1.c
deleted file mode 100644
index b28b6f3..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc1.c
+++ /dev/null
@@ -1,4079 +0,0 @@
1/* Small compiler
2 * Function and variable definition and declaration, statement parser.
3 *
4 * Copyright (c) ITB CompuPhase, 1997-2003
5 *
6 * This software is provided "as-is", without any express or implied
7 * warranty. In no event will the authors be held liable for any
8 * damages arising from the use of this software. Permission is granted
9 * to anyone to use this software for any purpose, including commercial
10 * applications, and to alter it and redistribute it freely, subject to
11 * the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented;
14 * you must not claim that you wrote the original software.
15 * If you use this software in a product, an acknowledgment in the
16 * product documentation would be appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and
18 * must not be misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source
20 * distribution.
21 * Version: $Id: embryo_cc_sc1.c 61433 2011-07-16 23:19:02Z caro $
22 */
23
24
25#ifdef HAVE_CONFIG_H
26# include <config.h>
27#endif
28
29#include <assert.h>
30#include <ctype.h>
31#include <limits.h>
32#include <stdarg.h>
33#include <stdio.h>
34#include <stdlib.h>
35#include <string.h>
36
37#ifdef HAVE_UNISTD_H
38# include <unistd.h>
39#endif
40
41#ifdef HAVE_EVIL
42# include <Evil.h>
43#endif /* HAVE_EVIL */
44
45#include "embryo_cc_sc.h"
46#include "embryo_cc_prefix.h"
47
48#define VERSION_STR "2.4"
49#define VERSION_INT 240
50
51static void resetglobals(void);
52static void initglobals(void);
53static void setopt(int argc, char **argv,
54 char *iname, char *oname,
55 char *pname, char *rname);
56static void setconfig(char *root);
57static void about(void);
58static void setconstants(void);
59static void parse(void);
60static void dumplits(void);
61static void dumpzero(int count);
62static void declfuncvar(int tok, char *symname,
63 int tag, int fpublic,
64 int fstatic, int fstock, int fconst);
65static void declglb(char *firstname, int firsttag,
66 int fpublic, int fstatic, int stock, int fconst);
67static int declloc(int fstatic);
68static void decl_const(int table);
69static void decl_enum(int table);
70static cell needsub(int *tag);
71static void initials(int ident, int tag,
72 cell * size, int dim[], int numdim);
73static cell initvector(int ident, int tag, cell size, int fillzero);
74static cell init(int ident, int *tag);
75static void funcstub(int native);
76static int newfunc(char *firstname, int firsttag,
77 int fpublic, int fstatic, int stock);
78static int declargs(symbol * sym);
79static void doarg(char *name, int ident, int offset,
80 int tags[], int numtags,
81 int fpublic, int fconst, arginfo * arg);
82static void reduce_referrers(symbol * root);
83static int testsymbols(symbol * root, int level,
84 int testlabs, int testconst);
85static void destructsymbols(symbol * root, int level);
86static constvalue *find_constval_byval(constvalue * table, cell val);
87static void statement(int *lastindent, int allow_decl);
88static void compound(void);
89static void doexpr(int comma, int chkeffect,
90 int allowarray, int mark_endexpr,
91 int *tag, int chkfuncresult);
92static void doassert(void);
93static void doexit(void);
94static void test(int label, int parens, int invert);
95static void doif(void);
96static void dowhile(void);
97static void dodo(void);
98static void dofor(void);
99static void doswitch(void);
100static void dogoto(void);
101static void dolabel(void);
102static symbol *fetchlab(char *name);
103static void doreturn(void);
104static void dobreak(void);
105static void docont(void);
106static void dosleep(void);
107static void addwhile(int *ptr);
108static void delwhile(void);
109static int *readwhile(void);
110
111static int lastst = 0; /* last executed statement type */
112static int nestlevel = 0; /* number of active (open) compound statements */
113static int rettype = 0; /* the type that a "return" expression should have */
114static int skipinput = 0; /* number of lines to skip from the first input file */
115static int wq[wqTABSZ]; /* "while queue", internal stack for nested loops */
116static int *wqptr; /* pointer to next entry */
117static char binfname[PATH_MAX]; /* binary file name */
118
119int
120main(int argc, char *argv[], char *env[] __UNUSED__)
121{
122 e_prefix_determine(argv[0]);
123 return sc_compile(argc, argv);
124}
125
126int
127sc_error(int number, char *message, char *filename, int firstline,
128 int lastline, va_list argptr)
129{
130 static char *prefix[3] = { "error", "fatal error", "warning" };
131
132 if (number != 0)
133 {
134 char *pre;
135
136 pre = prefix[number / 100];
137 if (firstline >= 0)
138 fprintf(stderr, "%s(%d -- %d) : %s %03d: ", filename, firstline,
139 lastline, pre, number);
140 else
141 fprintf(stderr, "%s(%d) : %s %03d: ", filename, lastline, pre,
142 number);
143 } /* if */
144 vfprintf(stderr, message, argptr);
145 fflush(stderr);
146 return 0;
147}
148
149void *
150sc_opensrc(char *filename)
151{
152 return fopen(filename, "rb");
153}
154
155void
156sc_closesrc(void *handle)
157{
158 assert(handle != NULL);
159 fclose((FILE *) handle);
160}
161
162void
163sc_resetsrc(void *handle, void *position)
164{
165 assert(handle != NULL);
166 fsetpos((FILE *) handle, (fpos_t *) position);
167}
168
169char *
170sc_readsrc(void *handle, char *target, int maxchars)
171{
172 return fgets(target, maxchars, (FILE *) handle);
173}
174
175void *
176sc_getpossrc(void *handle)
177{
178 static fpos_t lastpos; /* may need to have a LIFO stack of
179 * such positions */
180
181 fgetpos((FILE *) handle, &lastpos);
182 return &lastpos;
183}
184
185int
186sc_eofsrc(void *handle)
187{
188 return feof((FILE *) handle);
189}
190
191void *
192sc_openasm(int fd)
193{
194 return fdopen(fd, "w+");
195}
196
197void
198sc_closeasm(void *handle)
199{
200 if (handle)
201 fclose((FILE *) handle);
202}
203
204void
205sc_resetasm(void *handle)
206{
207 fflush((FILE *) handle);
208 fseek((FILE *) handle, 0, SEEK_SET);
209}
210
211int
212sc_writeasm(void *handle, char *st)
213{
214 return fputs(st, (FILE *) handle) >= 0;
215}
216
217char *
218sc_readasm(void *handle, char *target, int maxchars)
219{
220 return fgets(target, maxchars, (FILE *) handle);
221}
222
223void *
224sc_openbin(char *filename)
225{
226 return fopen(filename, "wb");
227}
228
229void
230sc_closebin(void *handle, int deletefile)
231{
232 fclose((FILE *) handle);
233 if (deletefile)
234 unlink(binfname);
235}
236
237void
238sc_resetbin(void *handle)
239{
240 fflush((FILE *) handle);
241 fseek((FILE *) handle, 0, SEEK_SET);
242}
243
244int
245sc_writebin(void *handle, void *buffer, int size)
246{
247 return (int)fwrite(buffer, 1, size, (FILE *) handle) == size;
248}
249
250long
251sc_lengthbin(void *handle)
252{
253 return ftell((FILE *) handle);
254}
255
256/* "main" of the compiler
257 */
258int
259sc_compile(int argc, char *argv[])
260{
261 int entry, i, jmpcode, fd_out;
262 int retcode;
263 char incfname[PATH_MAX];
264 char reportname[PATH_MAX];
265 FILE *binf;
266 void *inpfmark;
267 char lcl_ctrlchar;
268 int lcl_packstr, lcl_needsemicolon, lcl_tabsize;
269 char *tmpdir;
270
271 /* set global variables to their initial value */
272 binf = NULL;
273 initglobals();
274 errorset(sRESET);
275 errorset(sEXPRRELEASE);
276 lexinit();
277
278 /* make sure that we clean up on a fatal error; do this before the
279 * first call to error(). */
280 if ((jmpcode = setjmp(errbuf)) != 0)
281 goto cleanup;
282
283 /* allocate memory for fixed tables */
284 inpfname = (char *)malloc(PATH_MAX);
285 litq = (cell *) malloc(litmax * sizeof(cell));
286 if (!litq)
287 error(103); /* insufficient memory */
288 if (!phopt_init())
289 error(103); /* insufficient memory */
290
291 setopt(argc, argv, inpfname, binfname, incfname, reportname);
292
293 /* open the output file */
294
295#ifndef HAVE_EVIL
296 tmpdir = getenv("TMPDIR");
297 if (!tmpdir) tmpdir = "/tmp";
298#else
299 tmpdir = (char *)evil_tmpdir_get();
300#endif /* ! HAVE_EVIL */
301
302 snprintf(outfname, PATH_MAX, "%s/embryo_cc.asm-tmp-XXXXXX", tmpdir);
303 fd_out = mkstemp(outfname);
304 if (fd_out < 0)
305 error(101, outfname);
306
307 setconfig(argv[0]); /* the path to the include files */
308 lcl_ctrlchar = sc_ctrlchar;
309 lcl_packstr = sc_packstr;
310 lcl_needsemicolon = sc_needsemicolon;
311 lcl_tabsize = sc_tabsize;
312 inpf = inpf_org = (FILE *) sc_opensrc(inpfname);
313 if (!inpf)
314 error(100, inpfname);
315 freading = TRUE;
316 outf = (FILE *) sc_openasm(fd_out); /* first write to assembler
317 * file (may be temporary) */
318 if (!outf)
319 error(101, outfname);
320 /* immediately open the binary file, for other programs to check */
321 binf = (FILE *) sc_openbin(binfname);
322 if (!binf)
323 error(101, binfname);
324 setconstants(); /* set predefined constants and tagnames */
325 for (i = 0; i < skipinput; i++) /* skip lines in the input file */
326 if (sc_readsrc(inpf, pline, sLINEMAX))
327 fline++; /* keep line number up to date */
328 skipinput = fline;
329 sc_status = statFIRST;
330 /* do the first pass through the file */
331 inpfmark = sc_getpossrc(inpf);
332 if (incfname[0] != '\0')
333 {
334 if (strcmp(incfname, sDEF_PREFIX) == 0)
335 {
336 plungefile(incfname, FALSE, TRUE); /* parse "default.inc" */
337 }
338 else
339 {
340 if (!plungequalifiedfile(incfname)) /* parse "prefix" include
341 * file */
342 error(100, incfname); /* cannot read from ... (fatal error) */
343 } /* if */
344 } /* if */
345 preprocess(); /* fetch first line */
346 parse(); /* process all input */
347
348 /* second pass */
349 sc_status = statWRITE; /* set, to enable warnings */
350
351 /* ??? for re-parsing the listing file instead of the original source
352 * file (and doing preprocessing twice):
353 * - close input file, close listing file
354 * - re-open listing file for reading (inpf)
355 * - open assembler file (outf)
356 */
357
358 /* reset "defined" flag of all functions and global variables */
359 reduce_referrers(&glbtab);
360 delete_symbols(&glbtab, 0, TRUE, FALSE);
361#if !defined NO_DEFINE
362 delete_substtable();
363#endif
364 resetglobals();
365 sc_ctrlchar = lcl_ctrlchar;
366 sc_packstr = lcl_packstr;
367 sc_needsemicolon = lcl_needsemicolon;
368 sc_tabsize = lcl_tabsize;
369 errorset(sRESET);
370 /* reset the source file */
371 inpf = inpf_org;
372 freading = TRUE;
373 sc_resetsrc(inpf, inpfmark); /* reset file position */
374 fline = skipinput; /* reset line number */
375 lexinit(); /* clear internal flags of lex() */
376 sc_status = statWRITE; /* allow to write --this variable was reset
377 * by resetglobals() */
378 writeleader();
379 setfile(inpfname, fnumber);
380 if (incfname[0] != '\0')
381 {
382 if (strcmp(incfname, sDEF_PREFIX) == 0)
383 plungefile(incfname, FALSE, TRUE); /* parse "default.inc" (again) */
384 else
385 plungequalifiedfile(incfname); /* parse implicit include
386 * file (again) */
387 } /* if */
388 preprocess(); /* fetch first line */
389 parse(); /* process all input */
390 /* inpf is already closed when readline() attempts to pop of a file */
391 writetrailer(); /* write remaining stuff */
392
393 entry = testsymbols(&glbtab, 0, TRUE, FALSE); /* test for unused
394 * or undefined functions and variables */
395 if (!entry)
396 error(13); /* no entry point (no public functions) */
397
398 cleanup:
399 if (inpf) /* main source file is not closed, do it now */
400 sc_closesrc(inpf);
401 /* write the binary file (the file is already open) */
402 if (errnum == 0 && jmpcode == 0)
403 {
404 assert(binf != NULL);
405 sc_resetasm(outf); /* flush and loop back, for reading */
406 assemble(binf, outf); /* assembler file is now input */
407 } /* if */
408 if (outf)
409 sc_closeasm(outf);
410 unlink (outfname);
411 if (binf)
412 sc_closebin(binf, errnum != 0);
413
414 if (inpfname)
415 free(inpfname);
416 if (litq)
417 free(litq);
418 phopt_cleanup();
419 stgbuffer_cleanup();
420 assert(jmpcode != 0 || loctab.next == NULL); /* on normal flow,
421 * local symbols
422 * should already have been deleted */
423 delete_symbols(&loctab, 0, TRUE, TRUE); /* delete local variables
424 * if not yet done (i.e.
425 * on a fatal error) */
426 delete_symbols(&glbtab, 0, TRUE, TRUE);
427 delete_consttable(&tagname_tab);
428 delete_consttable(&libname_tab);
429 delete_aliastable();
430 delete_pathtable();
431#if !defined NO_DEFINE
432 delete_substtable();
433#endif
434 if (errnum != 0)
435 {
436 printf("\n%d Error%s.\n", errnum, (errnum > 1) ? "s" : "");
437 retcode = 2;
438 }
439 else if (warnnum != 0)
440 {
441 printf("\n%d Warning%s.\n", warnnum, (warnnum > 1) ? "s" : "");
442 retcode = 1;
443 }
444 else
445 {
446 retcode = jmpcode;
447 } /* if */
448 return retcode;
449}
450
451int
452sc_addconstant(char *name, cell value, int tag)
453{
454 errorset(sFORCESET); /* make sure error engine is silenced */
455 sc_status = statIDLE;
456 add_constant(name, value, sGLOBAL, tag);
457 return 1;
458}
459
460int
461sc_addtag(char *name)
462{
463 cell val;
464 constvalue *ptr;
465 int last, tag;
466
467 if (!name)
468 {
469 /* no tagname was given, check for one */
470 if (lex(&val, &name) != tLABEL)
471 {
472 lexpush();
473 return 0; /* untagged */
474 } /* if */
475 } /* if */
476
477 last = 0;
478 ptr = tagname_tab.next;
479 while (ptr)
480 {
481 tag = (int)(ptr->value & TAGMASK);
482 if (strcmp(name, ptr->name) == 0)
483 return tag; /* tagname is known, return its sequence number */
484 tag &= (int)~FIXEDTAG;
485 if (tag > last)
486 last = tag;
487 ptr = ptr->next;
488 } /* while */
489
490 /* tagname currently unknown, add it */
491 tag = last + 1; /* guaranteed not to exist already */
492 if (isupper(*name))
493 tag |= (int)FIXEDTAG;
494 append_constval(&tagname_tab, name, (cell) tag, 0);
495 return tag;
496}
497
498static void
499resetglobals(void)
500{
501 /* reset the subset of global variables that is modified by the
502 * first pass */
503 curfunc = NULL; /* pointer to current function */
504 lastst = 0; /* last executed statement type */
505 nestlevel = 0; /* number of active (open) compound statements */
506 rettype = 0; /* the type that a "return" expression should have */
507 litidx = 0; /* index to literal table */
508 stgidx = 0; /* index to the staging buffer */
509 labnum = 0; /* number of (internal) labels */
510 staging = 0; /* true if staging output */
511 declared = 0; /* number of local cells declared */
512 glb_declared = 0; /* number of global cells declared */
513 code_idx = 0; /* number of bytes with generated code */
514 ntv_funcid = 0; /* incremental number of native function */
515 curseg = 0; /* 1 if currently parsing CODE, 2 if parsing DATA */
516 freading = FALSE; /* no input file ready yet */
517 fline = 0; /* the line number in the current file */
518 fnumber = 0; /* the file number in the file table (debugging) */
519 fcurrent = 0; /* current file being processed (debugging) */
520 intest = 0; /* true if inside a test */
521 sideeffect = 0; /* true if an expression causes a side-effect */
522 stmtindent = 0; /* current indent of the statement */
523 indent_nowarn = TRUE; /* do not skip warning "217 loose indentation" */
524 sc_allowtags = TRUE; /* allow/detect tagnames */
525 sc_status = statIDLE;
526}
527
528static void
529initglobals(void)
530{
531 resetglobals();
532
533 skipinput = 0; /* number of lines to skip from the first
534 * input file */
535 sc_ctrlchar = CTRL_CHAR; /* the escape character */
536 litmax = sDEF_LITMAX; /* current size of the literal table */
537 errnum = 0; /* number of errors */
538 warnnum = 0; /* number of warnings */
539/* sc_debug=sCHKBOUNDS; by default: bounds checking+assertions */
540 sc_debug = 0; /* by default: no debug */
541 charbits = 8; /* a "char" is 8 bits */
542 sc_packstr = FALSE; /* strings are unpacked by default */
543/* sc_compress=TRUE; compress output bytecodes */
544 sc_compress = FALSE; /* compress output bytecodes */
545 sc_needsemicolon = FALSE; /* semicolon required to terminate
546 * expressions? */
547 sc_dataalign = 4;
548 sc_stksize = sDEF_AMXSTACK; /* default stack size */
549 sc_tabsize = 8; /* assume a TAB is 8 spaces */
550 sc_rationaltag = 0; /* assume no support for rational numbers */
551 rational_digits = 0; /* number of fractional digits */
552
553 outfname[0] = '\0'; /* output file name */
554 inpf = NULL; /* file read from */
555 inpfname = NULL; /* pointer to name of the file currently
556 * read from */
557 outf = NULL; /* file written to */
558 litq = NULL; /* the literal queue */
559 glbtab.next = NULL; /* clear global variables/constants table */
560 loctab.next = NULL; /* " local " / " " */
561 tagname_tab.next = NULL; /* tagname table */
562 libname_tab.next = NULL; /* library table (#pragma library "..."
563 * syntax) */
564
565 pline[0] = '\0'; /* the line read from the input file */
566 lptr = NULL; /* points to the current position in "pline" */
567 curlibrary = NULL; /* current library */
568 inpf_org = NULL; /* main source file */
569
570 wqptr = wq; /* initialize while queue pointer */
571
572}
573
574static void
575parseoptions(int argc, char **argv, char *iname, char *oname,
576 char *pname __UNUSED__, char *rname __UNUSED__)
577{
578 char str[PATH_MAX];
579 int i, stack_size;
580 size_t len;
581
582 /* use embryo include dir always */
583 snprintf(str, sizeof(str), "%s/include/", e_prefix_data_get());
584 insert_path(str);
585 insert_path("./");
586
587 for (i = 1; i < argc; i++)
588 {
589 if (!strcmp (argv[i], "-i") && (i + 1 < argc) && *argv[i + 1])
590 {
591 /* include directory */
592 i++;
593 strncpy(str, argv[i], sizeof(str));
594
595 len = strlen(str);
596 if (str[len - 1] != DIRSEP_CHAR)
597 {
598 str[len] = DIRSEP_CHAR;
599 str[len + 1] = '\0';
600 }
601
602 insert_path(str);
603 }
604 else if (!strcmp (argv[i], "-o") && (i + 1 < argc) && *argv[i + 1])
605 {
606 /* output file */
607 i++;
608 strcpy(oname, argv[i]); /* FIXME */
609 }
610 else if (!strcmp (argv[i], "-S") && (i + 1 < argc) && *argv[i + 1])
611 {
612 /* stack size */
613 i++;
614 stack_size = atoi(argv[i]);
615
616 if (stack_size > 64)
617 sc_stksize = (cell) stack_size;
618 else
619 about();
620 }
621 else if (!*iname)
622 {
623 /* input file */
624 strcpy(iname, argv[i]); /* FIXME */
625 }
626 else
627 {
628 /* only allow one input filename */
629 about();
630 }
631 }
632}
633
634static void
635setopt(int argc, char **argv, char *iname, char *oname,
636 char *pname, char *rname)
637{
638 *iname = '\0';
639 *oname = '\0';
640 *pname = '\0';
641 *rname = '\0';
642 strcpy(pname, sDEF_PREFIX);
643
644 parseoptions(argc, argv, iname, oname, pname, rname);
645 if (iname[0] == '\0')
646 about();
647}
648
649static void
650setconfig(char *root)
651{
652 char path[PATH_MAX];
653 char *ptr;
654 int len;
655
656 /* add the default "include" directory */
657 if (root)
658 {
659 /* path + filename (hopefully) */
660 strncpy(path, root, sizeof(path) - 1);
661 path[sizeof(path) - 1] = 0;
662 }
663/* terminate just behind last \ or : */
664 if ((ptr = strrchr(path, DIRSEP_CHAR))
665 || (ptr = strchr(path, ':')))
666 {
667 /* If there was no terminating "\" or ":",
668 * the filename probably does not
669 * contain the path; so we just don't add it
670 * to the list in that case
671 */
672 *(ptr + 1) = '\0';
673 if (strlen(path) < (sizeof(path) - 1 - 7))
674 {
675 strcat(path, "include");
676 }
677 len = strlen(path);
678 path[len] = DIRSEP_CHAR;
679 path[len + 1] = '\0';
680 insert_path(path);
681 } /* if */
682}
683
684static void
685about(void)
686{
687 printf("Usage: embryo_cc <filename> [options]\n\n");
688 printf("Options:\n");
689#if 0
690 printf
691 (" -A<num> alignment in bytes of the data segment and the\
692 stack\n");
693
694 printf
695 (" -a output assembler code (skip code generation\
696 pass)\n");
697
698 printf
699 (" -C[+/-] compact encoding for output file (default=%c)\n",
700 sc_compress ? '+' : '-');
701 printf(" -c8 [default] a character is 8-bits\
702 (ASCII/ISO Latin-1)\n");
703
704 printf(" -c16 a character is 16-bits (Unicode)\n");
705#if defined dos_setdrive
706 printf(" -Dpath active directory path\n");
707#endif
708 printf
709 (" -d0 no symbolic information, no run-time checks\n");
710 printf(" -d1 [default] run-time checks, no symbolic\
711 information\n");
712 printf
713 (" -d2 full debug information and dynamic checking\n");
714 printf(" -d3 full debug information, dynamic checking,\
715 no optimization\n");
716#endif
717 printf(" -i <name> path for include files\n");
718#if 0
719 printf(" -l create list file (preprocess only)\n");
720#endif
721 printf(" -o <name> set base name of output file\n");
722#if 0
723 printf
724 (" -P[+/-] strings are \"packed\" by default (default=%c)\n",
725 sc_packstr ? '+' : '-');
726 printf(" -p<name> set name of \"prefix\" file\n");
727 if (!waitkey())
728 longjmp(errbuf, 3);
729#endif
730 printf
731 (" -S <num> stack/heap size in cells (default=%d, min=65)\n",
732 (int)sc_stksize);
733#if 0
734 printf(" -s<num> skip lines from the input file\n");
735 printf
736 (" -t<num> TAB indent size (in character positions)\n");
737 printf(" -\\ use '\\' for escape characters\n");
738 printf(" -^ use '^' for escape characters\n");
739 printf(" -;[+/-] require a semicolon to end each statement\
740 (default=%c)\n", sc_needsemicolon ? '+' : '-');
741
742 printf
743 (" sym=val define constant \"sym\" with value \"val\"\n");
744 printf(" sym= define constant \"sym\" with value 0\n");
745#endif
746 longjmp(errbuf, 3); /* user abort */
747}
748
749static void
750setconstants(void)
751{
752 int debug;
753
754 assert(sc_status == statIDLE);
755 append_constval(&tagname_tab, "_", 0, 0); /* "untagged" */
756 append_constval(&tagname_tab, "bool", 1, 0);
757
758 add_constant("true", 1, sGLOBAL, 1); /* boolean flags */
759 add_constant("false", 0, sGLOBAL, 1);
760 add_constant("EOS", 0, sGLOBAL, 0); /* End Of String, or '\0' */
761 add_constant("cellbits", 32, sGLOBAL, 0);
762 add_constant("cellmax", INT_MAX, sGLOBAL, 0);
763 add_constant("cellmin", INT_MIN, sGLOBAL, 0);
764 add_constant("charbits", charbits, sGLOBAL, 0);
765 add_constant("charmin", 0, sGLOBAL, 0);
766 add_constant("charmax", (charbits == 16) ? 0xffff : 0xff, sGLOBAL, 0);
767
768 add_constant("__Small", VERSION_INT, sGLOBAL, 0);
769
770 debug = 0;
771 if ((sc_debug & (sCHKBOUNDS | sSYMBOLIC)) == (sCHKBOUNDS | sSYMBOLIC))
772 debug = 2;
773 else if ((sc_debug & sCHKBOUNDS) == sCHKBOUNDS)
774 debug = 1;
775 add_constant("debug", debug, sGLOBAL, 0);
776}
777
778/* parse - process all input text
779 *
780 * At this level, only static declarations and function definitions
781 * are legal.
782 */
783static void
784parse(void)
785{
786 int tok, tag, fconst, fstock, fstatic;
787 cell val;
788 char *str;
789
790 while (freading)
791 {
792 /* first try whether a declaration possibly is native or public */
793 tok = lex(&val, &str); /* read in (new) token */
794 switch (tok)
795 {
796 case 0:
797 /* ignore zero's */
798 break;
799 case tNEW:
800 fconst = matchtoken(tCONST);
801 declglb(NULL, 0, FALSE, FALSE, FALSE, fconst);
802 break;
803 case tSTATIC:
804 /* This can be a static function or a static global variable;
805 * we know which of the two as soon as we have parsed up to the
806 * point where an opening parenthesis of a function would be
807 * expected. To back out after deciding it was a declaration of
808 * a static variable after all, we have to store the symbol name
809 * and tag.
810 */
811 fstock = matchtoken(tSTOCK);
812 fconst = matchtoken(tCONST);
813 tag = sc_addtag(NULL);
814 tok = lex(&val, &str);
815 if (tok == tNATIVE || tok == tPUBLIC)
816 {
817 error(42); /* invalid combination of class specifiers */
818 break;
819 } /* if */
820 declfuncvar(tok, str, tag, FALSE, TRUE, fstock, fconst);
821 break;
822 case tCONST:
823 decl_const(sGLOBAL);
824 break;
825 case tENUM:
826 decl_enum(sGLOBAL);
827 break;
828 case tPUBLIC:
829 /* This can be a public function or a public variable;
830 * see the comment above (for static functions/variables)
831 * for details.
832 */
833 fconst = matchtoken(tCONST);
834 tag = sc_addtag(NULL);
835 tok = lex(&val, &str);
836 if (tok == tNATIVE || tok == tSTOCK || tok == tSTATIC)
837 {
838 error(42); /* invalid combination of class specifiers */
839 break;
840 } /* if */
841 declfuncvar(tok, str, tag, TRUE, FALSE, FALSE, fconst);
842 break;
843 case tSTOCK:
844 /* This can be a stock function or a stock *global) variable;
845 * see the comment above (for static functions/variables) for
846 * details.
847 */
848 fstatic = matchtoken(tSTATIC);
849 fconst = matchtoken(tCONST);
850 tag = sc_addtag(NULL);
851 tok = lex(&val, &str);
852 if (tok == tNATIVE || tok == tPUBLIC)
853 {
854 error(42); /* invalid combination of class specifiers */
855 break;
856 } /* if */
857 declfuncvar(tok, str, tag, FALSE, fstatic, TRUE, fconst);
858 break;
859 case tLABEL:
860 case tSYMBOL:
861 case tOPERATOR:
862 lexpush();
863 if (!newfunc(NULL, -1, FALSE, FALSE, FALSE))
864 {
865 error(10); /* illegal function or declaration */
866 lexclr(TRUE); /* drop the rest of the line */
867 } /* if */
868 break;
869 case tNATIVE:
870 funcstub(TRUE); /* create a dummy function */
871 break;
872 case tFORWARD:
873 funcstub(FALSE);
874 break;
875 case '}':
876 error(54); /* unmatched closing brace */
877 break;
878 case '{':
879 error(55); /* start of function body without function header */
880 break;
881 default:
882 if (freading)
883 {
884 error(10); /* illegal function or declaration */
885 lexclr(TRUE); /* drop the rest of the line */
886 } /* if */
887 } /* switch */
888 } /* while */
889}
890
891/* dumplits
892 *
893 * Dump the literal pool (strings etc.)
894 *
895 * Global references: litidx (referred to only)
896 */
897static void
898dumplits(void)
899{
900 int j, k;
901
902 k = 0;
903 while (k < litidx)
904 {
905 /* should be in the data segment */
906 assert(curseg == 2);
907 defstorage();
908 j = 16; /* 16 values per line */
909 while (j && k < litidx)
910 {
911 outval(litq[k], FALSE);
912 stgwrite(" ");
913 k++;
914 j--;
915 if (j == 0 || k >= litidx)
916 stgwrite("\n"); /* force a newline after 10 dumps */
917 /* Note: stgwrite() buffers a line until it is complete. It recognizes
918 * the end of line as a sequence of "\n\0", so something like "\n\t"
919 * so should not be passed to stgwrite().
920 */
921 } /* while */
922 } /* while */
923}
924
925/* dumpzero
926 *
927 * Dump zero's for default initial values
928 */
929static void
930dumpzero(int count)
931{
932 int i;
933
934 if (count <= 0)
935 return;
936 assert(curseg == 2);
937 defstorage();
938 i = 0;
939 while (count-- > 0)
940 {
941 outval(0, FALSE);
942 i = (i + 1) % 16;
943 stgwrite((i == 0 || count == 0) ? "\n" : " ");
944 if (i == 0 && count > 0)
945 defstorage();
946 } /* while */
947}
948
949static void
950aligndata(int numbytes)
951{
952 if ((((glb_declared + litidx) * sizeof(cell)) % numbytes) != 0)
953 {
954 while ((((glb_declared + litidx) * sizeof(cell)) % numbytes) != 0)
955 stowlit(0);
956 } /* if */
957
958}
959
960static void
961declfuncvar(int tok, char *symname, int tag, int fpublic, int fstatic,
962 int fstock, int fconst)
963{
964 char name[sNAMEMAX + 1];
965
966 if (tok != tSYMBOL && tok != tOPERATOR)
967 {
968 if (freading)
969 error(20, symname); /* invalid symbol name */
970 return;
971 } /* if */
972 if (tok == tOPERATOR)
973 {
974 lexpush();
975 if (!newfunc(NULL, tag, fpublic, fstatic, fstock))
976 error(10); /* illegal function or declaration */
977 }
978 else
979 {
980 assert(strlen(symname) <= sNAMEMAX);
981 strcpy(name, symname);
982 if (fconst || !newfunc(name, tag, fpublic, fstatic, fstock))
983 declglb(name, tag, fpublic, fstatic, fstock, fconst);
984 /* if not a static function, try a static variable */
985 } /* if */
986}
987
988/* declglb - declare global symbols
989 *
990 * Declare a static (global) variable. Global variables are stored in
991 * the DATA segment.
992 *
993 * global references: glb_declared (altered)
994 */
995static void
996declglb(char *firstname, int firsttag, int fpublic, int fstatic,
997 int stock, int fconst)
998{
999 int ident, tag, ispublic;
1000 int idxtag[sDIMEN_MAX];
1001 char name[sNAMEMAX + 1];
1002 cell val, size, cidx;
1003 char *str;
1004 int dim[sDIMEN_MAX];
1005 int numdim, level;
1006 int filenum;
1007 symbol *sym;
1008
1009#if !defined NDEBUG
1010 cell glbdecl = 0;
1011#endif
1012
1013 filenum = fcurrent; /* save file number at the start of the
1014 * declaration */
1015 do
1016 {
1017 size = 1; /* single size (no array) */
1018 numdim = 0; /* no dimensions */
1019 ident = iVARIABLE;
1020 if (firstname)
1021 {
1022 assert(strlen(firstname) <= sNAMEMAX);
1023 strcpy(name, firstname); /* save symbol name */
1024 tag = firsttag;
1025 firstname = NULL;
1026 }
1027 else
1028 {
1029 tag = sc_addtag(NULL);
1030 if (lex(&val, &str) != tSYMBOL) /* read in (new) token */
1031 error(20, str); /* invalid symbol name */
1032 assert(strlen(str) <= sNAMEMAX);
1033 strcpy(name, str); /* save symbol name */
1034 } /* if */
1035 sym = findglb(name);
1036 if (!sym)
1037 sym = findconst(name);
1038 if (sym && (sym->usage & uDEFINE) != 0)
1039 error(21, name); /* symbol already defined */
1040 ispublic = fpublic;
1041 if (name[0] == PUBLIC_CHAR)
1042 {
1043 ispublic = TRUE; /* implicitly public variable */
1044 if (stock || fstatic)
1045 error(42); /* invalid combination of class specifiers */
1046 } /* if */
1047 while (matchtoken('['))
1048 {
1049 ident = iARRAY;
1050 if (numdim == sDIMEN_MAX)
1051 {
1052 error(53); /* exceeding maximum number of dimensions */
1053 return;
1054 } /* if */
1055 if (numdim > 0 && dim[numdim - 1] == 0)
1056 error(52); /* only last dimension may be variable length */
1057 size = needsub(&idxtag[numdim]); /* get size; size==0 for
1058 * "var[]" */
1059#if INT_MAX < LONG_MAX
1060 if (size > INT_MAX)
1061 error(105); /* overflow, exceeding capacity */
1062#endif
1063 if (ispublic)
1064 error(56, name); /* arrays cannot be public */
1065 dim[numdim++] = (int)size;
1066 } /* while */
1067 /* if this variable is never used (which can be detected only in
1068 * the second stage), shut off code generation; make an exception
1069 * for public variables
1070 */
1071 cidx = 0; /* only to avoid a compiler warning */
1072 if (sc_status == statWRITE && sym
1073 && (sym->usage & (uREAD | uWRITTEN | uPUBLIC)) == 0)
1074 {
1075 sc_status = statSKIP;
1076 cidx = code_idx;
1077#if !defined NDEBUG
1078 glbdecl = glb_declared;
1079#endif
1080 } /* if */
1081 defsymbol(name, ident, sGLOBAL, sizeof(cell) * glb_declared, tag);
1082 begdseg(); /* real (initialized) data in data segment */
1083 assert(litidx == 0); /* literal queue should be empty */
1084 if (sc_alignnext)
1085 {
1086 litidx = 0;
1087 aligndata(sc_dataalign);
1088 dumplits(); /* dump the literal queue */
1089 sc_alignnext = FALSE;
1090 litidx = 0; /* global initial data is dumped, so restart at zero */
1091 } /* if */
1092 initials(ident, tag, &size, dim, numdim); /* stores values in
1093 * the literal queue */
1094 if (numdim == 1)
1095 dim[0] = (int)size;
1096 dumplits(); /* dump the literal queue */
1097 dumpzero((int)size - litidx);
1098 litidx = 0;
1099 if (!sym)
1100 { /* define only if not yet defined */
1101 sym =
1102 addvariable(name, sizeof(cell) * glb_declared, ident, sGLOBAL,
1103 tag, dim, numdim, idxtag);
1104 }
1105 else
1106 { /* if declared but not yet defined, adjust the
1107 * variable's address */
1108 sym->addr = sizeof(cell) * glb_declared;
1109 sym->usage |= uDEFINE;
1110 } /* if */
1111 if (ispublic)
1112 sym->usage |= uPUBLIC;
1113 if (fconst)
1114 sym->usage |= uCONST;
1115 if (stock)
1116 sym->usage |= uSTOCK;
1117 if (fstatic)
1118 sym->fnumber = filenum;
1119 if (ident == iARRAY)
1120 for (level = 0; level < numdim; level++)
1121 symbolrange(level, dim[level]);
1122 if (sc_status == statSKIP)
1123 {
1124 sc_status = statWRITE;
1125 code_idx = cidx;
1126 assert(glb_declared == glbdecl);
1127 }
1128 else
1129 {
1130 glb_declared += (int)size; /* add total number of cells */
1131 } /* if */
1132 }
1133 while (matchtoken(',')); /* enddo *//* more? */
1134 needtoken(tTERM); /* if not comma, must be semicolumn */
1135}
1136
1137/* declloc - declare local symbols
1138 *
1139 * Declare local (automatic) variables. Since these variables are
1140 * relative to the STACK, there is no switch to the DATA segment.
1141 * These variables cannot be initialized either.
1142 *
1143 * global references: declared (altered)
1144 * funcstatus (referred to only)
1145 */
1146static int
1147declloc(int fstatic)
1148{
1149 int ident, tag;
1150 int idxtag[sDIMEN_MAX];
1151 char name[sNAMEMAX + 1];
1152 symbol *sym;
1153 cell val, size;
1154 char *str;
1155 value lval = { NULL, 0, 0, 0, 0, NULL };
1156 int cur_lit = 0;
1157 int dim[sDIMEN_MAX];
1158 int numdim, level;
1159 int fconst;
1160
1161 fconst = matchtoken(tCONST);
1162 do
1163 {
1164 ident = iVARIABLE;
1165 size = 1;
1166 numdim = 0; /* no dimensions */
1167 tag = sc_addtag(NULL);
1168 if (lex(&val, &str) != tSYMBOL) /* read in (new) token */
1169 error(20, str); /* invalid symbol name */
1170 assert(strlen(str) <= sNAMEMAX);
1171 strcpy(name, str); /* save symbol name */
1172 if (name[0] == PUBLIC_CHAR)
1173 error(56, name); /* local variables cannot be public */
1174 /* Note: block locals may be named identical to locals at higher
1175 * compound blocks (as with standard C); so we must check (and add)
1176 * the "nesting level" of local variables to verify the
1177 * multi-definition of symbols.
1178 */
1179 if ((sym = findloc(name)) && sym->compound == nestlevel)
1180 error(21, name); /* symbol already defined */
1181 /* Although valid, a local variable whose name is equal to that
1182 * of a global variable or to that of a local variable at a lower
1183 * level might indicate a bug.
1184 */
1185 if (((sym = findloc(name)) && sym->compound != nestlevel)
1186 || findglb(name))
1187 error(219, name); /* variable shadows another symbol */
1188 while (matchtoken('['))
1189 {
1190 ident = iARRAY;
1191 if (numdim == sDIMEN_MAX)
1192 {
1193 error(53); /* exceeding maximum number of dimensions */
1194 return ident;
1195 } /* if */
1196 if (numdim > 0 && dim[numdim - 1] == 0)
1197 error(52); /* only last dimension may be variable length */
1198 size = needsub(&idxtag[numdim]); /* get size; size==0 for "var[]" */
1199#if INT_MAX < LONG_MAX
1200 if (size > INT_MAX)
1201 error(105); /* overflow, exceeding capacity */
1202#endif
1203 dim[numdim++] = (int)size;
1204 } /* while */
1205 if (ident == iARRAY || fstatic)
1206 {
1207 if (sc_alignnext)
1208 {
1209 aligndata(sc_dataalign);
1210 sc_alignnext = FALSE;
1211 } /* if */
1212 cur_lit = litidx; /* save current index in the literal table */
1213 initials(ident, tag, &size, dim, numdim);
1214 if (size == 0)
1215 return ident; /* error message already given */
1216 if (numdim == 1)
1217 dim[0] = (int)size;
1218 } /* if */
1219 /* reserve memory (on the stack) for the variable */
1220 if (fstatic)
1221 {
1222 /* write zeros for uninitialized fields */
1223 while (litidx < cur_lit + size)
1224 stowlit(0);
1225 sym =
1226 addvariable(name, (cur_lit + glb_declared) * sizeof(cell),
1227 ident, sSTATIC, tag, dim, numdim, idxtag);
1228 defsymbol(name, ident, sSTATIC,
1229 (cur_lit + glb_declared) * sizeof(cell), tag);
1230 }
1231 else
1232 {
1233 declared += (int)size; /* variables are put on stack,
1234 * adjust "declared" */
1235 sym =
1236 addvariable(name, -declared * sizeof(cell), ident, sLOCAL, tag,
1237 dim, numdim, idxtag);
1238 defsymbol(name, ident, sLOCAL, -declared * sizeof(cell), tag);
1239 modstk(-(int)size * sizeof(cell));
1240 } /* if */
1241 /* now that we have reserved memory for the variable, we can
1242 * proceed to initialize it */
1243 sym->compound = nestlevel; /* for multiple declaration/shadowing */
1244 if (fconst)
1245 sym->usage |= uCONST;
1246 if (ident == iARRAY)
1247 for (level = 0; level < numdim; level++)
1248 symbolrange(level, dim[level]);
1249 if (!fstatic)
1250 { /* static variables already initialized */
1251 if (ident == iVARIABLE)
1252 {
1253 /* simple variable, also supports initialization */
1254 int ctag = tag; /* set to "tag" by default */
1255 int explicit_init = FALSE; /* is the variable explicitly
1256 * initialized? */
1257 if (matchtoken('='))
1258 {
1259 doexpr(FALSE, FALSE, FALSE, FALSE, &ctag, TRUE);
1260 explicit_init = TRUE;
1261 }
1262 else
1263 {
1264 const1(0); /* uninitialized variable, set to zero */
1265 } /* if */
1266 /* now try to save the value (still in PRI) in the variable */
1267 lval.sym = sym;
1268 lval.ident = iVARIABLE;
1269 lval.constval = 0;
1270 lval.tag = tag;
1271 check_userop(NULL, ctag, lval.tag, 2, NULL, &ctag);
1272 store(&lval);
1273 endexpr(TRUE); /* full expression ends after the store */
1274 if (!matchtag(tag, ctag, TRUE))
1275 error(213); /* tag mismatch */
1276 /* if the variable was not explicitly initialized, reset the
1277 * "uWRITTEN" flag that store() set */
1278 if (!explicit_init)
1279 sym->usage &= ~uWRITTEN;
1280 }
1281 else
1282 {
1283 /* an array */
1284 if (litidx - cur_lit < size)
1285 fillarray(sym, size * sizeof(cell), 0);
1286 if (cur_lit < litidx)
1287 {
1288 /* check whether the complete array is set to a single value;
1289 * if it is, more compact code can be generated */
1290 cell first = litq[cur_lit];
1291 int i;
1292
1293 for (i = cur_lit; i < litidx && litq[i] == first; i++)
1294 /* nothing */ ;
1295 if (i == litidx)
1296 {
1297 /* all values are the same */
1298 fillarray(sym, (litidx - cur_lit) * sizeof(cell),
1299 first);
1300 litidx = cur_lit; /* reset literal table */
1301 }
1302 else
1303 {
1304 /* copy the literals to the array */
1305 const1((cur_lit + glb_declared) * sizeof(cell));
1306 copyarray(sym, (litidx - cur_lit) * sizeof(cell));
1307 } /* if */
1308 } /* if */
1309 } /* if */
1310 } /* if */
1311 }
1312 while (matchtoken(',')); /* enddo *//* more? */
1313 needtoken(tTERM); /* if not comma, must be semicolumn */
1314 return ident;
1315}
1316
1317static cell
1318calc_arraysize(int dim[], int numdim, int cur)
1319{
1320 if (cur == numdim)
1321 return 0;
1322 return dim[cur] + (dim[cur] * calc_arraysize(dim, numdim, cur + 1));
1323}
1324
1325/* initials
1326 *
1327 * Initialize global objects and local arrays.
1328 * size==array cells (count), if 0 on input, the routine counts
1329 * the number of elements
1330 * tag==required tagname id (not the returned tag)
1331 *
1332 * Global references: litidx (altered)
1333 */
1334static void
1335initials(int ident, int tag, cell * size, int dim[], int numdim)
1336{
1337 int ctag;
1338 int curlit = litidx;
1339 int d;
1340
1341 if (!matchtoken('='))
1342 {
1343 if (ident == iARRAY && dim[numdim - 1] == 0)
1344 {
1345 /* declared as "myvar[];" which is senseless (note: this *does* make
1346 * sense in the case of a iREFARRAY, which is a function parameter)
1347 */
1348 error(9); /* array has zero length -> invalid size */
1349 } /* if */
1350 if (numdim > 1)
1351 {
1352 /* initialize the indirection tables */
1353#if sDIMEN_MAX>2
1354#error Array algorithms for more than 2 dimensions are not implemented
1355#endif
1356 assert(numdim == 2);
1357 *size = calc_arraysize(dim, numdim, 0);
1358 for (d = 0; d < dim[0]; d++)
1359 stowlit((dim[0] + d * (dim[1] - 1)) * sizeof(cell));
1360 } /* if */
1361 return;
1362 } /* if */
1363
1364 if (ident == iVARIABLE)
1365 {
1366 assert(*size == 1);
1367 init(ident, &ctag);
1368 if (!matchtag(tag, ctag, TRUE))
1369 error(213); /* tag mismatch */
1370 }
1371 else
1372 {
1373 assert(numdim > 0);
1374 if (numdim == 1)
1375 {
1376 *size = initvector(ident, tag, dim[0], FALSE);
1377 }
1378 else
1379 {
1380 cell offs, dsize;
1381
1382 /* The simple algorithm below only works for arrays with one or
1383 * two dimensions. This should be some recursive algorithm.
1384 */
1385 if (dim[numdim - 1] != 0)
1386 /* set size to (known) full size */
1387 *size = calc_arraysize(dim, numdim, 0);
1388 /* dump indirection tables */
1389 for (d = 0; d < dim[0]; d++)
1390 stowlit(0);
1391 /* now dump individual vectors */
1392 needtoken('{');
1393 offs = dim[0];
1394 for (d = 0; d < dim[0]; d++)
1395 {
1396 litq[curlit + d] = offs * sizeof(cell);
1397 dsize = initvector(ident, tag, dim[1], TRUE);
1398 offs += dsize - 1;
1399 if (d + 1 < dim[0])
1400 needtoken(',');
1401 if (matchtoken('{') || matchtoken(tSTRING))
1402 /* expect a '{' or a string */
1403 lexpush();
1404 else
1405 break;
1406 } /* for */
1407 matchtoken(',');
1408 needtoken('}');
1409 } /* if */
1410 } /* if */
1411
1412 if (*size == 0)
1413 *size = litidx - curlit; /* number of elements defined */
1414}
1415
1416/* initvector
1417 * Initialize a single dimensional array
1418 */
1419static cell
1420initvector(int ident, int tag, cell size, int fillzero)
1421{
1422 cell prev1 = 0, prev2 = 0;
1423 int ctag;
1424 int ellips = FALSE;
1425 int curlit = litidx;
1426
1427 assert(ident == iARRAY || ident == iREFARRAY);
1428 if (matchtoken('{'))
1429 {
1430 do
1431 {
1432 if (matchtoken('}'))
1433 { /* to allow for trailing ',' after the initialization */
1434 lexpush();
1435 break;
1436 } /* if */
1437 if ((ellips = matchtoken(tELLIPS)) != 0)
1438 break;
1439 prev2 = prev1;
1440 prev1 = init(ident, &ctag);
1441 if (!matchtag(tag, ctag, TRUE))
1442 error(213); /* tag mismatch */
1443 }
1444 while (matchtoken(',')); /* do */
1445 needtoken('}');
1446 }
1447 else
1448 {
1449 init(ident, &ctag);
1450 if (!matchtag(tag, ctag, TRUE))
1451 error(213); /* tagname mismatch */
1452 } /* if */
1453 /* fill up the literal queue with a series */
1454 if (ellips)
1455 {
1456 cell step =
1457 ((litidx - curlit) == 1) ? (cell) 0 : prev1 - prev2;
1458 if (size == 0 || (litidx - curlit) == 0)
1459 error(41); /* invalid ellipsis, array size unknown */
1460 else if ((litidx - curlit) == (int)size)
1461 error(18); /* initialisation data exceeds declared size */
1462 while ((litidx - curlit) < (int)size)
1463 {
1464 prev1 += step;
1465 stowlit(prev1);
1466 } /* while */
1467 } /* if */
1468 if (fillzero && size > 0)
1469 {
1470 while ((litidx - curlit) < (int)size)
1471 stowlit(0);
1472 } /* if */
1473 if (size == 0)
1474 {
1475 size = litidx - curlit; /* number of elements defined */
1476 }
1477 else if (litidx - curlit > (int)size)
1478 { /* e.g. "myvar[3]={1,2,3,4};" */
1479 error(18); /* initialisation data exceeds declared size */
1480 litidx = (int)size + curlit; /* avoid overflow in memory moves */
1481 } /* if */
1482 return size;
1483}
1484
1485/* init
1486 *
1487 * Evaluate one initializer.
1488 */
1489static cell
1490init(int ident, int *tag)
1491{
1492 cell i = 0;
1493
1494 if (matchtoken(tSTRING))
1495 {
1496 /* lex() automatically stores strings in the literal table (and
1497 * increases "litidx") */
1498 if (ident == iVARIABLE)
1499 {
1500 error(6); /* must be assigned to an array */
1501 litidx = 1; /* reset literal queue */
1502 } /* if */
1503 *tag = 0;
1504 }
1505 else if (constexpr(&i, tag))
1506 {
1507 stowlit(i); /* store expression result in literal table */
1508 } /* if */
1509 return i;
1510}
1511
1512/* needsub
1513 *
1514 * Get required array size
1515 */
1516static cell
1517needsub(int *tag)
1518{
1519 cell val;
1520
1521 *tag = 0;
1522 if (matchtoken(']')) /* we've already seen "[" */
1523 return 0; /* null size (like "char msg[]") */
1524 constexpr(&val, tag); /* get value (must be constant expression) */
1525 if (val < 0)
1526 {
1527 error(9); /* negative array size is invalid; assumed zero */
1528 val = 0;
1529 } /* if */
1530 needtoken(']');
1531 return val; /* return array size */
1532}
1533
1534/* decl_const - declare a single constant
1535 *
1536 */
1537static void
1538decl_const(int vclass)
1539{
1540 char constname[sNAMEMAX + 1];
1541 cell val;
1542 char *str;
1543 int tag, exprtag;
1544 int symbolline;
1545
1546 tag = sc_addtag(NULL);
1547 if (lex(&val, &str) != tSYMBOL) /* read in (new) token */
1548 error(20, str); /* invalid symbol name */
1549 symbolline = fline; /* save line where symbol was found */
1550 strcpy(constname, str); /* save symbol name */
1551 needtoken('=');
1552 constexpr(&val, &exprtag); /* get value */
1553 needtoken(tTERM);
1554 /* add_constant() checks for duplicate definitions */
1555 if (!matchtag(tag, exprtag, FALSE))
1556 {
1557 /* temporarily reset the line number to where the symbol was
1558 * defined */
1559 int orgfline = fline;
1560
1561 fline = symbolline;
1562 error(213); /* tagname mismatch */
1563 fline = orgfline;
1564 } /* if */
1565 add_constant(constname, val, vclass, tag);
1566}
1567
1568/* decl_enum - declare enumerated constants
1569 *
1570 */
1571static void
1572decl_enum(int vclass)
1573{
1574 char enumname[sNAMEMAX + 1], constname[sNAMEMAX + 1];
1575 cell val, value, size;
1576 char *str;
1577 int tok, tag, explicittag;
1578 cell increment, multiplier;
1579
1580 /* get an explicit tag, if any (we need to remember whether an
1581 * explicit tag was passed, even if that explicit tag was "_:", so we
1582 * cannot call sc_addtag() here
1583 */
1584 if (lex(&val, &str) == tLABEL)
1585 {
1586 tag = sc_addtag(str);
1587 explicittag = TRUE;
1588 }
1589 else
1590 {
1591 lexpush();
1592 tag = 0;
1593 explicittag = FALSE;
1594 } /* if */
1595
1596 /* get optional enum name (also serves as a tag if no explicit
1597 * tag was set) */
1598 if (lex(&val, &str) == tSYMBOL)
1599 { /* read in (new) token */
1600 strcpy(enumname, str); /* save enum name (last constant) */
1601 if (!explicittag)
1602 tag = sc_addtag(enumname);
1603 }
1604 else
1605 {
1606 lexpush(); /* analyze again */
1607 enumname[0] = '\0';
1608 } /* if */
1609
1610 /* get increment and multiplier */
1611 increment = 1;
1612 multiplier = 1;
1613 if (matchtoken('('))
1614 {
1615 if (matchtoken(taADD))
1616 {
1617 constexpr(&increment, NULL);
1618 }
1619 else if (matchtoken(taMULT))
1620 {
1621 constexpr(&multiplier, NULL);
1622 }
1623 else if (matchtoken(taSHL))
1624 {
1625 constexpr(&val, NULL);
1626 while (val-- > 0)
1627 multiplier *= 2;
1628 } /* if */
1629 needtoken(')');
1630 } /* if */
1631
1632 needtoken('{');
1633 /* go through all constants */
1634 value = 0; /* default starting value */
1635 do
1636 {
1637 if (matchtoken('}'))
1638 { /* quick exit if '}' follows ',' */
1639 lexpush();
1640 break;
1641 } /* if */
1642 tok = lex(&val, &str); /* read in (new) token */
1643 if (tok != tSYMBOL && tok != tLABEL)
1644 error(20, str); /* invalid symbol name */
1645 strcpy(constname, str); /* save symbol name */
1646 size = increment; /* default increment of 'val' */
1647 if (tok == tLABEL || matchtoken(':'))
1648 constexpr(&size, NULL); /* get size */
1649 if (matchtoken('='))
1650 constexpr(&value, NULL); /* get value */
1651 /* add_constant() checks whether a variable (global or local) or
1652 * a constant with the same name already exists */
1653 add_constant(constname, value, vclass, tag);
1654 if (multiplier == 1)
1655 value += size;
1656 else
1657 value *= size * multiplier;
1658 }
1659 while (matchtoken(','));
1660 needtoken('}'); /* terminates the constant list */
1661 matchtoken(';'); /* eat an optional ; */
1662
1663 /* set the enum name to the last value plus one */
1664 if (enumname[0] != '\0')
1665 add_constant(enumname, value, vclass, tag);
1666}
1667
1668/*
1669 * Finds a function in the global symbol table or creates a new entry.
1670 * It does some basic processing and error checking.
1671 */
1672symbol *
1673fetchfunc(char *name, int tag)
1674{
1675 symbol *sym;
1676 cell offset;
1677
1678 offset = code_idx;
1679 if ((sc_debug & sSYMBOLIC) != 0)
1680 {
1681 offset += opcodes(1) + opargs(3) + nameincells(name);
1682 /* ^^^ The address for the symbol is the code address. But the
1683 * "symbol" instruction itself generates code. Therefore the
1684 * offset is pre-adjusted to the value it will have after the
1685 * symbol instruction.
1686 */
1687 } /* if */
1688 if ((sym = findglb(name)))
1689 { /* already in symbol table? */
1690 if (sym->ident != iFUNCTN)
1691 {
1692 error(21, name); /* yes, but not as a function */
1693 return NULL; /* make sure the old symbol is not damaged */
1694 }
1695 else if ((sym->usage & uDEFINE) != 0)
1696 {
1697 error(21, name); /* yes, and it's already defined */
1698 }
1699 else if ((sym->usage & uNATIVE) != 0)
1700 {
1701 error(21, name); /* yes, and it is an native */
1702 } /* if */
1703 assert(sym->vclass == sGLOBAL);
1704 if ((sym->usage & uDEFINE) == 0)
1705 {
1706 /* as long as the function stays undefined, update the address
1707 * and the tag */
1708 sym->addr = offset;
1709 sym->tag = tag;
1710 } /* if */
1711 }
1712 else
1713 {
1714 /* don't set the "uDEFINE" flag; it may be a prototype */
1715 sym = addsym(name, offset, iFUNCTN, sGLOBAL, tag, 0);
1716 /* assume no arguments */
1717 sym->dim.arglist = (arginfo *) malloc(1 * sizeof(arginfo));
1718 sym->dim.arglist[0].ident = 0;
1719 /* set library ID to NULL (only for native functions) */
1720 sym->x.lib = NULL;
1721 } /* if */
1722 return sym;
1723}
1724
1725/* This routine adds symbolic information for each argument.
1726 */
1727static void
1728define_args(void)
1729{
1730 symbol *sym;
1731
1732 /* At this point, no local variables have been declared. All
1733 * local symbols are function arguments.
1734 */
1735 sym = loctab.next;
1736 while (sym)
1737 {
1738 assert(sym->ident != iLABEL);
1739 assert(sym->vclass == sLOCAL);
1740 defsymbol(sym->name, sym->ident, sLOCAL, sym->addr, sym->tag);
1741 if (sym->ident == iREFARRAY)
1742 {
1743 symbol *sub = sym;
1744
1745 while (sub)
1746 {
1747 symbolrange(sub->dim.array.level, sub->dim.array.length);
1748 sub = finddepend(sub);
1749 } /* while */
1750 } /* if */
1751 sym = sym->next;
1752 } /* while */
1753}
1754
1755static int
1756operatorname(char *name)
1757{
1758 int opertok;
1759 char *str;
1760 cell val;
1761
1762 assert(name != NULL);
1763
1764 /* check the operator */
1765 opertok = lex(&val, &str);
1766 switch (opertok)
1767 {
1768 case '+':
1769 case '-':
1770 case '*':
1771 case '/':
1772 case '%':
1773 case '>':
1774 case '<':
1775 case '!':
1776 case '~':
1777 case '=':
1778 name[0] = (char)opertok;
1779 name[1] = '\0';
1780 break;
1781 case tINC:
1782 strcpy(name, "++");
1783 break;
1784 case tDEC:
1785 strcpy(name, "--");
1786 break;
1787 case tlEQ:
1788 strcpy(name, "==");
1789 break;
1790 case tlNE:
1791 strcpy(name, "!=");
1792 break;
1793 case tlLE:
1794 strcpy(name, "<=");
1795 break;
1796 case tlGE:
1797 strcpy(name, ">=");
1798 break;
1799 default:
1800 name[0] = '\0';
1801 error(61); /* operator cannot be redefined
1802 * (or bad operator name) */
1803 return 0;
1804 } /* switch */
1805
1806 return opertok;
1807}
1808
1809static int
1810operatoradjust(int opertok, symbol * sym, char *opername, int resulttag)
1811{
1812 int tags[2] = { 0, 0 };
1813 int count = 0;
1814 arginfo *arg;
1815 char tmpname[sNAMEMAX + 1];
1816 symbol *oldsym;
1817
1818 if (opertok == 0)
1819 return TRUE;
1820
1821 /* count arguments and save (first two) tags */
1822 while (arg = &sym->dim.arglist[count], arg->ident != 0)
1823 {
1824 if (count < 2)
1825 {
1826 if (arg->numtags > 1)
1827 error(65, count + 1); /* function argument may only have
1828 * a single tag */
1829 else if (arg->numtags == 1)
1830 tags[count] = arg->tags[0];
1831 } /* if */
1832 if (opertok == '~' && count == 0)
1833 {
1834 if (arg->ident != iREFARRAY)
1835 error(73, arg->name); /* must be an array argument */
1836 }
1837 else
1838 {
1839 if (arg->ident != iVARIABLE)
1840 error(66, arg->name); /* must be non-reference argument */
1841 } /* if */
1842 if (arg->hasdefault)
1843 error(59, arg->name); /* arguments of an operator may not
1844 * have a default value */
1845 count++;
1846 } /* while */
1847
1848 /* for '!', '++' and '--', count must be 1
1849 * for '-', count may be 1 or 2
1850 * for '=', count must be 1, and the resulttag is also important
1851 * for all other (binary) operators and the special '~'
1852 * operator, count must be 2
1853 */
1854 switch (opertok)
1855 {
1856 case '!':
1857 case '=':
1858 case tINC:
1859 case tDEC:
1860 if (count != 1)
1861 error(62); /* number or placement of the operands does
1862 * not fit the operator */
1863 break;
1864 case '-':
1865 if (count != 1 && count != 2)
1866 error(62); /* number or placement of the operands does
1867 * not fit the operator */
1868 break;
1869 default:
1870 if (count != 2)
1871 error(62); /* number or placement of the operands does
1872 * not fit the operator */
1873 } /* switch */
1874
1875 if (tags[0] == 0
1876 && ((opertok != '=' && tags[1] == 0) || (opertok == '=' && resulttag == 0)))
1877 error(64); /* cannot change predefined operators */
1878
1879 /* change the operator name */
1880 assert(opername[0] != '\0');
1881 operator_symname(tmpname, opername, tags[0], tags[1], count, resulttag);
1882 if ((oldsym = findglb(tmpname)))
1883 {
1884 int i;
1885
1886 if ((oldsym->usage & uDEFINE) != 0)
1887 {
1888 char errname[2 * sNAMEMAX + 16];
1889
1890 funcdisplayname(errname, tmpname);
1891 error(21, errname); /* symbol already defined */
1892 } /* if */
1893 sym->usage |= oldsym->usage; /* copy flags from the previous
1894 * definition */
1895 for (i = 0; i < oldsym->numrefers; i++)
1896 if (oldsym->refer[i])
1897 refer_symbol(sym, oldsym->refer[i]);
1898 delete_symbol(&glbtab, oldsym);
1899 } /* if */
1900 if ((sc_debug & sSYMBOLIC) != 0)
1901 sym->addr += nameincells(tmpname) - nameincells(sym->name);
1902 strcpy(sym->name, tmpname);
1903 sym->hash = namehash(sym->name); /* calculate new hash */
1904
1905 /* operators should return a value, except the '~' operator */
1906 if (opertok != '~')
1907 sym->usage |= uRETVALUE;
1908
1909 return TRUE;
1910}
1911
1912static int
1913check_operatortag(int opertok, int resulttag, char *opername)
1914{
1915 assert(opername != NULL && opername[0] != '\0');
1916 switch (opertok)
1917 {
1918 case '!':
1919 case '<':
1920 case '>':
1921 case tlEQ:
1922 case tlNE:
1923 case tlLE:
1924 case tlGE:
1925 if (resulttag != sc_addtag("bool"))
1926 {
1927 error(63, opername, "bool:"); /* operator X requires
1928 * a "bool:" result tag */
1929 return FALSE;
1930 } /* if */
1931 break;
1932 case '~':
1933 if (resulttag != 0)
1934 {
1935 error(63, opername, "_:"); /* operator "~" requires
1936 * a "_:" result tag */
1937 return FALSE;
1938 } /* if */
1939 break;
1940 } /* switch */
1941 return TRUE;
1942}
1943
1944static char *
1945tag2str(char *dest, int tag)
1946{
1947 tag &= TAGMASK;
1948 assert(tag >= 0);
1949 sprintf(dest, "0%x", tag);
1950 return isdigit(dest[1]) ? &dest[1] : dest;
1951}
1952
1953char *
1954operator_symname(char *symname, char *opername, int tag1, int tag2,
1955 int numtags, int resulttag)
1956{
1957 char tagstr1[10], tagstr2[10];
1958 int opertok;
1959
1960 assert(numtags >= 1 && numtags <= 2);
1961 opertok = (opername[1] == '\0') ? opername[0] : 0;
1962 if (opertok == '=')
1963 sprintf(symname, "%s%s%s", tag2str(tagstr1, resulttag), opername,
1964 tag2str(tagstr2, tag1));
1965 else if (numtags == 1 || opertok == '~')
1966 sprintf(symname, "%s%s", opername, tag2str(tagstr1, tag1));
1967 else
1968 sprintf(symname, "%s%s%s", tag2str(tagstr1, tag1), opername,
1969 tag2str(tagstr2, tag2));
1970 return symname;
1971}
1972
1973static int
1974parse_funcname(char *fname, int *tag1, int *tag2, char *opname)
1975{
1976 char *ptr, *name;
1977 int unary;
1978
1979 /* tags are only positive, so if the function name starts with a '-',
1980 * the operator is an unary '-' or '--' operator.
1981 */
1982 if (*fname == '-')
1983 {
1984 *tag1 = 0;
1985 unary = TRUE;
1986 ptr = fname;
1987 }
1988 else
1989 {
1990 *tag1 = (int)strtol(fname, &ptr, 16);
1991 unary = ptr == fname; /* unary operator if it doesn't start
1992 * with a tag name */
1993 } /* if */
1994 assert(!unary || *tag1 == 0);
1995 assert(*ptr != '\0');
1996 for (name = opname; !isdigit(*ptr);)
1997 *name++ = *ptr++;
1998 *name = '\0';
1999 *tag2 = (int)strtol(ptr, NULL, 16);
2000 return unary;
2001}
2002
2003char *
2004funcdisplayname(char *dest, char *funcname)
2005{
2006 int tags[2];
2007 char opname[10];
2008 constvalue *tagsym[2];
2009 int unary;
2010
2011 if (isalpha(*funcname) || *funcname == '_' || *funcname == PUBLIC_CHAR
2012 || *funcname == '\0')
2013 {
2014 if (dest != funcname)
2015 strcpy(dest, funcname);
2016 return dest;
2017 } /* if */
2018
2019 unary = parse_funcname(funcname, &tags[0], &tags[1], opname);
2020 tagsym[1] = find_constval_byval(&tagname_tab, tags[1]);
2021 assert(tagsym[1] != NULL);
2022 if (unary)
2023 {
2024 sprintf(dest, "operator%s(%s:)", opname, tagsym[1]->name);
2025 }
2026 else
2027 {
2028 tagsym[0] = find_constval_byval(&tagname_tab, tags[0]);
2029 /* special case: the assignment operator has the return value
2030 * as the 2nd tag */
2031 if (opname[0] == '=' && opname[1] == '\0')
2032 sprintf(dest, "%s:operator%s(%s:)", tagsym[0]->name, opname,
2033 tagsym[1]->name);
2034 else
2035 sprintf(dest, "operator%s(%s:,%s:)", opname, tagsym[0]->name,
2036 tagsym[1]->name);
2037 } /* if */
2038 return dest;
2039}
2040
2041static void
2042funcstub(int native)
2043{
2044 int tok, tag;
2045 char *str;
2046 cell val;
2047 char symbolname[sNAMEMAX + 1];
2048 symbol *sym;
2049 int opertok;
2050
2051 opertok = 0;
2052 lastst = 0;
2053 litidx = 0; /* clear the literal pool */
2054
2055 tag = sc_addtag(NULL);
2056 tok = lex(&val, &str);
2057 if (native)
2058 {
2059 if (tok == tPUBLIC || tok == tSTOCK || tok == tSTATIC ||
2060 (tok == tSYMBOL && *str == PUBLIC_CHAR))
2061 error(42); /* invalid combination of class specifiers */
2062 }
2063 else
2064 {
2065 if (tok == tPUBLIC || tok == tSTATIC)
2066 tok = lex(&val, &str);
2067 } /* if */
2068 if (tok == tOPERATOR)
2069 {
2070 opertok = operatorname(symbolname);
2071 if (opertok == 0)
2072 return; /* error message already given */
2073 check_operatortag(opertok, tag, symbolname);
2074 }
2075 else
2076 {
2077 if (tok != tSYMBOL && freading)
2078 {
2079 error(10); /* illegal function or declaration */
2080 return;
2081 } /* if */
2082 strcpy(symbolname, str);
2083 } /* if */
2084 needtoken('('); /* only functions may be native/forward */
2085
2086 sym = fetchfunc(symbolname, tag); /* get a pointer to the
2087 * function entry */
2088 if (!sym)
2089 return;
2090 if (native)
2091 {
2092 sym->usage = uNATIVE | uRETVALUE | uDEFINE;
2093 sym->x.lib = curlibrary;
2094 } /* if */
2095
2096 declargs(sym);
2097 /* "declargs()" found the ")" */
2098 if (!operatoradjust(opertok, sym, symbolname, tag))
2099 sym->usage &= ~uDEFINE;
2100 /* for a native operator, also need to specify an "exported"
2101 * function name; for a native function, this is optional
2102 */
2103 if (native)
2104 {
2105 if (opertok != 0)
2106 {
2107 needtoken('=');
2108 lexpush(); /* push back, for matchtoken() to retrieve again */
2109 } /* if */
2110 if (matchtoken('='))
2111 {
2112 /* allow number or symbol */
2113 if (matchtoken(tSYMBOL))
2114 {
2115 tokeninfo(&val, &str);
2116 if (strlen(str) > sEXPMAX)
2117 {
2118 error(220, str, sEXPMAX);
2119 str[sEXPMAX] = '\0';
2120 } /* if */
2121 insert_alias(sym->name, str);
2122 }
2123 else
2124 {
2125 constexpr(&val, NULL);
2126 sym->addr = val;
2127 /*
2128 * ?? Must mark this address, so that it won't be generated again
2129 * and it won't be written to the output file. At the moment,
2130 * I have assumed that this syntax is only valid if val < 0.
2131 * To properly mix "normal" native functions and indexed native
2132 * functions, one should use negative indices anyway.
2133 * Special code for a negative index in sym->addr exists in
2134 * SC4.C (ffcall()) and in SC6.C (the loops for counting the
2135 * number of native variables and for writing them).
2136 */
2137 } /* if */
2138 } /* if */
2139 } /* if */
2140 needtoken(tTERM);
2141
2142 litidx = 0; /* clear the literal pool */
2143 /* clear local variables queue */
2144 delete_symbols(&loctab, 0, TRUE, TRUE);
2145}
2146
2147/* newfunc - begin a function
2148 *
2149 * This routine is called from "parse" and tries to make a function
2150 * out of the following text
2151 *
2152 * Global references: funcstatus,lastst,litidx
2153 * rettype (altered)
2154 * curfunc (altered)
2155 * declared (altered)
2156 * glb_declared (altered)
2157 * sc_alignnext (altered)
2158 */
2159static int
2160newfunc(char *firstname, int firsttag, int fpublic, int fstatic, int stock)
2161{
2162 symbol *sym;
2163 int argcnt, tok, tag, funcline;
2164 int opertok, opererror;
2165 char symbolname[sNAMEMAX + 1];
2166 char *str;
2167 cell val, cidx, glbdecl;
2168 int filenum;
2169
2170 litidx = 0; /* clear the literal pool ??? */
2171 opertok = 0;
2172 lastst = 0; /* no statement yet */
2173 cidx = 0; /* just to avoid compiler warnings */
2174 glbdecl = 0;
2175 filenum = fcurrent; /* save file number at start of declaration */
2176
2177 if (firstname)
2178 {
2179 assert(strlen(firstname) <= sNAMEMAX);
2180 strcpy(symbolname, firstname); /* save symbol name */
2181 tag = firsttag;
2182 }
2183 else
2184 {
2185 tag = (firsttag >= 0) ? firsttag : sc_addtag(NULL);
2186 tok = lex(&val, &str);
2187 assert(!fpublic);
2188 if (tok == tNATIVE || (tok == tPUBLIC && stock))
2189 error(42); /* invalid combination of class specifiers */
2190 if (tok == tOPERATOR)
2191 {
2192 opertok = operatorname(symbolname);
2193 if (opertok == 0)
2194 return TRUE; /* error message already given */
2195 check_operatortag(opertok, tag, symbolname);
2196 }
2197 else
2198 {
2199 if (tok != tSYMBOL && freading)
2200 {
2201 error(20, str); /* invalid symbol name */
2202 return FALSE;
2203 } /* if */
2204 assert(strlen(str) <= sNAMEMAX);
2205 strcpy(symbolname, str);
2206 } /* if */
2207 } /* if */
2208 /* check whether this is a function or a variable declaration */
2209 if (!matchtoken('('))
2210 return FALSE;
2211 /* so it is a function, proceed */
2212 funcline = fline; /* save line at which the function is defined */
2213 if (symbolname[0] == PUBLIC_CHAR)
2214 {
2215 fpublic = TRUE; /* implicitly public function */
2216 if (stock)
2217 error(42); /* invalid combination of class specifiers */
2218 } /* if */
2219 sym = fetchfunc(symbolname, tag); /* get a pointer to the
2220 * function entry */
2221 if (!sym)
2222 return TRUE;
2223 if (fpublic)
2224 sym->usage |= uPUBLIC;
2225 if (fstatic)
2226 sym->fnumber = filenum;
2227 /* declare all arguments */
2228 argcnt = declargs(sym);
2229 opererror = !operatoradjust(opertok, sym, symbolname, tag);
2230 if (strcmp(symbolname, uMAINFUNC) == 0)
2231 {
2232 if (argcnt > 0)
2233 error(5); /* "main()" function may not have any arguments */
2234 sym->usage |= uREAD; /* "main()" is the program's entry point:
2235 * always used */
2236 } /* if */
2237 /* "declargs()" found the ")"; if a ";" appears after this, it was a
2238 * prototype */
2239 if (matchtoken(';'))
2240 {
2241 if (!sc_needsemicolon)
2242 error(218); /* old style prototypes used with optional
2243 * semicolumns */
2244 delete_symbols(&loctab, 0, TRUE, TRUE); /* prototype is done;
2245 * forget everything */
2246 return TRUE;
2247 } /* if */
2248 /* so it is not a prototype, proceed */
2249 /* if this is a function that is not referred to (this can only be
2250 * detected in the second stage), shut code generation off */
2251 if (sc_status == statWRITE && (sym->usage & uREAD) == 0)
2252 {
2253 sc_status = statSKIP;
2254 cidx = code_idx;
2255 glbdecl = glb_declared;
2256 } /* if */
2257 begcseg();
2258 sym->usage |= uDEFINE; /* set the definition flag */
2259 if (fpublic)
2260 sym->usage |= uREAD; /* public functions are always "used" */
2261 if (stock)
2262 sym->usage |= uSTOCK;
2263 if (opertok != 0 && opererror)
2264 sym->usage &= ~uDEFINE;
2265 defsymbol(sym->name, iFUNCTN, sGLOBAL,
2266 code_idx + opcodes(1) + opargs(3) + nameincells(sym->name), tag);
2267 /* ^^^ The address for the symbol is the code address. But the
2268 * "symbol" instruction itself generates code. Therefore the
2269 * offset is pre-adjusted to the value it will have after the
2270 * symbol instruction.
2271 */
2272 startfunc(sym->name); /* creates stack frame */
2273 if ((sc_debug & sSYMBOLIC) != 0)
2274 setline(funcline, fcurrent);
2275 if (sc_alignnext)
2276 {
2277 alignframe(sc_dataalign);
2278 sc_alignnext = FALSE;
2279 } /* if */
2280 declared = 0; /* number of local cells */
2281 rettype = (sym->usage & uRETVALUE); /* set "return type" variable */
2282 curfunc = sym;
2283 define_args(); /* add the symbolic info for the function arguments */
2284 statement(NULL, FALSE);
2285 if ((rettype & uRETVALUE) != 0)
2286 sym->usage |= uRETVALUE;
2287 if (declared != 0)
2288 {
2289 /* This happens only in a very special (and useless) case, where a
2290 * function has only a single statement in its body (no compound
2291 * block) and that statement declares a new variable
2292 */
2293 modstk((int)declared * sizeof(cell)); /* remove all local
2294 * variables */
2295 declared = 0;
2296 } /* if */
2297 if ((lastst != tRETURN) && (lastst != tGOTO))
2298 {
2299 const1(0);
2300 ffret();
2301 if ((sym->usage & uRETVALUE) != 0)
2302 {
2303 char symname[2 * sNAMEMAX + 16]; /* allow space for user
2304 * defined operators */
2305 funcdisplayname(symname, sym->name);
2306 error(209, symname); /* function should return a value */
2307 } /* if */
2308 } /* if */
2309 endfunc();
2310 if (litidx)
2311 { /* if there are literals defined */
2312 glb_declared += litidx;
2313 begdseg(); /* flip to DATA segment */
2314 dumplits(); /* dump literal strings */
2315 litidx = 0;
2316 } /* if */
2317 testsymbols(&loctab, 0, TRUE, TRUE); /* test for unused arguments
2318 * and labels */
2319 delete_symbols(&loctab, 0, TRUE, TRUE); /* clear local variables
2320 * queue */
2321 assert(loctab.next == NULL);
2322 curfunc = NULL;
2323 if (sc_status == statSKIP)
2324 {
2325 sc_status = statWRITE;
2326 code_idx = cidx;
2327 glb_declared = glbdecl;
2328 } /* if */
2329 return TRUE;
2330}
2331
2332static int
2333argcompare(arginfo * a1, arginfo * a2)
2334{
2335 int result, level;
2336
2337 result = strcmp(a1->name, a2->name) == 0;
2338 if (result)
2339 result = a1->ident == a2->ident;
2340 if (result)
2341 result = a1->usage == a2->usage;
2342 if (result)
2343 result = a1->numtags == a2->numtags;
2344 if (result)
2345 {
2346 int i;
2347
2348 for (i = 0; i < a1->numtags && result; i++)
2349 result = a1->tags[i] == a2->tags[i];
2350 } /* if */
2351 if (result)
2352 result = a1->hasdefault == a2->hasdefault;
2353 if (a1->hasdefault)
2354 {
2355 if (a1->ident == iREFARRAY)
2356 {
2357 if (result)
2358 result = a1->defvalue.array.size == a2->defvalue.array.size;
2359 if (result)
2360 result =
2361 a1->defvalue.array.arraysize == a2->defvalue.array.arraysize;
2362 /* also check the dimensions of both arrays */
2363 if (result)
2364 result = a1->numdim == a2->numdim;
2365 for (level = 0; result && level < a1->numdim; level++)
2366 result = a1->dim[level] == a2->dim[level];
2367 /* ??? should also check contents of the default array
2368 * (these troubles go away in a 2-pass compiler that forbids
2369 * double declarations, but Small currently does not forbid them)
2370 */
2371 }
2372 else
2373 {
2374 if (result)
2375 {
2376 if ((a1->hasdefault & uSIZEOF) != 0
2377 || (a1->hasdefault & uTAGOF) != 0)
2378 result = a1->hasdefault == a2->hasdefault
2379 && strcmp(a1->defvalue.size.symname,
2380 a2->defvalue.size.symname) == 0
2381 && a1->defvalue.size.level == a2->defvalue.size.level;
2382 else
2383 result = a1->defvalue.val == a2->defvalue.val;
2384 } /* if */
2385 } /* if */
2386 if (result)
2387 result = a1->defvalue_tag == a2->defvalue_tag;
2388 } /* if */
2389 return result;
2390}
2391
2392/* declargs()
2393 *
2394 * This routine adds an entry in the local symbol table for each
2395 * argument found in the argument list.
2396 * It returns the number of arguments.
2397 */
2398static int
2399declargs(symbol * sym)
2400{
2401#define MAXTAGS 16
2402 char *ptr;
2403 int argcnt, oldargcnt, tok, tags[MAXTAGS], numtags;
2404 cell val;
2405 arginfo arg, *arglist;
2406 char name[sNAMEMAX + 1];
2407 int ident, fpublic, fconst;
2408 int idx;
2409
2410 /* if the function is already defined earlier, get the number of
2411 * arguments of the existing definition
2412 */
2413 oldargcnt = 0;
2414 if ((sym->usage & uPROTOTYPED) != 0)
2415 while (sym->dim.arglist[oldargcnt].ident != 0)
2416 oldargcnt++;
2417 argcnt = 0; /* zero aruments up to now */
2418 ident = iVARIABLE;
2419 numtags = 0;
2420 fconst = FALSE;
2421 fpublic = (sym->usage & uPUBLIC) != 0;
2422 /* the '(' parantheses has already been parsed */
2423 if (!matchtoken(')'))
2424 {
2425 do
2426 { /* there are arguments; process them */
2427 /* any legal name increases argument count (and stack offset) */
2428 tok = lex(&val, &ptr);
2429 switch (tok)
2430 {
2431 case 0:
2432 /* nothing */
2433 break;
2434 case '&':
2435 if (ident != iVARIABLE || numtags > 0)
2436 error(1, "-identifier-", "&");
2437 ident = iREFERENCE;
2438 break;
2439 case tCONST:
2440 if (ident != iVARIABLE || numtags > 0)
2441 error(1, "-identifier-", "const");
2442 fconst = TRUE;
2443 break;
2444 case tLABEL:
2445 if (numtags > 0)
2446 error(1, "-identifier-", "-tagname-");
2447 tags[0] = sc_addtag(ptr);
2448 numtags = 1;
2449 break;
2450 case '{':
2451 if (numtags > 0)
2452 error(1, "-identifier-", "-tagname-");
2453 numtags = 0;
2454 while (numtags < MAXTAGS)
2455 {
2456 if (!matchtoken('_') && !needtoken(tSYMBOL))
2457 break;
2458 tokeninfo(&val, &ptr);
2459 tags[numtags++] = sc_addtag(ptr);
2460 if (matchtoken('}'))
2461 break;
2462 needtoken(',');
2463 } /* for */
2464 needtoken(':');
2465 tok = tLABEL; /* for outer loop:
2466 * flag that we have seen a tagname */
2467 break;
2468 case tSYMBOL:
2469 if (argcnt >= sMAXARGS)
2470 error(45); /* too many function arguments */
2471 strcpy(name, ptr); /* save symbol name */
2472 if (name[0] == PUBLIC_CHAR)
2473 error(56, name); /* function arguments cannot be public */
2474 if (numtags == 0)
2475 tags[numtags++] = 0; /* default tag */
2476 /* Stack layout:
2477 * base + 0*sizeof(cell) == previous "base"
2478 * base + 1*sizeof(cell) == function return address
2479 * base + 2*sizeof(cell) == number of arguments
2480 * base + 3*sizeof(cell) == first argument of the function
2481 * So the offset of each argument is:
2482 * "(argcnt+3) * sizeof(cell)".
2483 */
2484 doarg(name, ident, (argcnt + 3) * sizeof(cell), tags, numtags,
2485 fpublic, fconst, &arg);
2486 if (fpublic && arg.hasdefault)
2487 error(59, name); /* arguments of a public function may not
2488 * have a default value */
2489 if ((sym->usage & uPROTOTYPED) == 0)
2490 {
2491 /* redimension the argument list, add the entry */
2492 sym->dim.arglist =
2493 (arginfo *) realloc(sym->dim.arglist,
2494 (argcnt + 2) * sizeof(arginfo));
2495 if (!sym->dim.arglist)
2496 error(103); /* insufficient memory */
2497 sym->dim.arglist[argcnt] = arg;
2498 sym->dim.arglist[argcnt + 1].ident = 0; /* keep the list
2499 * terminated */
2500 }
2501 else
2502 {
2503 /* check the argument with the earlier definition */
2504 if (argcnt > oldargcnt
2505 || !argcompare(&sym->dim.arglist[argcnt], &arg))
2506 error(25); /* function definition does not match prototype */
2507 /* may need to free default array argument and the tag list */
2508 if (arg.ident == iREFARRAY && arg.hasdefault)
2509 free(arg.defvalue.array.data);
2510 else if (arg.ident == iVARIABLE
2511 && ((arg.hasdefault & uSIZEOF) != 0
2512 || (arg.hasdefault & uTAGOF) != 0))
2513 free(arg.defvalue.size.symname);
2514 free(arg.tags);
2515 } /* if */
2516 argcnt++;
2517 ident = iVARIABLE;
2518 numtags = 0;
2519 fconst = FALSE;
2520 break;
2521 case tELLIPS:
2522 if (ident != iVARIABLE)
2523 error(10); /* illegal function or declaration */
2524 if (numtags == 0)
2525 tags[numtags++] = 0; /* default tag */
2526 if ((sym->usage & uPROTOTYPED) == 0)
2527 {
2528 /* redimension the argument list, add the entry iVARARGS */
2529 sym->dim.arglist =
2530 (arginfo *) realloc(sym->dim.arglist,
2531 (argcnt + 2) * sizeof(arginfo));
2532 if (!sym->dim.arglist)
2533 error(103); /* insufficient memory */
2534 sym->dim.arglist[argcnt + 1].ident = 0; /* keep the list
2535 * terminated */
2536 sym->dim.arglist[argcnt].ident = iVARARGS;
2537 sym->dim.arglist[argcnt].hasdefault = FALSE;
2538 sym->dim.arglist[argcnt].defvalue.val = 0;
2539 sym->dim.arglist[argcnt].defvalue_tag = 0;
2540 sym->dim.arglist[argcnt].numtags = numtags;
2541 sym->dim.arglist[argcnt].tags =
2542 (int *)malloc(numtags * sizeof tags[0]);
2543 if (!sym->dim.arglist[argcnt].tags)
2544 error(103); /* insufficient memory */
2545 memcpy(sym->dim.arglist[argcnt].tags, tags,
2546 numtags * sizeof tags[0]);
2547 }
2548 else
2549 {
2550 if (argcnt > oldargcnt
2551 || sym->dim.arglist[argcnt].ident != iVARARGS)
2552 error(25); /* function definition does not match prototype */
2553 } /* if */
2554 argcnt++;
2555 break;
2556 default:
2557 error(10); /* illegal function or declaration */
2558 } /* switch */
2559 }
2560 while (tok == '&' || tok == tLABEL || tok == tCONST || (tok != tELLIPS && matchtoken(','))); /* more? */
2561 /* if the next token is not ",", it should be ")" */
2562 needtoken(')');
2563 } /* if */
2564 /* resolve any "sizeof" arguments (now that all arguments are known) */
2565 assert(sym->dim.arglist != NULL);
2566 arglist = sym->dim.arglist;
2567 for (idx = 0; idx < argcnt && arglist[idx].ident != 0; idx++)
2568 {
2569 if ((arglist[idx].hasdefault & uSIZEOF) != 0
2570 || (arglist[idx].hasdefault & uTAGOF) != 0)
2571 {
2572 int altidx;
2573
2574 /* Find the argument with the name mentioned after the "sizeof".
2575 * Note that we cannot use findloc here because we need the
2576 * arginfo struct, not the symbol.
2577 */
2578 ptr = arglist[idx].defvalue.size.symname;
2579 for (altidx = 0;
2580 altidx < argcnt && strcmp(ptr, arglist[altidx].name) != 0;
2581 altidx++)
2582 /* nothing */ ;
2583 if (altidx >= argcnt)
2584 {
2585 error(17, ptr); /* undefined symbol */
2586 }
2587 else
2588 {
2589 /* check the level against the number of dimensions */
2590 /* the level must be zero for "tagof" values */
2591 assert(arglist[idx].defvalue.size.level == 0
2592 || (arglist[idx].hasdefault & uSIZEOF) != 0);
2593 if (arglist[idx].defvalue.size.level > 0
2594 && arglist[idx].defvalue.size.level >=
2595 arglist[altidx].numdim)
2596 error(28); /* invalid subscript */
2597 if (arglist[altidx].ident != iREFARRAY)
2598 {
2599 assert(arglist[altidx].ident == iVARIABLE
2600 || arglist[altidx].ident == iREFERENCE);
2601 error(223, ptr); /* redundant sizeof */
2602 } /* if */
2603 } /* if */
2604 } /* if */
2605 } /* for */
2606
2607 sym->usage |= uPROTOTYPED;
2608 errorset(sRESET); /* reset error flag (clear the "panic mode") */
2609 return argcnt;
2610}
2611
2612/* doarg - declare one argument type
2613 *
2614 * this routine is called from "declargs()" and adds an entry in the
2615 * local symbol table for one argument. "fpublic" indicates whether
2616 * the function for this argument list is public.
2617 * The arguments themselves are never public.
2618 */
2619static void
2620doarg(char *name, int ident, int offset, int tags[], int numtags,
2621 int fpublic, int fconst, arginfo * arg)
2622{
2623 symbol *argsym;
2624 cell size;
2625 int idxtag[sDIMEN_MAX];
2626
2627 strcpy(arg->name, name);
2628 arg->hasdefault = FALSE; /* preset (most common case) */
2629 arg->defvalue.val = 0; /* clear */
2630 arg->defvalue_tag = 0;
2631 arg->numdim = 0;
2632 if (matchtoken('['))
2633 {
2634 if (ident == iREFERENCE)
2635 error(67, name); /*illegal declaration ("&name[]" is unsupported) */
2636 do
2637 {
2638 if (arg->numdim == sDIMEN_MAX)
2639 {
2640 error(53); /* exceeding maximum number of dimensions */
2641 return;
2642 } /* if */
2643 /* there is no check for non-zero major dimensions here, only if
2644 * the array parameter has a default value, we enforce that all
2645 * array dimensions, except the last, are non-zero
2646 */
2647 size = needsub(&idxtag[arg->numdim]); /* may be zero here,
2648 *it is a pointer anyway */
2649#if INT_MAX < LONG_MAX
2650 if (size > INT_MAX)
2651 error(105); /* overflow, exceeding capacity */
2652#endif
2653 arg->dim[arg->numdim] = (int)size;
2654 arg->numdim += 1;
2655 }
2656 while (matchtoken('['));
2657 ident = iREFARRAY; /* "reference to array" (is a pointer) */
2658 if (matchtoken('='))
2659 {
2660 int level;
2661
2662 lexpush(); /* initials() needs the "=" token again */
2663 assert(numtags > 0);
2664 /* for the moment, when a default value is given for the array,
2665 * all dimension sizes, except the last, must be non-zero
2666 * (function initials() requires to know the major dimensions)
2667 */
2668 for (level = 0; level < arg->numdim - 1; level++)
2669 if (arg->dim[level] == 0)
2670 error(52); /* only last dimension may be variable length */
2671 initials(ident, tags[0], &size, arg->dim, arg->numdim);
2672 assert(size >= litidx);
2673 /* allocate memory to hold the initial values */
2674 arg->defvalue.array.data = (cell *) malloc(litidx * sizeof(cell));
2675 if (arg->defvalue.array.data)
2676 {
2677 int i;
2678
2679 memcpy(arg->defvalue.array.data, litq, litidx * sizeof(cell));
2680 arg->hasdefault = TRUE; /* argument has default value */
2681 arg->defvalue.array.size = litidx;
2682 arg->defvalue.array.addr = -1;
2683 /* calculate size to reserve on the heap */
2684 arg->defvalue.array.arraysize = 1;
2685 for (i = 0; i < arg->numdim; i++)
2686 arg->defvalue.array.arraysize *= arg->dim[i];
2687 if (arg->defvalue.array.arraysize < arg->defvalue.array.size)
2688 arg->defvalue.array.arraysize = arg->defvalue.array.size;
2689 } /* if */
2690 litidx = 0; /* reset */
2691 } /* if */
2692 }
2693 else
2694 {
2695 if (matchtoken('='))
2696 {
2697 unsigned char size_tag_token;
2698
2699 assert(ident == iVARIABLE || ident == iREFERENCE);
2700 arg->hasdefault = TRUE; /* argument has a default value */
2701 size_tag_token =
2702 (unsigned char)(matchtoken(tSIZEOF) ? uSIZEOF : 0);
2703 if (size_tag_token == 0)
2704 size_tag_token =
2705 (unsigned char)(matchtoken(tTAGOF) ? uTAGOF : 0);
2706 if (size_tag_token != 0)
2707 {
2708 int paranthese;
2709
2710 if (ident == iREFERENCE)
2711 error(66, name); /* argument may not be a reference */
2712 paranthese = 0;
2713 while (matchtoken('('))
2714 paranthese++;
2715 if (needtoken(tSYMBOL))
2716 {
2717 /* save the name of the argument whose size id to take */
2718 char *name;
2719 cell val;
2720
2721 tokeninfo(&val, &name);
2722 if (!(arg->defvalue.size.symname = strdup(name)))
2723 error(103); /* insufficient memory */
2724 arg->defvalue.size.level = 0;
2725 if (size_tag_token == uSIZEOF)
2726 {
2727 while (matchtoken('['))
2728 {
2729 arg->defvalue.size.level += (short)1;
2730 needtoken(']');
2731 } /* while */
2732 } /* if */
2733 if (ident == iVARIABLE) /* make sure we set this only if
2734 * not a reference */
2735 arg->hasdefault |= size_tag_token; /* uSIZEOF or uTAGOF */
2736 } /* if */
2737 while (paranthese--)
2738 needtoken(')');
2739 }
2740 else
2741 {
2742 constexpr(&arg->defvalue.val, &arg->defvalue_tag);
2743 assert(numtags > 0);
2744 if (!matchtag(tags[0], arg->defvalue_tag, TRUE))
2745 error(213); /* tagname mismatch */
2746 } /* if */
2747 } /* if */
2748 } /* if */
2749 arg->ident = (char)ident;
2750 arg->usage = (char)(fconst ? uCONST : 0);
2751 arg->numtags = numtags;
2752 arg->tags = (int *)malloc(numtags * sizeof tags[0]);
2753 if (!arg->tags)
2754 error(103); /* insufficient memory */
2755 memcpy(arg->tags, tags, numtags * sizeof tags[0]);
2756 argsym = findloc(name);
2757 if (argsym)
2758 {
2759 error(21, name); /* symbol already defined */
2760 }
2761 else
2762 {
2763 if ((argsym = findglb(name)) && argsym->ident != iFUNCTN)
2764 error(219, name); /* variable shadows another symbol */
2765 /* add details of type and address */
2766 assert(numtags > 0);
2767 argsym = addvariable(name, offset, ident, sLOCAL, tags[0],
2768 arg->dim, arg->numdim, idxtag);
2769 argsym->compound = 0;
2770 if (ident == iREFERENCE)
2771 argsym->usage |= uREAD; /* because references are passed back */
2772 if (fpublic)
2773 argsym->usage |= uREAD; /* arguments of public functions
2774 * are always "used" */
2775 if (fconst)
2776 argsym->usage |= uCONST;
2777 } /* if */
2778}
2779
2780static int
2781count_referrers(symbol * entry)
2782{
2783 int i, count;
2784
2785 count = 0;
2786 for (i = 0; i < entry->numrefers; i++)
2787 if (entry->refer[i])
2788 count++;
2789 return count;
2790}
2791
2792/* Every symbol has a referrer list, that contains the functions that
2793 * use the symbol. Now, if function "apple" is accessed by functions
2794 * "banana" and "citron", but neither function "banana" nor "citron" are
2795 * used by anyone else, then, by inference, function "apple" is not used
2796 * either. */
2797static void
2798reduce_referrers(symbol * root)
2799{
2800 int i, restart;
2801 symbol *sym, *ref;
2802
2803 do
2804 {
2805 restart = 0;
2806 for (sym = root->next; sym; sym = sym->next)
2807 {
2808 if (sym->parent)
2809 continue; /* hierarchical data type */
2810 if (sym->ident == iFUNCTN
2811 && (sym->usage & uNATIVE) == 0
2812 && (sym->usage & uPUBLIC) == 0
2813 && strcmp(sym->name, uMAINFUNC) != 0
2814 && count_referrers(sym) == 0)
2815 {
2816 sym->usage &= ~(uREAD | uWRITTEN); /* erase usage bits if
2817 * there is no referrer */
2818 /* find all symbols that are referred by this symbol */
2819 for (ref = root->next; ref; ref = ref->next)
2820 {
2821 if (ref->parent)
2822 continue; /* hierarchical data type */
2823 assert(ref->refer != NULL);
2824 for (i = 0; i < ref->numrefers && ref->refer[i] != sym;
2825 i++)
2826 /* nothing */ ;
2827 if (i < ref->numrefers)
2828 {
2829 assert(ref->refer[i] == sym);
2830 ref->refer[i] = NULL;
2831 restart++;
2832 } /* if */
2833 } /* for */
2834 }
2835 else if ((sym->ident == iVARIABLE || sym->ident == iARRAY)
2836 && (sym->usage & uPUBLIC) == 0
2837 && !sym->parent && count_referrers(sym) == 0)
2838 {
2839 sym->usage &= ~(uREAD | uWRITTEN); /* erase usage bits if
2840 * there is no referrer */
2841 } /* if */
2842 } /* for */
2843 /* after removing a symbol, check whether more can be removed */
2844 }
2845 while (restart > 0);
2846}
2847
2848/* testsymbols - test for unused local or global variables
2849 *
2850 * "Public" functions are excluded from the check, since these
2851 * may be exported to other object modules.
2852 * Labels are excluded from the check if the argument 'testlabs'
2853 * is 0. Thus, labels are not tested until the end of the function.
2854 * Constants may also be excluded (convenient for global constants).
2855 *
2856 * When the nesting level drops below "level", the check stops.
2857 *
2858 * The function returns whether there is an "entry" point for the file.
2859 * This flag will only be 1 when browsing the global symbol table.
2860 */
2861static int
2862testsymbols(symbol * root, int level, int testlabs, int testconst)
2863{
2864 char symname[2 * sNAMEMAX + 16];
2865 int entry = FALSE;
2866
2867 symbol *sym = root->next;
2868
2869 while (sym && sym->compound >= level)
2870 {
2871 switch (sym->ident)
2872 {
2873 case iLABEL:
2874 if (testlabs)
2875 {
2876 if ((sym->usage & uDEFINE) == 0)
2877 error(19, sym->name); /* not a label: ... */
2878 else if ((sym->usage & uREAD) == 0)
2879 error(203, sym->name); /* symbol isn't used: ... */
2880 } /* if */
2881 break;
2882 case iFUNCTN:
2883 if ((sym->usage & (uDEFINE | uREAD | uNATIVE | uSTOCK)) == uDEFINE)
2884 {
2885 funcdisplayname(symname, sym->name);
2886 if (symname[0] != '\0')
2887 error(203, symname); /* symbol isn't used ...
2888 * (and not native/stock) */
2889 } /* if */
2890 if ((sym->usage & uPUBLIC) != 0
2891 || strcmp(sym->name, uMAINFUNC) == 0)
2892 entry = TRUE; /* there is an entry point */
2893 break;
2894 case iCONSTEXPR:
2895 if (testconst && (sym->usage & uREAD) == 0)
2896 error(203, sym->name); /* symbol isn't used: ... */
2897 break;
2898 default:
2899 /* a variable */
2900 if (sym->parent)
2901 break; /* hierarchical data type */
2902 if ((sym->usage & (uWRITTEN | uREAD | uSTOCK | uPUBLIC)) == 0)
2903 error(203, sym->name); /* symbol isn't used (and not stock
2904 * or public) */
2905 else if ((sym->usage & (uREAD | uSTOCK | uPUBLIC)) == 0)
2906 error(204, sym->name); /* value assigned to symbol is
2907 * never used */
2908#if 0 /*// ??? not sure whether it is a good idea to
2909 * force people use "const" */
2910 else if ((sym->usage & (uWRITTEN | uPUBLIC | uCONST)) == 0
2911 && sym->ident == iREFARRAY)
2912 error(214, sym->name); /* make array argument "const" */
2913#endif
2914 } /* if */
2915 sym = sym->next;
2916 } /* while */
2917
2918 return entry;
2919}
2920
2921static cell
2922calc_array_datasize(symbol * sym, cell * offset)
2923{
2924 cell length;
2925
2926 assert(sym != NULL);
2927 assert(sym->ident == iARRAY || sym->ident == iREFARRAY);
2928 length = sym->dim.array.length;
2929 if (sym->dim.array.level > 0)
2930 {
2931 cell sublength =
2932 calc_array_datasize(finddepend(sym), offset);
2933 if (offset)
2934 *offset = length * (*offset + sizeof(cell));
2935 if (sublength > 0)
2936 length *= length * sublength;
2937 else
2938 length = 0;
2939 }
2940 else
2941 {
2942 if (offset)
2943 *offset = 0;
2944 } /* if */
2945 return length;
2946}
2947
2948static void
2949destructsymbols(symbol * root, int level)
2950{
2951 cell offset = 0;
2952 int savepri = FALSE;
2953 symbol *sym = root->next;
2954
2955 while (sym && sym->compound >= level)
2956 {
2957 if (sym->ident == iVARIABLE || sym->ident == iARRAY)
2958 {
2959 char symbolname[16];
2960 symbol *opsym;
2961 cell elements;
2962
2963 /* check that the '~' operator is defined for this tag */
2964 operator_symname(symbolname, "~", sym->tag, 0, 1, 0);
2965 if ((opsym = findglb(symbolname)))
2966 {
2967 /* save PRI, in case of a return statement */
2968 if (!savepri)
2969 {
2970 push1(); /* right-hand operand is in PRI */
2971 savepri = TRUE;
2972 } /* if */
2973 /* if the variable is an array, get the number of elements */
2974 if (sym->ident == iARRAY)
2975 {
2976 elements = calc_array_datasize(sym, &offset);
2977 /* "elements" can be zero when the variable is declared like
2978 * new mytag: myvar[2][] = { {1, 2}, {3, 4} }
2979 * one should declare all dimensions!
2980 */
2981 if (elements == 0)
2982 error(46, sym->name); /* array size is unknown */
2983 }
2984 else
2985 {
2986 elements = 1;
2987 offset = 0;
2988 } /* if */
2989 pushval(elements);
2990 /* call the '~' operator */
2991 address(sym);
2992 addconst(offset); /*add offset to array data to the address */
2993 push1();
2994 pushval(2 * sizeof(cell)); /* 2 parameters */
2995 ffcall(opsym, 1);
2996 if (sc_status != statSKIP)
2997 markusage(opsym, uREAD); /* do not mark as "used" when this
2998 * call itself is skipped */
2999 if (opsym->x.lib)
3000 opsym->x.lib->value += 1; /* increment "usage count"
3001 * of the library */
3002 } /* if */
3003 } /* if */
3004 sym = sym->next;
3005 } /* while */
3006 /* restore PRI, if it was saved */
3007 if (savepri)
3008 pop1();
3009}
3010
3011static constvalue *
3012insert_constval(constvalue * prev, constvalue * next, char *name,
3013 cell val, short index)
3014{
3015 constvalue *cur;
3016
3017 if (!(cur = (constvalue *)malloc(sizeof(constvalue))))
3018 error(103); /* insufficient memory (fatal error) */
3019 memset(cur, 0, sizeof(constvalue));
3020 strcpy(cur->name, name);
3021 cur->value = val;
3022 cur->index = index;
3023 cur->next = next;
3024 prev->next = cur;
3025 return cur;
3026}
3027
3028constvalue *
3029append_constval(constvalue * table, char *name, cell val, short index)
3030{
3031 constvalue *cur, *prev;
3032
3033 /* find the end of the constant table */
3034 for (prev = table, cur = table->next; cur;
3035 prev = cur, cur = cur->next)
3036 /* nothing */ ;
3037 return insert_constval(prev, NULL, name, val, index);
3038}
3039
3040constvalue *
3041find_constval(constvalue * table, char *name, short index)
3042{
3043 constvalue *ptr = table->next;
3044
3045 while (ptr)
3046 {
3047 if (strcmp(name, ptr->name) == 0 && ptr->index == index)
3048 return ptr;
3049 ptr = ptr->next;
3050 } /* while */
3051 return NULL;
3052}
3053
3054static constvalue *
3055find_constval_byval(constvalue * table, cell val)
3056{
3057 constvalue *ptr = table->next;
3058
3059 while (ptr)
3060 {
3061 if (ptr->value == val)
3062 return ptr;
3063 ptr = ptr->next;
3064 } /* while */
3065 return NULL;
3066}
3067
3068#if 0 /* never used */
3069static int
3070delete_constval(constvalue * table, char *name)
3071{
3072 constvalue *prev = table;
3073 constvalue *cur = prev->next;
3074
3075 while (cur != NULL)
3076 {
3077 if (strcmp(name, cur->name) == 0)
3078 {
3079 prev->next = cur->next;
3080 free(cur);
3081 return TRUE;
3082 } /* if */
3083 prev = cur;
3084 cur = cur->next;
3085 } /* while */
3086 return FALSE;
3087}
3088#endif
3089
3090void
3091delete_consttable(constvalue * table)
3092{
3093 constvalue *cur = table->next, *next;
3094
3095 while (cur)
3096 {
3097 next = cur->next;
3098 free(cur);
3099 cur = next;
3100 } /* while */
3101 memset(table, 0, sizeof(constvalue));
3102}
3103
3104/* add_constant
3105 *
3106 * Adds a symbol to the #define symbol table.
3107 */
3108void
3109add_constant(char *name, cell val, int vclass, int tag)
3110{
3111 symbol *sym;
3112
3113 /* Test whether a global or local symbol with the same name exists. Since
3114 * constants are stored in the symbols table, this also finds previously
3115 * defind constants. */
3116 sym = findglb(name);
3117 if (!sym)
3118 sym = findloc(name);
3119 if (sym)
3120 {
3121 /* silently ignore redefinitions of constants with the same value */
3122 if (sym->ident == iCONSTEXPR)
3123 {
3124 if (sym->addr != val)
3125 error(201, name); /* redefinition of constant (different value) */
3126 }
3127 else
3128 {
3129 error(21, name); /* symbol already defined */
3130 } /* if */
3131 return;
3132 } /* if */
3133
3134 /* constant doesn't exist yet, an entry must be created */
3135 sym = addsym(name, val, iCONSTEXPR, vclass, tag, uDEFINE);
3136 if (sc_status == statIDLE)
3137 sym->usage |= uPREDEF;
3138}
3139
3140/* statement - The Statement Parser
3141 *
3142 * This routine is called whenever the parser needs to know what
3143 * statement it encounters (i.e. whenever program syntax requires a
3144 * statement).
3145 */
3146static void
3147statement(int *lastindent, int allow_decl)
3148{
3149 int tok;
3150 cell val;
3151 char *st;
3152
3153 if (!freading)
3154 {
3155 error(36); /* empty statement */
3156 return;
3157 } /* if */
3158 errorset(sRESET);
3159
3160 tok = lex(&val, &st);
3161 if (tok != '{')
3162 setline(fline, fcurrent);
3163 /* lex() has set stmtindent */
3164 if (lastindent && tok != tLABEL)
3165 {
3166#if 0
3167 if (*lastindent >= 0 && *lastindent != stmtindent &&
3168 !indent_nowarn && sc_tabsize > 0)
3169 error(217); /* loose indentation */
3170#endif
3171 *lastindent = stmtindent;
3172 indent_nowarn = TRUE; /* if warning was blocked, re-enable it */
3173 } /* if */
3174 switch (tok)
3175 {
3176 case 0:
3177 /* nothing */
3178 break;
3179 case tNEW:
3180 if (allow_decl)
3181 {
3182 declloc(FALSE);
3183 lastst = tNEW;
3184 }
3185 else
3186 {
3187 error(3); /* declaration only valid in a block */
3188 } /* if */
3189 break;
3190 case tSTATIC:
3191 if (allow_decl)
3192 {
3193 declloc(TRUE);
3194 lastst = tNEW;
3195 }
3196 else
3197 {
3198 error(3); /* declaration only valid in a block */
3199 } /* if */
3200 break;
3201 case '{':
3202 if (!matchtoken('}')) /* {} is the empty statement */
3203 compound();
3204 /* lastst (for "last statement") does not change */
3205 break;
3206 case ';':
3207 error(36); /* empty statement */
3208 break;
3209 case tIF:
3210 doif();
3211 lastst = tIF;
3212 break;
3213 case tWHILE:
3214 dowhile();
3215 lastst = tWHILE;
3216 break;
3217 case tDO:
3218 dodo();
3219 lastst = tDO;
3220 break;
3221 case tFOR:
3222 dofor();
3223 lastst = tFOR;
3224 break;
3225 case tSWITCH:
3226 doswitch();
3227 lastst = tSWITCH;
3228 break;
3229 case tCASE:
3230 case tDEFAULT:
3231 error(14); /* not in switch */
3232 break;
3233 case tGOTO:
3234 dogoto();
3235 lastst = tGOTO;
3236 break;
3237 case tLABEL:
3238 dolabel();
3239 lastst = tLABEL;
3240 break;
3241 case tRETURN:
3242 doreturn();
3243 lastst = tRETURN;
3244 break;
3245 case tBREAK:
3246 dobreak();
3247 lastst = tBREAK;
3248 break;
3249 case tCONTINUE:
3250 docont();
3251 lastst = tCONTINUE;
3252 break;
3253 case tEXIT:
3254 doexit();
3255 lastst = tEXIT;
3256 break;
3257 case tASSERT:
3258 doassert();
3259 lastst = tASSERT;
3260 break;
3261 case tSLEEP:
3262 dosleep();
3263 lastst = tSLEEP;
3264 break;
3265 case tCONST:
3266 decl_const(sLOCAL);
3267 break;
3268 case tENUM:
3269 decl_enum(sLOCAL);
3270 break;
3271 default: /* non-empty expression */
3272 lexpush(); /* analyze token later */
3273 doexpr(TRUE, TRUE, TRUE, TRUE, NULL, FALSE);
3274 needtoken(tTERM);
3275 lastst = tEXPR;
3276 } /* switch */
3277}
3278
3279static void
3280compound(void)
3281{
3282 int indent = -1;
3283 cell save_decl = declared;
3284 int count_stmt = 0;
3285
3286 nestlevel += 1; /* increase compound statement level */
3287 while (matchtoken('}') == 0)
3288 { /* repeat until compound statement is closed */
3289 if (!freading)
3290 {
3291 needtoken('}'); /* gives error: "expected token }" */
3292 break;
3293 }
3294 else
3295 {
3296 if (count_stmt > 0
3297 && (lastst == tRETURN || lastst == tBREAK
3298 || lastst == tCONTINUE))
3299 error(225); /* unreachable code */
3300 statement(&indent, TRUE); /* do a statement */
3301 count_stmt++;
3302 } /* if */
3303 } /* while */
3304 if (lastst != tRETURN)
3305 destructsymbols(&loctab, nestlevel);
3306 if (lastst != tRETURN && lastst != tGOTO)
3307 /* delete local variable space */
3308 modstk((int)(declared - save_decl) * sizeof(cell));
3309
3310 testsymbols(&loctab, nestlevel, FALSE, TRUE); /* look for unused
3311 * block locals */
3312 declared = save_decl;
3313 delete_symbols(&loctab, nestlevel, FALSE, TRUE);
3314 /* erase local symbols, but
3315 * retain block local labels
3316 * (within the function) */
3317
3318 nestlevel -= 1; /* decrease compound statement level */
3319}
3320
3321/* doexpr
3322 *
3323 * Global references: stgidx (referred to only)
3324 */
3325static void
3326doexpr(int comma, int chkeffect, int allowarray, int mark_endexpr,
3327 int *tag, int chkfuncresult)
3328{
3329 int constant, index, ident;
3330 int localstaging = FALSE;
3331 cell val;
3332
3333 if (!staging)
3334 {
3335 stgset(TRUE); /* start stage-buffering */
3336 localstaging = TRUE;
3337 assert(stgidx == 0);
3338 } /* if */
3339 index = stgidx;
3340 errorset(sEXPRMARK);
3341 do
3342 {
3343 /* on second round through, mark the end of the previous expression */
3344 if (index != stgidx)
3345 endexpr(TRUE);
3346 sideeffect = FALSE;
3347 ident = expression(&constant, &val, tag, chkfuncresult);
3348 if (!allowarray && (ident == iARRAY || ident == iREFARRAY))
3349 error(33, "-unknown-"); /* array must be indexed */
3350 if (chkeffect && !sideeffect)
3351 error(215); /* expression has no effect */
3352 }
3353 while (comma && matchtoken(',')); /* more? */
3354 if (mark_endexpr)
3355 endexpr(TRUE); /* optionally, mark the end of the expression */
3356 errorset(sEXPRRELEASE);
3357 if (localstaging)
3358 {
3359 stgout(index);
3360 stgset(FALSE); /* stop staging */
3361 } /* if */
3362}
3363
3364/* constexpr
3365 */
3366int
3367constexpr(cell * val, int *tag)
3368{
3369 int constant, index;
3370 cell cidx;
3371
3372 stgset(TRUE); /* start stage-buffering */
3373 stgget(&index, &cidx); /* mark position in code generator */
3374 errorset(sEXPRMARK);
3375 expression(&constant, val, tag, FALSE);
3376 stgdel(index, cidx); /* scratch generated code */
3377 stgset(FALSE); /* stop stage-buffering */
3378 if (constant == 0)
3379 error(8); /* must be constant expression */
3380 errorset(sEXPRRELEASE);
3381 return constant;
3382}
3383
3384/* test
3385 *
3386 * In the case a "simple assignment" operator ("=") is used within a
3387 * test, * the warning "possibly unintended assignment" is displayed.
3388 * This routine sets the global variable "intest" to true, it is
3389 * restored upon termination. In the case the assignment was intended,
3390 * use parantheses around the expression to avoid the warning;
3391 * primary() sets "intest" to 0.
3392 *
3393 * Global references: intest (altered, but restored upon termination)
3394 */
3395static void
3396test(int label, int parens, int invert)
3397{
3398 int index, tok;
3399 cell cidx;
3400 value lval = { NULL, 0, 0, 0, 0, NULL };
3401 int localstaging = FALSE;
3402
3403 if (!staging)
3404 {
3405 stgset(TRUE); /* start staging */
3406 localstaging = TRUE;
3407#if !defined NDEBUG
3408 stgget(&index, &cidx); /* should start at zero if started
3409 * locally */
3410 assert(index == 0);
3411#endif
3412 } /* if */
3413
3414 pushstk((stkitem) intest);
3415 intest = 1;
3416 if (parens)
3417 needtoken('(');
3418 do
3419 {
3420 stgget(&index, &cidx); /* mark position (of last expression) in
3421 * code generator */
3422 if (hier14(&lval))
3423 rvalue(&lval);
3424 tok = matchtoken(',');
3425 if (tok)
3426 endexpr(TRUE);
3427 }
3428 while (tok); /* do */
3429 if (parens)
3430 needtoken(')');
3431 if (lval.ident == iARRAY || lval.ident == iREFARRAY)
3432 {
3433 char *ptr =
3434 (lval.sym->name) ? lval.sym->name : "-unknown-";
3435 error(33, ptr); /* array must be indexed */
3436 } /* if */
3437 if (lval.ident == iCONSTEXPR)
3438 { /* constant expression */
3439 intest = (int)(long)popstk(); /* restore stack */
3440 stgdel(index, cidx);
3441 if (lval.constval)
3442 { /* code always executed */
3443 error(206); /* redundant test: always non-zero */
3444 }
3445 else
3446 {
3447 error(205); /* redundant code: never executed */
3448 jumplabel(label);
3449 } /* if */
3450 if (localstaging)
3451 {
3452 stgout(0); /* write "jumplabel" code */
3453 stgset(FALSE); /* stop staging */
3454 } /* if */
3455 return;
3456 } /* if */
3457 if (lval.tag != 0 && lval.tag != sc_addtag("bool"))
3458 if (check_userop(lneg, lval.tag, 0, 1, NULL, &lval.tag))
3459 invert = !invert; /* user-defined ! operator inverted result */
3460 if (invert)
3461 jmp_ne0(label); /* jump to label if true (different from 0) */
3462 else
3463 jmp_eq0(label); /* jump to label if false (equal to 0) */
3464 endexpr(TRUE); /* end expression (give optimizer a chance) */
3465 intest = (int)(long)popstk(); /* double typecast to avoid warning
3466 * with Microsoft C */
3467 if (localstaging)
3468 {
3469 stgout(0); /* output queue from the very beginning (see
3470 * assert() when localstaging is set to TRUE) */
3471 stgset(FALSE); /* stop staging */
3472 } /* if */
3473}
3474
3475static void
3476doif(void)
3477{
3478 int flab1, flab2;
3479 int ifindent;
3480
3481 ifindent = stmtindent; /* save the indent of the "if" instruction */
3482 flab1 = getlabel(); /* get label number for false branch */
3483 test(flab1, TRUE, FALSE); /*get expression, branch to flab1 if false */
3484 statement(NULL, FALSE); /* if true, do a statement */
3485 if (matchtoken(tELSE) == 0)
3486 { /* if...else ? */
3487 setlabel(flab1); /* no, simple if..., print false label */
3488 }
3489 else
3490 {
3491 /* to avoid the "dangling else" error, we want a warning if the "else"
3492 * has a lower indent than the matching "if" */
3493#if 0
3494 if (stmtindent < ifindent && sc_tabsize > 0)
3495 error(217); /* loose indentation */
3496#endif
3497 flab2 = getlabel();
3498 if ((lastst != tRETURN) && (lastst != tGOTO))
3499 jumplabel(flab2);
3500 setlabel(flab1); /* print false label */
3501 statement(NULL, FALSE); /* do "else" clause */
3502 setlabel(flab2); /* print true label */
3503 } /* endif */
3504}
3505
3506static void
3507dowhile(void)
3508{
3509 int wq[wqSIZE]; /* allocate local queue */
3510
3511 addwhile(wq); /* add entry to queue for "break" */
3512 setlabel(wq[wqLOOP]); /* loop label */
3513 /* The debugger uses the "line" opcode to be able to "break" out of
3514 * a loop. To make sure that each loop has a line opcode, even for the
3515 * tiniest loop, set it below the top of the loop */
3516 setline(fline, fcurrent);
3517 test(wq[wqEXIT], TRUE, FALSE); /* branch to wq[wqEXIT] if false */
3518 statement(NULL, FALSE); /* if so, do a statement */
3519 jumplabel(wq[wqLOOP]); /* and loop to "while" start */
3520 setlabel(wq[wqEXIT]); /* exit label */
3521 delwhile(); /* delete queue entry */
3522}
3523
3524/*
3525 * Note that "continue" will in this case not jump to the top of the
3526 * loop, but to the end: just before the TRUE-or-FALSE testing code.
3527 */
3528static void
3529dodo(void)
3530{
3531 int wq[wqSIZE], top;
3532
3533 addwhile(wq); /* see "dowhile" for more info */
3534 top = getlabel(); /* make a label first */
3535 setlabel(top); /* loop label */
3536 statement(NULL, FALSE);
3537 needtoken(tWHILE);
3538 setlabel(wq[wqLOOP]); /* "continue" always jumps to WQLOOP. */
3539 setline(fline, fcurrent);
3540 test(wq[wqEXIT], TRUE, FALSE);
3541 jumplabel(top);
3542 setlabel(wq[wqEXIT]);
3543 delwhile();
3544 needtoken(tTERM);
3545}
3546
3547static void
3548dofor(void)
3549{
3550 int wq[wqSIZE], skiplab;
3551 cell save_decl;
3552 int save_nestlevel, index;
3553 int *ptr;
3554
3555 save_decl = declared;
3556 save_nestlevel = nestlevel;
3557
3558 addwhile(wq);
3559 skiplab = getlabel();
3560 needtoken('(');
3561 if (matchtoken(';') == 0)
3562 {
3563 /* new variable declarations are allowed here */
3564 if (matchtoken(tNEW))
3565 {
3566 /* The variable in expr1 of the for loop is at a
3567 * 'compound statement' level of it own.
3568 */
3569 nestlevel++;
3570 declloc(FALSE); /* declare local variable */
3571 }
3572 else
3573 {
3574 doexpr(TRUE, TRUE, TRUE, TRUE, NULL, FALSE); /* expression 1 */
3575 needtoken(';');
3576 } /* if */
3577 } /* if */
3578 /* Adjust the "declared" field in the "while queue", in case that
3579 * local variables were declared in the first expression of the
3580 * "for" loop. These are deleted in separately, so a "break" or a
3581 * "continue" must ignore these fields.
3582 */
3583 ptr = readwhile();
3584 assert(ptr != NULL);
3585 ptr[wqBRK] = (int)declared;
3586 ptr[wqCONT] = (int)declared;
3587 jumplabel(skiplab); /* skip expression 3 1st time */
3588 setlabel(wq[wqLOOP]); /* "continue" goes to this label: expr3 */
3589 setline(fline, fcurrent);
3590 /* Expressions 2 and 3 are reversed in the generated code:
3591 * expression 3 precedes expression 2.
3592 * When parsing, the code is buffered and marks for
3593 * the start of each expression are insterted in the buffer.
3594 */
3595 assert(!staging);
3596 stgset(TRUE); /* start staging */
3597 assert(stgidx == 0);
3598 index = stgidx;
3599 stgmark(sSTARTREORDER);
3600 stgmark((char)(sEXPRSTART + 0)); /* mark start of 2nd expression
3601 * in stage */
3602 setlabel(skiplab); /*jump to this point after 1st expression */
3603 if (matchtoken(';') == 0)
3604 {
3605 test(wq[wqEXIT], FALSE, FALSE); /* expression 2
3606 *(jump to wq[wqEXIT] if false) */
3607 needtoken(';');
3608 } /* if */
3609 stgmark((char)(sEXPRSTART + 1)); /* mark start of 3th expression
3610 * in stage */
3611 if (matchtoken(')') == 0)
3612 {
3613 doexpr(TRUE, TRUE, TRUE, TRUE, NULL, FALSE); /* expression 3 */
3614 needtoken(')');
3615 } /* if */
3616 stgmark(sENDREORDER); /* mark end of reversed evaluation */
3617 stgout(index);
3618 stgset(FALSE); /* stop staging */
3619 statement(NULL, FALSE);
3620 jumplabel(wq[wqLOOP]);
3621 setlabel(wq[wqEXIT]);
3622 delwhile();
3623
3624 assert(nestlevel >= save_nestlevel);
3625 if (nestlevel > save_nestlevel)
3626 {
3627 /* Clean up the space and the symbol table for the local
3628 * variable in "expr1".
3629 */
3630 destructsymbols(&loctab, nestlevel);
3631 modstk((int)(declared - save_decl) * sizeof(cell));
3632 declared = save_decl;
3633 delete_symbols(&loctab, nestlevel, FALSE, TRUE);
3634 nestlevel = save_nestlevel; /* reset 'compound statement'
3635 * nesting level */
3636 } /* if */
3637}
3638
3639/* The switch statement is incompatible with its C sibling:
3640 * 1. the cases are not drop through
3641 * 2. only one instruction may appear below each case, use a compound
3642 * instruction to execute multiple instructions
3643 * 3. the "case" keyword accepts a comma separated list of values to
3644 * match, it also accepts a range using the syntax "1 .. 4"
3645 *
3646 * SWITCH param
3647 * PRI = expression result
3648 * param = table offset (code segment)
3649 *
3650 */
3651static void
3652doswitch(void)
3653{
3654 int lbl_table, lbl_exit, lbl_case;
3655 int tok, swdefault, casecount;
3656 cell val;
3657 char *str;
3658 constvalue caselist = { NULL, "", 0, 0 }; /*case list starts empty */
3659 constvalue *cse, *csp;
3660 char labelname[sNAMEMAX + 1];
3661
3662 needtoken('(');
3663 doexpr(TRUE, FALSE, FALSE, TRUE, NULL, FALSE); /* evaluate
3664 * switch expression */
3665 needtoken(')');
3666 /* generate the code for the switch statement, the label is the
3667 * address of the case table (to be generated later).
3668 */
3669 lbl_table = getlabel();
3670 lbl_case = 0; /* just to avoid a compiler warning */
3671 ffswitch(lbl_table);
3672
3673 needtoken('{');
3674 lbl_exit = getlabel(); /*get label number for jumping out of switch */
3675 swdefault = FALSE;
3676 casecount = 0;
3677 do
3678 {
3679 tok = lex(&val, &str); /* read in (new) token */
3680 switch (tok)
3681 {
3682 case tCASE:
3683 if (swdefault != FALSE)
3684 error(15); /* "default" case must be last in switch
3685 * statement */
3686 lbl_case = getlabel();
3687 sc_allowtags = FALSE; /* do not allow tagnames here */
3688 do
3689 {
3690 casecount++;
3691
3692 /* ??? enforce/document that, in a switch, a statement cannot
3693 * start an opening brace (marks the start of a compound
3694 * statement) and search for the right-most colon before that
3695 * statement.
3696 * Now, by replacing the ':' by a special COLON token, you can
3697 * parse all expressions until that special token.
3698 */
3699
3700 constexpr(&val, NULL);
3701 /* Search the insertion point (the table is kept in sorted
3702 * order, so that advanced abstract machines can sift the
3703 * case table with a binary search). Check for duplicate
3704 * case values at the same time.
3705 */
3706 for (csp = &caselist, cse = caselist.next;
3707 cse && cse->value < val;
3708 csp = cse, cse = cse->next)
3709 /* nothing */ ;
3710 if (cse && cse->value == val)
3711 error(40, val); /* duplicate "case" label */
3712 /* Since the label is stored as a string in the
3713 * "constvalue", the size of an identifier must
3714 * be at least 8, as there are 8
3715 * hexadecimal digits in a 32-bit number.
3716 */
3717#if sNAMEMAX < 8
3718#error Length of identifier (sNAMEMAX) too small.
3719#endif
3720 insert_constval(csp, cse, itoh(lbl_case), val, 0);
3721 if (matchtoken(tDBLDOT))
3722 {
3723 cell end;
3724
3725 constexpr(&end, NULL);
3726 if (end <= val)
3727 error(50); /* invalid range */
3728 while (++val <= end)
3729 {
3730 casecount++;
3731 /* find the new insertion point */
3732 for (csp = &caselist, cse = caselist.next;
3733 cse && cse->value < val;
3734 csp = cse, cse = cse->next)
3735 /* nothing */ ;
3736 if (cse && cse->value == val)
3737 error(40, val); /* duplicate "case" label */
3738 insert_constval(csp, cse, itoh(lbl_case), val, 0);
3739 } /* if */
3740 } /* if */
3741 }
3742 while (matchtoken(','));
3743 needtoken(':'); /* ':' ends the case */
3744 sc_allowtags = TRUE; /* reset */
3745 setlabel(lbl_case);
3746 statement(NULL, FALSE);
3747 jumplabel(lbl_exit);
3748 break;
3749 case tDEFAULT:
3750 if (swdefault != FALSE)
3751 error(16); /* multiple defaults in switch */
3752 lbl_case = getlabel();
3753 setlabel(lbl_case);
3754 needtoken(':');
3755 swdefault = TRUE;
3756 statement(NULL, FALSE);
3757 /* Jump to lbl_exit, even thouh this is the last clause in the
3758 *switch, because the jump table is generated between the last
3759 * clause of the switch and the exit label.
3760 */
3761 jumplabel(lbl_exit);
3762 break;
3763 case '}':
3764 /* nothing, but avoid dropping into "default" */
3765 break;
3766 default:
3767 error(2);
3768 indent_nowarn = TRUE; /* disable this check */
3769 tok = '}'; /* break out of the loop after an error */
3770 } /* switch */
3771 }
3772 while (tok != '}');
3773
3774#if !defined NDEBUG
3775 /* verify that the case table is sorted (unfortunately, duplicates can
3776 * occur; there really shouldn't be duplicate cases, but the compiler
3777 * may not crash or drop into an assertion for a user error). */
3778 for (cse = caselist.next; cse && cse->next; cse = cse->next)
3779 ; /* empty. no idea whether this is correct, but we MUST NOT do
3780 * the setlabel(lbl_table) call in the loop body. doing so breaks
3781 * switch statements that only have one case statement following.
3782 */
3783#endif
3784
3785 /* generate the table here, before lbl_exit (general jump target) */
3786 setlabel(lbl_table);
3787
3788 if (swdefault == FALSE)
3789 {
3790 /* store lbl_exit as the "none-matched" label in the switch table */
3791 strcpy(labelname, itoh(lbl_exit));
3792 }
3793 else
3794 {
3795 /* lbl_case holds the label of the "default" clause */
3796 strcpy(labelname, itoh(lbl_case));
3797 } /* if */
3798 ffcase(casecount, labelname, TRUE);
3799 /* generate the rest of the table */
3800 for (cse = caselist.next; cse; cse = cse->next)
3801 ffcase(cse->value, cse->name, FALSE);
3802
3803 setlabel(lbl_exit);
3804 delete_consttable(&caselist); /* clear list of case labels */
3805}
3806
3807static void
3808doassert(void)
3809{
3810 int flab1, index;
3811 cell cidx;
3812 value lval = { NULL, 0, 0, 0, 0, NULL };
3813
3814 if ((sc_debug & sCHKBOUNDS) != 0)
3815 {
3816 flab1 = getlabel(); /* get label number for "OK" branch */
3817 test(flab1, FALSE, TRUE); /* get expression and branch
3818 * to flab1 if true */
3819 setline(fline, fcurrent); /* make sure we abort on the correct
3820 * line number */
3821 ffabort(xASSERTION);
3822 setlabel(flab1);
3823 }
3824 else
3825 {
3826 stgset(TRUE); /* start staging */
3827 stgget(&index, &cidx); /* mark position in code generator */
3828 do
3829 {
3830 if (hier14(&lval))
3831 rvalue(&lval);
3832 stgdel(index, cidx); /* just scrap the code */
3833 }
3834 while (matchtoken(','));
3835 stgset(FALSE); /* stop staging */
3836 } /* if */
3837 needtoken(tTERM);
3838}
3839
3840static void
3841dogoto(void)
3842{
3843 char *st;
3844 cell val;
3845 symbol *sym;
3846
3847 if (lex(&val, &st) == tSYMBOL)
3848 {
3849 sym = fetchlab(st);
3850 jumplabel((int)sym->addr);
3851 sym->usage |= uREAD; /* set "uREAD" bit */
3852 /*
3853 * // ??? if the label is defined (check sym->usage & uDEFINE), check
3854 * // sym->compound (nesting level of the label) against nestlevel;
3855 * // if sym->compound < nestlevel, call the destructor operator
3856 */
3857 }
3858 else
3859 {
3860 error(20, st); /* illegal symbol name */
3861 } /* if */
3862 needtoken(tTERM);
3863}
3864
3865static void
3866dolabel(void)
3867{
3868 char *st;
3869 cell val;
3870 symbol *sym;
3871
3872 tokeninfo(&val, &st); /* retrieve label name again */
3873 if (find_constval(&tagname_tab, st, 0))
3874 error(221, st); /* label name shadows tagname */
3875 sym = fetchlab(st);
3876 setlabel((int)sym->addr);
3877 /* since one can jump around variable declarations or out of compound
3878 * blocks, the stack must be manually adjusted
3879 */
3880 setstk(-declared * sizeof(cell));
3881 sym->usage |= uDEFINE; /* label is now defined */
3882}
3883
3884/* fetchlab
3885 *
3886 * Finds a label from the (local) symbol table or adds one to it.
3887 * Labels are local in scope.
3888 *
3889 * Note: The "_usage" bit is set to zero. The routines that call
3890 * "fetchlab()" must set this bit accordingly.
3891 */
3892static symbol *
3893fetchlab(char *name)
3894{
3895 symbol *sym;
3896
3897 sym = findloc(name); /* labels are local in scope */
3898 if (sym)
3899 {
3900 if (sym->ident != iLABEL)
3901 error(19, sym->name); /* not a label: ... */
3902 }
3903 else
3904 {
3905 sym = addsym(name, getlabel(), iLABEL, sLOCAL, 0, 0);
3906 sym->x.declared = (int)declared;
3907 sym->compound = nestlevel;
3908 } /* if */
3909 return sym;
3910}
3911
3912/* doreturn
3913 *
3914 * Global references: rettype (altered)
3915 */
3916static void
3917doreturn(void)
3918{
3919 int tag;
3920
3921 if (matchtoken(tTERM) == 0)
3922 {
3923 if ((rettype & uRETNONE) != 0)
3924 error(208); /* mix "return;" and "return value;" */
3925 doexpr(TRUE, FALSE, FALSE, TRUE, &tag, FALSE);
3926 needtoken(tTERM);
3927 rettype |= uRETVALUE; /* function returns a value */
3928 /* check tagname with function tagname */
3929 assert(curfunc != NULL);
3930 if (!matchtag(curfunc->tag, tag, TRUE))
3931 error(213); /* tagname mismatch */
3932 }
3933 else
3934 {
3935 /* this return statement contains no expression */
3936 const1(0);
3937 if ((rettype & uRETVALUE) != 0)
3938 {
3939 char symname[2 * sNAMEMAX + 16]; /* allow space for user
3940 * defined operators */
3941 assert(curfunc != NULL);
3942 funcdisplayname(symname, curfunc->name);
3943 error(209, symname); /* function should return a value */
3944 } /* if */
3945 rettype |= uRETNONE; /* function does not return anything */
3946 } /* if */
3947 destructsymbols(&loctab, 0); /*call destructor for *all* locals */
3948 modstk((int)declared * sizeof(cell)); /* end of function, remove
3949 *all* * local variables*/
3950 ffret();
3951}
3952
3953static void
3954dobreak(void)
3955{
3956 int *ptr;
3957
3958 ptr = readwhile(); /* readwhile() gives an error if not in loop */
3959 needtoken(tTERM);
3960 if (!ptr)
3961 return;
3962 destructsymbols(&loctab, nestlevel);
3963 modstk(((int)declared - ptr[wqBRK]) * sizeof(cell));
3964 jumplabel(ptr[wqEXIT]);
3965}
3966
3967static void
3968docont(void)
3969{
3970 int *ptr;
3971
3972 ptr = readwhile(); /* readwhile() gives an error if not in loop */
3973 needtoken(tTERM);
3974 if (!ptr)
3975 return;
3976 destructsymbols(&loctab, nestlevel);
3977 modstk(((int)declared - ptr[wqCONT]) * sizeof(cell));
3978 jumplabel(ptr[wqLOOP]);
3979}
3980
3981void
3982exporttag(int tag)
3983{
3984 /* find the tag by value in the table, then set the top bit to mark it
3985 * "public"
3986 */
3987 if (tag != 0)
3988 {
3989 constvalue *ptr;
3990
3991 assert((tag & PUBLICTAG) == 0);
3992 for (ptr = tagname_tab.next;
3993 ptr && tag != (int)(ptr->value & TAGMASK); ptr = ptr->next)
3994 /* nothing */ ;
3995 if (ptr)
3996 ptr->value |= PUBLICTAG;
3997 } /* if */
3998}
3999
4000static void
4001doexit(void)
4002{
4003 int tag = 0;
4004
4005 if (matchtoken(tTERM) == 0)
4006 {
4007 doexpr(TRUE, FALSE, FALSE, TRUE, &tag, FALSE);
4008 needtoken(tTERM);
4009 }
4010 else
4011 {
4012 const1(0);
4013 } /* if */
4014 const2(tag);
4015 exporttag(tag);
4016 destructsymbols(&loctab, 0); /* call destructor for *all* locals */
4017 ffabort(xEXIT);
4018}
4019
4020static void
4021dosleep(void)
4022{
4023 int tag = 0;
4024
4025 if (matchtoken(tTERM) == 0)
4026 {
4027 doexpr(TRUE, FALSE, FALSE, TRUE, &tag, FALSE);
4028 needtoken(tTERM);
4029 }
4030 else
4031 {
4032 const1(0);
4033 } /* if */
4034 const2(tag);
4035 exporttag(tag);
4036 ffabort(xSLEEP);
4037}
4038
4039static void
4040addwhile(int *ptr)
4041{
4042 int k;
4043
4044 ptr[wqBRK] = (int)declared; /* stack pointer (for "break") */
4045 ptr[wqCONT] = (int)declared; /* for "continue", possibly adjusted later */
4046 ptr[wqLOOP] = getlabel();
4047 ptr[wqEXIT] = getlabel();
4048 if (wqptr >= (wq + wqTABSZ - wqSIZE))
4049 error(102, "loop table"); /* loop table overflow (too many active loops) */
4050 k = 0;
4051 while (k < wqSIZE)
4052 { /* copy "ptr" to while queue table */
4053 *wqptr = *ptr;
4054 wqptr += 1;
4055 ptr += 1;
4056 k += 1;
4057 } /* while */
4058}
4059
4060static void
4061delwhile(void)
4062{
4063 if (wqptr > wq)
4064 wqptr -= wqSIZE;
4065}
4066
4067static int *
4068readwhile(void)
4069{
4070 if (wqptr <= wq)
4071 {
4072 error(24); /* out of context */
4073 return NULL;
4074 }
4075 else
4076 {
4077 return (wqptr - wqSIZE);
4078 } /* if */
4079}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc2.c b/libraries/embryo/src/bin/embryo_cc_sc2.c
deleted file mode 100644
index b3f4fae..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc2.c
+++ /dev/null
@@ -1,2779 +0,0 @@
1/* Small compiler - File input, preprocessing and lexical analysis functions
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_sc2.c 62382 2011-08-12 12:39:29Z billiob $
22 */
23
24
25#ifdef HAVE_CONFIG_H
26# include <config.h>
27#endif
28
29#include <assert.h>
30#include <stdio.h>
31#include <stdlib.h>
32#include <string.h>
33#include <ctype.h>
34#include <math.h>
35#include "embryo_cc_sc.h"
36#include "Embryo.h"
37
38static int match(char *st, int end);
39static cell litchar(char **lptr, int rawmode);
40static int alpha(char c);
41
42static int icomment; /* currently in multiline comment? */
43static int iflevel; /* nesting level if #if/#else/#endif */
44static int skiplevel; /* level at which we started skipping */
45static int elsedone; /* level at which we have seen an #else */
46static char term_expr[] = "";
47static int listline = -1; /* "current line" for the list file */
48
49/* pushstk & popstk
50 *
51 * Uses a LIFO stack to store information. The stack is used by doinclude(),
52 * doswitch() (to hold the state of "swactive") and some other routines.
53 *
54 * Porting note: I made the bold assumption that an integer will not be
55 * larger than a pointer (it may be smaller). That is, the stack element
56 * is typedef'ed as a pointer type, but I also store integers on it. See
57 * SC.H for "stkitem"
58 *
59 * Global references: stack,stkidx (private to pushstk() and popstk())
60 */
61static stkitem stack[sSTKMAX];
62static int stkidx;
63void
64pushstk(stkitem val)
65{
66 if (stkidx >= sSTKMAX)
67 error(102, "parser stack"); /* stack overflow (recursive include?) */
68 stack[stkidx] = val;
69 stkidx += 1;
70}
71
72stkitem
73popstk(void)
74{
75 if (stkidx == 0)
76 return (stkitem) - 1; /* stack is empty */
77 stkidx -= 1;
78 return stack[stkidx];
79}
80
81int
82plungequalifiedfile(char *name)
83{
84 static char *extensions[] = { ".inc", ".sma", ".small" };
85 FILE *fp;
86 char *ext;
87 int ext_idx;
88
89 ext_idx = 0;
90 do
91 {
92 fp = (FILE *) sc_opensrc(name);
93 ext = strchr(name, '\0'); /* save position */
94 if (!fp)
95 {
96 /* try to append an extension */
97 strcpy(ext, extensions[ext_idx]);
98 fp = (FILE *) sc_opensrc(name);
99 if (!fp)
100 *ext = '\0'; /* on failure, restore filename */
101 } /* if */
102 ext_idx++;
103 }
104 while ((!fp) &&
105 (ext_idx < (int)(sizeof extensions / sizeof extensions[0])));
106 if (!fp)
107 {
108 *ext = '\0'; /* restore filename */
109 return FALSE;
110 } /* if */
111 pushstk((stkitem) inpf);
112 pushstk((stkitem) inpfname); /* pointer to current file name */
113 pushstk((stkitem) curlibrary);
114 pushstk((stkitem) iflevel);
115 assert(skiplevel == 0);
116 pushstk((stkitem) icomment);
117 pushstk((stkitem) fcurrent);
118 pushstk((stkitem) fline);
119 inpfname = strdup(name); /* set name of include file */
120 if (!inpfname)
121 error(103); /* insufficient memory */
122 inpf = fp; /* set input file pointer to include file */
123 fnumber++;
124 fline = 0; /* set current line number to 0 */
125 fcurrent = fnumber;
126 icomment = FALSE;
127 setfile(inpfname, fcurrent);
128 listline = -1; /* force a #line directive when changing the file */
129 setactivefile(fcurrent);
130 return TRUE;
131}
132
133int
134plungefile(char *name, int try_currentpath, int try_includepaths)
135{
136 int result = FALSE;
137 int i;
138 char *ptr;
139
140 if (try_currentpath)
141 result = plungequalifiedfile(name);
142
143 if (try_includepaths && name[0] != DIRSEP_CHAR)
144 {
145 for (i = 0; !result && (ptr = get_path(i)); i++)
146 {
147 char path[PATH_MAX];
148
149 strncpy(path, ptr, sizeof path);
150 path[sizeof path - 1] = '\0'; /* force '\0' termination */
151 strncat(path, name, sizeof(path) - strlen(path));
152 path[sizeof path - 1] = '\0';
153 result = plungequalifiedfile(path);
154 } /* while */
155 } /* if */
156 return result;
157}
158
159static void
160check_empty(char *lptr)
161{
162 /* verifies that the string contains only whitespace */
163 while (*lptr <= ' ' && *lptr != '\0')
164 lptr++;
165 if (*lptr != '\0')
166 error(38); /* extra characters on line */
167}
168
169/* doinclude
170 *
171 * Gets the name of an include file, pushes the old file on the stack and
172 * sets some options. This routine doesn't use lex(), since lex() doesn't
173 * recognize file names (and directories).
174 *
175 * Global references: inpf (altered)
176 * inpfname (altered)
177 * fline (altered)
178 * lptr (altered)
179 */
180static void
181doinclude(void)
182{
183 char name[PATH_MAX], c;
184 int i, result;
185
186 while (*lptr <= ' ' && *lptr != 0) /* skip leading whitespace */
187 lptr++;
188 if (*lptr == '<' || *lptr == '\"')
189 {
190 c = (char)((*lptr == '\"') ? '\"' : '>'); /* termination character */
191 lptr++;
192 while (*lptr <= ' ' && *lptr != 0) /* skip whitespace after quote */
193 lptr++;
194 }
195 else
196 {
197 c = '\0';
198 } /* if */
199
200 i = 0;
201 while ((*lptr != c) && (*lptr != '\0') && (i < (int)(sizeof(name) - 1))) /* find the end of the string */
202 name[i++] = *lptr++;
203 while (i > 0 && name[i - 1] <= ' ')
204 i--; /* strip trailing whitespace */
205 assert((i >= 0) && (i < (int)(sizeof(name))));
206 name[i] = '\0'; /* zero-terminate the string */
207
208 if (*lptr != c)
209 { /* verify correct string termination */
210 error(37); /* invalid string */
211 return;
212 } /* if */
213 if (c != '\0')
214 check_empty(lptr + 1); /* verify that the rest of the line is whitespace */
215
216 /* Include files between "..." or without quotes are read from the current
217 * directory, or from a list of "include directories". Include files
218 * between <...> are only read from the list of include directories.
219 */
220 result = plungefile(name, (c != '>'), TRUE);
221 if (!result)
222 error(100, name); /* cannot read from ... (fatal error) */
223}
224
225/* readline
226 *
227 * Reads in a new line from the input file pointed to by "inpf". readline()
228 * concatenates lines that end with a \ with the next line. If no more data
229 * can be read from the file, readline() attempts to pop off the previous file
230 * from the stack. If that fails too, it sets "freading" to 0.
231 *
232 * Global references: inpf,fline,inpfname,freading,icomment (altered)
233 */
234static void
235readline(char *line)
236{
237 int i, num, cont;
238 char *ptr;
239
240 if (lptr == term_expr)
241 return;
242 num = sLINEMAX;
243 cont = FALSE;
244 do
245 {
246 if (!inpf || sc_eofsrc(inpf))
247 {
248 if (cont)
249 error(49); /* invalid line continuation */
250 if (inpf && inpf != inpf_org)
251 sc_closesrc(inpf);
252 i = (int)(long)popstk();
253 if (i == -1)
254 { /* All's done; popstk() returns "stack is empty" */
255 freading = FALSE;
256 *line = '\0';
257 /* when there is nothing more to read, the #if/#else stack should
258 * be empty and we should not be in a comment
259 */
260 assert(iflevel >= 0);
261 if (iflevel > 0)
262 error(1, "#endif", "-end of file-");
263 else if (icomment)
264 error(1, "*/", "-end of file-");
265 return;
266 } /* if */
267 fline = i;
268 fcurrent = (int)(long)popstk();
269 icomment = (int)(long)popstk();
270 assert(skiplevel == 0); /* skiplevel was not stored on stack, because it should always be zero at this point */
271 iflevel = (int)(long)popstk();
272 curlibrary = (constvalue *) popstk();
273 free(inpfname); /* return memory allocated for the include file name */
274 inpfname = (char *)popstk();
275 inpf = (FILE *) popstk();
276 setactivefile(fcurrent);
277 listline = -1; /* force a #line directive when changing the file */
278 elsedone = 0;
279 } /* if */
280
281 if (!sc_readsrc(inpf, line, num))
282 {
283 *line = '\0'; /* delete line */
284 cont = FALSE;
285 }
286 else
287 {
288 /* check whether to erase leading spaces */
289 if (cont)
290 {
291 char *ptr = line;
292
293 while (*ptr == ' ' || *ptr == '\t')
294 ptr++;
295 if (ptr != line)
296 memmove(line, ptr, strlen(ptr) + 1);
297 } /* if */
298 cont = FALSE;
299 /* check whether a full line was read */
300 if (!strchr(line, '\n') && !sc_eofsrc(inpf))
301 error(75); /* line too long */
302 /* check if the next line must be concatenated to this line */
303 if ((ptr = strchr(line, '\n')) && ptr > line)
304 {
305 assert(*(ptr + 1) == '\0'); /* '\n' should be last in the string */
306 while (ptr > line
307 && (*ptr == '\n' || *ptr == ' ' || *ptr == '\t'))
308 ptr--; /* skip trailing whitespace */
309 if (*ptr == '\\')
310 {
311 cont = TRUE;
312 /* set '\a' at the position of '\\' to make it possible to check
313 * for a line continuation in a single line comment (error 49)
314 */
315 *ptr++ = '\a';
316 *ptr = '\0'; /* erase '\n' (and any trailing whitespace) */
317 } /* if */
318 } /* if */
319 num -= strlen(line);
320 line += strlen(line);
321 } /* if */
322 fline += 1;
323 }
324 while (num >= 0 && cont);
325}
326
327/* stripcom
328 *
329 * Replaces all comments from the line by space characters. It updates
330 * a global variable ("icomment") for multiline comments.
331 *
332 * This routine also supports the C++ extension for single line comments.
333 * These comments are started with "//" and end at the end of the line.
334 *
335 * Global references: icomment (private to "stripcom")
336 */
337static void
338stripcom(char *line)
339{
340 char c;
341
342 while (*line)
343 {
344 if (icomment)
345 {
346 if (*line == '*' && *(line + 1) == '/')
347 {
348 icomment = FALSE; /* comment has ended */
349 *line = ' '; /* replace '*' and '/' characters by spaces */
350 *(line + 1) = ' ';
351 line += 2;
352 }
353 else
354 {
355 if (*line == '/' && *(line + 1) == '*')
356 error(216); /* nested comment */
357 *line = ' '; /* replace comments by spaces */
358 line += 1;
359 } /* if */
360 }
361 else
362 {
363 if (*line == '/' && *(line + 1) == '*')
364 {
365 icomment = TRUE; /* start comment */
366 *line = ' '; /* replace '/' and '*' characters by spaces */
367 *(line + 1) = ' ';
368 line += 2;
369 }
370 else if (*line == '/' && *(line + 1) == '/')
371 { /* comment to end of line */
372 if (strchr(line, '\a'))
373 error(49); /* invalid line continuation */
374 *line++ = '\n'; /* put "newline" at first slash */
375 *line = '\0'; /* put "zero-terminator" at second slash */
376 }
377 else
378 {
379 if (*line == '\"' || *line == '\'')
380 { /* leave literals unaltered */
381 c = *line; /* ending quote, single or double */
382 line += 1;
383 while ((*line != c || *(line - 1) == '\\')
384 && *line != '\0')
385 line += 1;
386 line += 1; /* skip final quote */
387 }
388 else
389 {
390 line += 1;
391 } /* if */
392 } /* if */
393 } /* if */
394 } /* while */
395}
396
397/* btoi
398 *
399 * Attempts to interpret a numeric symbol as a boolean value. On success
400 * it returns the number of characters processed (so the line pointer can be
401 * adjusted) and the value is stored in "val". Otherwise it returns 0 and
402 * "val" is garbage.
403 *
404 * A boolean value must start with "0b"
405 */
406static int
407btoi(cell * val, char *curptr)
408{
409 char *ptr;
410
411 *val = 0;
412 ptr = curptr;
413 if (*ptr == '0' && *(ptr + 1) == 'b')
414 {
415 ptr += 2;
416 while (*ptr == '0' || *ptr == '1' || *ptr == '_')
417 {
418 if (*ptr != '_')
419 *val = (*val << 1) | (*ptr - '0');
420 ptr++;
421 } /* while */
422 }
423 else
424 {
425 return 0;
426 } /* if */
427 if (alphanum(*ptr)) /* number must be delimited by non-alphanumeric char */
428 return 0;
429 else
430 return (int)(ptr - curptr);
431}
432
433/* dtoi
434 *
435 * Attempts to interpret a numeric symbol as a decimal value. On success
436 * it returns the number of characters processed and the value is stored in
437 * "val". Otherwise it returns 0 and "val" is garbage.
438 */
439static int
440dtoi(cell * val, char *curptr)
441{
442 char *ptr;
443
444 *val = 0;
445 ptr = curptr;
446 if (!isdigit(*ptr)) /* should start with digit */
447 return 0;
448 while (isdigit(*ptr) || *ptr == '_')
449 {
450 if (*ptr != '_')
451 *val = (*val * 10) + (*ptr - '0');
452 ptr++;
453 } /* while */
454 if (alphanum(*ptr)) /* number must be delimited by non-alphanumerical */
455 return 0;
456 if (*ptr == '.' && isdigit(*(ptr + 1)))
457 return 0; /* but a fractional part must not be present */
458 return (int)(ptr - curptr);
459}
460
461/* htoi
462 *
463 * Attempts to interpret a numeric symbol as a hexadecimal value. On
464 * success it returns the number of characters processed and the value is
465 * stored in "val". Otherwise it return 0 and "val" is garbage.
466 */
467static int
468htoi(cell * val, char *curptr)
469{
470 char *ptr;
471
472 *val = 0;
473 ptr = curptr;
474 if (!isdigit(*ptr)) /* should start with digit */
475 return 0;
476 if (*ptr == '0' && *(ptr + 1) == 'x')
477 { /* C style hexadecimal notation */
478 ptr += 2;
479 while (isxdigit(*ptr) || *ptr == '_')
480 {
481 if (*ptr != '_')
482 {
483 assert(isxdigit(*ptr));
484 *val = *val << 4;
485 if (isdigit(*ptr))
486 *val += (*ptr - '0');
487 else
488 *val += (tolower(*ptr) - 'a' + 10);
489 } /* if */
490 ptr++;
491 } /* while */
492 }
493 else
494 {
495 return 0;
496 } /* if */
497 if (alphanum(*ptr))
498 return 0;
499 else
500 return (int)(ptr - curptr);
501}
502
503#if defined LINUX
504static double
505pow10(int value)
506{
507 double res = 1.0;
508
509 while (value >= 4)
510 {
511 res *= 10000.0;
512 value -= 5;
513 } /* while */
514 while (value >= 2)
515 {
516 res *= 100.0;
517 value -= 2;
518 } /* while */
519 while (value >= 1)
520 {
521 res *= 10.0;
522 value -= 1;
523 } /* while */
524 return res;
525}
526#endif
527
528/* ftoi
529 *
530 * Attempts to interpret a numeric symbol as a rational number, either as
531 * IEEE 754 single precision floating point or as a fixed point integer.
532 * On success it returns the number of characters processed and the value is
533 * stored in "val". Otherwise it returns 0 and "val" is unchanged.
534 *
535 * Small has stricter definition for floating point numbers than most:
536 * o the value must start with a digit; ".5" is not a valid number, you
537 * should write "0.5"
538 * o a period must appear in the value, even if an exponent is given; "2e3"
539 * is not a valid number, you should write "2.0e3"
540 * o at least one digit must follow the period; "6." is not a valid number,
541 * you should write "6.0"
542 */
543static int
544ftoi(cell * val, char *curptr)
545{
546 char *ptr;
547 double fnum, ffrac, fmult;
548 unsigned long dnum, dbase;
549 int i, ignore;
550
551 assert(rational_digits >= 0 && rational_digits < 9);
552 for (i = 0, dbase = 1; i < rational_digits; i++)
553 dbase *= 10;
554 fnum = 0.0;
555 dnum = 0L;
556 ptr = curptr;
557 if (!isdigit(*ptr)) /* should start with digit */
558 return 0;
559 while (isdigit(*ptr) || *ptr == '_')
560 {
561 if (*ptr != '_')
562 {
563 fnum = (fnum * 10.0) + (*ptr - '0');
564 dnum = (dnum * 10L) + (*ptr - '0') * dbase;
565 } /* if */
566 ptr++;
567 } /* while */
568 if (*ptr != '.')
569 return 0; /* there must be a period */
570 ptr++;
571 if (!isdigit(*ptr)) /* there must be at least one digit after the dot */
572 return 0;
573 ffrac = 0.0;
574 fmult = 1.0;
575 ignore = FALSE;
576 while (isdigit(*ptr) || *ptr == '_')
577 {
578 if (*ptr != '_')
579 {
580 ffrac = (ffrac * 10.0) + (*ptr - '0');
581 fmult = fmult / 10.0;
582 dbase /= 10L;
583 dnum += (*ptr - '0') * dbase;
584 if (dbase == 0L && sc_rationaltag && rational_digits > 0
585 && !ignore)
586 {
587 error(222); /* number of digits exceeds rational number precision */
588 ignore = TRUE;
589 } /* if */
590 } /* if */
591 ptr++;
592 } /* while */
593 fnum += ffrac * fmult; /* form the number so far */
594 if (*ptr == 'e')
595 { /* optional fractional part */
596 int exp, sign;
597
598 ptr++;
599 if (*ptr == '-')
600 {
601 sign = -1;
602 ptr++;
603 }
604 else
605 {
606 sign = 1;
607 } /* if */
608 if (!isdigit(*ptr)) /* 'e' should be followed by a digit */
609 return 0;
610 exp = 0;
611 while (isdigit(*ptr))
612 {
613 exp = (exp * 10) + (*ptr - '0');
614 ptr++;
615 } /* while */
616#if defined LINUX
617 fmult = pow10(exp * sign);
618#else
619 fmult = pow(10, exp * sign);
620#endif
621 fnum *= fmult;
622 dnum *= (unsigned long)(fmult + 0.5);
623 } /* if */
624
625 /* decide how to store the number */
626 if (sc_rationaltag == 0)
627 {
628 error(70); /* rational number support was not enabled */
629 *val = 0;
630 }
631 else if (rational_digits == 0)
632 {
633 float f = (float) fnum;
634 /* floating point */
635 *val = EMBRYO_FLOAT_TO_CELL(f);
636#if !defined NDEBUG
637 /* I assume that the C/C++ compiler stores "float" values in IEEE 754
638 * format (as mandated in the ANSI standard). Test this assumption anyway.
639 */
640 {
641 float test1 = 0.0, test2 = 50.0;
642 Embryo_Cell c1 = EMBRYO_FLOAT_TO_CELL(test1);
643 Embryo_Cell c2 = EMBRYO_FLOAT_TO_CELL(test2);
644
645 if (c1 != 0x00000000L)
646 {
647 fprintf(stderr,
648 "embryo_cc: WARNING! you compiler does not SEEM to interpret IEEE floating\n"
649 "point math as embryo expects. this could be bad.\n"
650 "\n"
651 "(float 0.0 != 0x00000000 bitpattern, 0x%08x instead)\n"
652 "\n"
653 "this could be an issue with you compiling embryo with gcc 3.2.x that seems\n"
654 "to trigger this sanity check. we are not sure why yet, but gcc 3.3.x works\n"
655 , c1);
656 }
657 else if (c2 != 0x42480000L)
658 {
659 fprintf(stderr,
660 "embryo_cc: WARNING! you compiler does not SEEM to interpret IEEE floating\n"
661 "point math as embryo expects. This could be bad.\n"
662 "\n"
663 "(float 50.0 != 0x42480000 bitpattern, 0x%08x instead)\n"
664 "\n"
665 "this could be an issue with you compiling embryo with gcc 3.2.x that seems\n"
666 "to trigger this sanity check. we are not sure why yet, but gcc 3.3.x works\n"
667 , c2);
668 }
669 }
670#endif
671 }
672 else
673 {
674 /* fixed point */
675 *val = (cell) dnum;
676 } /* if */
677
678 return (int)(ptr - curptr);
679}
680
681/* number
682 *
683 * Reads in a number (binary, decimal or hexadecimal). It returns the number
684 * of characters processed or 0 if the symbol couldn't be interpreted as a
685 * number (in this case the argument "val" remains unchanged). This routine
686 * relies on the 'early dropout' implementation of the logical or (||)
687 * operator.
688 *
689 * Note: the routine doesn't check for a sign (+ or -). The - is checked
690 * for at "hier2()" (in fact, it is viewed as an operator, not as a
691 * sign) and the + is invalid (as in K&R C, and unlike ANSI C).
692 */
693static int
694number(cell * val, char *curptr)
695{
696 int i;
697 cell value;
698
699 if ((i = btoi(&value, curptr)) != 0 /* binary? */
700 || (i = htoi(&value, curptr)) != 0 /* hexadecimal? */
701 || (i = dtoi(&value, curptr)) != 0) /* decimal? */
702 {
703 *val = value;
704 return i;
705 }
706 else
707 {
708 return 0; /* else not a number */
709 } /* if */
710}
711
712static void
713chrcat(char *str, char chr)
714{
715 str = strchr(str, '\0');
716 *str++ = chr;
717 *str = '\0';
718}
719
720static int
721preproc_expr(cell * val, int *tag)
722{
723 int result;
724 int index;
725 cell code_index;
726 char *term;
727
728 /* Disable staging; it should be disabled already because
729 * expressions may not be cut off half-way between conditional
730 * compilations. Reset the staging index, but keep the code
731 * index.
732 */
733 if (stgget(&index, &code_index))
734 {
735 error(57); /* unfinished expression */
736 stgdel(0, code_index);
737 stgset(FALSE);
738 } /* if */
739 /* append a special symbol to the string, so the expression
740 * analyzer won't try to read a next line when it encounters
741 * an end-of-line
742 */
743 assert(strlen(pline) < sLINEMAX);
744 term = strchr(pline, '\0');
745 assert(term != NULL);
746 chrcat(pline, PREPROC_TERM); /* the "DEL" code (see SC.H) */
747 result = constexpr(val, tag); /* get value (or 0 on error) */
748 *term = '\0'; /* erase the token (if still present) */
749 lexclr(FALSE); /* clear any "pushed" tokens */
750 return result;
751}
752
753/* getstring
754 * Returns returns a pointer behind the closing quote or to the other
755 * character that caused the input to be ended.
756 */
757static char *
758getstring(char *dest, int max)
759{
760 assert(dest != NULL);
761 *dest = '\0';
762 while (*lptr <= ' ' && *lptr != '\0')
763 lptr++; /* skip whitespace */
764 if (*lptr != '"')
765 {
766 error(37); /* invalid string */
767 }
768 else
769 {
770 int len = 0;
771
772 lptr++; /* skip " */
773 while (*lptr != '"' && *lptr != '\0')
774 {
775 if (len < max - 1)
776 dest[len++] = *lptr;
777 lptr++;
778 } /* if */
779 dest[len] = '\0';
780 if (*lptr == '"')
781 lptr++; /* skip closing " */
782 else
783 error(37); /* invalid string */
784 } /* if */
785 return lptr;
786}
787
788enum
789{
790 CMD_NONE,
791 CMD_TERM,
792 CMD_EMPTYLINE,
793 CMD_CONDFALSE,
794 CMD_INCLUDE,
795 CMD_DEFINE,
796 CMD_IF,
797 CMD_DIRECTIVE,
798};
799
800/* command
801 *
802 * Recognizes the compiler directives. The function returns:
803 * CMD_NONE the line must be processed
804 * CMD_TERM a pending expression must be completed before processing further lines
805 * Other value: the line must be skipped, because:
806 * CMD_CONDFALSE false "#if.." code
807 * CMD_EMPTYLINE line is empty
808 * CMD_INCLUDE the line contains a #include directive
809 * CMD_DEFINE the line contains a #subst directive
810 * CMD_IF the line contains a #if/#else/#endif directive
811 * CMD_DIRECTIVE the line contains some other compiler directive
812 *
813 * Global variables: iflevel, skiplevel, elsedone (altered)
814 * lptr (altered)
815 */
816static int
817command(void)
818{
819 int tok, ret;
820 cell val;
821 char *str;
822 int index;
823 cell code_index;
824
825 while (*lptr <= ' ' && *lptr != '\0')
826 lptr += 1;
827 if (*lptr == '\0')
828 return CMD_EMPTYLINE; /* empty line */
829 if (*lptr != '#')
830 return skiplevel > 0 ? CMD_CONDFALSE : CMD_NONE; /* it is not a compiler directive */
831 /* compiler directive found */
832 indent_nowarn = TRUE; /* allow loose indentation" */
833 lexclr(FALSE); /* clear any "pushed" tokens */
834 /* on a pending expression, force to return a silent ';' token and force to
835 * re-read the line
836 */
837 if (!sc_needsemicolon && stgget(&index, &code_index))
838 {
839 lptr = term_expr;
840 return CMD_TERM;
841 } /* if */
842 tok = lex(&val, &str);
843 ret = skiplevel > 0 ? CMD_CONDFALSE : CMD_DIRECTIVE; /* preset 'ret' to CMD_DIRECTIVE (most common case) */
844 switch (tok)
845 {
846 case tpIF: /* conditional compilation */
847 ret = CMD_IF;
848 iflevel += 1;
849 if (skiplevel)
850 break; /* break out of switch */
851 preproc_expr(&val, NULL); /* get value (or 0 on error) */
852 if (!val)
853 skiplevel = iflevel;
854 check_empty(lptr);
855 break;
856 case tpELSE:
857 ret = CMD_IF;
858 if (iflevel == 0 && skiplevel == 0)
859 {
860 error(26); /* no matching #if */
861 errorset(sRESET);
862 }
863 else
864 {
865 if (elsedone == iflevel)
866 error(60); /* multiple #else directives between #if ... #endif */
867 elsedone = iflevel;
868 if (skiplevel == iflevel)
869 skiplevel = 0;
870 else if (skiplevel == 0)
871 skiplevel = iflevel;
872 } /* if */
873 check_empty(lptr);
874 break;
875#if 0 /* ??? *really* need to use a stack here */
876 case tpELSEIF:
877 ret = CMD_IF;
878 if (iflevel == 0 && skiplevel == 0)
879 {
880 error(26); /* no matching #if */
881 errorset(sRESET);
882 }
883 else if (elsedone == iflevel)
884 {
885 error(61); /* #elseif directive may not follow an #else */
886 errorset(sRESET);
887 }
888 else
889 {
890 preproc_expr(&val, NULL); /* get value (or 0 on error) */
891 if (skiplevel == 0)
892 skiplevel = iflevel; /* we weren't skipping, start skipping now */
893 else if (val)
894 skiplevel = 0; /* we were skipping, condition is valid -> stop skipping */
895 /* else: we were skipping and condition is invalid -> keep skipping */
896 check_empty(lptr);
897 } /* if */
898 break;
899#endif
900 case tpENDIF:
901 ret = CMD_IF;
902 if (iflevel == 0 && skiplevel == 0)
903 {
904 error(26);
905 errorset(sRESET);
906 }
907 else
908 {
909 if (skiplevel == iflevel)
910 skiplevel = 0;
911 if (elsedone == iflevel)
912 elsedone = 0; /* ??? actually, should build a stack of #if/#endif and keep
913 * the state whether an #else was seen per nesting level */
914 iflevel -= 1;
915 } /* if */
916 check_empty(lptr);
917 break;
918 case tINCLUDE: /* #include directive */
919 ret = CMD_INCLUDE;
920 if (skiplevel == 0)
921 doinclude();
922 break;
923 case tpFILE:
924 if (skiplevel == 0)
925 {
926 char pathname[PATH_MAX];
927
928 lptr = getstring(pathname, sizeof pathname);
929 if (pathname[0] != '\0')
930 {
931 free(inpfname);
932 inpfname = strdup(pathname);
933 if (!inpfname)
934 error(103); /* insufficient memory */
935 } /* if */
936 } /* if */
937 check_empty(lptr);
938 break;
939 case tpLINE:
940 if (skiplevel == 0)
941 {
942 if (lex(&val, &str) != tNUMBER)
943 error(8); /* invalid/non-constant expression */
944 fline = (int)val;
945
946 while (*lptr == ' ' && *lptr != '\0')
947 lptr++; /* skip whitespace */
948 if (*lptr == '"')
949 {
950 char pathname[PATH_MAX];
951
952 lptr = getstring(pathname, sizeof pathname);
953 if (pathname[0] != '\0')
954 {
955 free(inpfname);
956 inpfname = strdup(pathname);
957 if (!inpfname)
958 error(103); /* insufficient memory */
959 } /* if */
960 }
961 } /* if */
962 check_empty(lptr);
963 break;
964 case tpASSERT:
965 if (skiplevel == 0 && (sc_debug & sCHKBOUNDS) != 0)
966 {
967 preproc_expr(&val, NULL); /* get constant expression (or 0 on error) */
968 if (!val)
969 error(7); /* assertion failed */
970 check_empty(lptr);
971 } /* if */
972 break;
973 case tpPRAGMA:
974 if (skiplevel == 0)
975 {
976 if (lex(&val, &str) == tSYMBOL)
977 {
978 if (strcmp(str, "ctrlchar") == 0)
979 {
980 if (lex(&val, &str) != tNUMBER)
981 error(27); /* invalid character constant */
982 sc_ctrlchar = (char)val;
983 }
984 else if (strcmp(str, "compress") == 0)
985 {
986 cell val;
987
988 preproc_expr(&val, NULL);
989 sc_compress = (int)val; /* switch code packing on/off */
990 }
991 else if (strcmp(str, "dynamic") == 0)
992 {
993 preproc_expr(&sc_stksize, NULL);
994 }
995 else if (strcmp(str, "library") == 0)
996 {
997 char name[sNAMEMAX + 1];
998
999 while (*lptr <= ' ' && *lptr != '\0')
1000 lptr++;
1001 if (*lptr == '"')
1002 {
1003 lptr = getstring(name, sizeof name);
1004 }
1005 else
1006 {
1007 int i;
1008
1009 for (i = 0;
1010 (i < (int)(sizeof(name))) &&
1011 (alphanum(*lptr));
1012 i++, lptr++)
1013 name[i] = *lptr;
1014 name[i] = '\0';
1015 } /* if */
1016 if (name[0] == '\0')
1017 {
1018 curlibrary = NULL;
1019 }
1020 else
1021 {
1022 if (strlen(name) > sEXPMAX)
1023 error(220, name, sEXPMAX); /* exported symbol is truncated */
1024 /* add the name if it does not yet exist in the table */
1025 if (!find_constval(&libname_tab, name, 0))
1026 curlibrary =
1027 append_constval(&libname_tab, name, 0, 0);
1028 } /* if */
1029 }
1030 else if (strcmp(str, "pack") == 0)
1031 {
1032 cell val;
1033
1034 preproc_expr(&val, NULL); /* default = packed/unpacked */
1035 sc_packstr = (int)val;
1036 }
1037 else if (strcmp(str, "rational") == 0)
1038 {
1039 char name[sNAMEMAX + 1];
1040 cell digits = 0;
1041 int i;
1042
1043 /* first gather all information, start with the tag name */
1044 while ((*lptr <= ' ') && (*lptr != '\0'))
1045 lptr++;
1046 for (i = 0;
1047 (i < (int)(sizeof(name))) &&
1048 (alphanum(*lptr));
1049 i++, lptr++)
1050 name[i] = *lptr;
1051 name[i] = '\0';
1052 /* then the precision (for fixed point arithmetic) */
1053 while (*lptr <= ' ' && *lptr != '\0')
1054 lptr++;
1055 if (*lptr == '(')
1056 {
1057 preproc_expr(&digits, NULL);
1058 if (digits <= 0 || digits > 9)
1059 {
1060 error(68); /* invalid rational number precision */
1061 digits = 0;
1062 } /* if */
1063 if (*lptr == ')')
1064 lptr++;
1065 } /* if */
1066 /* add the tag (make it public) and check the values */
1067 i = sc_addtag(name);
1068 exporttag(i);
1069 if (sc_rationaltag == 0
1070 || (sc_rationaltag == i
1071 && rational_digits == (int)digits))
1072 {
1073 sc_rationaltag = i;
1074 rational_digits = (int)digits;
1075 }
1076 else
1077 {
1078 error(69); /* rational number format already set, can only be set once */
1079 } /* if */
1080 }
1081 else if (strcmp(str, "semicolon") == 0)
1082 {
1083 cell val;
1084
1085 preproc_expr(&val, NULL);
1086 sc_needsemicolon = (int)val;
1087 }
1088 else if (strcmp(str, "tabsize") == 0)
1089 {
1090 cell val;
1091
1092 preproc_expr(&val, NULL);
1093 sc_tabsize = (int)val;
1094 }
1095 else if (strcmp(str, "align") == 0)
1096 {
1097 sc_alignnext = TRUE;
1098 }
1099 else if (strcmp(str, "unused") == 0)
1100 {
1101 char name[sNAMEMAX + 1];
1102 int i, comma;
1103 symbol *sym;
1104
1105 do
1106 {
1107 /* get the name */
1108 while ((*lptr <= ' ') && (*lptr != '\0'))
1109 lptr++;
1110 for (i = 0;
1111 (i < (int)(sizeof(name))) &&
1112 (isalpha(*lptr));
1113 i++, lptr++)
1114 name[i] = *lptr;
1115 name[i] = '\0';
1116 /* get the symbol */
1117 sym = findloc(name);
1118 if (!sym)
1119 sym = findglb(name);
1120 if (sym)
1121 {
1122 sym->usage |= uREAD;
1123 if (sym->ident == iVARIABLE
1124 || sym->ident == iREFERENCE
1125 || sym->ident == iARRAY
1126 || sym->ident == iREFARRAY)
1127 sym->usage |= uWRITTEN;
1128 }
1129 else
1130 {
1131 error(17, name); /* undefined symbol */
1132 } /* if */
1133 /* see if a comma follows the name */
1134 while (*lptr <= ' ' && *lptr != '\0')
1135 lptr++;
1136 comma = (*lptr == ',');
1137 if (comma)
1138 lptr++;
1139 }
1140 while (comma);
1141 }
1142 else
1143 {
1144 error(207); /* unknown #pragma */
1145 } /* if */
1146 }
1147 else
1148 {
1149 error(207); /* unknown #pragma */
1150 } /* if */
1151 check_empty(lptr);
1152 } /* if */
1153 break;
1154 case tpENDINPUT:
1155 case tpENDSCRPT:
1156 if (skiplevel == 0)
1157 {
1158 check_empty(lptr);
1159 assert(inpf != NULL);
1160 if (inpf != inpf_org)
1161 sc_closesrc(inpf);
1162 inpf = NULL;
1163 } /* if */
1164 break;
1165#if !defined NOEMIT
1166 case tpEMIT:
1167 {
1168 /* write opcode to output file */
1169 char name[40];
1170 int i;
1171
1172 while (*lptr <= ' ' && *lptr != '\0')
1173 lptr++;
1174 for (i = 0; i < 40 && (isalpha(*lptr) || *lptr == '.'); i++, lptr++)
1175 name[i] = (char)tolower(*lptr);
1176 name[i] = '\0';
1177 stgwrite("\t");
1178 stgwrite(name);
1179 stgwrite(" ");
1180 code_idx += opcodes(1);
1181 /* write parameter (if any) */
1182 while (*lptr <= ' ' && *lptr != '\0')
1183 lptr++;
1184 if (*lptr != '\0')
1185 {
1186 symbol *sym;
1187
1188 tok = lex(&val, &str);
1189 switch (tok)
1190 {
1191 case tNUMBER:
1192 case tRATIONAL:
1193 outval(val, FALSE);
1194 code_idx += opargs(1);
1195 break;
1196 case tSYMBOL:
1197 sym = findloc(str);
1198 if (!sym)
1199 sym = findglb(str);
1200 if (!sym || (sym->ident != iFUNCTN
1201 && sym->ident != iREFFUNC
1202 && (sym->usage & uDEFINE) == 0))
1203 {
1204 error(17, str); /* undefined symbol */
1205 }
1206 else
1207 {
1208 outval(sym->addr, FALSE);
1209 /* mark symbol as "used", unknown whether for read or write */
1210 markusage(sym, uREAD | uWRITTEN);
1211 code_idx += opargs(1);
1212 } /* if */
1213 break;
1214 default:
1215 {
1216 char s2[20];
1217 extern char *sc_tokens[]; /* forward declaration */
1218
1219 if (tok < 256)
1220 sprintf(s2, "%c", (char)tok);
1221 else
1222 strcpy(s2, sc_tokens[tok - tFIRST]);
1223 error(1, sc_tokens[tSYMBOL - tFIRST], s2);
1224 break;
1225 } /* case */
1226 } /* switch */
1227 } /* if */
1228 stgwrite("\n");
1229 check_empty(lptr);
1230 break;
1231 } /* case */
1232#endif
1233#if !defined NO_DEFINE
1234 case tpDEFINE:
1235 {
1236 ret = CMD_DEFINE;
1237 if (skiplevel == 0)
1238 {
1239 char *pattern, *substitution;
1240 char *start, *end;
1241 int count, prefixlen;
1242 stringpair *def;
1243
1244 /* find the pattern to match */
1245 while (*lptr <= ' ' && *lptr != '\0')
1246 lptr++;
1247 start = lptr; /* save starting point of the match pattern */
1248 count = 0;
1249 while (*lptr > ' ' && *lptr != '\0')
1250 {
1251 litchar(&lptr, FALSE); /* litchar() advances "lptr" and handles escape characters */
1252 count++;
1253 } /* while */
1254 end = lptr;
1255 /* check pattern to match */
1256 if (!isalpha(*start) && *start != '_')
1257 {
1258 error(74); /* pattern must start with an alphabetic character */
1259 break;
1260 } /* if */
1261 /* store matched pattern */
1262 pattern = malloc(count + 1);
1263 if (!pattern)
1264 error(103); /* insufficient memory */
1265 lptr = start;
1266 count = 0;
1267 while (lptr != end)
1268 {
1269 assert(lptr < end);
1270 assert(*lptr != '\0');
1271 pattern[count++] = (char)litchar(&lptr, FALSE);
1272 } /* while */
1273 pattern[count] = '\0';
1274 /* special case, erase trailing variable, because it could match anything */
1275 if (count >= 2 && isdigit(pattern[count - 1])
1276 && pattern[count - 2] == '%')
1277 pattern[count - 2] = '\0';
1278 /* find substitution string */
1279 while (*lptr <= ' ' && *lptr != '\0')
1280 lptr++;
1281 start = lptr; /* save starting point of the match pattern */
1282 count = 0;
1283 end = NULL;
1284 while (*lptr != '\0')
1285 {
1286 /* keep position of the start of trailing whitespace */
1287 if (*lptr <= ' ')
1288 {
1289 if (!end)
1290 end = lptr;
1291 }
1292 else
1293 {
1294 end = NULL;
1295 } /* if */
1296 count++;
1297 lptr++;
1298 } /* while */
1299 if (!end)
1300 end = lptr;
1301 /* store matched substitution */
1302 substitution = malloc(count + 1); /* +1 for '\0' */
1303 if (!substitution)
1304 error(103); /* insufficient memory */
1305 lptr = start;
1306 count = 0;
1307 while (lptr != end)
1308 {
1309 assert(lptr < end);
1310 assert(*lptr != '\0');
1311 substitution[count++] = *lptr++;
1312 } /* while */
1313 substitution[count] = '\0';
1314 /* check whether the definition already exists */
1315 for (prefixlen = 0, start = pattern;
1316 isalpha(*start) || isdigit(*start) || *start == '_';
1317 prefixlen++, start++)
1318 /* nothing */ ;
1319 assert(prefixlen > 0);
1320 if ((def = find_subst(pattern, prefixlen)))
1321 {
1322 if (strcmp(def->first, pattern) != 0
1323 || strcmp(def->second, substitution) != 0)
1324 error(201, pattern); /* redefinition of macro (non-identical) */
1325 delete_subst(pattern, prefixlen);
1326 } /* if */
1327 /* add the pattern/substitution pair to the list */
1328 assert(pattern[0] != '\0');
1329 insert_subst(pattern, substitution, prefixlen);
1330 free(pattern);
1331 free(substitution);
1332 } /* if */
1333 break;
1334 } /* case */
1335 case tpUNDEF:
1336 if (skiplevel == 0)
1337 {
1338 if (lex(&val, &str) == tSYMBOL)
1339 {
1340 if (!delete_subst(str, strlen(str)))
1341 error(17, str); /* undefined symbol */
1342 }
1343 else
1344 {
1345 error(20, str); /* invalid symbol name */
1346 } /* if */
1347 check_empty(lptr);
1348 } /* if */
1349 break;
1350#endif
1351 default:
1352 error(31); /* unknown compiler directive */
1353 ret = skiplevel > 0 ? CMD_DIRECTIVE : CMD_NONE; /* line must be processed (if skiplevel==0) */
1354 } /* switch */
1355 return ret;
1356}
1357
1358#if !defined NO_DEFINE
1359static int
1360is_startstring(char *string)
1361{
1362 if (*string == '\"' || *string == '\'')
1363 return TRUE; /* "..." */
1364
1365 if (*string == '!')
1366 {
1367 string++;
1368 if (*string == '\"' || *string == '\'')
1369 return TRUE; /* !"..." */
1370 if (*string == sc_ctrlchar)
1371 {
1372 string++;
1373 if (*string == '\"' || *string == '\'')
1374 return TRUE; /* !\"..." */
1375 } /* if */
1376 }
1377 else if (*string == sc_ctrlchar)
1378 {
1379 string++;
1380 if (*string == '\"' || *string == '\'')
1381 return TRUE; /* \"..." */
1382 if (*string == '!')
1383 {
1384 string++;
1385 if (*string == '\"' || *string == '\'')
1386 return TRUE; /* \!"..." */
1387 } /* if */
1388 } /* if */
1389
1390 return FALSE;
1391}
1392
1393static char *
1394skipstring(char *string)
1395{
1396 char endquote;
1397 int rawstring = FALSE;
1398
1399 while (*string == '!' || *string == sc_ctrlchar)
1400 {
1401 rawstring = (*string == sc_ctrlchar);
1402 string++;
1403 } /* while */
1404
1405 endquote = *string;
1406 assert(endquote == '\"' || endquote == '\'');
1407 string++; /* skip open quote */
1408 while (*string != endquote && *string != '\0')
1409 litchar(&string, rawstring);
1410 return string;
1411}
1412
1413static char *
1414skippgroup(char *string)
1415{
1416 int nest = 0;
1417 char open = *string;
1418 char close;
1419
1420 switch (open)
1421 {
1422 case '(':
1423 close = ')';
1424 break;
1425 case '{':
1426 close = '}';
1427 break;
1428 case '[':
1429 close = ']';
1430 break;
1431 case '<':
1432 close = '>';
1433 break;
1434 default:
1435 assert(0);
1436 close = '\0'; /* only to avoid a compiler warning */
1437 } /* switch */
1438
1439 string++;
1440 while (*string != close || nest > 0)
1441 {
1442 if (*string == open)
1443 nest++;
1444 else if (*string == close)
1445 nest--;
1446 else if (is_startstring(string))
1447 string = skipstring(string);
1448 if (*string == '\0')
1449 break;
1450 string++;
1451 } /* while */
1452 return string;
1453}
1454
1455static char *
1456strdel(char *str, size_t len)
1457{
1458 size_t length = strlen(str);
1459
1460 if (len > length)
1461 len = length;
1462 memmove(str, str + len, length - len + 1); /* include EOS byte */
1463 return str;
1464}
1465
1466static char *
1467strins(char *dest, char *src, size_t srclen)
1468{
1469 size_t destlen = strlen(dest);
1470
1471 assert(srclen <= strlen(src));
1472 memmove(dest + srclen, dest, destlen + 1); /* include EOS byte */
1473 memcpy(dest, src, srclen);
1474 return dest;
1475}
1476
1477static int
1478substpattern(char *line, size_t buffersize, char *pattern, char *substitution)
1479{
1480 int prefixlen;
1481 char *p, *s, *e, *args[10];
1482 int match, arg, len;
1483
1484 memset(args, 0, sizeof args);
1485
1486 /* check the length of the prefix */
1487 for (prefixlen = 0, s = pattern; isalpha(*s) || isdigit(*s) || *s == '_';
1488 prefixlen++, s++)
1489 /* nothing */ ;
1490 assert(prefixlen > 0);
1491 assert(strncmp(line, pattern, prefixlen) == 0);
1492
1493 /* pattern prefix matches; match the rest of the pattern, gather
1494 * the parameters
1495 */
1496 s = line + prefixlen;
1497 p = pattern + prefixlen;
1498 match = TRUE; /* so far, pattern matches */
1499 while (match && *s != '\0' && *p != '\0')
1500 {
1501 if (*p == '%')
1502 {
1503 p++; /* skip '%' */
1504 if (isdigit(*p))
1505 {
1506 arg = *p - '0';
1507 assert(arg >= 0 && arg <= 9);
1508 p++; /* skip parameter id */
1509 assert(*p != '\0');
1510 /* match the source string up to the character after the digit
1511 * (skipping strings in the process
1512 */
1513 e = s;
1514 while (*e != *p && *e != '\0' && *e != '\n')
1515 {
1516 if (is_startstring(e)) /* skip strings */
1517 e = skipstring(e);
1518 else if (strchr("({[", *e)) /* skip parenthized groups */
1519 e = skippgroup(e);
1520 if (*e != '\0')
1521 e++; /* skip non-alphapetic character (or closing quote of
1522 * a string, or the closing paranthese of a group) */
1523 } /* while */
1524 /* store the parameter (overrule any earlier) */
1525 if (args[arg])
1526 free(args[arg]);
1527 len = (int)(e - s);
1528 args[arg] = malloc(len + 1);
1529 if (!args[arg])
1530 error(103); /* insufficient memory */
1531 strncpy(args[arg], s, len);
1532 args[arg][len] = '\0';
1533 /* character behind the pattern was matched too */
1534 if (*e == *p)
1535 {
1536 s = e + 1;
1537 }
1538 else if (*e == '\n' && *p == ';' && *(p + 1) == '\0'
1539 && !sc_needsemicolon)
1540 {
1541 s = e; /* allow a trailing ; in the pattern match to end of line */
1542 }
1543 else
1544 {
1545 assert(*e == '\0' || *e == '\n');
1546 match = FALSE;
1547 s = e;
1548 } /* if */
1549 p++;
1550 }
1551 else
1552 {
1553 match = FALSE;
1554 } /* if */
1555 }
1556 else if (*p == ';' && *(p + 1) == '\0' && !sc_needsemicolon)
1557 {
1558 /* source may be ';' or end of the line */
1559 while (*s <= ' ' && *s != '\0')
1560 s++; /* skip white space */
1561 if (*s != ';' && *s != '\0')
1562 match = FALSE;
1563 p++; /* skip the semicolon in the pattern */
1564 }
1565 else
1566 {
1567 cell ch;
1568
1569 /* skip whitespace between two non-alphanumeric characters, except
1570 * for two identical symbols
1571 */
1572 assert(p > pattern);
1573 if (!alphanum(*p) && *(p - 1) != *p)
1574 while (*s <= ' ' && *s != '\0')
1575 s++; /* skip white space */
1576 ch = litchar(&p, FALSE); /* this increments "p" */
1577 if (*s != ch)
1578 match = FALSE;
1579 else
1580 s++; /* this character matches */
1581 } /* if */
1582 } /* while */
1583
1584 if (match && *p == '\0')
1585 {
1586 /* if the last character to match is an alphanumeric character, the
1587 * current character in the source may not be alphanumeric
1588 */
1589 assert(p > pattern);
1590 if (alphanum(*(p - 1)) && alphanum(*s))
1591 match = FALSE;
1592 } /* if */
1593
1594 if (match)
1595 {
1596 /* calculate the length of the substituted string */
1597 for (e = substitution, len = 0; *e != '\0'; e++)
1598 {
1599 if (*e == '%' && isdigit(*(e + 1)))
1600 {
1601 arg = *(e + 1) - '0';
1602 assert(arg >= 0 && arg <= 9);
1603 if (args[arg])
1604 len += strlen(args[arg]);
1605 e++; /* skip %, digit is skipped later */
1606 }
1607 else
1608 {
1609 len++;
1610 } /* if */
1611 } /* for */
1612 /* check length of the string after substitution */
1613 if (strlen(line) + len - (int)(s - line) > buffersize)
1614 {
1615 error(75); /* line too long */
1616 }
1617 else
1618 {
1619 /* substitute pattern */
1620 strdel(line, (int)(s - line));
1621 for (e = substitution, s = line; *e != '\0'; e++)
1622 {
1623 if (*e == '%' && isdigit(*(e + 1)))
1624 {
1625 arg = *(e + 1) - '0';
1626 assert(arg >= 0 && arg <= 9);
1627 if (args[arg])
1628 {
1629 strins(s, args[arg], strlen(args[arg]));
1630 s += strlen(args[arg]);
1631 } /* if */
1632 e++; /* skip %, digit is skipped later */
1633 }
1634 else
1635 {
1636 strins(s, e, 1);
1637 s++;
1638 } /* if */
1639 } /* for */
1640 } /* if */
1641 } /* if */
1642
1643 for (arg = 0; arg < 10; arg++)
1644 if (args[arg])
1645 free(args[arg]);
1646
1647 return match;
1648}
1649
1650static void
1651substallpatterns(char *line, int buffersize)
1652{
1653 char *start, *end;
1654 int prefixlen;
1655 stringpair *subst;
1656
1657 start = line;
1658 while (*start != '\0')
1659 {
1660 /* find the start of a prefix (skip all non-alphabetic characters),
1661 * also skip strings
1662 */
1663 while (!isalpha(*start) && *start != '_' && *start != '\0')
1664 {
1665 /* skip strings */
1666 if (is_startstring(start))
1667 {
1668 start = skipstring(start);
1669 if (*start == '\0')
1670 break; /* abort loop on error */
1671 } /* if */
1672 start++; /* skip non-alphapetic character (or closing quote of a string) */
1673 } /* while */
1674 if (*start == '\0')
1675 break; /* abort loop on error */
1676 /* get the prefix (length), look for a matching definition */
1677 prefixlen = 0;
1678 end = start;
1679 while (isalpha(*end) || isdigit(*end) || *end == '_')
1680 {
1681 prefixlen++;
1682 end++;
1683 } /* while */
1684 assert(prefixlen > 0);
1685 subst = find_subst(start, prefixlen);
1686 if (subst)
1687 {
1688 /* properly match the pattern and substitute */
1689 if (!substpattern
1690 (start, buffersize - (start - line), subst->first,
1691 subst->second))
1692 start = end; /* match failed, skip this prefix */
1693 /* match succeeded: do not update "start", because the substitution text
1694 * may be matched by other macros
1695 */
1696 }
1697 else
1698 {
1699 start = end; /* no macro with this prefix, skip this prefix */
1700 } /* if */
1701 } /* while */
1702}
1703#endif
1704
1705/* preprocess
1706 *
1707 * Reads a line by readline() into "pline" and performs basic preprocessing:
1708 * deleting comments, skipping lines with false "#if.." code and recognizing
1709 * other compiler directives. There is an indirect recursion: lex() calls
1710 * preprocess() if a new line must be read, preprocess() calls command(),
1711 * which at his turn calls lex() to identify the token.
1712 *
1713 * Global references: lptr (altered)
1714 * pline (altered)
1715 * freading (referred to only)
1716 */
1717void
1718preprocess(void)
1719{
1720 int iscommand;
1721
1722 if (!freading)
1723 return;
1724 do
1725 {
1726 readline(pline);
1727 stripcom(pline); /* ??? no need for this when reading back from list file (in the second pass) */
1728 lptr = pline; /* set "line pointer" to start of the parsing buffer */
1729 iscommand = command();
1730 if (iscommand != CMD_NONE)
1731 errorset(sRESET); /* reset error flag ("panic mode") on empty line or directive */
1732#if !defined NO_DEFINE
1733 if (iscommand == CMD_NONE)
1734 {
1735 assert(lptr != term_expr);
1736 substallpatterns(pline, sLINEMAX);
1737 lptr = pline; /* reset "line pointer" to start of the parsing buffer */
1738 } /* if */
1739#endif
1740 }
1741 while (iscommand != CMD_NONE && iscommand != CMD_TERM && freading); /* enddo */
1742}
1743
1744static char *
1745unpackedstring(char *lptr, int rawstring)
1746{
1747 while (*lptr != '\0')
1748 {
1749 /* check for doublequotes indicating the end of the string */
1750 if (*lptr == '\"')
1751 {
1752 /* check whether there's another pair of quotes following.
1753 * If so, paste the two strings together, thus
1754 * "pants""off" becomes "pantsoff"
1755 */
1756 if (*(lptr + 1) == '\"')
1757 lptr += 2;
1758 else
1759 break;
1760 }
1761
1762 if (*lptr == '\a')
1763 { /* ignore '\a' (which was inserted at a line concatenation) */
1764 lptr++;
1765 continue;
1766 } /* if */
1767 stowlit(litchar(&lptr, rawstring)); /* litchar() alters "lptr" */
1768 } /* while */
1769 stowlit(0); /* terminate string */
1770 return lptr;
1771}
1772
1773static char *
1774packedstring(char *lptr, int rawstring)
1775{
1776 int i;
1777 ucell val, c;
1778
1779 i = sizeof(ucell) - (charbits / 8); /* start at most significant byte */
1780 val = 0;
1781 while (*lptr != '\0')
1782 {
1783 /* check for doublequotes indicating the end of the string */
1784 if (*lptr == '\"')
1785 {
1786 /* check whether there's another pair of quotes following.
1787 * If so, paste the two strings together, thus
1788 * "pants""off" becomes "pantsoff"
1789 */
1790 if (*(lptr + 1) == '\"')
1791 lptr += 2;
1792 else
1793 break;
1794 }
1795
1796 if (*lptr == '\a')
1797 { /* ignore '\a' (which was inserted at a line concatenation) */
1798 lptr++;
1799 continue;
1800 } /* if */
1801 c = litchar(&lptr, rawstring); /* litchar() alters "lptr" */
1802 if (c >= (ucell) (1 << charbits))
1803 error(43); /* character constant exceeds range */
1804 val |= (c << 8 * i);
1805 if (i == 0)
1806 {
1807 stowlit(val);
1808 val = 0;
1809 } /* if */
1810 i = (i + sizeof(ucell) - (charbits / 8)) % sizeof(ucell);
1811 } /* if */
1812 /* save last code; make sure there is at least one terminating zero character */
1813 if (i != (int)(sizeof(ucell) - (charbits / 8)))
1814 stowlit(val); /* at least one zero character in "val" */
1815 else
1816 stowlit(0); /* add full cell of zeros */
1817 return lptr;
1818}
1819
1820/* lex(lexvalue,lexsym) Lexical Analysis
1821 *
1822 * lex() first deletes leading white space, then checks for multi-character
1823 * operators, keywords (including most compiler directives), numbers,
1824 * labels, symbols and literals (literal characters are converted to a number
1825 * and are returned as such). If every check fails, the line must contain
1826 * a single-character operator. So, lex() returns this character. In the other
1827 * case (something did match), lex() returns the number of the token. All
1828 * these tokens have been assigned numbers above 255.
1829 *
1830 * Some tokens have "attributes":
1831 * tNUMBER the value of the number is return in "lexvalue".
1832 * tRATIONAL the value is in IEEE 754 encoding or in fixed point
1833 * encoding in "lexvalue".
1834 * tSYMBOL the first sNAMEMAX characters of the symbol are
1835 * stored in a buffer, a pointer to this buffer is
1836 * returned in "lexsym".
1837 * tLABEL the first sNAMEMAX characters of the label are
1838 * stored in a buffer, a pointer to this buffer is
1839 * returned in "lexsym".
1840 * tSTRING the string is stored in the literal pool, the index
1841 * in the literal pool to this string is stored in
1842 * "lexvalue".
1843 *
1844 * lex() stores all information (the token found and possibly its attribute)
1845 * in global variables. This allows a token to be examined twice. If "_pushed"
1846 * is true, this information is returned.
1847 *
1848 * Global references: lptr (altered)
1849 * fline (referred to only)
1850 * litidx (referred to only)
1851 * _lextok, _lexval, _lexstr
1852 * _pushed
1853 */
1854
1855static int _pushed;
1856static int _lextok;
1857static cell _lexval;
1858static char _lexstr[sLINEMAX + 1];
1859static int _lexnewline;
1860
1861void
1862lexinit(void)
1863{
1864 stkidx = 0; /* index for pushstk() and popstk() */
1865 iflevel = 0; /* preprocessor: nesting of "#if" */
1866 skiplevel = 0; /* preprocessor: skipping lines or compiling lines */
1867 icomment = FALSE; /* currently not in a multiline comment */
1868 _pushed = FALSE; /* no token pushed back into lex */
1869 _lexnewline = FALSE;
1870}
1871
1872char *sc_tokens[] = {
1873 "*=", "/=", "%=", "+=", "-=", "<<=", ">>>=", ">>=", "&=", "^=", "|=",
1874 "||", "&&", "==", "!=", "<=", ">=", "<<", ">>>", ">>", "++", "--",
1875 "...", "..",
1876 "assert", "break", "case", "char", "const", "continue", "default",
1877 "defined", "do", "else", "enum", "exit", "for", "forward", "goto",
1878 "if", "native", "new", "operator", "public", "return", "sizeof",
1879 "sleep", "static", "stock", "switch", "tagof", "while",
1880 "#assert", "#define", "#else", "#emit", "#endif", "#endinput",
1881 "#endscript", "#file", "#if", "#include", "#line", "#pragma", "#undef",
1882 ";", ";", "-integer value-", "-rational value-", "-identifier-",
1883 "-label-", "-string-"
1884};
1885
1886int
1887lex(cell * lexvalue, char **lexsym)
1888{
1889 int i, toolong, newline, rawstring;
1890 char **tokptr;
1891
1892 if (_pushed)
1893 {
1894 _pushed = FALSE; /* reset "_pushed" flag */
1895 *lexvalue = _lexval;
1896 *lexsym = _lexstr;
1897 return _lextok;
1898 } /* if */
1899
1900 _lextok = 0; /* preset all values */
1901 _lexval = 0;
1902 _lexstr[0] = '\0';
1903 *lexvalue = _lexval;
1904 *lexsym = _lexstr;
1905 _lexnewline = FALSE;
1906 if (!freading)
1907 return 0;
1908
1909 newline = (lptr == pline); /* does lptr point to start of line buffer */
1910 while (*lptr <= ' ')
1911 { /* delete leading white space */
1912 if (*lptr == '\0')
1913 {
1914 preprocess(); /* preprocess resets "lptr" */
1915 if (!freading)
1916 return 0;
1917 if (lptr == term_expr) /* special sequence to terminate a pending expression */
1918 return (_lextok = tENDEXPR);
1919 _lexnewline = TRUE; /* set this after preprocess(), because
1920 * preprocess() calls lex() recursively */
1921 newline = TRUE;
1922 }
1923 else
1924 {
1925 lptr += 1;
1926 } /* if */
1927 } /* while */
1928 if (newline)
1929 {
1930 stmtindent = 0;
1931 for (i = 0; i < (int)(lptr - pline); i++)
1932 if (pline[i] == '\t' && sc_tabsize > 0)
1933 stmtindent +=
1934 (int)(sc_tabsize - (stmtindent + sc_tabsize) % sc_tabsize);
1935 else
1936 stmtindent++;
1937 } /* if */
1938
1939 i = tFIRST;
1940 tokptr = sc_tokens;
1941 while (i <= tMIDDLE)
1942 { /* match multi-character operators */
1943 if (match(*tokptr, FALSE))
1944 {
1945 _lextok = i;
1946 return _lextok;
1947 } /* if */
1948 i += 1;
1949 tokptr += 1;
1950 } /* while */
1951 while (i <= tLAST)
1952 { /* match reserved words and compiler directives */
1953 if (match(*tokptr, TRUE))
1954 {
1955 _lextok = i;
1956 errorset(sRESET); /* reset error flag (clear the "panic mode") */
1957 return _lextok;
1958 } /* if */
1959 i += 1;
1960 tokptr += 1;
1961 } /* while */
1962
1963 if ((i = number(&_lexval, lptr)) != 0)
1964 { /* number */
1965 _lextok = tNUMBER;
1966 *lexvalue = _lexval;
1967 lptr += i;
1968 }
1969 else if ((i = ftoi(&_lexval, lptr)) != 0)
1970 {
1971 _lextok = tRATIONAL;
1972 *lexvalue = _lexval;
1973 lptr += i;
1974 }
1975 else if (alpha(*lptr))
1976 { /* symbol or label */
1977 /* Note: only sNAMEMAX characters are significant. The compiler
1978 * generates a warning if a symbol exceeds this length.
1979 */
1980 _lextok = tSYMBOL;
1981 i = 0;
1982 toolong = 0;
1983 while (alphanum(*lptr))
1984 {
1985 _lexstr[i] = *lptr;
1986 lptr += 1;
1987 if (i < sNAMEMAX)
1988 i += 1;
1989 else
1990 toolong = 1;
1991 } /* while */
1992 _lexstr[i] = '\0';
1993 if (toolong)
1994 error(200, _lexstr, sNAMEMAX); /* symbol too long, truncated to sNAMEMAX chars */
1995 if (_lexstr[0] == PUBLIC_CHAR && _lexstr[1] == '\0')
1996 {
1997 _lextok = PUBLIC_CHAR; /* '@' all alone is not a symbol, it is an operator */
1998 }
1999 else if (_lexstr[0] == '_' && _lexstr[1] == '\0')
2000 {
2001 _lextok = '_'; /* '_' by itself is not a symbol, it is a placeholder */
2002 } /* if */
2003 if (*lptr == ':' && sc_allowtags && _lextok != PUBLIC_CHAR)
2004 {
2005 _lextok = tLABEL; /* it wasn't a normal symbol, it was a label/tagname */
2006 lptr += 1; /* skip colon */
2007 } /* if */
2008 }
2009 else if (*lptr == '\"' || (*lptr == sc_ctrlchar && *(lptr + 1) == '\"'))
2010 { /* unpacked string literal */
2011 _lextok = tSTRING;
2012 rawstring = (*lptr == sc_ctrlchar);
2013 *lexvalue = _lexval = litidx;
2014 lptr += 1; /* skip double quote */
2015 if (rawstring)
2016 lptr += 1; /* skip "escape" character too */
2017 lptr =
2018 sc_packstr ? packedstring(lptr, rawstring) : unpackedstring(lptr,
2019 rawstring);
2020 if (*lptr == '\"')
2021 lptr += 1; /* skip final quote */
2022 else
2023 error(37); /* invalid (non-terminated) string */
2024 }
2025 else if ((*lptr == '!' && *(lptr + 1) == '\"')
2026 || (*lptr == '!' && *(lptr + 1) == sc_ctrlchar && *(lptr + 2) == '\"')
2027 || (*lptr == sc_ctrlchar && *(lptr + 1) == '!'
2028 && *(lptr + 2) == '\"'))
2029 { /* packed string literal */
2030 _lextok = tSTRING;
2031 rawstring = (*lptr == sc_ctrlchar || *(lptr + 1) == sc_ctrlchar);
2032 *lexvalue = _lexval = litidx;
2033 lptr += 2; /* skip exclamation point and double quote */
2034 if (rawstring)
2035 lptr += 1; /* skip "escape" character too */
2036 lptr =
2037 sc_packstr ? unpackedstring(lptr, rawstring) : packedstring(lptr,
2038 rawstring);
2039 if (*lptr == '\"')
2040 lptr += 1; /* skip final quote */
2041 else
2042 error(37); /* invalid (non-terminated) string */
2043 }
2044 else if (*lptr == '\'')
2045 { /* character literal */
2046 lptr += 1; /* skip quote */
2047 _lextok = tNUMBER;
2048 *lexvalue = _lexval = litchar(&lptr, FALSE);
2049 if (*lptr == '\'')
2050 lptr += 1; /* skip final quote */
2051 else
2052 error(27); /* invalid character constant (must be one character) */
2053 }
2054 else if (*lptr == ';')
2055 { /* semicolumn resets "error" flag */
2056 _lextok = ';';
2057 lptr += 1;
2058 errorset(sRESET); /* reset error flag (clear the "panic mode") */
2059 }
2060 else
2061 {
2062 _lextok = *lptr; /* if every match fails, return the character */
2063 lptr += 1; /* increase the "lptr" pointer */
2064 } /* if */
2065 return _lextok;
2066}
2067
2068/* lexpush
2069 *
2070 * Pushes a token back, so the next call to lex() will return the token
2071 * last examined, instead of a new token.
2072 *
2073 * Only one token can be pushed back.
2074 *
2075 * In fact, lex() already stores the information it finds into global
2076 * variables, so all that is to be done is set a flag that informs lex()
2077 * to read and return the information from these variables, rather than
2078 * to read in a new token from the input file.
2079 */
2080void
2081lexpush(void)
2082{
2083 assert(_pushed == FALSE);
2084 _pushed = TRUE;
2085}
2086
2087/* lexclr
2088 *
2089 * Sets the variable "_pushed" to 0 to make sure lex() will read in a new
2090 * symbol (a not continue with some old one). This is required upon return
2091 * from Assembler mode.
2092 */
2093void
2094lexclr(int clreol)
2095{
2096 _pushed = FALSE;
2097 if (clreol)
2098 {
2099 lptr = strchr(pline, '\0');
2100 assert(lptr != NULL);
2101 } /* if */
2102}
2103
2104/* matchtoken
2105 *
2106 * This routine is useful if only a simple check is needed. If the token
2107 * differs from the one expected, it is pushed back.
2108 */
2109int
2110matchtoken(int token)
2111{
2112 cell val;
2113 char *str;
2114 int tok;
2115
2116 tok = lex(&val, &str);
2117 if (tok == token || (token == tTERM && (tok == ';' || tok == tENDEXPR)))
2118 {
2119 return 1;
2120 }
2121 else if (!sc_needsemicolon && token == tTERM && (_lexnewline || !freading))
2122 {
2123 lexpush(); /* push "tok" back, we use the "hidden" newline token */
2124 return 1;
2125 }
2126 else
2127 {
2128 lexpush();
2129 return 0;
2130 } /* if */
2131}
2132
2133/* tokeninfo
2134 *
2135 * Returns additional information of a token after using "matchtoken()"
2136 * or needtoken(). It does no harm using this routine after a call to
2137 * "lex()", but lex() already returns the same information.
2138 *
2139 * The token itself is the return value. Normally, this one is already known.
2140 */
2141int
2142tokeninfo(cell * val, char **str)
2143{
2144 /* if the token was pushed back, tokeninfo() returns the token and
2145 * parameters of the *next* token, not of the *current* token.
2146 */
2147 assert(!_pushed);
2148 *val = _lexval;
2149 *str = _lexstr;
2150 return _lextok;
2151}
2152
2153/* needtoken
2154 *
2155 * This routine checks for a required token and gives an error message if
2156 * it isn't there (and returns FALSE in that case).
2157 *
2158 * Global references: _lextok;
2159 */
2160int
2161needtoken(int token)
2162{
2163 char s1[20], s2[20];
2164
2165 if (matchtoken(token))
2166 {
2167 return TRUE;
2168 }
2169 else
2170 {
2171 /* token already pushed back */
2172 assert(_pushed);
2173 if (token < 256)
2174 sprintf(s1, "%c", (char)token); /* single character token */
2175 else
2176 strcpy(s1, sc_tokens[token - tFIRST]); /* multi-character symbol */
2177 if (!freading)
2178 strcpy(s2, "-end of file-");
2179 else if (_lextok < 256)
2180 sprintf(s2, "%c", (char)_lextok);
2181 else
2182 strcpy(s2, sc_tokens[_lextok - tFIRST]);
2183 error(1, s1, s2); /* expected ..., but found ... */
2184 return FALSE;
2185 } /* if */
2186}
2187
2188/* match
2189 *
2190 * Compares a series of characters from the input file with the characters
2191 * in "st" (that contains a token). If the token on the input file matches
2192 * "st", the input file pointer "lptr" is adjusted to point to the next
2193 * token, otherwise "lptr" remains unaltered.
2194 *
2195 * If the parameter "end: is true, match() requires that the first character
2196 * behind the recognized token is non-alphanumeric.
2197 *
2198 * Global references: lptr (altered)
2199 */
2200static int
2201match(char *st, int end)
2202{
2203 int k;
2204 char *ptr;
2205
2206 k = 0;
2207 ptr = lptr;
2208 while (st[k])
2209 {
2210 if (st[k] != *ptr)
2211 return 0;
2212 k += 1;
2213 ptr += 1;
2214 } /* while */
2215 if (end)
2216 { /* symbol must terminate with non-alphanumeric char */
2217 if (alphanum(*ptr))
2218 return 0;
2219 } /* if */
2220 lptr = ptr; /* match found, skip symbol */
2221 return 1;
2222}
2223
2224/* stowlit
2225 *
2226 * Stores a value into the literal queue. The literal queue is used for
2227 * literal strings used in functions and for initializing array variables.
2228 *
2229 * Global references: litidx (altered)
2230 * litq (altered)
2231 */
2232void
2233stowlit(cell value)
2234{
2235 if (litidx >= litmax)
2236 {
2237 cell *p;
2238
2239 litmax += sDEF_LITMAX;
2240 p = (cell *) realloc(litq, litmax * sizeof(cell));
2241 if (!p)
2242 error(102, "literal table"); /* literal table overflow (fatal error) */
2243 litq = p;
2244 } /* if */
2245 assert(litidx < litmax);
2246 litq[litidx++] = value;
2247}
2248
2249/* litchar
2250 *
2251 * Return current literal character and increase the pointer to point
2252 * just behind this literal character.
2253 *
2254 * Note: standard "escape sequences" are suported, but the backslash may be
2255 * replaced by another character; the syntax '\ddd' is supported,
2256 * but ddd must be decimal!
2257 */
2258static cell
2259litchar(char **lptr, int rawmode)
2260{
2261 cell c = 0;
2262 unsigned char *cptr;
2263
2264 cptr = (unsigned char *)*lptr;
2265 if (rawmode || *cptr != sc_ctrlchar)
2266 { /* no escape character */
2267 c = *cptr;
2268 cptr += 1;
2269 }
2270 else
2271 {
2272 cptr += 1;
2273 if (*cptr == sc_ctrlchar)
2274 {
2275 c = *cptr; /* \\ == \ (the escape character itself) */
2276 cptr += 1;
2277 }
2278 else
2279 {
2280 switch (*cptr)
2281 {
2282 case 'a': /* \a == audible alarm */
2283 c = 7;
2284 cptr += 1;
2285 break;
2286 case 'b': /* \b == backspace */
2287 c = 8;
2288 cptr += 1;
2289 break;
2290 case 'e': /* \e == escape */
2291 c = 27;
2292 cptr += 1;
2293 break;
2294 case 'f': /* \f == form feed */
2295 c = 12;
2296 cptr += 1;
2297 break;
2298 case 'n': /* \n == NewLine character */
2299 c = 10;
2300 cptr += 1;
2301 break;
2302 case 'r': /* \r == carriage return */
2303 c = 13;
2304 cptr += 1;
2305 break;
2306 case 't': /* \t == horizontal TAB */
2307 c = 9;
2308 cptr += 1;
2309 break;
2310 case 'v': /* \v == vertical TAB */
2311 c = 11;
2312 cptr += 1;
2313 break;
2314 case '\'': /* \' == ' (single quote) */
2315 case '"': /* \" == " (single quote) */
2316 case '%': /* \% == % (percent) */
2317 c = *cptr;
2318 cptr += 1;
2319 break;
2320 default:
2321 if (isdigit(*cptr))
2322 { /* \ddd */
2323 c = 0;
2324 while (*cptr >= '0' && *cptr <= '9') /* decimal! */
2325 c = c * 10 + *cptr++ - '0';
2326 if (*cptr == ';')
2327 cptr++; /* swallow a trailing ';' */
2328 }
2329 else
2330 {
2331 error(27); /* invalid character constant */
2332 } /* if */
2333 } /* switch */
2334 } /* if */
2335 } /* if */
2336 *lptr = (char *)cptr;
2337 assert(c >= 0 && c < 256);
2338 return c;
2339}
2340
2341/* alpha
2342 *
2343 * Test if character "c" is alphabetic ("a".."z"), an underscore ("_")
2344 * or an "at" sign ("@"). The "@" is an extension to standard C.
2345 */
2346static int
2347alpha(char c)
2348{
2349 return (isalpha(c) || c == '_' || c == PUBLIC_CHAR);
2350}
2351
2352/* alphanum
2353 *
2354 * Test if character "c" is alphanumeric ("a".."z", "0".."9", "_" or "@")
2355 */
2356int
2357alphanum(char c)
2358{
2359 return (alpha(c) || isdigit(c));
2360}
2361
2362/* The local variable table must be searched backwards, so that the deepest
2363 * nesting of local variables is searched first. The simplest way to do
2364 * this is to insert all new items at the head of the list.
2365 * In the global list, the symbols are kept in sorted order, so that the
2366 * public functions are written in sorted order.
2367 */
2368static symbol *
2369add_symbol(symbol * root, symbol * entry, int sort)
2370{
2371 symbol *newsym;
2372
2373 if (sort)
2374 while (root->next && strcmp(entry->name, root->next->name) > 0)
2375 root = root->next;
2376
2377 if (!(newsym = (symbol *)malloc(sizeof(symbol))))
2378 {
2379 error(103);
2380 return NULL;
2381 } /* if */
2382 memcpy(newsym, entry, sizeof(symbol));
2383 newsym->next = root->next;
2384 root->next = newsym;
2385 return newsym;
2386}
2387
2388static void
2389free_symbol(symbol * sym)
2390{
2391 arginfo *arg;
2392
2393 /* free all sub-symbol allocated memory blocks, depending on the
2394 * kind of the symbol
2395 */
2396 assert(sym != NULL);
2397 if (sym->ident == iFUNCTN)
2398 {
2399 /* run through the argument list; "default array" arguments
2400 * must be freed explicitly; the tag list must also be freed */
2401 assert(sym->dim.arglist != NULL);
2402 for (arg = sym->dim.arglist; arg->ident != 0; arg++)
2403 {
2404 if (arg->ident == iREFARRAY && arg->hasdefault)
2405 free(arg->defvalue.array.data);
2406 else if (arg->ident == iVARIABLE
2407 && ((arg->hasdefault & uSIZEOF) != 0
2408 || (arg->hasdefault & uTAGOF) != 0))
2409 free(arg->defvalue.size.symname);
2410 assert(arg->tags != NULL);
2411 free(arg->tags);
2412 } /* for */
2413 free(sym->dim.arglist);
2414 } /* if */
2415 assert(sym->refer != NULL);
2416 free(sym->refer);
2417 free(sym);
2418}
2419
2420void
2421delete_symbol(symbol * root, symbol * sym)
2422{
2423 /* find the symbol and its predecessor
2424 * (this function assumes that you will never delete a symbol that is not
2425 * in the table pointed at by "root")
2426 */
2427 assert(root != sym);
2428 while (root->next != sym)
2429 {
2430 root = root->next;
2431 assert(root != NULL);
2432 } /* while */
2433
2434 /* unlink it, then free it */
2435 root->next = sym->next;
2436 free_symbol(sym);
2437}
2438
2439void
2440delete_symbols(symbol * root, int level, int delete_labels,
2441 int delete_functions)
2442{
2443 symbol *sym;
2444
2445 /* erase only the symbols with a deeper nesting level than the
2446 * specified nesting level */
2447 while (root->next)
2448 {
2449 sym = root->next;
2450 if (sym->compound < level)
2451 break;
2452 if ((delete_labels || sym->ident != iLABEL)
2453 && (delete_functions || sym->ident != iFUNCTN
2454 || (sym->usage & uNATIVE) != 0) && (delete_functions
2455 || sym->ident != iCONSTEXPR
2456 || (sym->usage & uPREDEF) ==
2457 0) && (delete_functions
2458 || (sym->ident !=
2459 iVARIABLE
2460 && sym->ident !=
2461 iARRAY)))
2462 {
2463 root->next = sym->next;
2464 free_symbol(sym);
2465 }
2466 else
2467 {
2468 /* if the function was prototyped, but not implemented in this source,
2469 * mark it as such, so that its use can be flagged
2470 */
2471 if (sym->ident == iFUNCTN && (sym->usage & uDEFINE) == 0)
2472 sym->usage |= uMISSING;
2473 if (sym->ident == iFUNCTN || sym->ident == iVARIABLE
2474 || sym->ident == iARRAY)
2475 sym->usage &= ~uDEFINE; /* clear "defined" flag */
2476 /* for user defined operators, also remove the "prototyped" flag, as
2477 * user-defined operators *must* be declared before use
2478 */
2479 if (sym->ident == iFUNCTN && !isalpha(*sym->name)
2480 && *sym->name != '_' && *sym->name != PUBLIC_CHAR)
2481 sym->usage &= ~uPROTOTYPED;
2482 root = sym; /* skip the symbol */
2483 } /* if */
2484 } /* if */
2485}
2486
2487/* The purpose of the hash is to reduce the frequency of a "name"
2488 * comparison (which is costly). There is little interest in avoiding
2489 * clusters in similar names, which is why this function is plain simple.
2490 */
2491unsigned int
2492namehash(char *name)
2493{
2494 unsigned char *ptr = (unsigned char *)name;
2495 int len = strlen(name);
2496
2497 if (len == 0)
2498 return 0L;
2499 assert(len < 256);
2500 return (len << 24Lu) + (ptr[0] << 16Lu) + (ptr[len - 1] << 8Lu) +
2501 (ptr[len >> 1Lu]);
2502}
2503
2504static symbol *
2505find_symbol(symbol * root, char *name, int fnumber)
2506{
2507 symbol *ptr = root->next;
2508 unsigned long hash = namehash(name);
2509
2510 while (ptr)
2511 {
2512 if (hash == ptr->hash && strcmp(name, ptr->name) == 0
2513 && !ptr->parent && (ptr->fnumber < 0
2514 || ptr->fnumber == fnumber))
2515 return ptr;
2516 ptr = ptr->next;
2517 } /* while */
2518 return NULL;
2519}
2520
2521static symbol *
2522find_symbol_child(symbol * root, symbol * sym)
2523{
2524 symbol *ptr = root->next;
2525
2526 while (ptr)
2527 {
2528 if (ptr->parent == sym)
2529 return ptr;
2530 ptr = ptr->next;
2531 } /* while */
2532 return NULL;
2533}
2534
2535/* Adds "bywhom" to the list of referrers of "entry". Typically,
2536 * bywhom will be the function that uses a variable or that calls
2537 * the function.
2538 */
2539int
2540refer_symbol(symbol * entry, symbol * bywhom)
2541{
2542 int count;
2543
2544 assert(bywhom != NULL); /* it makes no sense to add a "void" referrer */
2545 assert(entry != NULL);
2546 assert(entry->refer != NULL);
2547
2548 /* see if it is already there */
2549 for (count = 0; count < entry->numrefers && entry->refer[count] != bywhom;
2550 count++)
2551 /* nothing */ ;
2552 if (count < entry->numrefers)
2553 {
2554 assert(entry->refer[count] == bywhom);
2555 return TRUE;
2556 } /* if */
2557
2558 /* see if there is an empty spot in the referrer list */
2559 for (count = 0; count < entry->numrefers && entry->refer[count];
2560 count++)
2561 /* nothing */ ;
2562 assert(count <= entry->numrefers);
2563 if (count == entry->numrefers)
2564 {
2565 symbol **refer;
2566 int newsize = 2 * entry->numrefers;
2567
2568 assert(newsize > 0);
2569 /* grow the referrer list */
2570 refer = (symbol **) realloc(entry->refer, newsize * sizeof(symbol *));
2571 if (!refer)
2572 return FALSE; /* insufficient memory */
2573 /* initialize the new entries */
2574 entry->refer = refer;
2575 for (count = entry->numrefers; count < newsize; count++)
2576 entry->refer[count] = NULL;
2577 count = entry->numrefers; /* first empty spot */
2578 entry->numrefers = newsize;
2579 } /* if */
2580
2581 /* add the referrer */
2582 assert(entry->refer[count] == NULL);
2583 entry->refer[count] = bywhom;
2584 return TRUE;
2585}
2586
2587void
2588markusage(symbol * sym, int usage)
2589{
2590 sym->usage |= (char)usage;
2591 /* check if (global) reference must be added to the symbol */
2592 if ((usage & (uREAD | uWRITTEN)) != 0)
2593 {
2594 /* only do this for global symbols */
2595 if (sym->vclass == sGLOBAL)
2596 {
2597 /* "curfunc" should always be valid, since statements may not occurs
2598 * outside functions; in the case of syntax errors, however, the
2599 * compiler may arrive through this function
2600 */
2601 if (curfunc)
2602 refer_symbol(sym, curfunc);
2603 } /* if */
2604 } /* if */
2605}
2606
2607/* findglb
2608 *
2609 * Returns a pointer to the global symbol (if found) or NULL (if not found)
2610 */
2611symbol *
2612findglb(char *name)
2613{
2614 return find_symbol(&glbtab, name, fcurrent);
2615}
2616
2617/* findloc
2618 *
2619 * Returns a pointer to the local symbol (if found) or NULL (if not found).
2620 * See add_symbol() how the deepest nesting level is searched first.
2621 */
2622symbol *
2623findloc(char *name)
2624{
2625 return find_symbol(&loctab, name, -1);
2626}
2627
2628symbol *
2629findconst(char *name)
2630{
2631 symbol *sym;
2632
2633 sym = find_symbol(&loctab, name, -1); /* try local symbols first */
2634 if (!sym || sym->ident != iCONSTEXPR) /* not found, or not a constant */
2635 sym = find_symbol(&glbtab, name, fcurrent);
2636 if (!sym || sym->ident != iCONSTEXPR)
2637 return NULL;
2638 assert(sym->parent == NULL); /* constants have no hierarchy */
2639 return sym;
2640}
2641
2642symbol *
2643finddepend(symbol * parent)
2644{
2645 symbol *sym;
2646
2647 sym = find_symbol_child(&loctab, parent); /* try local symbols first */
2648 if (!sym) /* not found */
2649 sym = find_symbol_child(&glbtab, parent);
2650 return sym;
2651}
2652
2653/* addsym
2654 *
2655 * Adds a symbol to the symbol table (either global or local variables,
2656 * or global and local constants).
2657 */
2658symbol *
2659addsym(char *name, cell addr, int ident, int vclass, int tag, int usage)
2660{
2661 symbol entry, **refer;
2662
2663 /* global variables/constants/functions may only be defined once */
2664 assert(!(ident == iFUNCTN || ident == iCONSTEXPR) || vclass != sGLOBAL
2665 || findglb(name) == NULL);
2666 /* labels may only be defined once */
2667 assert(ident != iLABEL || findloc(name) == NULL);
2668
2669 /* create an empty referrer list */
2670 if (!(refer = (symbol **)malloc(sizeof(symbol *))))
2671 {
2672 error(103); /* insufficient memory */
2673 return NULL;
2674 } /* if */
2675 *refer = NULL;
2676
2677 /* first fill in the entry */
2678 strcpy(entry.name, name);
2679 entry.hash = namehash(name);
2680 entry.addr = addr;
2681 entry.vclass = (char)vclass;
2682 entry.ident = (char)ident;
2683 entry.tag = tag;
2684 entry.usage = (char)usage;
2685 entry.compound = 0; /* may be overridden later */
2686 entry.fnumber = -1; /* assume global visibility (ignored for local symbols) */
2687 entry.numrefers = 1;
2688 entry.refer = refer;
2689 entry.parent = NULL;
2690
2691 /* then insert it in the list */
2692 if (vclass == sGLOBAL)
2693 return add_symbol(&glbtab, &entry, TRUE);
2694 else
2695 return add_symbol(&loctab, &entry, FALSE);
2696}
2697
2698symbol *
2699addvariable(char *name, cell addr, int ident, int vclass, int tag,
2700 int dim[], int numdim, int idxtag[])
2701{
2702 symbol *sym, *parent, *top;
2703 int level;
2704
2705 /* global variables may only be defined once */
2706 assert(vclass != sGLOBAL || (sym = findglb(name)) == NULL
2707 || (sym->usage & uDEFINE) == 0);
2708
2709 if (ident == iARRAY || ident == iREFARRAY)
2710 {
2711 parent = NULL;
2712 sym = NULL; /* to avoid a compiler warning */
2713 for (level = 0; level < numdim; level++)
2714 {
2715 top = addsym(name, addr, ident, vclass, tag, uDEFINE);
2716 top->dim.array.length = dim[level];
2717 top->dim.array.level = (short)(numdim - level - 1);
2718 top->x.idxtag = idxtag[level];
2719 top->parent = parent;
2720 parent = top;
2721 if (level == 0)
2722 sym = top;
2723 } /* for */
2724 }
2725 else
2726 {
2727 sym = addsym(name, addr, ident, vclass, tag, uDEFINE);
2728 } /* if */
2729 return sym;
2730}
2731
2732/* getlabel
2733 *
2734 * Return next available internal label number.
2735 */
2736int
2737getlabel(void)
2738{
2739 return labnum++;
2740}
2741
2742/* itoh
2743 *
2744 * Converts a number to a hexadecimal string and returns a pointer to that
2745 * string.
2746 */
2747char *
2748itoh(ucell val)
2749{
2750 static char itohstr[15]; /* hex number is 10 characters long at most */
2751 char *ptr;
2752 int i, nibble[8]; /* a 32-bit hexadecimal cell has 8 nibbles */
2753 int max;
2754
2755#if defined(BIT16)
2756 max = 4;
2757#else
2758 max = 8;
2759#endif
2760 ptr = itohstr;
2761 for (i = 0; i < max; i += 1)
2762 {
2763 nibble[i] = (int)(val & 0x0f); /* nibble 0 is lowest nibble */
2764 val >>= 4;
2765 } /* endfor */
2766 i = max - 1;
2767 while (nibble[i] == 0 && i > 0) /* search for highest non-zero nibble */
2768 i -= 1;
2769 while (i >= 0)
2770 {
2771 if (nibble[i] >= 10)
2772 *ptr++ = (char)('a' + (nibble[i] - 10));
2773 else
2774 *ptr++ = (char)('0' + nibble[i]);
2775 i -= 1;
2776 } /* while */
2777 *ptr = '\0'; /* and a zero-terminator */
2778 return itohstr;
2779}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc3.c b/libraries/embryo/src/bin/embryo_cc_sc3.c
deleted file mode 100644
index 99b24ed..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc3.c
+++ /dev/null
@@ -1,2438 +0,0 @@
1/* Small compiler - Recursive descend expresion parser
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_sc3.c 52451 2010-09-19 03:00:12Z raster $
22 */
23
24
25#ifdef HAVE_CONFIG_H
26# include <config.h>
27#endif
28
29#include <assert.h>
30#include <stdio.h>
31#include <limits.h> /* for PATH_MAX */
32#include <string.h>
33
34#include "embryo_cc_sc.h"
35
36static int skim(int *opstr, void (*testfunc) (int), int dropval,
37 int endval, int (*hier) (value *), value * lval);
38static void dropout(int lvalue, void (*testfunc) (int val), int exit1,
39 value * lval);
40static int plnge(int *opstr, int opoff, int (*hier) (value * lval),
41 value * lval, char *forcetag, int chkbitwise);
42static int plnge1(int (*hier) (value * lval), value * lval);
43static void plnge2(void (*oper) (void),
44 int (*hier) (value * lval),
45 value * lval1, value * lval2);
46static cell calc(cell left, void (*oper) (), cell right,
47 char *boolresult);
48static int hier13(value * lval);
49static int hier12(value * lval);
50static int hier11(value * lval);
51static int hier10(value * lval);
52static int hier9(value * lval);
53static int hier8(value * lval);
54static int hier7(value * lval);
55static int hier6(value * lval);
56static int hier5(value * lval);
57static int hier4(value * lval);
58static int hier3(value * lval);
59static int hier2(value * lval);
60static int hier1(value * lval1);
61static int primary(value * lval);
62static void clear_value(value * lval);
63static void callfunction(symbol * sym);
64static int dbltest(void (*oper) (), value * lval1, value * lval2);
65static int commutative(void (*oper) ());
66static int constant(value * lval);
67
68static char lastsymbol[sNAMEMAX + 1]; /* name of last function/variable */
69static int bitwise_opercount; /* count of bitwise operators in an expression */
70
71/* Function addresses of binary operators for signed operations */
72static void (*op1[17]) (void) =
73{
74 os_mult, os_div, os_mod, /* hier3, index 0 */
75 ob_add, ob_sub, /* hier4, index 3 */
76 ob_sal, os_sar, ou_sar, /* hier5, index 5 */
77 ob_and, /* hier6, index 8 */
78 ob_xor, /* hier7, index 9 */
79 ob_or, /* hier8, index 10 */
80 os_le, os_ge, os_lt, os_gt, /* hier9, index 11 */
81 ob_eq, ob_ne, /* hier10, index 15 */
82};
83/* These two functions are defined because the functions inc() and dec() in
84 * SC4.C have a different prototype than the other code generation functions.
85 * The arrays for user-defined functions use the function pointers for
86 * identifying what kind of operation is requested; these functions must all
87 * have the same prototype. As inc() and dec() are special cases already, it
88 * is simplest to add two "do-nothing" functions.
89 */
90static void
91user_inc(void)
92{
93}
94static void
95user_dec(void)
96{
97}
98
99/*
100 * Searches for a binary operator a list of operators. The list is stored in
101 * the array "list". The last entry in the list should be set to 0.
102 *
103 * The index of an operator in "list" (if found) is returned in "opidx". If
104 * no operator is found, nextop() returns 0.
105 */
106static int
107nextop(int *opidx, int *list)
108{
109 *opidx = 0;
110 while (*list)
111 {
112 if (matchtoken(*list))
113 {
114 return TRUE; /* found! */
115 }
116 else
117 {
118 list += 1;
119 *opidx += 1;
120 } /* if */
121 } /* while */
122 return FALSE; /* entire list scanned, nothing found */
123}
124
125int
126check_userop(void (*oper) (void), int tag1, int tag2, int numparam,
127 value * lval, int *resulttag)
128{
129 static char *binoperstr[] = { "*", "/", "%", "+", "-", "", "", "",
130 "", "", "", "<=", ">=", "<", ">", "==", "!="
131 };
132 static int binoper_savepri[] =
133 { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
134 FALSE, FALSE, FALSE, FALSE, FALSE,
135 TRUE, TRUE, TRUE, TRUE, FALSE, FALSE
136 };
137 static char *unoperstr[] = { "!", "-", "++", "--" };
138 static void (*unopers[]) (void) =
139 {
140 lneg, neg, user_inc, user_dec};
141 char opername[4] = "", symbolname[sNAMEMAX + 1];
142 int i, swapparams, savepri, savealt;
143 int paramspassed;
144 symbol *sym;
145
146 /* since user-defined operators on untagged operands are forbidden, we have
147 * a quick exit.
148 */
149 assert(numparam == 1 || numparam == 2);
150 if (tag1 == 0 && (numparam == 1 || tag2 == 0))
151 return FALSE;
152
153 savepri = savealt = FALSE;
154 /* find the name with the operator */
155 if (numparam == 2)
156 {
157 if (!oper)
158 {
159 /* assignment operator: a special case */
160 strcpy(opername, "=");
161 if (lval
162 && (lval->ident == iARRAYCELL || lval->ident == iARRAYCHAR))
163 savealt = TRUE;
164 }
165 else
166 {
167 assert((sizeof binoperstr / sizeof binoperstr[0]) ==
168 (sizeof op1 / sizeof op1[0]));
169 for (i = 0; i < (int)(sizeof op1 / sizeof op1[0]); i++)
170 {
171 if (oper == op1[i])
172 {
173 strcpy(opername, binoperstr[i]);
174 savepri = binoper_savepri[i];
175 break;
176 } /* if */
177 } /* for */
178 } /* if */
179 }
180 else
181 {
182 assert(oper != NULL);
183 assert(numparam == 1);
184 /* try a select group of unary operators */
185 assert((sizeof unoperstr / sizeof unoperstr[0]) ==
186 (sizeof unopers / sizeof unopers[0]));
187 if (opername[0] == '\0')
188 {
189 for (i = 0; i < (int)(sizeof unopers / sizeof unopers[0]); i++)
190 {
191 if (oper == unopers[i])
192 {
193 strcpy(opername, unoperstr[i]);
194 break;
195 } /* if */
196 } /* for */
197 } /* if */
198 } /* if */
199 /* if not found, quit */
200 if (opername[0] == '\0')
201 return FALSE;
202
203 /* create a symbol name from the tags and the operator name */
204 assert(numparam == 1 || numparam == 2);
205 operator_symname(symbolname, opername, tag1, tag2, numparam, tag2);
206 swapparams = FALSE;
207 sym = findglb(symbolname);
208 if (!sym /*|| (sym->usage & uDEFINE)==0 */ )
209 { /* ??? should not check uDEFINE; first pass clears these bits */
210 /* check for commutative operators */
211 if (tag1 == tag2 || !oper || !commutative(oper))
212 return FALSE; /* not commutative, cannot swap operands */
213 /* if arrived here, the operator is commutative and the tags are different,
214 * swap tags and try again
215 */
216 assert(numparam == 2); /* commutative operator must be a binary operator */
217 operator_symname(symbolname, opername, tag2, tag1, numparam, tag1);
218 swapparams = TRUE;
219 sym = findglb(symbolname);
220 if (!sym /*|| (sym->usage & uDEFINE)==0 */ )
221 return FALSE;
222 } /* if */
223
224 /* check existence and the proper declaration of this function */
225 if ((sym->usage & uMISSING) != 0 || (sym->usage & uPROTOTYPED) == 0)
226 {
227 char symname[2 * sNAMEMAX + 16]; /* allow space for user defined operators */
228
229 funcdisplayname(symname, sym->name);
230 if ((sym->usage & uMISSING) != 0)
231 error(4, symname); /* function not defined */
232 if ((sym->usage & uPROTOTYPED) == 0)
233 error(71, symname); /* operator must be declared before use */
234 } /* if */
235
236 /* we don't want to use the redefined operator in the function that
237 * redefines the operator itself, otherwise the snippet below gives
238 * an unexpected recursion:
239 * fixed:operator+(fixed:a, fixed:b)
240 * return a + b
241 */
242 if (sym == curfunc)
243 return FALSE;
244
245 /* for increment and decrement operators, the symbol must first be loaded
246 * (and stored back afterwards)
247 */
248 if (oper == user_inc || oper == user_dec)
249 {
250 assert(!savepri);
251 assert(lval != NULL);
252 if (lval->ident == iARRAYCELL || lval->ident == iARRAYCHAR)
253 push1(); /* save current address in PRI */
254 rvalue(lval); /* get the symbol's value in PRI */
255 } /* if */
256
257 assert(!savepri || !savealt); /* either one MAY be set, but not both */
258 if (savepri)
259 {
260 /* the chained comparison operators require that the ALT register is
261 * unmodified, so we save it here; actually, we save PRI because the normal
262 * instruction sequence (without user operator) swaps PRI and ALT
263 */
264 push1(); /* right-hand operand is in PRI */
265 }
266 else if (savealt)
267 {
268 /* for the assignment operator, ALT may contain an address at which the
269 * result must be stored; this address must be preserved across the
270 * call
271 */
272 assert(lval != NULL); /* this was checked earlier */
273 assert(lval->ident == iARRAYCELL || lval->ident == iARRAYCHAR); /* checked earlier */
274 push2();
275 } /* if */
276
277 /* push parameters, call the function */
278 paramspassed = (!oper) ? 1 : numparam;
279 switch (paramspassed)
280 {
281 case 1:
282 push1();
283 break;
284 case 2:
285 /* note that 1) a function expects that the parameters are pushed
286 * in reversed order, and 2) the left operand is in the secondary register
287 * and the right operand is in the primary register */
288 if (swapparams)
289 {
290 push2();
291 push1();
292 }
293 else
294 {
295 push1();
296 push2();
297 } /* if */
298 break;
299 default:
300 assert(0);
301 } /* switch */
302 endexpr(FALSE); /* mark the end of a sub-expression */
303 pushval((cell) paramspassed * sizeof(cell));
304 assert(sym->ident == iFUNCTN);
305 ffcall(sym, paramspassed);
306 if (sc_status != statSKIP)
307 markusage(sym, uREAD); /* do not mark as "used" when this call itself is skipped */
308 if (sym->x.lib)
309 sym->x.lib->value += 1; /* increment "usage count" of the library */
310 sideeffect = TRUE; /* assume functions carry out a side-effect */
311 assert(resulttag != NULL);
312 *resulttag = sym->tag; /* save tag of the called function */
313
314 if (savepri || savealt)
315 pop2(); /* restore the saved PRI/ALT that into ALT */
316 if (oper == user_inc || oper == user_dec)
317 {
318 assert(lval != NULL);
319 if (lval->ident == iARRAYCELL || lval->ident == iARRAYCHAR)
320 pop2(); /* restore address (in ALT) */
321 store(lval); /* store PRI in the symbol */
322 moveto1(); /* make sure PRI is restored on exit */
323 } /* if */
324 return TRUE;
325}
326
327int
328matchtag(int formaltag, int actualtag, int allowcoerce)
329{
330 if (formaltag != actualtag)
331 {
332 /* if the formal tag is zero and the actual tag is not "fixed", the actual
333 * tag is "coerced" to zero
334 */
335 if (!allowcoerce || formaltag != 0 || (actualtag & FIXEDTAG) != 0)
336 return FALSE;
337 } /* if */
338 return TRUE;
339}
340
341/*
342 * The AMX pseudo-processor has no direct support for logical (boolean)
343 * operations. These have to be done via comparing and jumping. Since we are
344 * already jumping through the code, we might as well implement an "early
345 * drop-out" evaluation (also called "short-circuit"). This conforms to
346 * standard C:
347 *
348 * expr1 || expr2 expr2 will only be evaluated if expr1 is false.
349 * expr1 && expr2 expr2 will only be evaluated if expr1 is true.
350 *
351 * expr1 || expr2 && expr3 expr2 will only be evaluated if expr1 is false
352 * and expr3 will only be evaluated if expr1 is
353 * false and expr2 is true.
354 *
355 * Code generation for the last example proceeds thus:
356 *
357 * evaluate expr1
358 * operator || found
359 * jump to "l1" if result of expr1 not equal to 0
360 * evaluate expr2
361 * -> operator && found; skip to higher level in hierarchy diagram
362 * jump to "l2" if result of expr2 equal to 0
363 * evaluate expr3
364 * jump to "l2" if result of expr3 equal to 0
365 * set expression result to 1 (true)
366 * jump to "l3"
367 * l2: set expression result to 0 (false)
368 * l3:
369 * <- drop back to previous hierarchy level
370 * jump to "l1" if result of expr2 && expr3 not equal to 0
371 * set expression result to 0 (false)
372 * jump to "l4"
373 * l1: set expression result to 1 (true)
374 * l4:
375 *
376 */
377
378/* Skim over terms adjoining || and && operators
379 * dropval The value of the expression after "dropping out". An "or" drops
380 * out when the left hand is TRUE, so dropval must be 1 on "or"
381 * expressions.
382 * endval The value of the expression when no expression drops out. In an
383 * "or" expression, this happens when both the left hand and the
384 * right hand are FALSE, so endval must be 0 for "or" expressions.
385 */
386static int
387skim(int *opstr, void (*testfunc) (int), int dropval, int endval,
388 int (*hier) (value *), value * lval)
389{
390 int lvalue, hits, droplab, endlab, opidx;
391 int allconst;
392 cell constval;
393 int index;
394 cell cidx;
395
396 stgget(&index, &cidx); /* mark position in code generator */
397 hits = FALSE; /* no logical operators "hit" yet */
398 allconst = TRUE; /* assume all values "const" */
399 constval = 0;
400 droplab = 0; /* to avoid a compiler warning */
401 for (;;)
402 {
403 lvalue = plnge1(hier, lval); /* evaluate left expression */
404
405 allconst = allconst && (lval->ident == iCONSTEXPR);
406 if (allconst)
407 {
408 if (hits)
409 {
410 /* one operator was already found */
411 if (testfunc == jmp_ne0)
412 lval->constval = lval->constval || constval;
413 else
414 lval->constval = lval->constval && constval;
415 } /* if */
416 constval = lval->constval; /* save result accumulated so far */
417 } /* if */
418
419 if (nextop(&opidx, opstr))
420 {
421 if (!hits)
422 {
423 /* this is the first operator in the list */
424 hits = TRUE;
425 droplab = getlabel();
426 } /* if */
427 dropout(lvalue, testfunc, droplab, lval);
428 }
429 else if (hits)
430 { /* no (more) identical operators */
431 dropout(lvalue, testfunc, droplab, lval); /* found at least one operator! */
432 const1(endval);
433 jumplabel(endlab = getlabel());
434 setlabel(droplab);
435 const1(dropval);
436 setlabel(endlab);
437 lval->sym = NULL;
438 lval->tag = 0;
439 if (allconst)
440 {
441 lval->ident = iCONSTEXPR;
442 lval->constval = constval;
443 stgdel(index, cidx); /* scratch generated code and calculate */
444 }
445 else
446 {
447 lval->ident = iEXPRESSION;
448 lval->constval = 0;
449 } /* if */
450 return FALSE;
451 }
452 else
453 {
454 return lvalue; /* none of the operators in "opstr" were found */
455 } /* if */
456
457 } /* while */
458}
459
460/*
461 * Reads into the primary register the variable pointed to by lval if
462 * plunging through the hierarchy levels detected an lvalue. Otherwise
463 * if a constant was detected, it is loaded. If there is no constant and
464 * no lvalue, the primary register must already contain the expression
465 * result.
466 *
467 * After that, the compare routines "jmp_ne0" or "jmp_eq0" are called, which
468 * compare the primary register against 0, and jump to the "early drop-out"
469 * label "exit1" if the condition is true.
470 */
471static void
472dropout(int lvalue, void (*testfunc) (int val), int exit1, value * lval)
473{
474 if (lvalue)
475 rvalue(lval);
476 else if (lval->ident == iCONSTEXPR)
477 const1(lval->constval);
478 (*testfunc) (exit1);
479}
480
481static void
482checkfunction(value * lval)
483{
484 symbol *sym = lval->sym;
485
486 if (!sym || (sym->ident != iFUNCTN && sym->ident != iREFFUNC))
487 return; /* no known symbol, or not a function result */
488
489 if ((sym->usage & uDEFINE) != 0)
490 {
491 /* function is defined, can now check the return value (but make an
492 * exception for directly recursive functions)
493 */
494 if (sym != curfunc && (sym->usage & uRETVALUE) == 0)
495 {
496 char symname[2 * sNAMEMAX + 16]; /* allow space for user defined operators */
497
498 funcdisplayname(symname, sym->name);
499 error(209, symname); /* function should return a value */
500 } /* if */
501 }
502 else
503 {
504 /* function not yet defined, set */
505 sym->usage |= uRETVALUE; /* make sure that a future implementation of
506 * the function uses "return <value>" */
507 } /* if */
508}
509
510/*
511 * Plunge to a lower level
512 */
513static int
514plnge(int *opstr, int opoff, int (*hier) (value * lval), value * lval,
515 char *forcetag, int chkbitwise)
516{
517 int lvalue, opidx;
518 int count;
519 value lval2 = { NULL, 0, 0, 0, 0, NULL };
520
521 lvalue = plnge1(hier, lval);
522 if (nextop(&opidx, opstr) == 0)
523 return lvalue; /* no operator in "opstr" found */
524 if (lvalue)
525 rvalue(lval);
526 count = 0;
527 do
528 {
529 if (chkbitwise && count++ > 0 && bitwise_opercount != 0)
530 error(212);
531 opidx += opoff; /* add offset to index returned by nextop() */
532 plnge2(op1[opidx], hier, lval, &lval2);
533 if (op1[opidx] == ob_and || op1[opidx] == ob_or)
534 bitwise_opercount++;
535 if (forcetag)
536 lval->tag = sc_addtag(forcetag);
537 }
538 while (nextop(&opidx, opstr)); /* do */
539 return FALSE; /* result of expression is not an lvalue */
540}
541
542/* plnge_rel
543 *
544 * Binary plunge to lower level; this is very simular to plnge, but
545 * it has special code generation sequences for chained operations.
546 */
547static int
548plnge_rel(int *opstr, int opoff, int (*hier) (value * lval), value * lval)
549{
550 int lvalue, opidx;
551 value lval2 = { NULL, 0, 0, 0, 0, NULL };
552 int count;
553
554 /* this function should only be called for relational operators */
555 assert(op1[opoff] == os_le);
556 lvalue = plnge1(hier, lval);
557 if (nextop(&opidx, opstr) == 0)
558 return lvalue; /* no operator in "opstr" found */
559 if (lvalue)
560 rvalue(lval);
561 count = 0;
562 lval->boolresult = TRUE;
563 do
564 {
565 /* same check as in plnge(), but "chkbitwise" is always TRUE */
566 if (count > 0 && bitwise_opercount != 0)
567 error(212);
568 if (count > 0)
569 {
570 relop_prefix();
571 *lval = lval2; /* copy right hand expression of the previous iteration */
572 } /* if */
573 opidx += opoff;
574 plnge2(op1[opidx], hier, lval, &lval2);
575 if (count++ > 0)
576 relop_suffix();
577 }
578 while (nextop(&opidx, opstr)); /* enddo */
579 lval->constval = lval->boolresult;
580 lval->tag = sc_addtag("bool"); /* force tag to be "bool" */
581 return FALSE; /* result of expression is not an lvalue */
582}
583
584/* plnge1
585 *
586 * Unary plunge to lower level
587 * Called by: skim(), plnge(), plnge2(), plnge_rel(), hier14() and hier13()
588 */
589static int
590plnge1(int (*hier) (value * lval), value * lval)
591{
592 int lvalue, index;
593 cell cidx;
594
595 stgget(&index, &cidx); /* mark position in code generator */
596 lvalue = (*hier) (lval);
597 if (lval->ident == iCONSTEXPR)
598 stgdel(index, cidx); /* load constant later */
599 return lvalue;
600}
601
602/* plnge2
603 *
604 * Binary plunge to lower level
605 * Called by: plnge(), plnge_rel(), hier14() and hier1()
606 */
607static void
608plnge2(void (*oper) (void),
609 int (*hier) (value * lval), value * lval1, value * lval2)
610{
611 int index;
612 cell cidx;
613
614 stgget(&index, &cidx); /* mark position in code generator */
615 if (lval1->ident == iCONSTEXPR)
616 { /* constant on left side; it is not yet loaded */
617 if (plnge1(hier, lval2))
618 rvalue(lval2); /* load lvalue now */
619 else if (lval2->ident == iCONSTEXPR)
620 const1(lval2->constval << dbltest(oper, lval2, lval1));
621 const2(lval1->constval << dbltest(oper, lval2, lval1));
622 /* ^ doubling of constants operating on integer addresses */
623 /* is restricted to "add" and "subtract" operators */
624 }
625 else
626 { /* non-constant on left side */
627 push1();
628 if (plnge1(hier, lval2))
629 rvalue(lval2);
630 if (lval2->ident == iCONSTEXPR)
631 { /* constant on right side */
632 if (commutative(oper))
633 { /* test for commutative operators */
634 value lvaltmp = { NULL, 0, 0, 0, 0, NULL };
635 stgdel(index, cidx); /* scratch push1() and constant fetch (then
636 * fetch the constant again */
637 const2(lval2->constval << dbltest(oper, lval1, lval2));
638 /* now, the primary register has the left operand and the secondary
639 * register the right operand; swap the "lval" variables so that lval1
640 * is associated with the secondary register and lval2 with the
641 * primary register, as is the "normal" case.
642 */
643 lvaltmp = *lval1;
644 *lval1 = *lval2;
645 *lval2 = lvaltmp;
646 }
647 else
648 {
649 const1(lval2->constval << dbltest(oper, lval1, lval2));
650 pop2(); /* pop result of left operand into secondary register */
651 } /* if */
652 }
653 else
654 { /* non-constants on both sides */
655 pop2();
656 if (dbltest(oper, lval1, lval2))
657 cell2addr(); /* double primary register */
658 if (dbltest(oper, lval2, lval1))
659 cell2addr_alt(); /* double secondary register */
660 } /* if */
661 } /* if */
662 if (oper)
663 {
664 /* If used in an expression, a function should return a value.
665 * If the function has been defined, we can check this. If the
666 * function was not defined, we can set this requirement (so that
667 * a future function definition can check this bit.
668 */
669 checkfunction(lval1);
670 checkfunction(lval2);
671 if (lval1->ident == iARRAY || lval1->ident == iREFARRAY)
672 {
673 char *ptr =
674 (lval1->sym) ? lval1->sym->name : "-unknown-";
675 error(33, ptr); /* array must be indexed */
676 }
677 else if (lval2->ident == iARRAY || lval2->ident == iREFARRAY)
678 {
679 char *ptr =
680 (lval2->sym) ? lval2->sym->name : "-unknown-";
681 error(33, ptr); /* array must be indexed */
682 } /* if */
683 /* ??? ^^^ should do same kind of error checking with functions */
684
685 /* check whether an "operator" function is defined for the tag names
686 * (a constant expression cannot be optimized in that case)
687 */
688 if (check_userop(oper, lval1->tag, lval2->tag, 2, NULL, &lval1->tag))
689 {
690 lval1->ident = iEXPRESSION;
691 lval1->constval = 0;
692 }
693 else if (lval1->ident == iCONSTEXPR && lval2->ident == iCONSTEXPR)
694 {
695 /* only constant expression if both constant */
696 stgdel(index, cidx); /* scratch generated code and calculate */
697 if (!matchtag(lval1->tag, lval2->tag, FALSE))
698 error(213); /* tagname mismatch */
699 lval1->constval =
700 calc(lval1->constval, oper, lval2->constval,
701 &lval1->boolresult);
702 }
703 else
704 {
705 if (!matchtag(lval1->tag, lval2->tag, FALSE))
706 error(213); /* tagname mismatch */
707 (*oper) (); /* do the (signed) operation */
708 lval1->ident = iEXPRESSION;
709 } /* if */
710 } /* if */
711}
712
713static cell
714truemodulus(cell a, cell b)
715{
716 return (a % b + b) % b;
717}
718
719static cell
720calc(cell left, void (*oper) (), cell right, char *boolresult)
721{
722 if (oper == ob_or)
723 return (left | right);
724 else if (oper == ob_xor)
725 return (left ^ right);
726 else if (oper == ob_and)
727 return (left & right);
728 else if (oper == ob_eq)
729 return (left == right);
730 else if (oper == ob_ne)
731 return (left != right);
732 else if (oper == os_le)
733 return *boolresult &= (char)(left <= right), right;
734 else if (oper == os_ge)
735 return *boolresult &= (char)(left >= right), right;
736 else if (oper == os_lt)
737 return *boolresult &= (char)(left < right), right;
738 else if (oper == os_gt)
739 return *boolresult &= (char)(left > right), right;
740 else if (oper == os_sar)
741 return (left >> (int)right);
742 else if (oper == ou_sar)
743 return ((ucell) left >> (ucell) right);
744 else if (oper == ob_sal)
745 return ((ucell) left << (int)right);
746 else if (oper == ob_add)
747 return (left + right);
748 else if (oper == ob_sub)
749 return (left - right);
750 else if (oper == os_mult)
751 return (left * right);
752 else if (oper == os_div)
753 return (left - truemodulus(left, right)) / right;
754 else if (oper == os_mod)
755 return truemodulus(left, right);
756 else
757 error(29); /* invalid expression, assumed 0 (this should never occur) */
758 return 0;
759}
760
761int
762expression(int *constant, cell * val, int *tag, int chkfuncresult)
763{
764 value lval = { NULL, 0, 0, 0, 0, NULL };
765
766 if (hier14(&lval))
767 rvalue(&lval);
768 if (lval.ident == iCONSTEXPR)
769 { /* constant expression */
770 *constant = TRUE;
771 *val = lval.constval;
772 }
773 else
774 {
775 *constant = FALSE;
776 *val = 0;
777 } /* if */
778 if (tag)
779 *tag = lval.tag;
780 if (chkfuncresult)
781 checkfunction(&lval);
782 return lval.ident;
783}
784
785static cell
786array_totalsize(symbol * sym)
787{
788 cell length;
789
790 assert(sym != NULL);
791 assert(sym->ident == iARRAY || sym->ident == iREFARRAY);
792 length = sym->dim.array.length;
793 if (sym->dim.array.level > 0)
794 {
795 cell sublength = array_totalsize(finddepend(sym));
796
797 if (sublength > 0)
798 length = length + length * sublength;
799 else
800 length = 0;
801 } /* if */
802 return length;
803}
804
805static cell
806array_levelsize(symbol * sym, int level)
807{
808 assert(sym != NULL);
809 assert(sym->ident == iARRAY || sym->ident == iREFARRAY);
810 assert(level <= sym->dim.array.level);
811 while (level-- > 0)
812 {
813 sym = finddepend(sym);
814 assert(sym != NULL);
815 } /* if */
816 return sym->dim.array.length;
817}
818
819/* hier14
820 *
821 * Lowest hierarchy level (except for the , operator).
822 *
823 * Global references: intest (referred to only)
824 */
825int
826hier14(value * lval1)
827{
828 int lvalue;
829 value lval2 = { NULL, 0, 0, 0, 0, NULL };
830 value lval3 = { NULL, 0, 0, 0, 0, NULL };
831 void (*oper) (void);
832 int tok, level, i;
833 cell val;
834 char *st;
835 int bwcount;
836 cell arrayidx1[sDIMEN_MAX], arrayidx2[sDIMEN_MAX]; /* last used array indices */
837 cell *org_arrayidx;
838
839 bwcount = bitwise_opercount;
840 bitwise_opercount = 0;
841 for (i = 0; i < sDIMEN_MAX; i++)
842 arrayidx1[i] = arrayidx2[i] = 0;
843 org_arrayidx = lval1->arrayidx; /* save current pointer, to reset later */
844 if (!lval1->arrayidx)
845 lval1->arrayidx = arrayidx1;
846 lvalue = plnge1(hier13, lval1);
847 if (lval1->ident != iARRAYCELL && lval1->ident != iARRAYCHAR)
848 lval1->arrayidx = NULL;
849 if (lval1->ident == iCONSTEXPR) /* load constant here */
850 const1(lval1->constval);
851 tok = lex(&val, &st);
852 switch (tok)
853 {
854 case taOR:
855 oper = ob_or;
856 break;
857 case taXOR:
858 oper = ob_xor;
859 break;
860 case taAND:
861 oper = ob_and;
862 break;
863 case taADD:
864 oper = ob_add;
865 break;
866 case taSUB:
867 oper = ob_sub;
868 break;
869 case taMULT:
870 oper = os_mult;
871 break;
872 case taDIV:
873 oper = os_div;
874 break;
875 case taMOD:
876 oper = os_mod;
877 break;
878 case taSHRU:
879 oper = ou_sar;
880 break;
881 case taSHR:
882 oper = os_sar;
883 break;
884 case taSHL:
885 oper = ob_sal;
886 break;
887 case '=': /* simple assignment */
888 oper = NULL;
889 if (intest)
890 error(211); /* possibly unintended assignment */
891 break;
892 default:
893 lexpush();
894 bitwise_opercount = bwcount;
895 lval1->arrayidx = org_arrayidx; /* restore array index pointer */
896 return lvalue;
897 } /* switch */
898
899 /* if we get here, it was an assignment; first check a few special cases
900 * and then the general */
901 if (lval1->ident == iARRAYCHAR)
902 {
903 /* special case, assignment to packed character in a cell is permitted */
904 lvalue = TRUE;
905 }
906 else if (lval1->ident == iARRAY || lval1->ident == iREFARRAY)
907 {
908 /* array assignment is permitted too (with restrictions) */
909 if (oper)
910 return error(23); /* array assignment must be simple assigment */
911 assert(lval1->sym != NULL);
912 if (array_totalsize(lval1->sym) == 0)
913 return error(46, lval1->sym->name); /* unknown array size */
914 lvalue = TRUE;
915 } /* if */
916
917 /* operand on left side of assignment must be lvalue */
918 if (!lvalue)
919 return error(22); /* must be lvalue */
920 /* may not change "constant" parameters */
921 assert(lval1->sym != NULL);
922 if ((lval1->sym->usage & uCONST) != 0)
923 return error(22); /* assignment to const argument */
924 lval3 = *lval1; /* save symbol to enable storage of expresion result */
925 lval1->arrayidx = org_arrayidx; /* restore array index pointer */
926 if (lval1->ident == iARRAYCELL || lval1->ident == iARRAYCHAR
927 || lval1->ident == iARRAY || lval1->ident == iREFARRAY)
928 {
929 /* if indirect fetch: save PRI (cell address) */
930 if (oper)
931 {
932 push1();
933 rvalue(lval1);
934 } /* if */
935 lval2.arrayidx = arrayidx2;
936 plnge2(oper, hier14, lval1, &lval2);
937 if (lval2.ident != iARRAYCELL && lval2.ident != iARRAYCHAR)
938 lval2.arrayidx = NULL;
939 if (oper)
940 pop2();
941 if (!oper && lval3.arrayidx && lval2.arrayidx
942 && lval3.ident == lval2.ident && lval3.sym == lval2.sym)
943 {
944 int same = TRUE;
945
946 assert(lval3.arrayidx == arrayidx1);
947 assert(lval2.arrayidx == arrayidx2);
948 for (i = 0; i < sDIMEN_MAX; i++)
949 same = same && (lval3.arrayidx[i] == lval2.arrayidx[i]);
950 if (same)
951 error(226, lval3.sym->name); /* self-assignment */
952 } /* if */
953 }
954 else
955 {
956 if (oper)
957 {
958 rvalue(lval1);
959 plnge2(oper, hier14, lval1, &lval2);
960 }
961 else
962 {
963 /* if direct fetch and simple assignment: no "push"
964 * and "pop" needed -> call hier14() directly, */
965 if (hier14(&lval2))
966 rvalue(&lval2); /* instead of plnge2(). */
967 checkfunction(&lval2);
968 /* check whether lval2 and lval3 (old lval1) refer to the same variable */
969 if (lval2.ident == iVARIABLE && lval3.ident == lval2.ident
970 && lval3.sym == lval2.sym)
971 {
972 assert(lval3.sym != NULL);
973 error(226, lval3.sym->name); /* self-assignment */
974 } /* if */
975 } /* if */
976 } /* if */
977 if (lval3.ident == iARRAY || lval3.ident == iREFARRAY)
978 {
979 /* left operand is an array, right operand should be an array variable
980 * of the same size and the same dimension, an array literal (of the
981 * same size) or a literal string.
982 */
983 int exactmatch = TRUE;
984
985 if (lval2.ident != iARRAY && lval2.ident != iREFARRAY)
986 error(33, lval3.sym->name); /* array must be indexed */
987 if (lval2.sym)
988 {
989 val = lval2.sym->dim.array.length; /* array variable */
990 level = lval2.sym->dim.array.level;
991 }
992 else
993 {
994 val = lval2.constval; /* literal array */
995 level = 0;
996 /* If val is negative, it means that lval2 is a
997 * literal string. The string array size may be
998 * smaller than the destination array.
999 */
1000 if (val < 0)
1001 {
1002 val = -val;
1003 exactmatch = FALSE;
1004 } /* if */
1005 } /* if */
1006 if (lval3.sym->dim.array.level != level)
1007 return error(48); /* array dimensions must match */
1008 else if (lval3.sym->dim.array.length < val
1009 || (exactmatch && lval3.sym->dim.array.length > val))
1010 return error(47); /* array sizes must match */
1011 if (level > 0)
1012 {
1013 /* check the sizes of all sublevels too */
1014 symbol *sym1 = lval3.sym;
1015 symbol *sym2 = lval2.sym;
1016 int i;
1017
1018 assert(sym1 != NULL && sym2 != NULL);
1019 /* ^^^ sym2 must be valid, because only variables can be
1020 * multi-dimensional (there are no multi-dimensional arrays),
1021 * sym1 must be valid because it must be an lvalue
1022 */
1023 assert(exactmatch);
1024 for (i = 0; i < level; i++)
1025 {
1026 sym1 = finddepend(sym1);
1027 sym2 = finddepend(sym2);
1028 assert(sym1 != NULL && sym2 != NULL);
1029 /* ^^^ both arrays have the same dimensions (this was checked
1030 * earlier) so the dependend should always be found
1031 */
1032 if (sym1->dim.array.length != sym2->dim.array.length)
1033 error(47); /* array sizes must match */
1034 } /* for */
1035 /* get the total size in cells of the multi-dimensional array */
1036 val = array_totalsize(lval3.sym);
1037 assert(val > 0); /* already checked */
1038 } /* if */
1039 }
1040 else
1041 {
1042 /* left operand is not an array, right operand should then not be either */
1043 if (lval2.ident == iARRAY || lval2.ident == iREFARRAY)
1044 error(6); /* must be assigned to an array */
1045 } /* if */
1046 if (lval3.ident == iARRAY || lval3.ident == iREFARRAY)
1047 {
1048 memcopy(val * sizeof(cell));
1049 }
1050 else
1051 {
1052 check_userop(NULL, lval2.tag, lval3.tag, 2, &lval3, &lval2.tag);
1053 store(&lval3); /* now, store the expression result */
1054 } /* if */
1055 if (!oper && !matchtag(lval3.tag, lval2.tag, TRUE))
1056 error(213); /* tagname mismatch (if "oper", warning already given in plunge2()) */
1057 if (lval3.sym)
1058 markusage(lval3.sym, uWRITTEN);
1059 sideeffect = TRUE;
1060 bitwise_opercount = bwcount;
1061 return FALSE; /* expression result is never an lvalue */
1062}
1063
1064static int
1065hier13(value * lval)
1066{
1067 int lvalue, flab1, flab2;
1068 value lval2 = { NULL, 0, 0, 0, 0, NULL };
1069 int array1, array2;
1070
1071 lvalue = plnge1(hier12, lval);
1072 if (matchtoken('?'))
1073 {
1074 flab1 = getlabel();
1075 flab2 = getlabel();
1076 if (lvalue)
1077 {
1078 rvalue(lval);
1079 }
1080 else if (lval->ident == iCONSTEXPR)
1081 {
1082 const1(lval->constval);
1083 error(lval->constval ? 206 : 205); /* redundant test */
1084 } /* if */
1085 jmp_eq0(flab1); /* go to second expression if primary register==0 */
1086 if (hier14(lval))
1087 rvalue(lval);
1088 jumplabel(flab2);
1089 setlabel(flab1);
1090 needtoken(':');
1091 if (hier14(&lval2))
1092 rvalue(&lval2);
1093 array1 = (lval->ident == iARRAY || lval->ident == iREFARRAY);
1094 array2 = (lval2.ident == iARRAY || lval2.ident == iREFARRAY);
1095 if (array1 && !array2)
1096 {
1097 char *ptr =
1098 (lval->sym->name) ? lval->sym->name : "-unknown-";
1099 error(33, ptr); /* array must be indexed */
1100 }
1101 else if (!array1 && array2)
1102 {
1103 char *ptr =
1104 (lval2.sym->name) ? lval2.sym->name : "-unknown-";
1105 error(33, ptr); /* array must be indexed */
1106 } /* if */
1107 /* ??? if both are arrays, should check dimensions */
1108 if (!matchtag(lval->tag, lval2.tag, FALSE))
1109 error(213); /* tagname mismatch ('true' and 'false' expressions) */
1110 setlabel(flab2);
1111 if (lval->ident == iARRAY)
1112 lval->ident = iREFARRAY; /* iARRAY becomes iREFARRAY */
1113 else if (lval->ident != iREFARRAY)
1114 lval->ident = iEXPRESSION; /* iREFARRAY stays iREFARRAY, rest becomes iEXPRESSION */
1115 return FALSE; /* conditional expression is no lvalue */
1116 }
1117 else
1118 {
1119 return lvalue;
1120 } /* endif */
1121}
1122
1123/* the order of the operators in these lists is important and must cohere */
1124/* with the order of the operators in the array "op1" */
1125static int list3[] = { '*', '/', '%', 0 };
1126static int list4[] = { '+', '-', 0 };
1127static int list5[] = { tSHL, tSHR, tSHRU, 0 };
1128static int list6[] = { '&', 0 };
1129static int list7[] = { '^', 0 };
1130static int list8[] = { '|', 0 };
1131static int list9[] = { tlLE, tlGE, '<', '>', 0 };
1132static int list10[] = { tlEQ, tlNE, 0 };
1133static int list11[] = { tlAND, 0 };
1134static int list12[] = { tlOR, 0 };
1135
1136static int
1137hier12(value * lval)
1138{
1139 return skim(list12, jmp_ne0, 1, 0, hier11, lval);
1140}
1141
1142static int
1143hier11(value * lval)
1144{
1145 return skim(list11, jmp_eq0, 0, 1, hier10, lval);
1146}
1147
1148static int
1149hier10(value * lval)
1150{ /* ==, != */
1151 return plnge(list10, 15, hier9, lval, "bool", TRUE);
1152} /* ^ this variable is the starting index in the op1[]
1153 * array of the operators of this hierarchy level */
1154
1155static int
1156hier9(value * lval)
1157{ /* <=, >=, <, > */
1158 return plnge_rel(list9, 11, hier8, lval);
1159}
1160
1161static int
1162hier8(value * lval)
1163{ /* | */
1164 return plnge(list8, 10, hier7, lval, NULL, FALSE);
1165}
1166
1167static int
1168hier7(value * lval)
1169{ /* ^ */
1170 return plnge(list7, 9, hier6, lval, NULL, FALSE);
1171}
1172
1173static int
1174hier6(value * lval)
1175{ /* & */
1176 return plnge(list6, 8, hier5, lval, NULL, FALSE);
1177}
1178
1179static int
1180hier5(value * lval)
1181{ /* <<, >>, >>> */
1182 return plnge(list5, 5, hier4, lval, NULL, FALSE);
1183}
1184
1185static int
1186hier4(value * lval)
1187{ /* +, - */
1188 return plnge(list4, 3, hier3, lval, NULL, FALSE);
1189}
1190
1191static int
1192hier3(value * lval)
1193{ /* *, /, % */
1194 return plnge(list3, 0, hier2, lval, NULL, FALSE);
1195}
1196
1197static int
1198hier2(value * lval)
1199{
1200 int lvalue, tok;
1201 int tag, paranthese;
1202 cell val;
1203 char *st;
1204 symbol *sym;
1205 int saveresult;
1206
1207 tok = lex(&val, &st);
1208 switch (tok)
1209 {
1210 case tINC: /* ++lval */
1211 if (!hier2(lval))
1212 return error(22); /* must be lvalue */
1213 assert(lval->sym != NULL);
1214 if ((lval->sym->usage & uCONST) != 0)
1215 return error(22); /* assignment to const argument */
1216 if (!check_userop(user_inc, lval->tag, 0, 1, lval, &lval->tag))
1217 inc(lval); /* increase variable first */
1218 rvalue(lval); /* and read the result into PRI */
1219 sideeffect = TRUE;
1220 return FALSE; /* result is no longer lvalue */
1221 case tDEC: /* --lval */
1222 if (!hier2(lval))
1223 return error(22); /* must be lvalue */
1224 assert(lval->sym != NULL);
1225 if ((lval->sym->usage & uCONST) != 0)
1226 return error(22); /* assignment to const argument */
1227 if (!check_userop(user_dec, lval->tag, 0, 1, lval, &lval->tag))
1228 dec(lval); /* decrease variable first */
1229 rvalue(lval); /* and read the result into PRI */
1230 sideeffect = TRUE;
1231 return FALSE; /* result is no longer lvalue */
1232 case '~': /* ~ (one's complement) */
1233 if (hier2(lval))
1234 rvalue(lval);
1235 invert(); /* bitwise NOT */
1236 lval->constval = ~lval->constval;
1237 return FALSE;
1238 case '!': /* ! (logical negate) */
1239 if (hier2(lval))
1240 rvalue(lval);
1241 if (check_userop(lneg, lval->tag, 0, 1, NULL, &lval->tag))
1242 {
1243 lval->ident = iEXPRESSION;
1244 lval->constval = 0;
1245 }
1246 else
1247 {
1248 lneg(); /* 0 -> 1, !0 -> 0 */
1249 lval->constval = !lval->constval;
1250 lval->tag = sc_addtag("bool");
1251 } /* if */
1252 return FALSE;
1253 case '-': /* unary - (two's complement) */
1254 if (hier2(lval))
1255 rvalue(lval);
1256 /* make a special check for a constant expression with the tag of a
1257 * rational number, so that we can simple swap the sign of that constant.
1258 */
1259 if (lval->ident == iCONSTEXPR && lval->tag == sc_rationaltag
1260 && sc_rationaltag != 0)
1261 {
1262 if (rational_digits == 0)
1263 {
1264 float *f = (float *)&lval->constval;
1265
1266 *f = -*f; /* this modifies lval->constval */
1267 }
1268 else
1269 {
1270 /* the negation of a fixed point number is just an integer negation */
1271 lval->constval = -lval->constval;
1272 } /* if */
1273 }
1274 else if (check_userop(neg, lval->tag, 0, 1, NULL, &lval->tag))
1275 {
1276 lval->ident = iEXPRESSION;
1277 lval->constval = 0;
1278 }
1279 else
1280 {
1281 neg(); /* arithmic negation */
1282 lval->constval = -lval->constval;
1283 } /* if */
1284 return FALSE;
1285 case tLABEL: /* tagname override */
1286 tag = sc_addtag(st);
1287 lvalue = hier2(lval);
1288 lval->tag = tag;
1289 return lvalue;
1290 case tDEFINED:
1291 paranthese = 0;
1292 while (matchtoken('('))
1293 paranthese++;
1294 tok = lex(&val, &st);
1295 if (tok != tSYMBOL)
1296 return error(20, st); /* illegal symbol name */
1297 sym = findloc(st);
1298 if (!sym)
1299 sym = findglb(st);
1300 if (sym && sym->ident != iFUNCTN && sym->ident != iREFFUNC
1301 && (sym->usage & uDEFINE) == 0)
1302 sym = NULL; /* symbol is not a function, it is in the table, but not "defined" */
1303 val = !!sym;
1304 if (!val && find_subst(st, strlen(st)))
1305 val = 1;
1306 clear_value(lval);
1307 lval->ident = iCONSTEXPR;
1308 lval->constval = val;
1309 const1(lval->constval);
1310 while (paranthese--)
1311 needtoken(')');
1312 return FALSE;
1313 case tSIZEOF:
1314 paranthese = 0;
1315 while (matchtoken('('))
1316 paranthese++;
1317 tok = lex(&val, &st);
1318 if (tok != tSYMBOL)
1319 return error(20, st); /* illegal symbol name */
1320 sym = findloc(st);
1321 if (!sym)
1322 sym = findglb(st);
1323 if (!sym)
1324 return error(17, st); /* undefined symbol */
1325 if (sym->ident == iCONSTEXPR)
1326 error(39); /* constant symbol has no size */
1327 else if (sym->ident == iFUNCTN || sym->ident == iREFFUNC)
1328 error(72); /* "function" symbol has no size */
1329 else if ((sym->usage & uDEFINE) == 0)
1330 return error(17, st); /* undefined symbol (symbol is in the table, but it is "used" only) */
1331 clear_value(lval);
1332 lval->ident = iCONSTEXPR;
1333 lval->constval = 1; /* preset */
1334 if (sym->ident == iARRAY || sym->ident == iREFARRAY)
1335 {
1336 int level;
1337
1338 for (level = 0; matchtoken('['); level++)
1339 needtoken(']');
1340 if (level > sym->dim.array.level)
1341 error(28); /* invalid subscript */
1342 else
1343 lval->constval = array_levelsize(sym, level);
1344 if (lval->constval == 0 && !strchr(lptr, PREPROC_TERM))
1345 error(224, st); /* indeterminate array size in "sizeof" expression */
1346 } /* if */
1347 const1(lval->constval);
1348 while (paranthese--)
1349 needtoken(')');
1350 return FALSE;
1351 case tTAGOF:
1352 paranthese = 0;
1353 while (matchtoken('('))
1354 paranthese++;
1355 tok = lex(&val, &st);
1356 if (tok != tSYMBOL && tok != tLABEL)
1357 return error(20, st); /* illegal symbol name */
1358 if (tok == tLABEL)
1359 {
1360 tag = sc_addtag(st);
1361 }
1362 else
1363 {
1364 sym = findloc(st);
1365 if (!sym)
1366 sym = findglb(st);
1367 if (!sym)
1368 return error(17, st); /* undefined symbol */
1369 if ((sym->usage & uDEFINE) == 0)
1370 return error(17, st); /* undefined symbol (symbol is in the table, but it is "used" only) */
1371 tag = sym->tag;
1372 } /* if */
1373 exporttag(tag);
1374 clear_value(lval);
1375 lval->ident = iCONSTEXPR;
1376 lval->constval = tag;
1377 const1(lval->constval);
1378 while (paranthese--)
1379 needtoken(')');
1380 return FALSE;
1381 default:
1382 lexpush();
1383 lvalue = hier1(lval);
1384 /* check for postfix operators */
1385 if (matchtoken(';'))
1386 {
1387 /* Found a ';', do not look further for postfix operators */
1388 lexpush(); /* push ';' back after successful match */
1389 return lvalue;
1390 }
1391 else if (matchtoken(tTERM))
1392 {
1393 /* Found a newline that ends a statement (this is the case when
1394 * semicolons are optional). Note that an explicit semicolon was
1395 * handled above. This case is similar, except that the token must
1396 * not be pushed back.
1397 */
1398 return lvalue;
1399 }
1400 else
1401 {
1402 tok = lex(&val, &st);
1403 switch (tok)
1404 {
1405 case tINC: /* lval++ */
1406 if (!lvalue)
1407 return error(22); /* must be lvalue */
1408 assert(lval->sym != NULL);
1409 if ((lval->sym->usage & uCONST) != 0)
1410 return error(22); /* assignment to const argument */
1411 /* on incrementing array cells, the address in PRI must be saved for
1412 * incremening the value, whereas the current value must be in PRI
1413 * on exit.
1414 */
1415 saveresult = (lval->ident == iARRAYCELL
1416 || lval->ident == iARRAYCHAR);
1417 if (saveresult)
1418 push1(); /* save address in PRI */
1419 rvalue(lval); /* read current value into PRI */
1420 if (saveresult)
1421 swap1(); /* save PRI on the stack, restore address in PRI */
1422 if (!check_userop
1423 (user_inc, lval->tag, 0, 1, lval, &lval->tag))
1424 inc(lval); /* increase variable afterwards */
1425 if (saveresult)
1426 pop1(); /* restore PRI (result of rvalue()) */
1427 sideeffect = TRUE;
1428 return FALSE; /* result is no longer lvalue */
1429 case tDEC: /* lval-- */
1430 if (!lvalue)
1431 return error(22); /* must be lvalue */
1432 assert(lval->sym != NULL);
1433 if ((lval->sym->usage & uCONST) != 0)
1434 return error(22); /* assignment to const argument */
1435 saveresult = (lval->ident == iARRAYCELL
1436 || lval->ident == iARRAYCHAR);
1437 if (saveresult)
1438 push1(); /* save address in PRI */
1439 rvalue(lval); /* read current value into PRI */
1440 if (saveresult)
1441 swap1(); /* save PRI on the stack, restore address in PRI */
1442 if (!check_userop
1443 (user_dec, lval->tag, 0, 1, lval, &lval->tag))
1444 dec(lval); /* decrease variable afterwards */
1445 if (saveresult)
1446 pop1(); /* restore PRI (result of rvalue()) */
1447 sideeffect = TRUE;
1448 return FALSE;
1449 case tCHAR: /* char (compute required # of cells */
1450 if (lval->ident == iCONSTEXPR)
1451 {
1452 lval->constval *= charbits / 8; /* from char to bytes */
1453 lval->constval =
1454 (lval->constval + sizeof(cell) - 1) / sizeof(cell);
1455 }
1456 else
1457 {
1458 if (lvalue)
1459 rvalue(lval); /* fetch value if not already in PRI */
1460 char2addr(); /* from characters to bytes */
1461 addconst(sizeof(cell) - 1); /* make sure the value is rounded up */
1462 addr2cell(); /* truncate to number of cells */
1463 } /* if */
1464 return FALSE;
1465 default:
1466 lexpush();
1467 return lvalue;
1468 } /* switch */
1469 } /* if */
1470 } /* switch */
1471}
1472
1473/* hier1
1474 *
1475 * The highest hierarchy level: it looks for pointer and array indices
1476 * and function calls.
1477 * Generates code to fetch a pointer value if it is indexed and code to
1478 * add to the pointer value or the array address (the address is already
1479 * read at primary()). It also generates code to fetch a function address
1480 * if that hasn't already been done at primary() (check lval[4]) and calls
1481 * callfunction() to call the function.
1482 */
1483static int
1484hier1(value * lval1)
1485{
1486 int lvalue, index, tok, symtok;
1487 cell val, cidx;
1488 value lval2 = { NULL, 0, 0, 0, 0, NULL };
1489 char *st;
1490 char close;
1491 symbol *sym;
1492
1493 lvalue = primary(lval1);
1494 symtok = tokeninfo(&val, &st); /* get token read by primary() */
1495 restart:
1496 sym = lval1->sym;
1497 if (matchtoken('[') || matchtoken('{') || matchtoken('('))
1498 {
1499 tok = tokeninfo(&val, &st); /* get token read by matchtoken() */
1500 if (!sym && symtok != tSYMBOL)
1501 {
1502 /* we do not have a valid symbol and we appear not to have read a valid
1503 * symbol name (so it is unlikely that we would have read a name of an
1504 * undefined symbol) */
1505 error(29); /* expression error, assumed 0 */
1506 lexpush(); /* analyse '(', '{' or '[' again later */
1507 return FALSE;
1508 } /* if */
1509 if (tok == '[' || tok == '{')
1510 { /* subscript */
1511 close = (char)((tok == '[') ? ']' : '}');
1512 if (!sym)
1513 { /* sym==NULL if lval is a constant or a literal */
1514 error(28); /* cannot subscript */
1515 needtoken(close);
1516 return FALSE;
1517 }
1518 else if (sym->ident != iARRAY && sym->ident != iREFARRAY)
1519 {
1520 error(28); /* cannot subscript, variable is not an array */
1521 needtoken(close);
1522 return FALSE;
1523 }
1524 else if (sym->dim.array.level > 0 && close != ']')
1525 {
1526 error(51); /* invalid subscript, must use [ ] */
1527 needtoken(close);
1528 return FALSE;
1529 } /* if */
1530 stgget(&index, &cidx); /* mark position in code generator */
1531 push1(); /* save base address of the array */
1532 if (hier14(&lval2)) /* create expression for the array index */
1533 rvalue(&lval2);
1534 if (lval2.ident == iARRAY || lval2.ident == iREFARRAY)
1535 error(33, lval2.sym->name); /* array must be indexed */
1536 needtoken(close);
1537 if (!matchtag(sym->x.idxtag, lval2.tag, TRUE))
1538 error(213);
1539 if (lval2.ident == iCONSTEXPR)
1540 { /* constant expression */
1541 stgdel(index, cidx); /* scratch generated code */
1542 if (lval1->arrayidx)
1543 { /* keep constant index, for checking */
1544 assert(sym->dim.array.level >= 0
1545 && sym->dim.array.level < sDIMEN_MAX);
1546 lval1->arrayidx[sym->dim.array.level] = lval2.constval;
1547 } /* if */
1548 if (close == ']')
1549 {
1550 /* normal array index */
1551 if (lval2.constval < 0 || (sym->dim.array.length != 0
1552 && sym->dim.array.length <= lval2.constval))
1553 error(32, sym->name); /* array index out of bounds */
1554 if (lval2.constval != 0)
1555 {
1556 /* don't add offsets for zero subscripts */
1557#if defined(BIT16)
1558 const2(lval2.constval << 1);
1559#else
1560 const2(lval2.constval << 2);
1561#endif
1562 ob_add();
1563 } /* if */
1564 }
1565 else
1566 {
1567 /* character index */
1568 if (lval2.constval < 0 || (sym->dim.array.length != 0
1569 && sym->dim.array.length * ((8 * sizeof(cell)) /
1570 charbits) <=
1571 (ucell) lval2.constval))
1572 error(32, sym->name); /* array index out of bounds */
1573 if (lval2.constval != 0)
1574 {
1575 /* don't add offsets for zero subscripts */
1576 if (charbits == 16)
1577 const2(lval2.constval << 1); /* 16-bit character */
1578 else
1579 const2(lval2.constval); /* 8-bit character */
1580 ob_add();
1581 } /* if */
1582 charalign(); /* align character index into array */
1583 } /* if */
1584 }
1585 else
1586 {
1587 /* array index is not constant */
1588 lval1->arrayidx = NULL; /* reset, so won't be checked */
1589 if (close == ']')
1590 {
1591 if (sym->dim.array.length != 0)
1592 ffbounds(sym->dim.array.length - 1); /* run time check for array bounds */
1593 cell2addr(); /* normal array index */
1594 }
1595 else
1596 {
1597 if (sym->dim.array.length != 0)
1598 ffbounds(sym->dim.array.length * (32 / charbits) - 1);
1599 char2addr(); /* character array index */
1600 } /* if */
1601 pop2();
1602 ob_add(); /* base address was popped into secondary register */
1603 if (close != ']')
1604 charalign(); /* align character index into array */
1605 } /* if */
1606 /* the indexed item may be another array (multi-dimensional arrays) */
1607 assert(lval1->sym == sym && sym != NULL); /* should still be set */
1608 if (sym->dim.array.level > 0)
1609 {
1610 assert(close == ']'); /* checked earlier */
1611 /* read the offset to the subarray and add it to the current address */
1612 lval1->ident = iARRAYCELL;
1613 push1(); /* the optimizer makes this to a MOVE.alt */
1614 rvalue(lval1);
1615 pop2();
1616 ob_add();
1617 /* adjust the "value" structure and find the referenced array */
1618 lval1->ident = iREFARRAY;
1619 lval1->sym = finddepend(sym);
1620 assert(lval1->sym != NULL);
1621 assert(lval1->sym->dim.array.level ==
1622 sym->dim.array.level - 1);
1623 /* try to parse subsequent array indices */
1624 lvalue = FALSE; /* for now, a iREFARRAY is no lvalue */
1625 goto restart;
1626 } /* if */
1627 assert(sym->dim.array.level == 0);
1628 /* set type to fetch... INDIRECTLY */
1629 lval1->ident = (char)((close == ']') ? iARRAYCELL : iARRAYCHAR);
1630 lval1->tag = sym->tag;
1631 /* a cell in an array is an lvalue, a character in an array is not
1632 * always a *valid* lvalue */
1633 return TRUE;
1634 }
1635 else
1636 { /* tok=='(' -> function(...) */
1637 if (!sym
1638 || (sym->ident != iFUNCTN && sym->ident != iREFFUNC))
1639 {
1640 if (!sym && sc_status == statFIRST)
1641 {
1642 /* could be a "use before declaration"; in that case, create a stub
1643 * function so that the usage can be marked.
1644 */
1645 sym = fetchfunc(lastsymbol, 0);
1646 if (sym)
1647 markusage(sym, uREAD);
1648 } /* if */
1649 return error(12); /* invalid function call */
1650 }
1651 else if ((sym->usage & uMISSING) != 0)
1652 {
1653 char symname[2 * sNAMEMAX + 16]; /* allow space for user defined operators */
1654
1655 funcdisplayname(symname, sym->name);
1656 error(4, symname); /* function not defined */
1657 } /* if */
1658 callfunction(sym);
1659 lval1->ident = iEXPRESSION;
1660 lval1->constval = 0;
1661 lval1->tag = sym->tag;
1662 return FALSE; /* result of function call is no lvalue */
1663 } /* if */
1664 } /* if */
1665 if (sym && lval1->ident == iFUNCTN)
1666 {
1667 assert(sym->ident == iFUNCTN);
1668 address(sym);
1669 lval1->sym = NULL;
1670 lval1->ident = iREFFUNC;
1671 /* ??? however... function pointers (or function references are not (yet) allowed */
1672 error(29); /* expression error, assumed 0 */
1673 return FALSE;
1674 } /* if */
1675 return lvalue;
1676}
1677
1678/* primary
1679 *
1680 * Returns 1 if the operand is an lvalue (everything except arrays, functions
1681 * constants and -of course- errors).
1682 * Generates code to fetch the address of arrays. Code for constants is
1683 * already generated by constant().
1684 * This routine first clears the entire lval array (all fields are set to 0).
1685 *
1686 * Global references: intest (may be altered, but restored upon termination)
1687 */
1688static int
1689primary(value * lval)
1690{
1691 char *st;
1692 int lvalue, tok;
1693 cell val;
1694 symbol *sym;
1695
1696 if (matchtoken('('))
1697 { /* sub-expression - (expression,...) */
1698 pushstk((stkitem) intest);
1699 pushstk((stkitem) sc_allowtags);
1700
1701 intest = 0; /* no longer in "test" expression */
1702 sc_allowtags = TRUE; /* allow tagnames to be used in parenthised expressions */
1703 do
1704 lvalue = hier14(lval);
1705 while (matchtoken(','));
1706 needtoken(')');
1707 lexclr(FALSE); /* clear lex() push-back, it should have been
1708 * cleared already by needtoken() */
1709 sc_allowtags = (int)(long)popstk();
1710 intest = (int)(long)popstk();
1711 return lvalue;
1712 } /* if */
1713
1714 clear_value(lval); /* clear lval */
1715 tok = lex(&val, &st);
1716 if (tok == tSYMBOL)
1717 {
1718 /* lastsymbol is char[sNAMEMAX+1], lex() should have truncated any symbol
1719 * to sNAMEMAX significant characters */
1720 assert(strlen(st) < sizeof lastsymbol);
1721 strcpy(lastsymbol, st);
1722 } /* if */
1723 if (tok == tSYMBOL && !findconst(st))
1724 {
1725 /* first look for a local variable */
1726 if ((sym = findloc(st)))
1727 {
1728 if (sym->ident == iLABEL)
1729 {
1730 error(29); /* expression error, assumed 0 */
1731 const1(0); /* load 0 */
1732 return FALSE; /* return 0 for labels (expression error) */
1733 } /* if */
1734 lval->sym = sym;
1735 lval->ident = sym->ident;
1736 lval->tag = sym->tag;
1737 if (sym->ident == iARRAY || sym->ident == iREFARRAY)
1738 {
1739 address(sym); /* get starting address in primary register */
1740 return FALSE; /* return 0 for array (not lvalue) */
1741 }
1742 else
1743 {
1744 return TRUE; /* return 1 if lvalue (not label or array) */
1745 } /* if */
1746 } /* if */
1747 /* now try a global variable */
1748 if ((sym = findglb(st)))
1749 {
1750 if (sym->ident == iFUNCTN || sym->ident == iREFFUNC)
1751 {
1752 /* if the function is only in the table because it was inserted as a
1753 * stub in the first pass (i.e. it was "used" but never declared or
1754 * implemented, issue an error
1755 */
1756 if ((sym->usage & uPROTOTYPED) == 0)
1757 error(17, st);
1758 }
1759 else
1760 {
1761 if ((sym->usage & uDEFINE) == 0)
1762 error(17, st);
1763 lval->sym = sym;
1764 lval->ident = sym->ident;
1765 lval->tag = sym->tag;
1766 if (sym->ident == iARRAY || sym->ident == iREFARRAY)
1767 {
1768 address(sym); /* get starting address in primary register */
1769 return FALSE; /* return 0 for array (not lvalue) */
1770 }
1771 else
1772 {
1773 return TRUE; /* return 1 if lvalue (not function or array) */
1774 } /* if */
1775 } /* if */
1776 }
1777 else
1778 {
1779 return error(17, st); /* undefined symbol */
1780 } /* endif */
1781 assert(sym != NULL);
1782 assert(sym->ident == iFUNCTN || sym->ident != iREFFUNC);
1783 lval->sym = sym;
1784 lval->ident = sym->ident;
1785 lval->tag = sym->tag;
1786 return FALSE; /* return 0 for function (not an lvalue) */
1787 } /* if */
1788 lexpush(); /* push the token, it is analyzed by constant() */
1789 if (constant(lval) == 0)
1790 {
1791 error(29); /* expression error, assumed 0 */
1792 const1(0); /* load 0 */
1793 } /* if */
1794 return FALSE; /* return 0 for constants (or errors) */
1795}
1796
1797static void
1798clear_value(value * lval)
1799{
1800 lval->sym = NULL;
1801 lval->constval = 0L;
1802 lval->tag = 0;
1803 lval->ident = 0;
1804 lval->boolresult = FALSE;
1805 /* do not clear lval->arrayidx, it is preset in hier14() */
1806}
1807
1808static void
1809setdefarray(cell * string, cell size, cell array_sz, cell * dataaddr,
1810 int fconst)
1811{
1812 /* The routine must copy the default array data onto the heap, as to avoid
1813 * that a function can change the default value. An optimization is that
1814 * the default array data is "dumped" into the data segment only once (on the
1815 * first use).
1816 */
1817 assert(string != NULL);
1818 assert(size > 0);
1819 /* check whether to dump the default array */
1820 assert(dataaddr != NULL);
1821 if (sc_status == statWRITE && *dataaddr < 0)
1822 {
1823 int i;
1824
1825 *dataaddr = (litidx + glb_declared) * sizeof(cell);
1826 for (i = 0; i < size; i++)
1827 stowlit(*string++);
1828 } /* if */
1829
1830 /* if the function is known not to modify the array (meaning that it also
1831 * does not modify the default value), directly pass the address of the
1832 * array in the data segment.
1833 */
1834 if (fconst)
1835 {
1836 const1(*dataaddr);
1837 }
1838 else
1839 {
1840 /* Generate the code:
1841 * CONST.pri dataaddr ;address of the default array data
1842 * HEAP array_sz*sizeof(cell) ;heap address in ALT
1843 * MOVS size*sizeof(cell) ;copy data from PRI to ALT
1844 * MOVE.PRI ;PRI = address on the heap
1845 */
1846 const1(*dataaddr);
1847 /* "array_sz" is the size of the argument (the value between the brackets
1848 * in the declaration), "size" is the size of the default array data.
1849 */
1850 assert(array_sz >= size);
1851 modheap((int)array_sz * sizeof(cell));
1852 /* ??? should perhaps fill with zeros first */
1853 memcopy(size * sizeof(cell));
1854 moveto1();
1855 } /* if */
1856}
1857
1858static int
1859findnamedarg(arginfo * arg, char *name)
1860{
1861 int i;
1862
1863 for (i = 0; arg[i].ident != 0 && arg[i].ident != iVARARGS; i++)
1864 if (strcmp(arg[i].name, name) == 0)
1865 return i;
1866 return -1;
1867}
1868
1869static int
1870checktag(int tags[], int numtags, int exprtag)
1871{
1872 int i;
1873
1874 assert(tags != 0);
1875 assert(numtags > 0);
1876 for (i = 0; i < numtags; i++)
1877 if (matchtag(tags[i], exprtag, TRUE))
1878 return TRUE; /* matching tag */
1879 return FALSE; /* no tag matched */
1880}
1881
1882enum
1883{
1884 ARG_UNHANDLED,
1885 ARG_IGNORED,
1886 ARG_DONE,
1887};
1888
1889/* callfunction
1890 *
1891 * Generates code to call a function. This routine handles default arguments
1892 * and positional as well as named parameters.
1893 */
1894static void
1895callfunction(symbol * sym)
1896{
1897 int close, lvalue;
1898 int argpos; /* index in the output stream (argpos==nargs if positional parameters) */
1899 int argidx = 0; /* index in "arginfo" list */
1900 int nargs = 0; /* number of arguments */
1901 int heapalloc = 0;
1902 int namedparams = FALSE;
1903 value lval = { NULL, 0, 0, 0, 0, NULL };
1904 arginfo *arg;
1905 char arglist[sMAXARGS];
1906 constvalue arrayszlst = { NULL, "", 0, 0 }; /* array size list starts empty */
1907 cell lexval;
1908 char *lexstr;
1909
1910 assert(sym != NULL);
1911 arg = sym->dim.arglist;
1912 assert(arg != NULL);
1913 stgmark(sSTARTREORDER);
1914 for (argpos = 0; argpos < sMAXARGS; argpos++)
1915 arglist[argpos] = ARG_UNHANDLED;
1916 if (!matchtoken(')'))
1917 {
1918 do
1919 {
1920 if (matchtoken('.'))
1921 {
1922 namedparams = TRUE;
1923 if (needtoken(tSYMBOL))
1924 tokeninfo(&lexval, &lexstr);
1925 else
1926 lexstr = "";
1927 argpos = findnamedarg(arg, lexstr);
1928 if (argpos < 0)
1929 {
1930 error(17, lexstr); /* undefined symbol */
1931 break; /* exit loop, argpos is invalid */
1932 } /* if */
1933 needtoken('=');
1934 argidx = argpos;
1935 }
1936 else
1937 {
1938 if (namedparams)
1939 error(44); /* positional parameters must precede named parameters */
1940 argpos = nargs;
1941 } /* if */
1942 stgmark((char)(sEXPRSTART + argpos)); /* mark beginning of new expression in stage */
1943 if (arglist[argpos] != ARG_UNHANDLED)
1944 error(58); /* argument already set */
1945 if (matchtoken('_'))
1946 {
1947 arglist[argpos] = ARG_IGNORED; /* flag argument as "present, but ignored" */
1948 if (arg[argidx].ident == 0 || arg[argidx].ident == iVARARGS)
1949 {
1950 error(202); /* argument count mismatch */
1951 }
1952 else if (!arg[argidx].hasdefault)
1953 {
1954 error(34, nargs + 1); /* argument has no default value */
1955 } /* if */
1956 if (arg[argidx].ident != 0 && arg[argidx].ident != iVARARGS)
1957 argidx++;
1958 /* The rest of the code to handle default values is at the bottom
1959 * of this routine where default values for unspecified parameters
1960 * are (also) handled. Note that above, the argument is flagged as
1961 * ARG_IGNORED.
1962 */
1963 }
1964 else
1965 {
1966 arglist[argpos] = ARG_DONE; /* flag argument as "present" */
1967 lvalue = hier14(&lval);
1968 switch (arg[argidx].ident)
1969 {
1970 case 0:
1971 error(202); /* argument count mismatch */
1972 break;
1973 case iVARARGS:
1974 /* always pass by reference */
1975 if (lval.ident == iVARIABLE || lval.ident == iREFERENCE)
1976 {
1977 assert(lval.sym != NULL);
1978 if ((lval.sym->usage & uCONST) != 0
1979 && (arg[argidx].usage & uCONST) == 0)
1980 {
1981 /* treat a "const" variable passed to a function with a non-const
1982 * "variable argument list" as a constant here */
1983 assert(lvalue);
1984 rvalue(&lval); /* get value in PRI */
1985 setheap_pri(); /* address of the value on the heap in PRI */
1986 heapalloc++;
1987 }
1988 else if (lvalue)
1989 {
1990 address(lval.sym);
1991 }
1992 else
1993 {
1994 setheap_pri(); /* address of the value on the heap in PRI */
1995 heapalloc++;
1996 } /* if */
1997 }
1998 else if (lval.ident == iCONSTEXPR
1999 || lval.ident == iEXPRESSION
2000 || lval.ident == iARRAYCHAR)
2001 {
2002 /* fetch value if needed */
2003 if (lval.ident == iARRAYCHAR)
2004 rvalue(&lval);
2005 /* allocate a cell on the heap and store the
2006 * value (already in PRI) there */
2007 setheap_pri(); /* address of the value on the heap in PRI */
2008 heapalloc++;
2009 } /* if */
2010 /* ??? handle const array passed by reference */
2011 /* otherwise, the address is already in PRI */
2012 if (lval.sym)
2013 markusage(lval.sym, uWRITTEN);
2014/*
2015 * Dont need this warning - its varargs. there is no way of knowing the
2016 * required tag/type...
2017 *
2018 if (!checktag(arg[argidx].tags,arg[argidx].numtags,lval.tag))
2019 error(213);
2020 */
2021 break;
2022 case iVARIABLE:
2023 if (lval.ident == iLABEL || lval.ident == iFUNCTN
2024 || lval.ident == iREFFUNC || lval.ident == iARRAY
2025 || lval.ident == iREFARRAY)
2026 error(35, argidx + 1); /* argument type mismatch */
2027 if (lvalue)
2028 rvalue(&lval); /* get value (direct or indirect) */
2029 /* otherwise, the expression result is already in PRI */
2030 assert(arg[argidx].numtags > 0);
2031 check_userop(NULL, lval.tag, arg[argidx].tags[0], 2,
2032 NULL, &lval.tag);
2033 if (!checktag
2034 (arg[argidx].tags, arg[argidx].numtags, lval.tag))
2035 error(213);
2036 argidx++; /* argument done */
2037 break;
2038 case iREFERENCE:
2039 if (!lvalue || lval.ident == iARRAYCHAR)
2040 error(35, argidx + 1); /* argument type mismatch */
2041 if (lval.sym && (lval.sym->usage & uCONST) != 0
2042 && (arg[argidx].usage & uCONST) == 0)
2043 error(35, argidx + 1); /* argument type mismatch */
2044 if (lval.ident == iVARIABLE || lval.ident == iREFERENCE)
2045 {
2046 if (lvalue)
2047 {
2048 assert(lval.sym != NULL);
2049 address(lval.sym);
2050 }
2051 else
2052 {
2053 setheap_pri(); /* address of the value on the heap in PRI */
2054 heapalloc++;
2055 } /* if */
2056 } /* if */
2057 /* otherwise, the address is already in PRI */
2058 if (!checktag
2059 (arg[argidx].tags, arg[argidx].numtags, lval.tag))
2060 error(213);
2061 argidx++; /* argument done */
2062 if (lval.sym)
2063 markusage(lval.sym, uWRITTEN);
2064 break;
2065 case iREFARRAY:
2066 if (lval.ident != iARRAY && lval.ident != iREFARRAY
2067 && lval.ident != iARRAYCELL)
2068 {
2069 error(35, argidx + 1); /* argument type mismatch */
2070 break;
2071 } /* if */
2072 if (lval.sym && (lval.sym->usage & uCONST) != 0
2073 && (arg[argidx].usage & uCONST) == 0)
2074 error(35, argidx + 1); /* argument type mismatch */
2075 /* Verify that the dimensions match with those in arg[argidx].
2076 * A literal array always has a single dimension.
2077 * An iARRAYCELL parameter is also assumed to have a single dimension.
2078 */
2079 if (!lval.sym || lval.ident == iARRAYCELL)
2080 {
2081 if (arg[argidx].numdim != 1)
2082 {
2083 error(48); /* array dimensions must match */
2084 }
2085 else if (arg[argidx].dim[0] != 0)
2086 {
2087 assert(arg[argidx].dim[0] > 0);
2088 if (lval.ident == iARRAYCELL)
2089 {
2090 error(47); /* array sizes must match */
2091 }
2092 else
2093 {
2094 assert(lval.constval != 0); /* literal array must have a size */
2095 /* A literal array must have exactly the same size as the
2096 * function argument; a literal string may be smaller than
2097 * the function argument.
2098 */
2099 if ((lval.constval > 0
2100 && arg[argidx].dim[0] != lval.constval)
2101 || (lval.constval < 0
2102 && arg[argidx].dim[0] <
2103 -lval.constval))
2104 error(47); /* array sizes must match */
2105 } /* if */
2106 } /* if */
2107 if (lval.ident != iARRAYCELL)
2108 {
2109 /* save array size, for default values with uSIZEOF flag */
2110 cell array_sz = lval.constval;
2111
2112 assert(array_sz != 0); /* literal array must have a size */
2113 if (array_sz < 0)
2114 array_sz = -array_sz;
2115 append_constval(&arrayszlst, arg[argidx].name,
2116 array_sz, 0);
2117 } /* if */
2118 }
2119 else
2120 {
2121 symbol *sym = lval.sym;
2122 short level = 0;
2123
2124 assert(sym != NULL);
2125 if (sym->dim.array.level + 1 != arg[argidx].numdim)
2126 error(48); /* array dimensions must match */
2127 /* the lengths for all dimensions must match, unless the dimension
2128 * length was defined at zero (which means "undefined")
2129 */
2130 while (sym->dim.array.level > 0)
2131 {
2132 assert(level < sDIMEN_MAX);
2133 if (arg[argidx].dim[level] != 0
2134 && sym->dim.array.length !=
2135 arg[argidx].dim[level])
2136 error(47); /* array sizes must match */
2137 append_constval(&arrayszlst, arg[argidx].name,
2138 sym->dim.array.length, level);
2139 sym = finddepend(sym);
2140 assert(sym != NULL);
2141 level++;
2142 } /* if */
2143 /* the last dimension is checked too, again, unless it is zero */
2144 assert(level < sDIMEN_MAX);
2145 assert(sym != NULL);
2146 if (arg[argidx].dim[level] != 0
2147 && sym->dim.array.length !=
2148 arg[argidx].dim[level])
2149 error(47); /* array sizes must match */
2150 append_constval(&arrayszlst, arg[argidx].name,
2151 sym->dim.array.length, level);
2152 } /* if */
2153 /* address already in PRI */
2154 if (!checktag
2155 (arg[argidx].tags, arg[argidx].numtags, lval.tag))
2156 error(213);
2157 // ??? set uWRITTEN?
2158 argidx++; /* argument done */
2159 break;
2160 } /* switch */
2161 push1(); /* store the function argument on the stack */
2162 endexpr(FALSE); /* mark the end of a sub-expression */
2163 } /* if */
2164 assert(arglist[argpos] != ARG_UNHANDLED);
2165 nargs++;
2166 close = matchtoken(')');
2167 if (!close) /* if not paranthese... */
2168 if (!needtoken(',')) /* ...should be comma... */
2169 break; /* ...but abort loop if neither */
2170 }
2171 while (!close && freading && !matchtoken(tENDEXPR)); /* do */
2172 } /* if */
2173 /* check remaining function arguments (they may have default values) */
2174 for (argidx = 0; arg[argidx].ident != 0 && arg[argidx].ident != iVARARGS;
2175 argidx++)
2176 {
2177 if (arglist[argidx] == ARG_DONE)
2178 continue; /* already seen and handled this argument */
2179 /* in this first stage, we also skip the arguments with uSIZEOF and uTAGOF;
2180 * these are handled last
2181 */
2182 if ((arg[argidx].hasdefault & uSIZEOF) != 0
2183 || (arg[argidx].hasdefault & uTAGOF) != 0)
2184 {
2185 assert(arg[argidx].ident == iVARIABLE);
2186 continue;
2187 } /* if */
2188 stgmark((char)(sEXPRSTART + argidx)); /* mark beginning of new expression in stage */
2189 if (arg[argidx].hasdefault)
2190 {
2191 if (arg[argidx].ident == iREFARRAY)
2192 {
2193 short level;
2194
2195 setdefarray(arg[argidx].defvalue.array.data,
2196 arg[argidx].defvalue.array.size,
2197 arg[argidx].defvalue.array.arraysize,
2198 &arg[argidx].defvalue.array.addr,
2199 (arg[argidx].usage & uCONST) != 0);
2200 if ((arg[argidx].usage & uCONST) == 0)
2201 heapalloc += arg[argidx].defvalue.array.arraysize;
2202 /* keep the lengths of all dimensions of a multi-dimensional default array */
2203 assert(arg[argidx].numdim > 0);
2204 if (arg[argidx].numdim == 1)
2205 {
2206 append_constval(&arrayszlst, arg[argidx].name,
2207 arg[argidx].defvalue.array.arraysize, 0);
2208 }
2209 else
2210 {
2211 for (level = 0; level < arg[argidx].numdim; level++)
2212 {
2213 assert(level < sDIMEN_MAX);
2214 append_constval(&arrayszlst, arg[argidx].name,
2215 arg[argidx].dim[level], level);
2216 } /* for */
2217 } /* if */
2218 }
2219 else if (arg[argidx].ident == iREFERENCE)
2220 {
2221 setheap(arg[argidx].defvalue.val);
2222 /* address of the value on the heap in PRI */
2223 heapalloc++;
2224 }
2225 else
2226 {
2227 int dummytag = arg[argidx].tags[0];
2228
2229 const1(arg[argidx].defvalue.val);
2230 assert(arg[argidx].numtags > 0);
2231 check_userop(NULL, arg[argidx].defvalue_tag,
2232 arg[argidx].tags[0], 2, NULL, &dummytag);
2233 assert(dummytag == arg[argidx].tags[0]);
2234 } /* if */
2235 push1(); /* store the function argument on the stack */
2236 endexpr(FALSE); /* mark the end of a sub-expression */
2237 }
2238 else
2239 {
2240 error(202, argidx); /* argument count mismatch */
2241 } /* if */
2242 if (arglist[argidx] == ARG_UNHANDLED)
2243 nargs++;
2244 arglist[argidx] = ARG_DONE;
2245 } /* for */
2246 /* now a second loop to catch the arguments with default values that are
2247 * the "sizeof" or "tagof" of other arguments
2248 */
2249 for (argidx = 0; arg[argidx].ident != 0 && arg[argidx].ident != iVARARGS;
2250 argidx++)
2251 {
2252 constvalue *asz;
2253 cell array_sz;
2254
2255 if (arglist[argidx] == ARG_DONE)
2256 continue; /* already seen and handled this argument */
2257 stgmark((char)(sEXPRSTART + argidx)); /* mark beginning of new expression in stage */
2258 assert(arg[argidx].ident == iVARIABLE); /* if "sizeof", must be single cell */
2259 /* if unseen, must be "sizeof" or "tagof" */
2260 assert((arg[argidx].hasdefault & uSIZEOF) != 0
2261 || (arg[argidx].hasdefault & uTAGOF) != 0);
2262 if ((arg[argidx].hasdefault & uSIZEOF) != 0)
2263 {
2264 /* find the argument; if it isn't found, the argument's default value
2265 * was a "sizeof" of a non-array (a warning for this was already given
2266 * when declaring the function)
2267 */
2268 asz = find_constval(&arrayszlst, arg[argidx].defvalue.size.symname,
2269 arg[argidx].defvalue.size.level);
2270 if (asz)
2271 {
2272 array_sz = asz->value;
2273 if (array_sz == 0)
2274 error(224, arg[argidx].name); /* indeterminate array size in "sizeof" expression */
2275 }
2276 else
2277 {
2278 array_sz = 1;
2279 } /* if */
2280 }
2281 else
2282 {
2283 symbol *sym;
2284
2285 assert((arg[argidx].hasdefault & uTAGOF) != 0);
2286 sym = findloc(arg[argidx].defvalue.size.symname);
2287 if (!sym)
2288 sym = findglb(arg[argidx].defvalue.size.symname);
2289 array_sz = (sym) ? sym->tag : 0;
2290 exporttag(array_sz);
2291 } /* if */
2292 const1(array_sz);
2293 push1(); /* store the function argument on the stack */
2294 endexpr(FALSE);
2295 if (arglist[argidx] == ARG_UNHANDLED)
2296 nargs++;
2297 arglist[argidx] = ARG_DONE;
2298 } /* for */
2299 stgmark(sENDREORDER); /* mark end of reversed evaluation */
2300 pushval((cell) nargs * sizeof(cell));
2301 ffcall(sym, nargs);
2302 if (sc_status != statSKIP)
2303 markusage(sym, uREAD); /* do not mark as "used" when this call itself is skipped */
2304 if (sym->x.lib)
2305 sym->x.lib->value += 1; /* increment "usage count" of the library */
2306 modheap(-heapalloc * sizeof(cell));
2307 sideeffect = TRUE; /* assume functions carry out a side-effect */
2308 delete_consttable(&arrayszlst); /* clear list of array sizes */
2309}
2310
2311/* dbltest
2312 *
2313 * Returns a non-zero value if lval1 an array and lval2 is not an array and
2314 * the operation is addition or subtraction.
2315 *
2316 * Returns the "shift" count (1 for 16-bit, 2 for 32-bit) to align a cell
2317 * to an array offset.
2318 */
2319static int
2320dbltest(void (*oper) (), value * lval1, value * lval2)
2321{
2322 if ((oper != ob_add) && (oper != ob_sub))
2323 return 0;
2324 if (lval1->ident != iARRAY)
2325 return 0;
2326 if (lval2->ident == iARRAY)
2327 return 0;
2328 return sizeof(cell) / 2; /* 1 for 16-bit, 2 for 32-bit */
2329}
2330
2331/* commutative
2332 *
2333 * Test whether an operator is commutative, i.e. x oper y == y oper x.
2334 * Commutative operators are: + (addition)
2335 * * (multiplication)
2336 * == (equality)
2337 * != (inequality)
2338 * & (bitwise and)
2339 * ^ (bitwise xor)
2340 * | (bitwise or)
2341 *
2342 * If in an expression, code for the left operand has been generated and
2343 * the right operand is a constant and the operator is commutative, the
2344 * precautionary "push" of the primary register is scrapped and the constant
2345 * is read into the secondary register immediately.
2346 */
2347static int
2348commutative(void (*oper) ())
2349{
2350 return oper == ob_add || oper == os_mult
2351 || oper == ob_eq || oper == ob_ne
2352 || oper == ob_and || oper == ob_xor || oper == ob_or;
2353}
2354
2355/* constant
2356 *
2357 * Generates code to fetch a number, a literal character (which is returned
2358 * by lex() as a number as well) or a literal string (lex() stores the
2359 * strings in the literal queue). If the operand was a number, it is stored
2360 * in lval->constval.
2361 *
2362 * The function returns 1 if the token was a constant or a string, 0
2363 * otherwise.
2364 */
2365static int
2366constant(value * lval)
2367{
2368 int tok, index, constant;
2369 cell val, item, cidx;
2370 char *st;
2371 symbol *sym;
2372
2373 tok = lex(&val, &st);
2374 if (tok == tSYMBOL && (sym = findconst(st)))
2375 {
2376 lval->constval = sym->addr;
2377 const1(lval->constval);
2378 lval->ident = iCONSTEXPR;
2379 lval->tag = sym->tag;
2380 markusage(sym, uREAD);
2381 }
2382 else if (tok == tNUMBER)
2383 {
2384 lval->constval = val;
2385 const1(lval->constval);
2386 lval->ident = iCONSTEXPR;
2387 }
2388 else if (tok == tRATIONAL)
2389 {
2390 lval->constval = val;
2391 const1(lval->constval);
2392 lval->ident = iCONSTEXPR;
2393 lval->tag = sc_rationaltag;
2394 }
2395 else if (tok == tSTRING)
2396 {
2397 /* lex() stores starting index of string in the literal table in 'val' */
2398 const1((val + glb_declared) * sizeof(cell));
2399 lval->ident = iARRAY; /* pretend this is a global array */
2400 lval->constval = val - litidx; /* constval == the negative value of the
2401 * size of the literal array; using a negative
2402 * value distinguishes between literal arrays
2403 * and literal strings (this was done for
2404 * array assignment). */
2405 }
2406 else if (tok == '{')
2407 {
2408 int tag, lasttag = -1;
2409
2410 val = litidx;
2411 do
2412 {
2413 /* cannot call constexpr() here, because "staging" is already turned
2414 * on at this point */
2415 assert(staging);
2416 stgget(&index, &cidx); /* mark position in code generator */
2417 expression(&constant, &item, &tag, FALSE);
2418 stgdel(index, cidx); /* scratch generated code */
2419 if (constant == 0)
2420 error(8); /* must be constant expression */
2421 if (lasttag < 0)
2422 lasttag = tag;
2423 else if (!matchtag(lasttag, tag, FALSE))
2424 error(213); /* tagname mismatch */
2425 stowlit(item); /* store expression result in literal table */
2426 }
2427 while (matchtoken(','));
2428 needtoken('}');
2429 const1((val + glb_declared) * sizeof(cell));
2430 lval->ident = iARRAY; /* pretend this is a global array */
2431 lval->constval = litidx - val; /* constval == the size of the literal array */
2432 }
2433 else
2434 {
2435 return FALSE; /* no, it cannot be interpreted as a constant */
2436 } /* if */
2437 return TRUE; /* yes, it was a constant value */
2438}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc4.c b/libraries/embryo/src/bin/embryo_cc_sc4.c
deleted file mode 100644
index 0dedbfb..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc4.c
+++ /dev/null
@@ -1,1308 +0,0 @@
1/* Small compiler - code generation (unoptimized "assembler" code)
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_sc4.c 52451 2010-09-19 03:00:12Z raster $
22 */
23
24
25#ifdef HAVE_CONFIG_H
26# include <config.h>
27#endif
28
29#include <assert.h>
30#include <ctype.h>
31#include <stdio.h>
32#include <limits.h> /* for PATH_MAX */
33#include <string.h>
34
35#include "embryo_cc_sc.h"
36
37/* When a subroutine returns to address 0, the AMX must halt. In earlier
38 * releases, the RET and RETN opcodes checked for the special case 0 address.
39 * Today, the compiler simply generates a HALT instruction at address 0. So
40 * a subroutine can savely return to 0, and then encounter a HALT.
41 */
42void
43writeleader(void)
44{
45 assert(code_idx == 0);
46 stgwrite(";program exit point\n");
47 stgwrite("\thalt 0\n");
48 /* calculate code length */
49 code_idx += opcodes(1) + opargs(1);
50}
51
52/* writetrailer
53 * Not much left of this once important function.
54 *
55 * Global references: sc_stksize (referred to only)
56 * sc_dataalign (referred to only)
57 * code_idx (altered)
58 * glb_declared (altered)
59 */
60void
61writetrailer(void)
62{
63 assert(sc_dataalign % opcodes(1) == 0); /* alignment must be a multiple of
64 * the opcode size */
65 assert(sc_dataalign != 0);
66
67 /* pad code to align data segment */
68 if ((code_idx % sc_dataalign) != 0)
69 {
70 begcseg();
71 while ((code_idx % sc_dataalign) != 0)
72 nooperation();
73 } /* if */
74
75 /* pad data segment to align the stack and the heap */
76 assert(litidx == 0); /* literal queue should have been emptied */
77 assert(sc_dataalign % sizeof(cell) == 0);
78 if (((glb_declared * sizeof(cell)) % sc_dataalign) != 0)
79 {
80 begdseg();
81 defstorage();
82 while (((glb_declared * sizeof(cell)) % sc_dataalign) != 0)
83 {
84 stgwrite("0 ");
85 glb_declared++;
86 } /* while */
87 } /* if */
88
89 stgwrite("\nSTKSIZE "); /* write stack size (align stack top) */
90 outval(sc_stksize - (sc_stksize % sc_dataalign), TRUE);
91}
92
93/*
94 * Start (or restart) the CODE segment.
95 *
96 * In fact, the code and data segment specifiers are purely informational;
97 * the "DUMP" instruction itself already specifies that the following values
98 * should go to the data segment. All otherinstructions go to the code
99 * segment.
100 *
101 * Global references: curseg
102 */
103void
104begcseg(void)
105{
106 if (curseg != sIN_CSEG)
107 {
108 stgwrite("\n");
109 stgwrite("CODE\t; ");
110 outval(code_idx, TRUE);
111 curseg = sIN_CSEG;
112 } /* endif */
113}
114
115/*
116 * Start (or restart) the DATA segment.
117 *
118 * Global references: curseg
119 */
120void
121begdseg(void)
122{
123 if (curseg != sIN_DSEG)
124 {
125 stgwrite("\n");
126 stgwrite("DATA\t; ");
127 outval(glb_declared - litidx, TRUE);
128 curseg = sIN_DSEG;
129 } /* if */
130}
131
132void
133setactivefile(int fnumber)
134{
135 stgwrite("curfile ");
136 outval(fnumber, TRUE);
137}
138
139cell
140nameincells(char *name)
141{
142 cell clen =
143 (strlen(name) + sizeof(cell)) & ~(sizeof(cell) - 1);
144 return clen;
145}
146
147void
148setfile(char *name, int fileno)
149{
150 if ((sc_debug & sSYMBOLIC) != 0)
151 {
152 begcseg();
153 stgwrite("file ");
154 outval(fileno, FALSE);
155 stgwrite(" ");
156 stgwrite(name);
157 stgwrite("\n");
158 /* calculate code length */
159 code_idx += opcodes(1) + opargs(2) + nameincells(name);
160 } /* if */
161}
162
163void
164setline(int line, int fileno)
165{
166 if ((sc_debug & (sSYMBOLIC | sCHKBOUNDS)) != 0)
167 {
168 stgwrite("line ");
169 outval(line, FALSE);
170 stgwrite(" ");
171 outval(fileno, FALSE);
172 stgwrite("\t; ");
173 outval(code_idx, TRUE);
174 code_idx += opcodes(1) + opargs(2);
175 } /* if */
176}
177
178/* setlabel
179 *
180 * Post a code label (specified as a number), on a new line.
181 */
182void
183setlabel(int number)
184{
185 assert(number >= 0);
186 stgwrite("l.");
187 stgwrite((char *)itoh(number));
188 /* To assist verification of the assembled code, put the address of the
189 * label as a comment. However, labels that occur inside an expression
190 * may move (through optimization or through re-ordering). So write the
191 * address only if it is known to accurate.
192 */
193 if (!staging)
194 {
195 stgwrite("\t\t; ");
196 outval(code_idx, FALSE);
197 } /* if */
198 stgwrite("\n");
199}
200
201/* Write a token that signifies the end of an expression, or the end of a
202 * function parameter. This allows several simple optimizations by the peephole
203 * optimizer.
204 */
205void
206endexpr(int fullexpr)
207{
208 if (fullexpr)
209 stgwrite("\t;$exp\n");
210 else
211 stgwrite("\t;$par\n");
212}
213
214/* startfunc - declare a CODE entry point (function start)
215 *
216 * Global references: funcstatus (referred to only)
217 */
218void
219startfunc(char *fname __UNUSED__)
220{
221 stgwrite("\tproc");
222 stgwrite("\n");
223 code_idx += opcodes(1);
224}
225
226/* endfunc
227 *
228 * Declare a CODE ending point (function end)
229 */
230void
231endfunc(void)
232{
233 stgwrite("\n"); /* skip a line */
234}
235
236/* alignframe
237 *
238 * Aligns the frame (and the stack) of the current function to a multiple
239 * of the specified byte count. Two caveats: the alignment ("numbytes") should
240 * be a power of 2, and this alignment must be done right after the frame
241 * is set up (before the first variable is declared)
242 */
243void
244alignframe(int numbytes)
245{
246#if !defined NDEBUG
247 /* "numbytes" should be a power of 2 for this code to work */
248 int i, count = 0;
249
250 for (i = 0; i < (int)(sizeof(numbytes) * 8); i++)
251 if (numbytes & (1 << i))
252 count++;
253 assert(count == 1);
254#endif
255
256 stgwrite("\tlctrl 4\n"); /* get STK in PRI */
257 stgwrite("\tconst.alt "); /* get ~(numbytes-1) in ALT */
258 outval(~(numbytes - 1), TRUE);
259 stgwrite("\tand\n"); /* PRI = STK "and" ~(numbytes-1) */
260 stgwrite("\tsctrl 4\n"); /* set the new value of STK ... */
261 stgwrite("\tsctrl 5\n"); /* ... and FRM */
262 code_idx += opcodes(5) + opargs(4);
263}
264
265/* Define a variable or function
266 */
267void
268defsymbol(char *name, int ident, int vclass, cell offset, int tag)
269{
270 if ((sc_debug & sSYMBOLIC) != 0)
271 {
272 begcseg(); /* symbol definition in code segment */
273 stgwrite("symbol ");
274
275 stgwrite(name);
276 stgwrite(" ");
277
278 outval(offset, FALSE);
279 stgwrite(" ");
280
281 outval(vclass, FALSE);
282 stgwrite(" ");
283
284 outval(ident, TRUE);
285
286 code_idx += opcodes(1) + opargs(3) + nameincells(name); /* class and ident encoded in "flags" */
287
288 /* also write the optional tag */
289 if (tag != 0)
290 {
291 assert((tag & TAGMASK) != 0);
292 stgwrite("symtag ");
293 outval(tag & TAGMASK, TRUE);
294 code_idx += opcodes(1) + opargs(1);
295 } /* if */
296 } /* if */
297}
298
299void
300symbolrange(int level, cell size)
301{
302 if ((sc_debug & sSYMBOLIC) != 0)
303 {
304 begcseg(); /* symbol definition in code segment */
305 stgwrite("srange ");
306 outval(level, FALSE);
307 stgwrite(" ");
308 outval(size, TRUE);
309 code_idx += opcodes(1) + opargs(2);
310 } /* if */
311}
312
313/* rvalue
314 *
315 * Generate code to get the value of a symbol into "primary".
316 */
317void
318rvalue(value * lval)
319{
320 symbol *sym;
321
322 sym = lval->sym;
323 if (lval->ident == iARRAYCELL)
324 {
325 /* indirect fetch, address already in PRI */
326 stgwrite("\tload.i\n");
327 code_idx += opcodes(1);
328 }
329 else if (lval->ident == iARRAYCHAR)
330 {
331 /* indirect fetch of a character from a pack, address already in PRI */
332 stgwrite("\tlodb.i ");
333 outval(charbits / 8, TRUE); /* read one or two bytes */
334 code_idx += opcodes(1) + opargs(1);
335 }
336 else if (lval->ident == iREFERENCE)
337 {
338 /* indirect fetch, but address not yet in PRI */
339 assert(sym != NULL);
340 assert(sym->vclass == sLOCAL); /* global references don't exist in Small */
341 if (sym->vclass == sLOCAL)
342 stgwrite("\tlref.s.pri ");
343 else
344 stgwrite("\tlref.pri ");
345 outval(sym->addr, TRUE);
346 markusage(sym, uREAD);
347 code_idx += opcodes(1) + opargs(1);
348 }
349 else
350 {
351 /* direct or stack relative fetch */
352 assert(sym != NULL);
353 if (sym->vclass == sLOCAL)
354 stgwrite("\tload.s.pri ");
355 else
356 stgwrite("\tload.pri ");
357 outval(sym->addr, TRUE);
358 markusage(sym, uREAD);
359 code_idx += opcodes(1) + opargs(1);
360 } /* if */
361}
362
363/*
364 * Get the address of a symbol into the primary register (used for arrays,
365 * and for passing arguments by reference).
366 */
367void
368address(symbol * sym)
369{
370 assert(sym != NULL);
371 /* the symbol can be a local array, a global array, or an array
372 * that is passed by reference.
373 */
374 if (sym->ident == iREFARRAY || sym->ident == iREFERENCE)
375 {
376 /* reference to a variable or to an array; currently this is
377 * always a local variable */
378 stgwrite("\tload.s.pri ");
379 }
380 else
381 {
382 /* a local array or local variable */
383 if (sym->vclass == sLOCAL)
384 stgwrite("\taddr.pri ");
385 else
386 stgwrite("\tconst.pri ");
387 } /* if */
388 outval(sym->addr, TRUE);
389 markusage(sym, uREAD);
390 code_idx += opcodes(1) + opargs(1);
391}
392
393/* store
394 *
395 * Saves the contents of "primary" into a memory cell, either directly
396 * or indirectly (at the address given in the alternate register).
397 */
398void
399store(value * lval)
400{
401 symbol *sym;
402
403 sym = lval->sym;
404 if (lval->ident == iARRAYCELL)
405 {
406 /* store at address in ALT */
407 stgwrite("\tstor.i\n");
408 code_idx += opcodes(1);
409 }
410 else if (lval->ident == iARRAYCHAR)
411 {
412 /* store at address in ALT */
413 stgwrite("\tstrb.i ");
414 outval(charbits / 8, TRUE); /* write one or two bytes */
415 code_idx += opcodes(1) + opargs(1);
416 }
417 else if (lval->ident == iREFERENCE)
418 {
419 assert(sym != NULL);
420 if (sym->vclass == sLOCAL)
421 stgwrite("\tsref.s.pri ");
422 else
423 stgwrite("\tsref.pri ");
424 outval(sym->addr, TRUE);
425 code_idx += opcodes(1) + opargs(1);
426 }
427 else
428 {
429 assert(sym != NULL);
430 markusage(sym, uWRITTEN);
431 if (sym->vclass == sLOCAL)
432 stgwrite("\tstor.s.pri ");
433 else
434 stgwrite("\tstor.pri ");
435 outval(sym->addr, TRUE);
436 code_idx += opcodes(1) + opargs(1);
437 } /* if */
438}
439
440/* source must in PRI, destination address in ALT. The "size"
441 * parameter is in bytes, not cells.
442 */
443void
444memcopy(cell size)
445{
446 stgwrite("\tmovs ");
447 outval(size, TRUE);
448
449 code_idx += opcodes(1) + opargs(1);
450}
451
452/* Address of the source must already have been loaded in PRI
453 * "size" is the size in bytes (not cells).
454 */
455void
456copyarray(symbol * sym, cell size)
457{
458 assert(sym != NULL);
459 /* the symbol can be a local array, a global array, or an array
460 * that is passed by reference.
461 */
462 if (sym->ident == iREFARRAY)
463 {
464 /* reference to an array; currently this is always a local variable */
465 assert(sym->vclass == sLOCAL); /* symbol must be stack relative */
466 stgwrite("\tload.s.alt ");
467 }
468 else
469 {
470 /* a local or global array */
471 if (sym->vclass == sLOCAL)
472 stgwrite("\taddr.alt ");
473 else
474 stgwrite("\tconst.alt ");
475 } /* if */
476 outval(sym->addr, TRUE);
477 markusage(sym, uWRITTEN);
478
479 code_idx += opcodes(1) + opargs(1);
480 memcopy(size);
481}
482
483void
484fillarray(symbol * sym, cell size, cell val)
485{
486 const1(val); /* load val in PRI */
487
488 assert(sym != NULL);
489 /* the symbol can be a local array, a global array, or an array
490 * that is passed by reference.
491 */
492 if (sym->ident == iREFARRAY)
493 {
494 /* reference to an array; currently this is always a local variable */
495 assert(sym->vclass == sLOCAL); /* symbol must be stack relative */
496 stgwrite("\tload.s.alt ");
497 }
498 else
499 {
500 /* a local or global array */
501 if (sym->vclass == sLOCAL)
502 stgwrite("\taddr.alt ");
503 else
504 stgwrite("\tconst.alt ");
505 } /* if */
506 outval(sym->addr, TRUE);
507 markusage(sym, uWRITTEN);
508
509 stgwrite("\tfill ");
510 outval(size, TRUE);
511
512 code_idx += opcodes(2) + opargs(2);
513}
514
515/*
516 * Instruction to get an immediate value into the primary register
517 */
518void
519const1(cell val)
520{
521 if (val == 0)
522 {
523 stgwrite("\tzero.pri\n");
524 code_idx += opcodes(1);
525 }
526 else
527 {
528 stgwrite("\tconst.pri ");
529 outval(val, TRUE);
530 code_idx += opcodes(1) + opargs(1);
531 } /* if */
532}
533
534/*
535 * Instruction to get an immediate value into the secondary register
536 */
537void
538const2(cell val)
539{
540 if (val == 0)
541 {
542 stgwrite("\tzero.alt\n");
543 code_idx += opcodes(1);
544 }
545 else
546 {
547 stgwrite("\tconst.alt ");
548 outval(val, TRUE);
549 code_idx += opcodes(1) + opargs(1);
550 } /* if */
551}
552
553/* Copy value in secondary register to the primary register */
554void
555moveto1(void)
556{
557 stgwrite("\tmove.pri\n");
558 code_idx += opcodes(1) + opargs(0);
559}
560
561/*
562 * Push primary register onto the stack
563 */
564void
565push1(void)
566{
567 stgwrite("\tpush.pri\n");
568 code_idx += opcodes(1);
569}
570
571/*
572 * Push alternate register onto the stack
573 */
574void
575push2(void)
576{
577 stgwrite("\tpush.alt\n");
578 code_idx += opcodes(1);
579}
580
581/*
582 * Push a constant value onto the stack
583 */
584void
585pushval(cell val)
586{
587 stgwrite("\tpush.c ");
588 outval(val, TRUE);
589 code_idx += opcodes(1) + opargs(1);
590}
591
592/*
593 * pop stack to the primary register
594 */
595void
596pop1(void)
597{
598 stgwrite("\tpop.pri\n");
599 code_idx += opcodes(1);
600}
601
602/*
603 * pop stack to the secondary register
604 */
605void
606pop2(void)
607{
608 stgwrite("\tpop.alt\n");
609 code_idx += opcodes(1);
610}
611
612/*
613 * swap the top-of-stack with the value in primary register
614 */
615void
616swap1(void)
617{
618 stgwrite("\tswap.pri\n");
619 code_idx += opcodes(1);
620}
621
622/* Switch statements
623 * The "switch" statement generates a "case" table using the "CASE" opcode.
624 * The case table contains a list of records, each record holds a comparison
625 * value and a label to branch to on a match. The very first record is an
626 * exception: it holds the size of the table (excluding the first record) and
627 * the label to branch to when none of the values in the case table match.
628 * The case table is sorted on the comparison value. This allows more advanced
629 * abstract machines to sift the case table with a binary search.
630 */
631void
632ffswitch(int label)
633{
634 stgwrite("\tswitch ");
635 outval(label, TRUE); /* the label is the address of the case table */
636 code_idx += opcodes(1) + opargs(1);
637}
638
639void
640ffcase(cell val, char *labelname, int newtable)
641{
642 if (newtable)
643 {
644 stgwrite("\tcasetbl\n");
645 code_idx += opcodes(1);
646 } /* if */
647 stgwrite("\tcase ");
648 outval(val, FALSE);
649 stgwrite(" ");
650 stgwrite(labelname);
651 stgwrite("\n");
652 code_idx += opcodes(0) + opargs(2);
653}
654
655/*
656 * Call specified function
657 */
658void
659ffcall(symbol * sym, int numargs)
660{
661 assert(sym != NULL);
662 assert(sym->ident == iFUNCTN);
663 if ((sym->usage & uNATIVE) != 0)
664 {
665 /* reserve a SYSREQ id if called for the first time */
666 if (sc_status == statWRITE && (sym->usage & uREAD) == 0
667 && sym->addr >= 0)
668 sym->addr = ntv_funcid++;
669 stgwrite("\tsysreq.c ");
670 outval(sym->addr, FALSE);
671 stgwrite("\n\tstack ");
672 outval((numargs + 1) * sizeof(cell), TRUE);
673 code_idx += opcodes(2) + opargs(2);
674 }
675 else
676 {
677 /* normal function */
678 stgwrite("\tcall ");
679 stgwrite(sym->name);
680 stgwrite("\n");
681 code_idx += opcodes(1) + opargs(1);
682 } /* if */
683}
684
685/* Return from function
686 *
687 * Global references: funcstatus (referred to only)
688 */
689void
690ffret(void)
691{
692 stgwrite("\tretn\n");
693 code_idx += opcodes(1);
694}
695
696void
697ffabort(int reason)
698{
699 stgwrite("\thalt ");
700 outval(reason, TRUE);
701 code_idx += opcodes(1) + opargs(1);
702}
703
704void
705ffbounds(cell size)
706{
707 if ((sc_debug & sCHKBOUNDS) != 0)
708 {
709 stgwrite("\tbounds ");
710 outval(size, TRUE);
711 code_idx += opcodes(1) + opargs(1);
712 } /* if */
713}
714
715/*
716 * Jump to local label number (the number is converted to a name)
717 */
718void
719jumplabel(int number)
720{
721 stgwrite("\tjump ");
722 outval(number, TRUE);
723 code_idx += opcodes(1) + opargs(1);
724}
725
726/*
727 * Define storage (global and static variables)
728 */
729void
730defstorage(void)
731{
732 stgwrite("dump ");
733}
734
735/*
736 * Inclrement/decrement stack pointer. Note that this routine does
737 * nothing if the delta is zero.
738 */
739void
740modstk(int delta)
741{
742 if (delta)
743 {
744 stgwrite("\tstack ");
745 outval(delta, TRUE);
746 code_idx += opcodes(1) + opargs(1);
747 } /* if */
748}
749
750/* set the stack to a hard offset from the frame */
751void
752setstk(cell val)
753{
754 stgwrite("\tlctrl 5\n"); /* get FRM */
755 assert(val <= 0); /* STK should always become <= FRM */
756 if (val < 0)
757 {
758 stgwrite("\tadd.c ");
759 outval(val, TRUE); /* add (negative) offset */
760 code_idx += opcodes(1) + opargs(1);
761 // ??? write zeros in the space between STK and the val in PRI (the new stk)
762 // get val of STK in ALT
763 // zero PRI
764 // need new FILL opcode that takes a variable size
765 } /* if */
766 stgwrite("\tsctrl 4\n"); /* store in STK */
767 code_idx += opcodes(2) + opargs(2);
768}
769
770void
771modheap(int delta)
772{
773 if (delta)
774 {
775 stgwrite("\theap ");
776 outval(delta, TRUE);
777 code_idx += opcodes(1) + opargs(1);
778 } /* if */
779}
780
781void
782setheap_pri(void)
783{
784 stgwrite("\theap "); /* ALT = HEA++ */
785 outval(sizeof(cell), TRUE);
786 stgwrite("\tstor.i\n"); /* store PRI (default value) at address ALT */
787 stgwrite("\tmove.pri\n"); /* move ALT to PRI: PRI contains the address */
788 code_idx += opcodes(3) + opargs(1);
789}
790
791void
792setheap(cell val)
793{
794 stgwrite("\tconst.pri "); /* load default val in PRI */
795 outval(val, TRUE);
796 code_idx += opcodes(1) + opargs(1);
797 setheap_pri();
798}
799
800/*
801 * Convert a cell number to a "byte" address; i.e. double or quadruple
802 * the primary register.
803 */
804void
805cell2addr(void)
806{
807#if defined(BIT16)
808 stgwrite("\tshl.c.pri 1\n");
809#else
810 stgwrite("\tshl.c.pri 2\n");
811#endif
812 code_idx += opcodes(1) + opargs(1);
813}
814
815/*
816 * Double or quadruple the alternate register.
817 */
818void
819cell2addr_alt(void)
820{
821#if defined(BIT16)
822 stgwrite("\tshl.c.alt 1\n");
823#else
824 stgwrite("\tshl.c.alt 2\n");
825#endif
826 code_idx += opcodes(1) + opargs(1);
827}
828
829/*
830 * Convert "distance of addresses" to "number of cells" in between.
831 * Or convert a number of packed characters to the number of cells (with
832 * truncation).
833 */
834void
835addr2cell(void)
836{
837#if defined(BIT16)
838 stgwrite("\tshr.c.pri 1\n");
839#else
840 stgwrite("\tshr.c.pri 2\n");
841#endif
842 code_idx += opcodes(1) + opargs(1);
843}
844
845/* Convert from character index to byte address. This routine does
846 * nothing if a character has the size of a byte.
847 */
848void
849char2addr(void)
850{
851 if (charbits == 16)
852 {
853 stgwrite("\tshl.c.pri 1\n");
854 code_idx += opcodes(1) + opargs(1);
855 } /* if */
856}
857
858/* Align PRI (which should hold a character index) to an address.
859 * The first character in a "pack" occupies the highest bits of
860 * the cell. This is at the lower memory address on Big Endian
861 * computers and on the higher address on Little Endian computers.
862 * The ALIGN.pri/alt instructions must solve this machine dependence;
863 * that is, on Big Endian computers, ALIGN.pri/alt shuold do nothing
864 * and on Little Endian computers they should toggle the address.
865 */
866void
867charalign(void)
868{
869 stgwrite("\talign.pri ");
870 outval(charbits / 8, TRUE);
871 code_idx += opcodes(1) + opargs(1);
872}
873
874/*
875 * Add a constant to the primary register.
876 */
877void
878addconst(cell val)
879{
880 if (val != 0)
881 {
882 stgwrite("\tadd.c ");
883 outval(val, TRUE);
884 code_idx += opcodes(1) + opargs(1);
885 } /* if */
886}
887
888/*
889 * signed multiply of primary and secundairy registers (result in primary)
890 */
891void
892os_mult(void)
893{
894 stgwrite("\tsmul\n");
895 code_idx += opcodes(1);
896}
897
898/*
899 * signed divide of alternate register by primary register (quotient in
900 * primary; remainder in alternate)
901 */
902void
903os_div(void)
904{
905 stgwrite("\tsdiv.alt\n");
906 code_idx += opcodes(1);
907}
908
909/*
910 * modulus of (alternate % primary), result in primary (signed)
911 */
912void
913os_mod(void)
914{
915 stgwrite("\tsdiv.alt\n");
916 stgwrite("\tmove.pri\n"); /* move ALT to PRI */
917 code_idx += opcodes(2);
918}
919
920/*
921 * Add primary and alternate registers (result in primary).
922 */
923void
924ob_add(void)
925{
926 stgwrite("\tadd\n");
927 code_idx += opcodes(1);
928}
929
930/*
931 * subtract primary register from alternate register (result in primary)
932 */
933void
934ob_sub(void)
935{
936 stgwrite("\tsub.alt\n");
937 code_idx += opcodes(1);
938}
939
940/*
941 * arithmic shift left alternate register the number of bits
942 * given in the primary register (result in primary).
943 * There is no need for a "logical shift left" routine, since
944 * logical shift left is identical to arithmic shift left.
945 */
946void
947ob_sal(void)
948{
949 stgwrite("\txchg\n");
950 stgwrite("\tshl\n");
951 code_idx += opcodes(2);
952}
953
954/*
955 * arithmic shift right alternate register the number of bits
956 * given in the primary register (result in primary).
957 */
958void
959os_sar(void)
960{
961 stgwrite("\txchg\n");
962 stgwrite("\tsshr\n");
963 code_idx += opcodes(2);
964}
965
966/*
967 * logical (unsigned) shift right of the alternate register by the
968 * number of bits given in the primary register (result in primary).
969 */
970void
971ou_sar(void)
972{
973 stgwrite("\txchg\n");
974 stgwrite("\tshr\n");
975 code_idx += opcodes(2);
976}
977
978/*
979 * inclusive "or" of primary and secondary registers (result in primary)
980 */
981void
982ob_or(void)
983{
984 stgwrite("\tor\n");
985 code_idx += opcodes(1);
986}
987
988/*
989 * "exclusive or" of primary and alternate registers (result in primary)
990 */
991void
992ob_xor(void)
993{
994 stgwrite("\txor\n");
995 code_idx += opcodes(1);
996}
997
998/*
999 * "and" of primary and secundairy registers (result in primary)
1000 */
1001void
1002ob_and(void)
1003{
1004 stgwrite("\tand\n");
1005 code_idx += opcodes(1);
1006}
1007
1008/*
1009 * test ALT==PRI; result in primary register (1 or 0).
1010 */
1011void
1012ob_eq(void)
1013{
1014 stgwrite("\teq\n");
1015 code_idx += opcodes(1);
1016}
1017
1018/*
1019 * test ALT!=PRI
1020 */
1021void
1022ob_ne(void)
1023{
1024 stgwrite("\tneq\n");
1025 code_idx += opcodes(1);
1026}
1027
1028/* The abstract machine defines the relational instructions so that PRI is
1029 * on the left side and ALT on the right side of the operator. For example,
1030 * SLESS sets PRI to either 1 or 0 depending on whether the expression
1031 * "PRI < ALT" is true.
1032 *
1033 * The compiler generates comparisons with ALT on the left side of the
1034 * relational operator and PRI on the right side. The XCHG instruction
1035 * prefixing the relational operators resets this. We leave it to the
1036 * peephole optimizer to choose more compact instructions where possible.
1037 */
1038
1039/* Relational operator prefix for chained relational expressions. The
1040 * "suffix" code restores the stack.
1041 * For chained relational operators, the goal is to keep the comparison
1042 * result "so far" in PRI and the value of the most recent operand in
1043 * ALT, ready for a next comparison.
1044 * The "prefix" instruction pushed the comparison result (PRI) onto the
1045 * stack and moves the value of ALT into PRI. If there is a next comparison,
1046 * PRI can now serve as the "left" operand of the relational operator.
1047 */
1048void
1049relop_prefix(void)
1050{
1051 stgwrite("\tpush.pri\n");
1052 stgwrite("\tmove.pri\n");
1053 code_idx += opcodes(2);
1054}
1055
1056void
1057relop_suffix(void)
1058{
1059 stgwrite("\tswap.alt\n");
1060 stgwrite("\tand\n");
1061 stgwrite("\tpop.alt\n");
1062 code_idx += opcodes(3);
1063}
1064
1065/*
1066 * test ALT<PRI (signed)
1067 */
1068void
1069os_lt(void)
1070{
1071 stgwrite("\txchg\n");
1072 stgwrite("\tsless\n");
1073 code_idx += opcodes(2);
1074}
1075
1076/*
1077 * test ALT<=PRI (signed)
1078 */
1079void
1080os_le(void)
1081{
1082 stgwrite("\txchg\n");
1083 stgwrite("\tsleq\n");
1084 code_idx += opcodes(2);
1085}
1086
1087/*
1088 * test ALT>PRI (signed)
1089 */
1090void
1091os_gt(void)
1092{
1093 stgwrite("\txchg\n");
1094 stgwrite("\tsgrtr\n");
1095 code_idx += opcodes(2);
1096}
1097
1098/*
1099 * test ALT>=PRI (signed)
1100 */
1101void
1102os_ge(void)
1103{
1104 stgwrite("\txchg\n");
1105 stgwrite("\tsgeq\n");
1106 code_idx += opcodes(2);
1107}
1108
1109/*
1110 * logical negation of primary register
1111 */
1112void
1113lneg(void)
1114{
1115 stgwrite("\tnot\n");
1116 code_idx += opcodes(1);
1117}
1118
1119/*
1120 * two's complement primary register
1121 */
1122void
1123neg(void)
1124{
1125 stgwrite("\tneg\n");
1126 code_idx += opcodes(1);
1127}
1128
1129/*
1130 * one's complement of primary register
1131 */
1132void
1133invert(void)
1134{
1135 stgwrite("\tinvert\n");
1136 code_idx += opcodes(1);
1137}
1138
1139/*
1140 * nop
1141 */
1142void
1143nooperation(void)
1144{
1145 stgwrite("\tnop\n");
1146 code_idx += opcodes(1);
1147}
1148
1149/* increment symbol
1150 */
1151void
1152inc(value * lval)
1153{
1154 symbol *sym;
1155
1156 sym = lval->sym;
1157 if (lval->ident == iARRAYCELL)
1158 {
1159 /* indirect increment, address already in PRI */
1160 stgwrite("\tinc.i\n");
1161 code_idx += opcodes(1);
1162 }
1163 else if (lval->ident == iARRAYCHAR)
1164 {
1165 /* indirect increment of single character, address already in PRI */
1166 stgwrite("\tpush.pri\n");
1167 stgwrite("\tpush.alt\n");
1168 stgwrite("\tmove.alt\n"); /* copy address */
1169 stgwrite("\tlodb.i "); /* read from PRI into PRI */
1170 outval(charbits / 8, TRUE); /* read one or two bytes */
1171 stgwrite("\tinc.pri\n");
1172 stgwrite("\tstrb.i "); /* write PRI to ALT */
1173 outval(charbits / 8, TRUE); /* write one or two bytes */
1174 stgwrite("\tpop.alt\n");
1175 stgwrite("\tpop.pri\n");
1176 code_idx += opcodes(8) + opargs(2);
1177 }
1178 else if (lval->ident == iREFERENCE)
1179 {
1180 assert(sym != NULL);
1181 stgwrite("\tpush.pri\n");
1182 /* load dereferenced value */
1183 assert(sym->vclass == sLOCAL); /* global references don't exist in Small */
1184 if (sym->vclass == sLOCAL)
1185 stgwrite("\tlref.s.pri ");
1186 else
1187 stgwrite("\tlref.pri ");
1188 outval(sym->addr, TRUE);
1189 /* increment */
1190 stgwrite("\tinc.pri\n");
1191 /* store dereferenced value */
1192 if (sym->vclass == sLOCAL)
1193 stgwrite("\tsref.s.pri ");
1194 else
1195 stgwrite("\tsref.pri ");
1196 outval(sym->addr, TRUE);
1197 stgwrite("\tpop.pri\n");
1198 code_idx += opcodes(5) + opargs(2);
1199 }
1200 else
1201 {
1202 /* local or global variable */
1203 assert(sym != NULL);
1204 if (sym->vclass == sLOCAL)
1205 stgwrite("\tinc.s ");
1206 else
1207 stgwrite("\tinc ");
1208 outval(sym->addr, TRUE);
1209 code_idx += opcodes(1) + opargs(1);
1210 } /* if */
1211}
1212
1213/* decrement symbol
1214 *
1215 * in case of an integer pointer, the symbol must be incremented by 2.
1216 */
1217void
1218dec(value * lval)
1219{
1220 symbol *sym;
1221
1222 sym = lval->sym;
1223 if (lval->ident == iARRAYCELL)
1224 {
1225 /* indirect decrement, address already in PRI */
1226 stgwrite("\tdec.i\n");
1227 code_idx += opcodes(1);
1228 }
1229 else if (lval->ident == iARRAYCHAR)
1230 {
1231 /* indirect decrement of single character, address already in PRI */
1232 stgwrite("\tpush.pri\n");
1233 stgwrite("\tpush.alt\n");
1234 stgwrite("\tmove.alt\n"); /* copy address */
1235 stgwrite("\tlodb.i "); /* read from PRI into PRI */
1236 outval(charbits / 8, TRUE); /* read one or two bytes */
1237 stgwrite("\tdec.pri\n");
1238 stgwrite("\tstrb.i "); /* write PRI to ALT */
1239 outval(charbits / 8, TRUE); /* write one or two bytes */
1240 stgwrite("\tpop.alt\n");
1241 stgwrite("\tpop.pri\n");
1242 code_idx += opcodes(8) + opargs(2);
1243 }
1244 else if (lval->ident == iREFERENCE)
1245 {
1246 assert(sym != NULL);
1247 stgwrite("\tpush.pri\n");
1248 /* load dereferenced value */
1249 assert(sym->vclass == sLOCAL); /* global references don't exist in Small */
1250 if (sym->vclass == sLOCAL)
1251 stgwrite("\tlref.s.pri ");
1252 else
1253 stgwrite("\tlref.pri ");
1254 outval(sym->addr, TRUE);
1255 /* decrement */
1256 stgwrite("\tdec.pri\n");
1257 /* store dereferenced value */
1258 if (sym->vclass == sLOCAL)
1259 stgwrite("\tsref.s.pri ");
1260 else
1261 stgwrite("\tsref.pri ");
1262 outval(sym->addr, TRUE);
1263 stgwrite("\tpop.pri\n");
1264 code_idx += opcodes(5) + opargs(2);
1265 }
1266 else
1267 {
1268 /* local or global variable */
1269 assert(sym != NULL);
1270 if (sym->vclass == sLOCAL)
1271 stgwrite("\tdec.s ");
1272 else
1273 stgwrite("\tdec ");
1274 outval(sym->addr, TRUE);
1275 code_idx += opcodes(1) + opargs(1);
1276 } /* if */
1277}
1278
1279/*
1280 * Jumps to "label" if PRI != 0
1281 */
1282void
1283jmp_ne0(int number)
1284{
1285 stgwrite("\tjnz ");
1286 outval(number, TRUE);
1287 code_idx += opcodes(1) + opargs(1);
1288}
1289
1290/*
1291 * Jumps to "label" if PRI == 0
1292 */
1293void
1294jmp_eq0(int number)
1295{
1296 stgwrite("\tjzer ");
1297 outval(number, TRUE);
1298 code_idx += opcodes(1) + opargs(1);
1299}
1300
1301/* write a value in hexadecimal; optionally adds a newline */
1302void
1303outval(cell val, int newline)
1304{
1305 stgwrite(itoh(val));
1306 if (newline)
1307 stgwrite("\n");
1308}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc5.c b/libraries/embryo/src/bin/embryo_cc_sc5.c
deleted file mode 100644
index 57b1744..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc5.c
+++ /dev/null
@@ -1,154 +0,0 @@
1/* Small compiler - Error message system
2 * In fact a very simple system, using only 'panic mode'.
3 *
4 * Copyright (c) ITB CompuPhase, 1997-2003
5 *
6 * This software is provided "as-is", without any express or implied warranty.
7 * In no event will the authors be held liable for any damages arising from
8 * the use of this software.
9 *
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
13 *
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software in
16 * a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 * 3. This notice may not be removed or altered from any source distribution.
21 *
22 * Version: $Id: embryo_cc_sc5.c 61433 2011-07-16 23:19:02Z caro $
23 */
24
25
26#ifdef HAVE_CONFIG_H
27# include <config.h>
28#endif
29
30#include <stdio.h>
31#include <stdlib.h>
32#include <stdarg.h>
33#include <string.h>
34
35#ifdef HAVE_UNISTD_H
36# include <unistd.h>
37#endif
38
39#include "embryo_cc_sc.h"
40#include "embryo_cc_sc5.scp"
41
42static int errflag;
43static int errstart; /* line number at which the instruction started */
44
45/* error
46 *
47 * Outputs an error message (note: msg is passed optionally).
48 * If an error is found, the variable "errflag" is set and subsequent
49 * errors are ignored until lex() finds a semicolumn or a keyword
50 * (lex() resets "errflag" in that case).
51 *
52 * Global references: inpfname (referred to only)
53 * fline (referred to only)
54 * fcurrent (referred to only)
55 * errflag (altered)
56 */
57int
58error(int number, ...)
59{
60 static int lastline, lastfile, errorcount;
61 char *msg;
62 va_list argptr;
63 char string[1024];
64 int start;
65
66 /* errflag is reset on each semicolon.
67 * In a two-pass compiler, an error should not be reported twice. Therefore
68 * the error reporting is enabled only in the second pass (and only when
69 * actually producing output). Fatal errors may never be ignored.
70 */
71 if (((errflag) || (sc_status != statWRITE)) &&
72 ((number < 100) || (number >= 200)))
73 return 0;
74
75 if (number < 100)
76 {
77 msg = errmsg[number - 1];
78 errflag = TRUE; /* set errflag (skip rest of erroneous expression) */
79 errnum++;
80 }
81 else if (number < 200)
82 {
83 msg = fatalmsg[number - 100];
84 errnum++; /* a fatal error also counts as an error */
85 }
86 else
87 {
88 msg = warnmsg[number - 200];
89 warnnum++;
90 }
91
92 strexpand(string, (unsigned char *)msg, sizeof string, SCPACK_TABLE);
93
94 va_start(argptr, number);
95
96 start = (errstart == fline) ? -1 : errstart;
97
98 if (sc_error(number, string, inpfname, start, fline, argptr))
99 {
100 sc_closeasm(outf);
101 outf = NULL;
102 longjmp(errbuf, 3);
103 }
104
105 va_end(argptr);
106
107 if (((number >= 100) && (number < 200)) || (errnum > 250))
108 {
109 va_start(argptr, number);
110 sc_error(0, "\nCompilation aborted.", NULL, 0, 0, argptr);
111 va_end(argptr);
112
113 if (outf)
114 {
115 sc_closeasm(outf);
116 outf = NULL;
117 } /* if */
118 longjmp(errbuf, 2); /* fatal error, quit */
119 } /* if */
120
121 /* check whether we are seeing many errors on the same line */
122 if (((errstart < 0) && (lastline != fline)) ||
123 (lastline < errstart) || (lastline > fline) || (fcurrent != lastfile))
124 errorcount = 0;
125 lastline = fline;
126 lastfile = fcurrent;
127 if (number < 200)
128 errorcount++;
129 if (errorcount >= 3)
130 error(107); /* too many error/warning messages on one line */
131 return 0;
132}
133
134void
135errorset(int code)
136{
137 switch (code)
138 {
139 case sRESET:
140 errflag = FALSE; /* start reporting errors */
141 break;
142 case sFORCESET:
143 errflag = TRUE; /* stop reporting errors */
144 break;
145 case sEXPRMARK:
146 errstart = fline; /* save start line number */
147 break;
148 case sEXPRRELEASE:
149 errstart = -1; /* forget start line number */
150 break;
151 default:
152 break;
153 }
154}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc5.scp b/libraries/embryo/src/bin/embryo_cc_sc5.scp
deleted file mode 100644
index af3f352..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc5.scp
+++ /dev/null
@@ -1,317 +0,0 @@
1/* Small compiler - Error message strings (plain and compressed formats)
2 *
3 * Copyright (c) ITB CompuPhase, 2000-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_sc5.scp 35497 2008-08-17 07:44:18Z raster $
22 */
23
24int strexpand(char *dest, unsigned char *source, int maxlen,
25 unsigned char pairtable[128][2]);
26
27#define SCPACK_TABLE errstr_table
28/*-*SCPACK start of pair table, do not change or remove this line */
29unsigned char errstr_table[][2] = {
30 {101, 32}, {116, 32}, {111, 110}, {105, 110}, {97, 114}, {100, 32}, {105,
31 130},
32 {101, 114}, {101, 110}, {115, 32}, {97, 108}, {97, 116}, {117, 110}, {115,
33 34},
34 {37, 141}, {34, 142},
35 {109, 136}, {121, 32}, {97, 110}, {114, 101}, {99, 116}, {134, 32}, {110,
36 111},
37 {101, 133}, {118, 138}, {115, 105}, {98, 108}, {111, 114}, {115, 116},
38 {41, 10}, {109, 98}, {100, 101},
39 {117, 115}, {150, 129}, {102, 140}, {117, 144}, {162, 148}, {103, 163}, {132,
40 165},
41 {114, 97}, {105, 133}, {152, 168}, {99, 104}, {32, 143}, {97, 32}, {131,
42 169},
43 {97, 115}, {164, 149},
44 {111, 108}, {101, 120}, {97, 154}, {135, 32}, {132, 167}, {111, 102}, {105,
45 116},
46 {166, 129}, {101, 100}, {98, 128}, {178, 128}, {160, 129}, {105, 137},
47 {180, 145}, {121, 158}, {190, 176},
48 {109, 187}, {115, 191}, {118, 132}, {101, 10}, {115, 10}, {112, 147}, {155,
49 32},
50 {181, 32}, {159, 102}, {194, 105}, {99, 130}, {103, 32}, {201, 186}, {116,
51 111},
52 {34, 32}, {109, 97},
53 {153, 122}, {171, 10}, {104, 97}, {100, 105}, {108, 111}, {111, 112}, {200,
54 131},
55 {139, 134}, {213, 135}, {101, 137}, {202, 156}, {143, 157}, {138, 32},
56 {192, 185}, {58, 209}, {105, 99},
57 {112, 111}, {115, 115}, {110, 117}, {115, 117}, {146, 129}, {226, 158}, {229,
58 179},
59 {177, 197}, {231, 225}, {132, 97}, {98, 101}, {99, 111}, {216, 139}, {109,
60 139},
61 {116, 10}, {99, 146},
62 {44, 32}, {237, 170}, {131, 203}, {116, 104}, {117, 108}, {152, 117}, {108,
63 128},
64 {118, 128}, {101, 144}, {233, 148}, {174, 153}, {110, 32}, {131, 32},
65 {146, 32}, {239, 161}
66};
67/*-*SCPACK end of pair table, do not change or remove this line */
68
69static char *errmsg[] = {
70#ifdef SCPACK
71/*001*/ "expected token: \"%s\", but found \"%s\"\n",
72/*002*/ "only a single statement (or expression) can follow each \"case\"\n",
73/*003*/ "declaration of a local variable must appear in a compound block\n",
74/*004*/ "function \"%s\" is not implemented\n",
75/*005*/ "function may not have arguments\n",
76/*006*/ "must be assigned to an array\n",
77/*007*/ "assertion failed\n",
78/*008*/ "must be a constant expression; assumed zero\n",
79/*009*/ "invalid array size (negative or zero)\n",
80/*010*/ "invalid function or declaration\n",
81/*011*/ "invalid outside functions\n",
82/*012*/ "invalid function call, not a valid address\n",
83/*013*/ "no entry point (no public functions)\n",
84/*014*/ "invalid statement; not in switch\n",
85/*015*/ "\"default\" case must be the last case in switch statement\n",
86/*016*/ "multiple defaults in \"switch\"\n",
87/*017*/ "undefined symbol \"%s\"\n",
88/*018*/ "initialization data exceeds declared size\n",
89/*019*/ "not a label: \"%s\"\n",
90/*020*/ "invalid symbol name \"%s\"\n",
91/*021*/ "symbol already defined: \"%s\"\n",
92/*022*/ "must be lvalue (non-constant)\n",
93/*023*/ "array assignment must be simple assignment\n",
94/*024*/ "\"break\" or \"continue\" is out of context\n",
95/*025*/ "function heading differs from prototype\n",
96/*026*/ "no matching \"#if...\"\n",
97/*027*/ "invalid character constant\n",
98/*028*/ "invalid subscript (not an array or too many subscripts)\n",
99/*029*/ "invalid expression, assumed zero\n",
100/*030*/ "compound statement not closed at the end of file\n",
101/*031*/ "unknown directive\n",
102/*032*/ "array index out of bounds (variable \"%s\")\n",
103/*033*/ "array must be indexed (variable \"%s\")\n",
104/*034*/ "argument does not have a default value (argument %d)\n",
105/*035*/ "argument type mismatch (argument %d)\n",
106/*036*/ "empty statement\n",
107/*037*/ "invalid string (possibly non-terminated string)\n",
108/*038*/ "extra characters on line\n",
109/*039*/ "constant symbol has no size\n",
110/*040*/ "duplicate \"case\" label (value %d)\n",
111/*041*/ "invalid ellipsis, array size is not known\n",
112/*042*/ "invalid combination of class specifiers\n",
113/*043*/ "character constant exceeds range for packed string\n",
114/*044*/ "positional parameters must precede all named parameters\n",
115/*045*/ "too many function arguments\n",
116/*046*/ "unknown array size (variable \"%s\")\n",
117/*047*/ "array sizes must match\n",
118/*048*/ "array dimensions must match\n",
119/*049*/ "invalid line continuation\n",
120/*050*/ "invalid range\n",
121/*051*/ "invalid subscript, use \"[ ]\" operators on major dimensions\n",
122/*052*/ "only the last dimension may be variable length\n",
123/*053*/ "exceeding maximum number of dimensions\n",
124/*054*/ "unmatched closing brace\n",
125/*055*/ "start of function body without function header\n",
126/*056*/
127 "arrays, local variables and function arguments cannot be public (variable \"%s\")\n",
128/*057*/ "unfinished expression before compiler directive\n",
129/*058*/ "duplicate argument; same argument is passed twice\n",
130/*059*/ "function argument may not have a default value (variable \"%s\")\n",
131/*060*/ "multiple \"#else\" directives between \"#if ... #endif\"\n",
132/*061*/ "operator cannot be redefined\n",
133/*062*/ "number of operands does not fit the operator\n",
134/*063*/ "function result tag of operator \"%s\" must be \"%s\"\n",
135/*064*/ "cannot change predefined operators\n",
136/*065*/ "function argument may only have a single tag (argument %d)\n",
137/*066*/
138 "function argument may not be a reference argument or an array (argument \"%s\")\n",
139/*067*/
140 "variable cannot be both a reference and an array (variable \"%s\")\n",
141/*068*/ "invalid rational number precision in #pragma\n",
142/*069*/ "rational number format already defined\n",
143/*070*/ "rational number support was not enabled\n",
144/*071*/
145 "user-defined operator must be declared before use (function \"%s\")\n",
146/*072*/ "\"sizeof\" operator is invalid on \"function\" symbols\n",
147/*073*/ "function argument must be an array (argument \"%s\")\n",
148/*074*/ "#define pattern must start with an alphabetic character\n",
149/*075*/ "input line too long (after substitutions)\n"
150#else
151 "\261pe\224\227\315k\210:\253\360bu\201fo\214\205\217\012",
152 "\202l\221\254s\203g\366\234\213\370\201(\306\350\206) \357 f\260\324w ea\252 \042c\256e\042\012",
153 "\237cl\204\213\225\307\254\324c\334\314\300appe\204 \374\254\353m\340\214\205\232ock\012",
154 "\257\217 \274\241impl\370t\270\012",
155 "\257\317\221\241\322\367\246t\304",
156 "\335\372gn\227\315 \375\264y\012",
157 "\256s\207t\225fail\270\012",
158 "\335\254\332\344\350\206; \256\343m\227z\207o\012",
159 "\255\275\320\200(neg\213i\367\306z\207o\235",
160 "\255\257\306\237cl\204\327\012",
161 "\255out\231d\200\244\206\304",
162 "\255\257c\212l\360\241\254\251add\223s\304",
163 "\226 \210tr\221\340\203\201(\226 pu\232\337 \244\206s\235",
164 "\255\234\213\370t; \241\374sw\266\252\012",
165 "\042\310a\364t\316c\256\200\335\363\200l\256\201c\256\200\374sw\266\252 \234\213\370\356",
166 "m\364tip\366\310a\364t\211\374\042sw\266\252\042\012",
167 "\214\326\227\301\321",
168 "\203\266i\212iz\213\225d\213\254\261ce\270\211\237cl\204\227\320\303",
169 "\241\254la\352l\336",
170 "\255\301 nam\200\217\012",
171 "\301 \212\223ad\221\326\270\336",
172 "\335l\365\200(n\202-\332\222t\235",
173 "\275\372gn\220\201\335\231mp\366\372gn\220\356",
174 "\042b\223ak\316\306\042\312t\203ue\316\274ou\201\307\312t\261\356",
175 "\257head\362\323ff\207\211from pro\315typ\303",
176 "\226 \361\362\042#if...\042\012",
177 "\255\252\371\263\332\222\356",
178 "\255\343bscrip\201(\241\375\275\306\315o m\222\221\343bscripts\235",
179 "\255\350\206\360\256\343m\227z\207o\012",
180 "\353m\340\214\205\234\213\370\201\241c\324s\227a\201\363\200\210\205\307fil\303",
181 "\214k\226w\373\323\223\224iv\303",
182 "\275\203\237x ou\201\307bo\214d\211(\314\333",
183 "\275\335\203\237x\227(\314\333",
184 "\267do\331\241\322\367\254\310a\364\201\365\200(\267%d\235",
185 "\267typ\200mis\361 (\267%d\235",
186 "empt\221\234\213\370\356",
187 "\255\234r\362(\340s\231\232\221n\202-t\207m\203\213\227\234r\203g\235",
188 "\261t\247 \252\371\207\211\202 l\203\303",
189 "\332\344\301 \322\211\226 \320\303",
190 "dupl\337\213\200\042c\256e\316la\352l (\365\200%d\235",
191 "\255ellip\231s\360\275\320\200\274\241k\226wn\012",
192 "\255\353\236\203\213\225\307cl\256\211specifi\207\304",
193 "\252\371\263\332\344\261ce\270\211r\222g\200f\306pack\227\234r\203g\012",
194 "\340\231t\206\334p\351met\207\211\300\305c\270\200\212l nam\227p\351met\207\304",
195 "\315o m\222\221\257\246t\304",
196 "\214k\226w\373\275\320\200(\314\333",
197 "\275\320\331\300\361\012",
198 "\275\323\220s\206\211\300\361\012",
199 "\255l\203\200\312t\203u\327\012",
200 "\255r\222g\303",
201 "\255\343bscript\360\240\200\042[ ]\316\354\233\211\202 \317j\306\323\220s\206\304",
202 "\202l\221\363\200l\256\201\323\220s\225\317\221\271\314l\210g\363\012",
203 "\261ce\270\362\317ximum \346\307\323\220s\206\304",
204 "\214\361\227c\324s\362b\247c\303",
205 "\234\204\201\307\257bod\221w\266hou\201\257head\207\012",
206 "\264ys\360\324c\334\311\262\331\222\205\257\246t\211\376\271pu\232\337 (\314\333",
207 "\214f\203ish\227\350\225\352f\233\200\353mpil\263\323\223\224iv\303",
208 "dupl\337\213\200\246t; sam\200\267\274p\256s\227tw\337\303",
209 "\257\267\317\221\241\322\367\254\310a\364\201\365\200(\314\333",
210 "m\364tip\366\042#else\316\323\223\224iv\331\352twe\210 \042#if ... #\210\323f\042\012",
211 "\354\306\376\271\223\326\270\012",
212 "\346\307\330\222d\211do\331\241fi\201\363\200\354\233\012",
213 "\257\223\343l\201ta\313\307\354\233\253 \335\217\012",
214 "\376\252\222g\200\305\326\227\354\233\304",
215 "\257\267\317\221\202l\221\322\367\254s\203g\366ta\313(\267%d\235",
216 "\257\267\317\221\241\271\254\223f\207\210c\200\267\306\375\275(\267\333",
217 "\314\376\271bo\363 \254\223f\207\210c\200\222\205\375\275(\314\333",
218 "\255r\327\334\346\305cis\225\374#p\247g\317\012",
219 "r\327\334\346f\233\317\201\212\223ad\221\326\270\012",
220 "r\327\334\346\343pp\233\201wa\211\241\210\262\270\012",
221 "\240\207-\326\227\354\306\335\237cl\204\227\352f\233\200\240\200(\257\333",
222 "\042\320e\265\316\354\306\274\255\202 \042\244\206\316\301\304",
223 "\257\267\335\375\275(\267\333",
224 "#\326\200p\213t\207\373\300\234\204\201w\266h \375\212p\322\352t\337 \252\371\207\012",
225 "\203pu\201l\203\200\315o l\202\313(aft\263\343b\234\266ut\206s\235"
226#endif
227};
228
229static char *fatalmsg[] = {
230#ifdef SCPACK
231/*100*/ "cannot read from file: \"%s\"\n",
232/*101*/ "cannot write to file: \"%s\"\n",
233/*102*/ "table overflow: \"%s\"\n",
234 /* table can be: loop table
235 * literal table
236 * staging buffer
237 * parser stack (recursive include?)
238 * option table (response file)
239 * peephole optimizer table
240 */
241/*103*/ "insufficient memory\n",
242/*104*/ "invalid assembler instruction \"%s\"\n",
243/*105*/ "numeric overflow, exceeding capacity\n",
244/*106*/ "compaction buffer overflow\n",
245/*107*/ "too many error messages on one line\n"
246#else
247 "\376\223a\205from file\336",
248 "\376wr\266\200\315 file\336",
249 "t\272ov\207f\324w\336",
250 "\203\343ff\337i\210\201mem\233y\012",
251 "\255\256sem\232\263\203\234ru\224\225\217\012",
252 "\342m\207\337 ov\207f\324w\360\261ce\270\362capac\266y\012",
253 "\353mpa\224\225buff\263ov\207f\324w\012",
254 "\315o m\222\221\207r\306me\341ag\331\202 \202\200l\203\303"
255#endif
256};
257
258static char *warnmsg[] = {
259#ifdef SCPACK
260/*200*/ "symbol \"%s\" is truncated to %d characters\n",
261/*201*/ "redefinition of constant/macro (symbol \"%s\")\n",
262/*202*/ "number of arguments does not match definition\n",
263/*203*/ "symbol is never used: \"%s\"\n",
264/*204*/ "symbol is assigned a value that is never used: \"%s\"\n",
265/*205*/ "redundant code: constant expression is zero\n",
266/*206*/ "redundant test: constant expression is non-zero\n",
267/*207*/ "unknown #pragma\n",
268/*208*/ "function uses both \"return;\" and \"return <value>;\"\n",
269/*209*/ "function \"%s\" should return a value\n",
270/*210*/ "possible use of symbol before initialization: \"%s\"\n",
271/*211*/ "possibly unintended assignment\n",
272/*212*/ "possibly unintended bitwise operation\n",
273/*213*/ "tag mismatch\n",
274/*214*/ "possibly a \"const\" array argument was intended: \"%s\"\n",
275/*215*/ "expression has no effect\n",
276/*216*/ "nested comment\n",
277/*217*/ "loose indentation\n",
278/*218*/ "old style prototypes used with optional semicolumns\n",
279/*219*/ "local variable \"%s\" shadows a variable at a preceding level\n",
280/*220*/ "exported or native symbol \"%s\" is truncated to %d characters\n",
281/*221*/ "label name \"%s\" shadows tag name\n",
282/*222*/ "number of digits exceeds rational number precision\n",
283/*223*/ "redundant \"sizeof\": argument size is always 1 (symbol \"%s\")\n",
284/*224*/
285 "indeterminate array size in \"sizeof\" expression (symbol \"%s\")\n",
286/*225*/ "unreachable code\n",
287/*226*/ "a variable is assigned to itself (symbol \"%s\")\n"
288#else
289 "\301\253 \274tr\214c\213\227\315 %\205\252\371\207\304",
290 "\223\326\266\225\307\332\222t/\317cro (\301\253\235",
291 "\346\307\246t\211do\331\241\361 \326\266\206\012",
292 "\301 \274nev\263\240\270\336",
293 "\301 \274\372gn\227\254\365\200t\322\201\274nev\263\240\270\336",
294 "\223d\214d\344\353\237: \332\344\350\225\274z\207o\012",
295 "\223d\214d\344te\234: \332\344\350\225\274n\202-z\207o\012",
296 "\214k\226w\373#p\247g\317\012",
297 "\257\240\331bo\363 \042\223turn;\316\222\205\042\223tur\373<\365e>;\042\012",
298 "\257\217 sho\364\205\223tur\373\254\365\303",
299 "\340s\231\232\200\240\200\307\301 \352f\233\200\203\266i\212iz\327\336",
300 "\340s\231\232\221\214\203t\210d\227\372gn\220\356",
301 "\340s\231\232\221\214\203t\210d\227b\266wis\200\330\327\012",
302 "ta\313mis\361\012",
303 "\340s\231\232\221\254\042\332\316\275\267wa\211\203t\210\237d\336",
304 "\350\225\322\211\226 effe\224\012",
305 "ne\234\227\353m\220\356",
306 "\324os\200\203d\210t\327\012",
307 "\260\205\234y\366pro\315typ\331\240\227w\266h \325t\206\334sem\337\260umn\304",
308 "\324c\334\314\217 s\322dow\211\254\314a\201\254\305c\270\362level\012",
309 "\261p\233t\227\306n\213i\367\301\253 \274tr\214c\213\227\315 %\205\252\371\207\304",
310 "la\352l nam\200\217 s\322dow\211ta\313nam\303",
311 "\346\307\323g\266\211\261ce\270\211r\327\334\346\305cis\206\012",
312 "\223d\214d\344\042\320e\265\042: \267\320\200\274\212way\2111 (\301\253\235",
313 "\203\237t\207m\203\213\200\275\320\200\374\042\320e\265\316\350\225(\301\253\235",
314 "\214\223a\252\272\353\237\012",
315 "\254\314\274\372gn\227\315 \266self (\301\253\235"
316#endif
317};
diff --git a/libraries/embryo/src/bin/embryo_cc_sc6.c b/libraries/embryo/src/bin/embryo_cc_sc6.c
deleted file mode 100644
index 7ec6098..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc6.c
+++ /dev/null
@@ -1,1077 +0,0 @@
1/* Small compiler - Binary code generation (the "assembler")
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 *
5 * This software is provided "as-is", without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in
15 * a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * Version: $Id: embryo_cc_sc6.c 52451 2010-09-19 03:00:12Z raster $
22 */
23
24
25#ifdef HAVE_CONFIG_H
26# include <config.h>
27#endif
28
29#include <assert.h>
30#include <stdio.h>
31#include <stdlib.h> /* for macro max() */
32#include <string.h>
33#include <ctype.h>
34#include "embryo_cc_sc.h"
35
36typedef cell(*OPCODE_PROC) (FILE * fbin, char *params, cell opcode);
37
38typedef struct
39{
40 cell opcode;
41 char *name;
42 int segment; /* sIN_CSEG=parse in cseg, sIN_DSEG=parse in dseg */
43 OPCODE_PROC func;
44} OPCODE;
45
46static cell codeindex; /* similar to "code_idx" */
47static cell *lbltab; /* label table */
48static int writeerror;
49static int bytes_in, bytes_out;
50
51/* apparently, strtol() does not work correctly on very large (unsigned)
52 * hexadecimal values */
53static ucell
54hex2long(char *s, char **n)
55{
56 unsigned long result = 0L;
57 int negate = FALSE;
58 int digit;
59
60 /* ignore leading whitespace */
61 while (*s == ' ' || *s == '\t')
62 s++;
63
64 /* allow a negation sign to create the two's complement of numbers */
65 if (*s == '-')
66 {
67 negate = TRUE;
68 s++;
69 } /* if */
70
71 assert((*s >= '0' && *s <= '9') || (*s >= 'a' && *s <= 'f')
72 || (*s >= 'a' && *s <= 'f'));
73 for (;;)
74 {
75 if (*s >= '0' && *s <= '9')
76 digit = *s - '0';
77 else if (*s >= 'a' && *s <= 'f')
78 digit = *s - 'a' + 10;
79 else if (*s >= 'A' && *s <= 'F')
80 digit = *s - 'A' + 10;
81 else
82 break; /* probably whitespace */
83 result = (result << 4) | digit;
84 s++;
85 } /* for */
86 if (n)
87 *n = s;
88 if (negate)
89 result = (~result) + 1; /* take two's complement of the result */
90 return (ucell) result;
91}
92
93#ifdef WORDS_BIGENDIAN
94static short *
95align16(short *v)
96{
97 unsigned char *s = (unsigned char *)v;
98 unsigned char t;
99
100 /* swap two bytes */
101 t = s[0];
102 s[0] = s[1];
103 s[1] = t;
104 return v;
105}
106
107static long *
108align32(long *v)
109{
110 unsigned char *s = (unsigned char *)v;
111 unsigned char t;
112
113 /* swap outer two bytes */
114 t = s[0];
115 s[0] = s[3];
116 s[3] = t;
117 /* swap inner two bytes */
118 t = s[1];
119 s[1] = s[2];
120 s[2] = t;
121 return v;
122}
123#if defined BIT16
124#define aligncell(v) align16(v)
125#else
126#define aligncell(v) align32(v)
127#endif
128#else
129#define align16(v) (v)
130#define align32(v) (v)
131#define aligncell(v) (v)
132#endif
133
134static char *
135skipwhitespace(char *str)
136{
137 while (isspace(*str))
138 str++;
139 return str;
140}
141
142static char *
143stripcomment(char *str)
144{
145 char *ptr = strchr(str, ';');
146
147 if (ptr)
148 {
149 *ptr++ = '\n'; /* terminate the line, but leave the '\n' */
150 *ptr = '\0';
151 } /* if */
152 return str;
153}
154
155static void
156write_encoded(FILE * fbin, ucell * c, int num)
157{
158 assert(sizeof(cell) <= 4); /* code must be adjusted for larger cells */
159 assert(fbin != NULL);
160 while (num-- > 0)
161 {
162 if (sc_compress)
163 {
164 ucell p = (ucell) * c;
165 unsigned char t[5]; /* a 32-bit cell is encoded in max. 5 bytes (3 bytes for a 16-bit cell) */
166 unsigned char code;
167 int index;
168
169 for (index = 0; index < 5; index++)
170 {
171 t[index] = (unsigned char)(p & 0x7f); /* store 7 bits */
172 p >>= 7;
173 } /* for */
174 /* skip leading zeros */
175 while (index > 1 && t[index - 1] == 0
176 && (t[index - 2] & 0x40) == 0)
177 index--;
178 /* skip leading -1s *//* ??? for BIT16, check for index==3 && t[index-1]==0x03 */
179 if (index == 5 && t[index - 1] == 0x0f
180 && (t[index - 2] & 0x40) != 0)
181 index--;
182 while (index > 1 && t[index - 1] == 0x7f
183 && (t[index - 2] & 0x40) != 0)
184 index--;
185 /* write high byte first, write continuation bits */
186 assert(index > 0);
187 while (index-- > 0)
188 {
189 code =
190 (unsigned char)((index == 0) ? t[index]
191 : (t[index] | 0x80));
192 writeerror |= !sc_writebin(fbin, &code, 1);
193 bytes_out++;
194 } /* while */
195 bytes_in += sizeof *c;
196 assert(AMX_EXPANDMARGIN > 2);
197 if (bytes_out - bytes_in >= AMX_EXPANDMARGIN - 2)
198 error(106); /* compression buffer overflow */
199 }
200 else
201 {
202 assert((sc_lengthbin(fbin) % sizeof(cell)) == 0);
203 writeerror |= !sc_writebin(fbin, aligncell(c), sizeof *c);
204 } /* if */
205 c++;
206 } /* while */
207}
208
209#if defined __BORLANDC__ || defined __WATCOMC__
210#pragma argsused
211#endif
212
213static cell
214noop(FILE * fbin __UNUSED__, char *params __UNUSED__, cell opcode __UNUSED__)
215{
216 return 0;
217}
218
219#if defined __BORLANDC__ || defined __WATCOMC__
220#pragma argsused
221#endif
222
223static cell
224parm0(FILE * fbin, char *params __UNUSED__, cell opcode)
225{
226 if (fbin)
227 write_encoded(fbin, (ucell *) & opcode, 1);
228 return opcodes(1);
229}
230
231static cell
232parm1(FILE * fbin, char *params, cell opcode)
233{
234 ucell p = hex2long(params, NULL);
235
236 if (fbin)
237 {
238 write_encoded(fbin, (ucell *) & opcode, 1);
239 write_encoded(fbin, &p, 1);
240 } /* if */
241 return opcodes(1) + opargs(1);
242}
243
244static cell
245parm2(FILE * fbin, char *params, cell opcode)
246{
247 ucell p[2];
248
249 p[0] = hex2long(params, &params);
250 p[1] = hex2long(params, NULL);
251 if (fbin)
252 {
253 write_encoded(fbin, (ucell *) & opcode, 1);
254 write_encoded(fbin, p, 2);
255 } /* if */
256 return opcodes(1) + opargs(2);
257}
258
259#if defined __BORLANDC__ || defined __WATCOMC__
260#pragma argsused
261#endif
262
263static cell
264do_dump(FILE * fbin, char *params, cell opcode __UNUSED__)
265{
266 ucell p;
267 int num = 0;
268
269 while (*params != '\0')
270 {
271 p = hex2long(params, &params);
272 if (fbin)
273 write_encoded(fbin, &p, 1);
274 num++;
275 while (isspace(*params))
276 params++;
277 } /* while */
278 return num * sizeof(cell);
279}
280
281static cell
282do_call(FILE * fbin, char *params, cell opcode)
283{
284 char name[sNAMEMAX + 1];
285 int i;
286 symbol *sym;
287 ucell p;
288
289 for (i = 0; !isspace(*params); i++, params++)
290 {
291 assert(*params != '\0');
292 assert(i < sNAMEMAX);
293 name[i] = *params;
294 } /* for */
295 name[i] = '\0';
296
297 /* look up the function address; note that the correct file number must
298 * already have been set (in order for static globals to be found).
299 */
300 sym = findglb(name);
301 assert(sym != NULL);
302 assert(sym->ident == iFUNCTN || sym->ident == iREFFUNC);
303 assert(sym->vclass == sGLOBAL);
304
305 p = sym->addr;
306 if (fbin)
307 {
308 write_encoded(fbin, (ucell *) & opcode, 1);
309 write_encoded(fbin, &p, 1);
310 } /* if */
311 return opcodes(1) + opargs(1);
312}
313
314static cell
315do_jump(FILE * fbin, char *params, cell opcode)
316{
317 int i;
318 ucell p;
319
320 i = (int)hex2long(params, NULL);
321 assert(i >= 0 && i < labnum);
322
323 if (fbin)
324 {
325 assert(lbltab != NULL);
326 p = lbltab[i];
327 write_encoded(fbin, (ucell *) & opcode, 1);
328 write_encoded(fbin, &p, 1);
329 } /* if */
330 return opcodes(1) + opargs(1);
331}
332
333static cell
334do_file(FILE * fbin, char *params, cell opcode)
335{
336 ucell p, clen;
337 int len;
338
339 p = hex2long(params, &params);
340
341 /* remove leading and trailing white space from the filename */
342 while (isspace(*params))
343 params++;
344 len = strlen(params);
345 while (len > 0 && isspace(params[len - 1]))
346 len--;
347 params[len++] = '\0'; /* zero-terminate */
348 while (len % sizeof(cell) != 0)
349 params[len++] = '\0'; /* pad with zeros up to full cell */
350 assert(len > 0 && len < 256);
351 clen = len + sizeof(cell); /* add size of file ordinal */
352
353 if (fbin)
354 {
355 write_encoded(fbin, (ucell *) & opcode, 1);
356 write_encoded(fbin, &clen, 1);
357 write_encoded(fbin, &p, 1);
358 write_encoded(fbin, (ucell *) params, len / sizeof(cell));
359 } /* if */
360 return opcodes(1) + opargs(1) + clen; /* other argument is in clen */
361}
362
363static cell
364do_symbol(FILE * fbin, char *params, cell opcode)
365{
366 char *endptr;
367 ucell offset, clen, flags;
368 int len;
369 unsigned char mclass, type;
370
371 for (endptr = params; !isspace(*endptr) && endptr != '\0'; endptr++)
372 /* nothing */ ;
373 assert(*endptr == ' ');
374
375 len = (int)(endptr - params);
376 assert(len > 0 && len < sNAMEMAX);
377 /* first get the other parameters from the line */
378 offset = hex2long(endptr, &endptr);
379 mclass = (unsigned char)hex2long(endptr, &endptr);
380 type = (unsigned char)hex2long(endptr, NULL);
381 flags = type + 256 * mclass;
382 /* now finish up the name (overwriting the input line) */
383 params[len++] = '\0'; /* zero-terminate */
384 while (len % sizeof(cell) != 0)
385 params[len++] = '\0'; /* pad with zeros up to full cell */
386 clen = len + 2 * sizeof(cell); /* add size of symbol address and flags */
387
388 if (fbin)
389 {
390 write_encoded(fbin, (ucell *) & opcode, 1);
391 write_encoded(fbin, &clen, 1);
392 write_encoded(fbin, &offset, 1);
393 write_encoded(fbin, &flags, 1);
394 write_encoded(fbin, (ucell *) params, len / sizeof(cell));
395 } /* if */
396
397#if !defined NDEBUG
398 /* function should start right after the symbolic information */
399 if (!fbin && mclass == 0 && type == iFUNCTN)
400 assert(offset == codeindex + opcodes(1) + opargs(1) + clen);
401#endif
402
403 return opcodes(1) + opargs(1) + clen; /* other 2 arguments are in clen */
404}
405
406static cell
407do_switch(FILE * fbin, char *params, cell opcode)
408{
409 int i;
410 ucell p;
411
412 i = (int)hex2long(params, NULL);
413 assert(i >= 0 && i < labnum);
414
415 if (fbin)
416 {
417 assert(lbltab != NULL);
418 p = lbltab[i];
419 write_encoded(fbin, (ucell *) & opcode, 1);
420 write_encoded(fbin, &p, 1);
421 } /* if */
422 return opcodes(1) + opargs(1);
423}
424
425#if defined __BORLANDC__ || defined __WATCOMC__
426#pragma argsused
427#endif
428
429static cell
430do_case(FILE * fbin, char *params, cell opcode __UNUSED__)
431{
432 int i;
433 ucell p, v;
434
435 v = hex2long(params, &params);
436 i = (int)hex2long(params, NULL);
437 assert(i >= 0 && i < labnum);
438
439 if (fbin)
440 {
441 assert(lbltab != NULL);
442 p = lbltab[i];
443 write_encoded(fbin, &v, 1);
444 write_encoded(fbin, &p, 1);
445 } /* if */
446 return opcodes(0) + opargs(2);
447}
448
449#if defined __BORLANDC__ || defined __WATCOMC__
450#pragma argsused
451#endif
452
453static cell
454curfile(FILE * fbin __UNUSED__, char *params, cell opcode __UNUSED__)
455{
456 fcurrent = (int)hex2long(params, NULL);
457 return 0;
458}
459
460static OPCODE opcodelist[] = {
461 /* node for "invalid instruction" */
462 {0, NULL, 0, noop},
463 /* opcodes in sorted order */
464 {78, "add", sIN_CSEG, parm0},
465 {87, "add.c", sIN_CSEG, parm1},
466 {14, "addr.alt", sIN_CSEG, parm1},
467 {13, "addr.pri", sIN_CSEG, parm1},
468 {30, "align.alt", sIN_CSEG, parm1},
469 {29, "align.pri", sIN_CSEG, parm1},
470 {81, "and", sIN_CSEG, parm0},
471 {121, "bounds", sIN_CSEG, parm1},
472 {49, "call", sIN_CSEG, do_call},
473 {50, "call.pri", sIN_CSEG, parm0},
474 {0, "case", sIN_CSEG, do_case},
475 {130, "casetbl", sIN_CSEG, parm0}, /* version 1 */
476 {118, "cmps", sIN_CSEG, parm1},
477 {0, "code", 0, noop},
478 {12, "const.alt", sIN_CSEG, parm1},
479 {11, "const.pri", sIN_CSEG, parm1},
480 {0, "curfile", sIN_CSEG, curfile},
481 {0, "data", 0, noop},
482 {114, "dec", sIN_CSEG, parm1},
483 {113, "dec.alt", sIN_CSEG, parm0},
484 {116, "dec.i", sIN_CSEG, parm0},
485 {112, "dec.pri", sIN_CSEG, parm0},
486 {115, "dec.s", sIN_CSEG, parm1},
487 {0, "dump", sIN_DSEG, do_dump},
488 {95, "eq", sIN_CSEG, parm0},
489 {106, "eq.c.alt", sIN_CSEG, parm1},
490 {105, "eq.c.pri", sIN_CSEG, parm1},
491 {124, "file", sIN_CSEG, do_file},
492 {119, "fill", sIN_CSEG, parm1},
493 {100, "geq", sIN_CSEG, parm0},
494 {99, "grtr", sIN_CSEG, parm0},
495 {120, "halt", sIN_CSEG, parm1},
496 {45, "heap", sIN_CSEG, parm1},
497 {27, "idxaddr", sIN_CSEG, parm0},
498 {28, "idxaddr.b", sIN_CSEG, parm1},
499 {109, "inc", sIN_CSEG, parm1},
500 {108, "inc.alt", sIN_CSEG, parm0},
501 {111, "inc.i", sIN_CSEG, parm0},
502 {107, "inc.pri", sIN_CSEG, parm0},
503 {110, "inc.s", sIN_CSEG, parm1},
504 {86, "invert", sIN_CSEG, parm0},
505 {55, "jeq", sIN_CSEG, do_jump},
506 {60, "jgeq", sIN_CSEG, do_jump},
507 {59, "jgrtr", sIN_CSEG, do_jump},
508 {58, "jleq", sIN_CSEG, do_jump},
509 {57, "jless", sIN_CSEG, do_jump},
510 {56, "jneq", sIN_CSEG, do_jump},
511 {54, "jnz", sIN_CSEG, do_jump},
512 {52, "jrel", sIN_CSEG, parm1}, /* always a number */
513 {64, "jsgeq", sIN_CSEG, do_jump},
514 {63, "jsgrtr", sIN_CSEG, do_jump},
515 {62, "jsleq", sIN_CSEG, do_jump},
516 {61, "jsless", sIN_CSEG, do_jump},
517 {51, "jump", sIN_CSEG, do_jump},
518 {128, "jump.pri", sIN_CSEG, parm0}, /* version 1 */
519 {53, "jzer", sIN_CSEG, do_jump},
520 {31, "lctrl", sIN_CSEG, parm1},
521 {98, "leq", sIN_CSEG, parm0},
522 {97, "less", sIN_CSEG, parm0},
523 {25, "lidx", sIN_CSEG, parm0},
524 {26, "lidx.b", sIN_CSEG, parm1},
525 {125, "line", sIN_CSEG, parm2},
526 {2, "load.alt", sIN_CSEG, parm1},
527 {9, "load.i", sIN_CSEG, parm0},
528 {1, "load.pri", sIN_CSEG, parm1},
529 {4, "load.s.alt", sIN_CSEG, parm1},
530 {3, "load.s.pri", sIN_CSEG, parm1},
531 {10, "lodb.i", sIN_CSEG, parm1},
532 {6, "lref.alt", sIN_CSEG, parm1},
533 {5, "lref.pri", sIN_CSEG, parm1},
534 {8, "lref.s.alt", sIN_CSEG, parm1},
535 {7, "lref.s.pri", sIN_CSEG, parm1},
536 {34, "move.alt", sIN_CSEG, parm0},
537 {33, "move.pri", sIN_CSEG, parm0},
538 {117, "movs", sIN_CSEG, parm1},
539 {85, "neg", sIN_CSEG, parm0},
540 {96, "neq", sIN_CSEG, parm0},
541 {134, "nop", sIN_CSEG, parm0}, /* version 6 */
542 {84, "not", sIN_CSEG, parm0},
543 {82, "or", sIN_CSEG, parm0},
544 {43, "pop.alt", sIN_CSEG, parm0},
545 {42, "pop.pri", sIN_CSEG, parm0},
546 {46, "proc", sIN_CSEG, parm0},
547 {40, "push", sIN_CSEG, parm1},
548 {37, "push.alt", sIN_CSEG, parm0},
549 {39, "push.c", sIN_CSEG, parm1},
550 {36, "push.pri", sIN_CSEG, parm0},
551 {38, "push.r", sIN_CSEG, parm1},
552 {41, "push.s", sIN_CSEG, parm1},
553 {133, "pushaddr", sIN_CSEG, parm1}, /* version 4 */
554 {47, "ret", sIN_CSEG, parm0},
555 {48, "retn", sIN_CSEG, parm0},
556 {32, "sctrl", sIN_CSEG, parm1},
557 {73, "sdiv", sIN_CSEG, parm0},
558 {74, "sdiv.alt", sIN_CSEG, parm0},
559 {104, "sgeq", sIN_CSEG, parm0},
560 {103, "sgrtr", sIN_CSEG, parm0},
561 {65, "shl", sIN_CSEG, parm0},
562 {69, "shl.c.alt", sIN_CSEG, parm1},
563 {68, "shl.c.pri", sIN_CSEG, parm1},
564 {66, "shr", sIN_CSEG, parm0},
565 {71, "shr.c.alt", sIN_CSEG, parm1},
566 {70, "shr.c.pri", sIN_CSEG, parm1},
567 {94, "sign.alt", sIN_CSEG, parm0},
568 {93, "sign.pri", sIN_CSEG, parm0},
569 {102, "sleq", sIN_CSEG, parm0},
570 {101, "sless", sIN_CSEG, parm0},
571 {72, "smul", sIN_CSEG, parm0},
572 {88, "smul.c", sIN_CSEG, parm1},
573 {127, "srange", sIN_CSEG, parm2}, /* version 1 */
574 {20, "sref.alt", sIN_CSEG, parm1},
575 {19, "sref.pri", sIN_CSEG, parm1},
576 {22, "sref.s.alt", sIN_CSEG, parm1},
577 {21, "sref.s.pri", sIN_CSEG, parm1},
578 {67, "sshr", sIN_CSEG, parm0},
579 {44, "stack", sIN_CSEG, parm1},
580 {0, "stksize", 0, noop},
581 {16, "stor.alt", sIN_CSEG, parm1},
582 {23, "stor.i", sIN_CSEG, parm0},
583 {15, "stor.pri", sIN_CSEG, parm1},
584 {18, "stor.s.alt", sIN_CSEG, parm1},
585 {17, "stor.s.pri", sIN_CSEG, parm1},
586 {24, "strb.i", sIN_CSEG, parm1},
587 {79, "sub", sIN_CSEG, parm0},
588 {80, "sub.alt", sIN_CSEG, parm0},
589 {132, "swap.alt", sIN_CSEG, parm0}, /* version 4 */
590 {131, "swap.pri", sIN_CSEG, parm0}, /* version 4 */
591 {129, "switch", sIN_CSEG, do_switch}, /* version 1 */
592 {126, "symbol", sIN_CSEG, do_symbol},
593 {136, "symtag", sIN_CSEG, parm1}, /* version 7 */
594 {123, "sysreq.c", sIN_CSEG, parm1},
595 {135, "sysreq.d", sIN_CSEG, parm1}, /* version 7, not generated directly */
596 {122, "sysreq.pri", sIN_CSEG, parm0},
597 {76, "udiv", sIN_CSEG, parm0},
598 {77, "udiv.alt", sIN_CSEG, parm0},
599 {75, "umul", sIN_CSEG, parm0},
600 {35, "xchg", sIN_CSEG, parm0},
601 {83, "xor", sIN_CSEG, parm0},
602 {91, "zero", sIN_CSEG, parm1},
603 {90, "zero.alt", sIN_CSEG, parm0},
604 {89, "zero.pri", sIN_CSEG, parm0},
605 {92, "zero.s", sIN_CSEG, parm1},
606};
607
608#define MAX_INSTR_LEN 30
609static int
610findopcode(char *instr, int maxlen)
611{
612 int low, high, mid, cmp;
613 char str[MAX_INSTR_LEN];
614
615 if (maxlen >= MAX_INSTR_LEN)
616 return 0;
617 strncpy(str, instr, maxlen);
618 str[maxlen] = '\0'; /* make sure the string is zero terminated */
619 /* look up the instruction with a binary search
620 * the assembler is case insensitive to instructions (but case sensitive
621 * to symbols)
622 */
623 low = 1; /* entry 0 is reserved (for "not found") */
624 high = (sizeof opcodelist / sizeof opcodelist[0]) - 1;
625 while (low < high)
626 {
627 mid = (low + high) / 2;
628 assert(opcodelist[mid].name != NULL);
629 cmp = strcasecmp(str, opcodelist[mid].name);
630 if (cmp > 0)
631 low = mid + 1;
632 else
633 high = mid;
634 } /* while */
635
636 assert(low == high);
637 if (strcasecmp(str, opcodelist[low].name) == 0)
638 return low; /* found */
639 return 0; /* not found, return special index */
640}
641
642void
643assemble(FILE * fout, FILE * fin)
644{
645 typedef struct tagFUNCSTUB
646 {
647 unsigned int address, nameofs;
648 } FUNCSTUB;
649 AMX_HEADER hdr;
650 FUNCSTUB func;
651 int numpublics, numnatives, numlibraries, numpubvars,
652 numtags, padding;
653 long nametablesize, nameofs;
654 char line[256], *instr, *params;
655 int i, pass;
656 short count;
657 symbol *sym, **nativelist;
658 constvalue *constptr;
659 cell mainaddr;
660 int nametable, tags, libraries, publics, natives, pubvars;
661 int cod, defsize;
662
663#if !defined NDEBUG
664 /* verify that the opcode list is sorted (skip entry 1; it is reserved
665 * for a non-existent opcode)
666 */
667 assert(opcodelist[1].name != NULL);
668 for (i = 2; i < (int)(sizeof(opcodelist) / sizeof(opcodelist[0])); i++)
669 {
670 assert(opcodelist[i].name != NULL);
671 assert(strcasecmp(opcodelist[i].name, opcodelist[i - 1].name) > 0);
672 } /* for */
673#endif
674
675 writeerror = FALSE;
676 nametablesize = sizeof(short);
677 numpublics = 0;
678 numnatives = 0;
679 numpubvars = 0;
680 mainaddr = -1;
681 /* count number of public and native functions and public variables */
682 for (sym = glbtab.next; sym; sym = sym->next)
683 {
684 char alias[sNAMEMAX + 1] = "";
685 int match = 0;
686
687 if (sym->ident == iFUNCTN)
688 {
689 assert(strlen(sym->name) <= sNAMEMAX);
690 if ((sym->usage & uNATIVE) != 0 && (sym->usage & uREAD) != 0
691 && sym->addr >= 0)
692 {
693 match = ++numnatives;
694 if (!lookup_alias(alias, sym->name))
695 strcpy(alias, sym->name);
696 } /* if */
697 if ((sym->usage & uPUBLIC) != 0 && (sym->usage & uDEFINE) != 0)
698 {
699 match = ++numpublics;
700 strcpy(alias, sym->name);
701 } /* if */
702 if (strcmp(sym->name, uMAINFUNC) == 0)
703 {
704 assert(sym->vclass == sGLOBAL);
705 mainaddr = sym->addr;
706 } /* if */
707 }
708 else if (sym->ident == iVARIABLE)
709 {
710 if ((sym->usage & uPUBLIC) != 0)
711 {
712 match = ++numpubvars;
713 strcpy(alias, sym->name);
714 } /* if */
715 } /* if */
716 if (match)
717 {
718 assert(alias[0] != '\0');
719 nametablesize += strlen(alias) + 1;
720 } /* if */
721 } /* for */
722 assert(numnatives == ntv_funcid);
723
724 /* count number of libraries */
725 numlibraries = 0;
726 for (constptr = libname_tab.next; constptr;
727 constptr = constptr->next)
728 {
729 if (constptr->value > 0)
730 {
731 assert(constptr->name[0] != '\0');
732 numlibraries++;
733 nametablesize += strlen(constptr->name) + 1;
734 } /* if */
735 } /* for */
736
737 /* count number of public tags */
738 numtags = 0;
739 for (constptr = tagname_tab.next; constptr;
740 constptr = constptr->next)
741 {
742 if ((constptr->value & PUBLICTAG) != 0)
743 {
744 assert(constptr->name[0] != '\0');
745 numtags++;
746 nametablesize += strlen(constptr->name) + 1;
747 } /* if */
748 } /* for */
749
750 /* pad the header to sc_dataalign
751 * => thereby the code segment is aligned
752 * => since the code segment is padded to a sc_dataalign boundary, the data segment is aligned
753 * => and thereby the stack top is aligned too
754 */
755 assert(sc_dataalign != 0);
756 padding = sc_dataalign - (sizeof hdr + nametablesize) % sc_dataalign;
757 if (padding == sc_dataalign)
758 padding = 0;
759
760 /* write the abstract machine header */
761 memset(&hdr, 0, sizeof hdr);
762 hdr.magic = (unsigned short)0xF1E0;
763 hdr.file_version = CUR_FILE_VERSION;
764 hdr.amx_version = MIN_AMX_VERSION;
765 hdr.flags = (short)(sc_debug & sSYMBOLIC);
766 if (charbits == 16)
767 hdr.flags |= AMX_FLAG_CHAR16;
768 if (sc_compress)
769 hdr.flags |= AMX_FLAG_COMPACT;
770 if (sc_debug == 0)
771 hdr.flags |= AMX_FLAG_NOCHECKS;
772// #ifdef WORDS_BIGENDIAN
773// hdr.flags|=AMX_FLAG_BIGENDIAN;
774// #endif
775 defsize = hdr.defsize = sizeof(FUNCSTUB);
776 assert((hdr.defsize % sizeof(cell)) == 0);
777 publics = hdr.publics = sizeof hdr; /* public table starts right after the header */
778 natives = hdr.natives = hdr.publics + numpublics * sizeof(FUNCSTUB);
779 libraries = hdr.libraries = hdr.natives + numnatives * sizeof(FUNCSTUB);
780 pubvars = hdr.pubvars = hdr.libraries + numlibraries * sizeof(FUNCSTUB);
781 tags = hdr.tags = hdr.pubvars + numpubvars * sizeof(FUNCSTUB);
782 nametable = hdr.nametable = hdr.tags + numtags * sizeof(FUNCSTUB);
783 cod = hdr.cod = hdr.nametable + nametablesize + padding;
784 hdr.dat = hdr.cod + code_idx;
785 hdr.hea = hdr.dat + glb_declared * sizeof(cell);
786 hdr.stp = hdr.hea + sc_stksize * sizeof(cell);
787 hdr.cip = mainaddr;
788 hdr.size = hdr.hea; /* preset, this is incorrect in case of compressed output */
789#ifdef WORDS_BIGENDIAN
790 align32(&hdr.size);
791 align16(&hdr.magic);
792 align16(&hdr.flags);
793 align16(&hdr.defsize);
794 align32(&hdr.cod);
795 align32(&hdr.dat);
796 align32(&hdr.hea);
797 align32(&hdr.stp);
798 align32(&hdr.cip);
799 align32(&hdr.publics);
800 align32(&hdr.natives);
801 align32(&hdr.libraries);
802 align32(&hdr.pubvars);
803 align32(&hdr.tags);
804 align32(&hdr.nametable);
805#endif
806 sc_writebin(fout, &hdr, sizeof hdr);
807
808 /* dump zeros up to the rest of the header, so that we can easily "seek" */
809 for (nameofs = sizeof hdr; nameofs < cod; nameofs++)
810 putc(0, fout);
811 nameofs = nametable + sizeof(short);
812
813 /* write the public functions table */
814 count = 0;
815 for (sym = glbtab.next; sym; sym = sym->next)
816 {
817 if (sym->ident == iFUNCTN
818 && (sym->usage & uPUBLIC) != 0 && (sym->usage & uDEFINE) != 0)
819 {
820 assert(sym->vclass == sGLOBAL);
821 func.address = sym->addr;
822 func.nameofs = nameofs;
823#ifdef WORDS_BIGENDIAN
824 align32(&func.address);
825 align32(&func.nameofs);
826#endif
827 fseek(fout, publics + count * sizeof(FUNCSTUB), SEEK_SET);
828 sc_writebin(fout, &func, sizeof func);
829 fseek(fout, nameofs, SEEK_SET);
830 sc_writebin(fout, sym->name, strlen(sym->name) + 1);
831 nameofs += strlen(sym->name) + 1;
832 count++;
833 } /* if */
834 } /* for */
835
836 /* write the natives table */
837 /* The native functions must be written in sorted order. (They are
838 * sorted on their "id", not on their name). A nested loop to find
839 * each successive function would be an O(n^2) operation. But we
840 * do not really need to sort, because the native function id's
841 * are sequential and there are no duplicates. So we first walk
842 * through the complete symbol list and store a pointer to every
843 * native function of interest in a temporary table, where its id
844 * serves as the index in the table. Now we can walk the table and
845 * have all native functions in sorted order.
846 */
847 if (numnatives > 0)
848 {
849 nativelist = (symbol **) malloc(numnatives * sizeof(symbol *));
850 if (!nativelist)
851 error(103); /* insufficient memory */
852#if !defined NDEBUG
853 memset(nativelist, 0, numnatives * sizeof(symbol *)); /* for NULL checking */
854#endif
855 for (sym = glbtab.next; sym; sym = sym->next)
856 {
857 if (sym->ident == iFUNCTN && (sym->usage & uNATIVE) != 0
858 && (sym->usage & uREAD) != 0 && sym->addr >= 0)
859 {
860 assert(sym->addr < numnatives);
861 nativelist[(int)sym->addr] = sym;
862 } /* if */
863 } /* for */
864 count = 0;
865 for (i = 0; i < numnatives; i++)
866 {
867 char alias[sNAMEMAX + 1];
868
869 sym = nativelist[i];
870 assert(sym != NULL);
871 if (!lookup_alias(alias, sym->name))
872 {
873 assert(strlen(sym->name) <= sNAMEMAX);
874 strcpy(alias, sym->name);
875 } /* if */
876 assert(sym->vclass == sGLOBAL);
877 func.address = 0;
878 func.nameofs = nameofs;
879#ifdef WORDS_BIGENDIAN
880 align32(&func.address);
881 align32(&func.nameofs);
882#endif
883 fseek(fout, natives + count * sizeof(FUNCSTUB), SEEK_SET);
884 sc_writebin(fout, &func, sizeof func);
885 fseek(fout, nameofs, SEEK_SET);
886 sc_writebin(fout, alias, strlen(alias) + 1);
887 nameofs += strlen(alias) + 1;
888 count++;
889 } /* for */
890 free(nativelist);
891 } /* if */
892
893 /* write the libraries table */
894 count = 0;
895 for (constptr = libname_tab.next; constptr;
896 constptr = constptr->next)
897 {
898 if (constptr->value > 0)
899 {
900 assert(constptr->name[0] != '\0');
901 func.address = 0;
902 func.nameofs = nameofs;
903#ifdef WORDS_BIGENDIAN
904 align32(&func.address);
905 align32(&func.nameofs);
906#endif
907 fseek(fout, libraries + count * sizeof(FUNCSTUB), SEEK_SET);
908 sc_writebin(fout, &func, sizeof func);
909 fseek(fout, nameofs, SEEK_SET);
910 sc_writebin(fout, constptr->name, strlen(constptr->name) + 1);
911 nameofs += strlen(constptr->name) + 1;
912 count++;
913 } /* if */
914 } /* for */
915
916 /* write the public variables table */
917 count = 0;
918 for (sym = glbtab.next; sym; sym = sym->next)
919 {
920 if (sym->ident == iVARIABLE && (sym->usage & uPUBLIC) != 0)
921 {
922 assert((sym->usage & uDEFINE) != 0);
923 assert(sym->vclass == sGLOBAL);
924 func.address = sym->addr;
925 func.nameofs = nameofs;
926#ifdef WORDS_BIGENDIAN
927 align32(&func.address);
928 align32(&func.nameofs);
929#endif
930 fseek(fout, pubvars + count * sizeof(FUNCSTUB), SEEK_SET);
931 sc_writebin(fout, &func, sizeof func);
932 fseek(fout, nameofs, SEEK_SET);
933 sc_writebin(fout, sym->name, strlen(sym->name) + 1);
934 nameofs += strlen(sym->name) + 1;
935 count++;
936 } /* if */
937 } /* for */
938
939 /* write the public tagnames table */
940 count = 0;
941 for (constptr = tagname_tab.next; constptr;
942 constptr = constptr->next)
943 {
944 if ((constptr->value & PUBLICTAG) != 0)
945 {
946 assert(constptr->name[0] != '\0');
947 func.address = constptr->value & TAGMASK;
948 func.nameofs = nameofs;
949#ifdef WORDS_BIGENDIAN
950 align32(&func.address);
951 align32(&func.nameofs);
952#endif
953 fseek(fout, tags + count * sizeof(FUNCSTUB), SEEK_SET);
954 sc_writebin(fout, &func, sizeof func);
955 fseek(fout, nameofs, SEEK_SET);
956 sc_writebin(fout, constptr->name, strlen(constptr->name) + 1);
957 nameofs += strlen(constptr->name) + 1;
958 count++;
959 } /* if */
960 } /* for */
961
962 /* write the "maximum name length" field in the name table */
963 assert(nameofs == nametable + nametablesize);
964 fseek(fout, nametable, SEEK_SET);
965 count = sNAMEMAX;
966#ifdef WORDS_BIGENDIAN
967 align16(&count);
968#endif
969 sc_writebin(fout, &count, sizeof count);
970 fseek(fout, cod, SEEK_SET);
971
972 /* First pass: relocate all labels */
973 /* This pass is necessary because the code addresses of labels is only known
974 * after the peephole optimization flag. Labels can occur inside expressions
975 * (e.g. the conditional operator), which are optimized.
976 */
977 lbltab = NULL;
978 if (labnum > 0)
979 {
980 /* only very short programs have zero labels; no first pass is needed
981 * if there are no labels */
982 lbltab = (cell *) malloc(labnum * sizeof(cell));
983 if (!lbltab)
984 error(103); /* insufficient memory */
985 codeindex = 0;
986 sc_resetasm(fin);
987 while (sc_readasm(fin, line, sizeof line))
988 {
989 stripcomment(line);
990 instr = skipwhitespace(line);
991 /* ignore empty lines */
992 if (*instr == '\0')
993 continue;
994 if (tolower(*instr) == 'l' && *(instr + 1) == '.')
995 {
996 int lindex = (int)hex2long(instr + 2, NULL);
997
998 assert(lindex < labnum);
999 lbltab[lindex] = codeindex;
1000 }
1001 else
1002 {
1003 /* get to the end of the instruction (make use of the '\n' that fgets()
1004 * added at the end of the line; this way we will *always* drop on a
1005 * whitespace character) */
1006 for (params = instr; *params != '\0' && !isspace(*params);
1007 params++)
1008 /* nothing */ ;
1009 assert(params > instr);
1010 i = findopcode(instr, (int)(params - instr));
1011 if (!opcodelist[i].name)
1012 {
1013 *params = '\0';
1014 error(104, instr); /* invalid assembler instruction */
1015 } /* if */
1016 if (opcodelist[i].segment == sIN_CSEG)
1017 codeindex +=
1018 opcodelist[i].func(NULL, skipwhitespace(params),
1019 opcodelist[i].opcode);
1020 } /* if */
1021 } /* while */
1022 } /* if */
1023
1024 /* Second pass (actually 2 more passes, one for all code and one for all data) */
1025 bytes_in = 0;
1026 bytes_out = 0;
1027 for (pass = sIN_CSEG; pass <= sIN_DSEG; pass++)
1028 {
1029 sc_resetasm(fin);
1030 while (sc_readasm(fin, line, sizeof line))
1031 {
1032 stripcomment(line);
1033 instr = skipwhitespace(line);
1034 /* ignore empty lines and labels (labels have a special syntax, so these
1035 * must be parsed separately) */
1036 if (*instr == '\0' || (tolower(*instr) == 'l'
1037 && *(instr + 1) == '.'))
1038 continue;
1039 /* get to the end of the instruction (make use of the '\n' that fgets()
1040 * added at the end of the line; this way we will *always* drop on a
1041 * whitespace character) */
1042 for (params = instr; *params != '\0' && !isspace(*params);
1043 params++)
1044 /* nothing */ ;
1045 assert(params > instr);
1046 i = findopcode(instr, (int)(params - instr));
1047 assert(opcodelist[i].name != NULL);
1048 if (opcodelist[i].segment == pass)
1049 opcodelist[i].func(fout, skipwhitespace(params),
1050 opcodelist[i].opcode);
1051 } /* while */
1052 } /* for */
1053 if (bytes_out - bytes_in > 0)
1054 error(106); /* compression buffer overflow */
1055
1056 if (lbltab)
1057 {
1058 free(lbltab);
1059#if !defined NDEBUG
1060 lbltab = NULL;
1061#endif
1062 } /* if */
1063
1064 if (writeerror)
1065 error(101, "disk full");
1066
1067 /* adjust the header */
1068 if (sc_compress)
1069 {
1070 hdr.size = sc_lengthbin(fout);
1071#ifdef WORDS_BIGENDIAN
1072 align32(&hdr.size);
1073#endif
1074 sc_resetbin(fout); /* "size" is the very first field */
1075 sc_writebin(fout, &hdr.size, sizeof hdr.size);
1076 } /* if */
1077}
diff --git a/libraries/embryo/src/bin/embryo_cc_sc7.c b/libraries/embryo/src/bin/embryo_cc_sc7.c
deleted file mode 100644
index a2f9f4c..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc7.c
+++ /dev/null
@@ -1,688 +0,0 @@
1/* Small compiler - Staging buffer and optimizer
2 *
3 * The staging buffer
4 * ------------------
5 * The staging buffer allows buffered output of generated code, deletion
6 * of redundant code, optimization by a tinkering process and reversing
7 * the ouput of evaluated expressions (which is used for the reversed
8 * evaluation of arguments in functions).
9 * Initially, stgwrite() writes to the file directly, but after a call to
10 * stgset(TRUE), output is redirected to the buffer. After a call to
11 * stgset(FALSE), stgwrite()'s output is directed to the file again. Thus
12 * only one routine is used for writing to the output, which can be
13 * buffered output or direct output.
14 *
15 * staging buffer variables: stgbuf - the buffer
16 * stgidx - current index in the staging buffer
17 * staging - if true, write to the staging buffer;
18 * if false, write to file directly.
19 *
20 * Copyright (c) ITB CompuPhase, 1997-2003
21 *
22 * This software is provided "as-is", without any express or implied warranty.
23 * In no event will the authors be held liable for any damages arising from
24 * the use of this software.
25 *
26 * Permission is granted to anyone to use this software for any purpose,
27 * including commercial applications, and to alter it and redistribute it
28 * freely, subject to the following restrictions:
29 *
30 * 1. The origin of this software must not be misrepresented; you must not
31 * claim that you wrote the original software. If you use this software in
32 * a product, an acknowledgment in the product documentation would be
33 * appreciated but is not required.
34 * 2. Altered source versions must be plainly marked as such, and must not be
35 * misrepresented as being the original software.
36 * 3. This notice may not be removed or altered from any source distribution.
37 *
38 * Version: $Id: embryo_cc_sc7.c 52451 2010-09-19 03:00:12Z raster $
39 */
40
41
42#ifdef HAVE_CONFIG_H
43# include <config.h>
44#endif
45
46#include <assert.h>
47#include <stdio.h>
48#include <stdlib.h> /* for atoi() */
49#include <string.h>
50#include <ctype.h>
51
52#include "embryo_cc_sc.h"
53
54#if defined _MSC_VER
55#pragma warning(push)
56#pragma warning(disable:4125) /* decimal digit terminates octal escape sequence */
57#endif
58
59#include "embryo_cc_sc7.scp"
60
61#if defined _MSC_VER
62#pragma warning(pop)
63#endif
64
65static void stgstring(char *start, char *end);
66static void stgopt(char *start, char *end);
67
68#define sSTG_GROW 512
69#define sSTG_MAX 20480
70
71static char *stgbuf = NULL;
72static int stgmax = 0; /* current size of the staging buffer */
73
74#define CHECK_STGBUFFER(index) if ((int)(index)>=stgmax) grow_stgbuffer((index)+1)
75
76static void
77grow_stgbuffer(int requiredsize)
78{
79 char *p;
80 int clear = !stgbuf; /* if previously none, empty buffer explicitly */
81
82 assert(stgmax < requiredsize);
83 /* if the staging buffer (holding intermediate code for one line) grows
84 * over a few kBytes, there is probably a run-away expression
85 */
86 if (requiredsize > sSTG_MAX)
87 error(102, "staging buffer"); /* staging buffer overflow (fatal error) */
88 stgmax = requiredsize + sSTG_GROW;
89 if (stgbuf)
90 p = (char *)realloc(stgbuf, stgmax * sizeof(char));
91 else
92 p = (char *)malloc(stgmax * sizeof(char));
93 if (!p)
94 error(102, "staging buffer"); /* staging buffer overflow (fatal error) */
95 stgbuf = p;
96 if (clear)
97 *stgbuf = '\0';
98}
99
100void
101stgbuffer_cleanup(void)
102{
103 if (stgbuf)
104 {
105 free(stgbuf);
106 stgbuf = NULL;
107 stgmax = 0;
108 } /* if */
109}
110
111/* the variables "stgidx" and "staging" are declared in "scvars.c" */
112
113/* stgmark
114 *
115 * Copies a mark into the staging buffer. At this moment there are three
116 * possible marks:
117 * sSTARTREORDER identifies the beginning of a series of expression
118 * strings that must be written to the output file in
119 * reordered order
120 * sENDREORDER identifies the end of 'reverse evaluation'
121 * sEXPRSTART + idx only valid within a block that is evaluated in
122 * reordered order, it identifies the start of an
123 * expression; the "idx" value is the argument position
124 *
125 * Global references: stgidx (altered)
126 * stgbuf (altered)
127 * staging (referred to only)
128 */
129void
130stgmark(char mark)
131{
132 if (staging)
133 {
134 CHECK_STGBUFFER(stgidx);
135 stgbuf[stgidx++] = mark;
136 } /* if */
137}
138
139static int
140filewrite(char *str)
141{
142 if (sc_status == statWRITE)
143 return sc_writeasm(outf, str);
144 return TRUE;
145}
146
147/* stgwrite
148 *
149 * Writes the string "st" to the staging buffer or to the output file. In the
150 * case of writing to the staging buffer, the terminating byte of zero is
151 * copied too, but... the optimizer can only work on complete lines (not on
152 * fractions of it. Therefore if the string is staged, if the last character
153 * written to the buffer is a '\0' and the previous-to-last is not a '\n',
154 * the string is concatenated to the last string in the buffer (the '\0' is
155 * overwritten). This also means an '\n' used in the middle of a string isn't
156 * recognized and could give wrong results with the optimizer.
157 * Even when writing to the output file directly, all strings are buffered
158 * until a whole line is complete.
159 *
160 * Global references: stgidx (altered)
161 * stgbuf (altered)
162 * staging (referred to only)
163 */
164void
165stgwrite(char *st)
166{
167 int len;
168
169 CHECK_STGBUFFER(0);
170 if (staging)
171 {
172 if (stgidx >= 2 && stgbuf[stgidx - 1] == '\0'
173 && stgbuf[stgidx - 2] != '\n')
174 stgidx -= 1; /* overwrite last '\0' */
175 while (*st != '\0')
176 { /* copy to staging buffer */
177 CHECK_STGBUFFER(stgidx);
178 stgbuf[stgidx++] = *st++;
179 } /* while */
180 CHECK_STGBUFFER(stgidx);
181 stgbuf[stgidx++] = '\0';
182 }
183 else
184 {
185 CHECK_STGBUFFER(strlen(stgbuf) + strlen(st) + 1);
186 strcat(stgbuf, st);
187 len = strlen(stgbuf);
188 if (len > 0 && stgbuf[len - 1] == '\n')
189 {
190 filewrite(stgbuf);
191 stgbuf[0] = '\0';
192 } /* if */
193 } /* if */
194}
195
196/* stgout
197 *
198 * Writes the staging buffer to the output file via stgstring() (for
199 * reversing expressions in the buffer) and stgopt() (for optimizing). It
200 * resets "stgidx".
201 *
202 * Global references: stgidx (altered)
203 * stgbuf (referred to only)
204 * staging (referred to only)
205 */
206void
207stgout(int index)
208{
209 if (!staging)
210 return;
211 stgstring(&stgbuf[index], &stgbuf[stgidx]);
212 stgidx = index;
213}
214
215typedef struct
216{
217 char *start, *end;
218} argstack;
219
220/* stgstring
221 *
222 * Analyses whether code strings should be output to the file as they appear
223 * in the staging buffer or whether portions of it should be re-ordered.
224 * Re-ordering takes place in function argument lists; Small passes arguments
225 * to functions from right to left. When arguments are "named" rather than
226 * positional, the order in the source stream is indeterminate.
227 * This function calls itself recursively in case it needs to re-order code
228 * strings, and it uses a private stack (or list) to mark the start and the
229 * end of expressions in their correct (reversed) order.
230 * In any case, stgstring() sends a block as large as possible to the
231 * optimizer stgopt().
232 *
233 * In "reorder" mode, each set of code strings must start with the token
234 * sEXPRSTART, even the first. If the token sSTARTREORDER is represented
235 * by '[', sENDREORDER by ']' and sEXPRSTART by '|' the following applies:
236 * '[]...' valid, but useless; no output
237 * '[|...] valid, but useless; only one string
238 * '[|...|...] valid and useful
239 * '[...|...] invalid, first string doesn't start with '|'
240 * '[|...|] invalid
241 */
242static void
243stgstring(char *start, char *end)
244{
245 char *ptr;
246 int nest, argc, arg;
247 argstack *stack;
248
249 while (start < end)
250 {
251 if (*start == sSTARTREORDER)
252 {
253 start += 1; /* skip token */
254 /* allocate a argstack with sMAXARGS items */
255 stack = (argstack *) malloc(sMAXARGS * sizeof(argstack));
256 if (!stack)
257 error(103); /* insufficient memory */
258 nest = 1; /* nesting counter */
259 argc = 0; /* argument counter */
260 arg = -1; /* argument index; no valid argument yet */
261 do
262 {
263 switch (*start)
264 {
265 case sSTARTREORDER:
266 nest++;
267 start++;
268 break;
269 case sENDREORDER:
270 nest--;
271 start++;
272 break;
273 default:
274 if ((*start & sEXPRSTART) == sEXPRSTART)
275 {
276 if (nest == 1)
277 {
278 if (arg >= 0)
279 stack[arg].end = start - 1; /* finish previous argument */
280 arg = (unsigned char)*start - sEXPRSTART;
281 stack[arg].start = start + 1;
282 if (arg >= argc)
283 argc = arg + 1;
284 } /* if */
285 start++;
286 }
287 else
288 {
289 start += strlen(start) + 1;
290 } /* if */
291 } /* switch */
292 }
293 while (nest); /* enddo */
294 if (arg >= 0)
295 stack[arg].end = start - 1; /* finish previous argument */
296 while (argc > 0)
297 {
298 argc--;
299 stgstring(stack[argc].start, stack[argc].end);
300 } /* while */
301 free(stack);
302 }
303 else
304 {
305 ptr = start;
306 while (ptr < end && *ptr != sSTARTREORDER)
307 ptr += strlen(ptr) + 1;
308 stgopt(start, ptr);
309 start = ptr;
310 } /* if */
311 } /* while */
312}
313
314/* stgdel
315 *
316 * Scraps code from the staging buffer by resetting "stgidx" to "index".
317 *
318 * Global references: stgidx (altered)
319 * staging (referred to only)
320 */
321void
322stgdel(int index, cell code_index)
323{
324 if (staging)
325 {
326 stgidx = index;
327 code_idx = code_index;
328 } /* if */
329}
330
331int
332stgget(int *index, cell * code_index)
333{
334 if (staging)
335 {
336 *index = stgidx;
337 *code_index = code_idx;
338 } /* if */
339 return staging;
340}
341
342/* stgset
343 *
344 * Sets staging on or off. If it's turned off, the staging buffer must be
345 * initialized to an empty string. If it's turned on, the routine makes sure
346 * the index ("stgidx") is set to 0 (it should already be 0).
347 *
348 * Global references: staging (altered)
349 * stgidx (altered)
350 * stgbuf (contents altered)
351 */
352void
353stgset(int onoff)
354{
355 staging = onoff;
356 if (staging)
357 {
358 assert(stgidx == 0);
359 stgidx = 0;
360 CHECK_STGBUFFER(stgidx);
361 /* write any contents that may be put in the buffer by stgwrite()
362 * when "staging" was 0
363 */
364 if (stgbuf[0] != '\0')
365 filewrite(stgbuf);
366 } /* if */
367 stgbuf[0] = '\0';
368}
369
370/* phopt_init
371 * Initialize all sequence strings of the peehole optimizer. The strings
372 * are embedded in the .EXE file in compressed format, here we expand
373 * them (and allocate memory for the sequences).
374 */
375static SEQUENCE *sequences;
376
377int
378phopt_init(void)
379{
380 int number, i, len;
381 char str[160];
382
383 /* count number of sequences */
384 for (number = 0; sequences_cmp[number].find; number++)
385 /* nothing */ ;
386 number++; /* include an item for the NULL terminator */
387
388 if (!(sequences = (SEQUENCE *)malloc(number * sizeof(SEQUENCE))))
389 return FALSE;
390
391 /* pre-initialize all to NULL (in case of failure) */
392 for (i = 0; i < number; i++)
393 {
394 sequences[i].find = NULL;
395 sequences[i].replace = NULL;
396 sequences[i].savesize = 0;
397 } /* for */
398
399 /* expand all strings */
400 for (i = 0; i < number - 1; i++)
401 {
402 len =
403 strexpand(str, (unsigned char *)sequences_cmp[i].find, sizeof str,
404 SCPACK_TABLE);
405 assert(len <= (int)(sizeof(str)));
406 assert(len == (int)(strlen(str) + 1));
407 sequences[i].find = (char *)malloc(len);
408 if (sequences[i].find)
409 strcpy(sequences[i].find, str);
410 len =
411 strexpand(str, (unsigned char *)sequences_cmp[i].replace, sizeof str,
412 SCPACK_TABLE);
413 assert(len <= (int)(sizeof(str)));
414 assert(len == (int)(strlen(str) + 1));
415 sequences[i].replace = (char *)malloc(len);
416 if (sequences[i].replace)
417 strcpy(sequences[i].replace, str);
418 sequences[i].savesize = sequences_cmp[i].savesize;
419 if (!sequences[i].find || !sequences[i].replace)
420 return phopt_cleanup();
421 } /* for */
422
423 return TRUE;
424}
425
426int
427phopt_cleanup(void)
428{
429 int i;
430
431 if (sequences)
432 {
433 i = 0;
434 while (sequences[i].find || sequences[i].replace)
435 {
436 if (sequences[i].find)
437 free(sequences[i].find);
438 if (sequences[i].replace)
439 free(sequences[i].replace);
440 i++;
441 } /* while */
442 free(sequences);
443 sequences = NULL;
444 } /* if */
445 return FALSE;
446}
447
448#define _maxoptvars 4
449#define _aliasmax 10 /* a 32-bit number can be represented in
450 * 9 decimal digits */
451
452static int
453matchsequence(char *start, char *end, char *pattern,
454 char symbols[_maxoptvars][_aliasmax + 1], int *match_length)
455{
456 int var, i;
457 char str[_aliasmax + 1];
458 char *start_org = start;
459
460 *match_length = 0;
461 for (var = 0; var < _maxoptvars; var++)
462 symbols[var][0] = '\0';
463
464 while (*start == '\t' || *start == ' ')
465 start++;
466 while (*pattern)
467 {
468 if (start >= end)
469 return FALSE;
470 switch (*pattern)
471 {
472 case '%': /* new "symbol" */
473 pattern++;
474 assert(isdigit(*pattern));
475 var = atoi(pattern) - 1;
476 assert(var >= 0 && var < _maxoptvars);
477 assert(alphanum(*start));
478 for (i = 0; start < end && alphanum(*start); i++, start++)
479 {
480 assert(i <= _aliasmax);
481 str[i] = *start;
482 } /* for */
483 str[i] = '\0';
484 if (symbols[var][0] != '\0')
485 {
486 if (strcmp(symbols[var], str) != 0)
487 return FALSE; /* symbols should be identical */
488 }
489 else
490 {
491 strcpy(symbols[var], str);
492 } /* if */
493 break;
494 case ' ':
495 if (*start != '\t' && *start != ' ')
496 return FALSE;
497 while ((start < end && *start == '\t') || *start == ' ')
498 start++;
499 break;
500 case '!':
501 while ((start < end && *start == '\t') || *start == ' ')
502 start++; /* skip trailing white space */
503 if (*start != '\n')
504 return FALSE;
505 assert(*(start + 1) == '\0');
506 start += 2; /* skip '\n' and '\0' */
507 if (*(pattern + 1) != '\0')
508 while ((start < end && *start == '\t') || *start == ' ')
509 start++; /* skip leading white space of next instruction */
510 break;
511 default:
512 if (tolower(*start) != tolower(*pattern))
513 return FALSE;
514 start++;
515 } /* switch */
516 pattern++;
517 } /* while */
518
519 *match_length = (int)(start - start_org);
520 return TRUE;
521}
522
523static char *
524replacesequence(char *pattern, char symbols[_maxoptvars][_aliasmax + 1],
525 int *repl_length)
526{
527 char *lptr;
528 int var;
529 char *buffer;
530
531 /* calculate the length of the new buffer
532 * this is the length of the pattern plus the length of all symbols (note
533 * that the same symbol may occur multiple times in the pattern) plus
534 * line endings and startings ('\t' to start a line and '\n\0' to end one)
535 */
536 assert(repl_length != NULL);
537 *repl_length = 0;
538 lptr = pattern;
539 while (*lptr)
540 {
541 switch (*lptr)
542 {
543 case '%':
544 lptr++; /* skip '%' */
545 assert(isdigit(*lptr));
546 var = atoi(lptr) - 1;
547 assert(var >= 0 && var < _maxoptvars);
548 assert(symbols[var][0] != '\0'); /* variable should be defined */
549 *repl_length += strlen(symbols[var]);
550 break;
551 case '!':
552 *repl_length += 3; /* '\t', '\n' & '\0' */
553 break;
554 default:
555 *repl_length += 1;
556 } /* switch */
557 lptr++;
558 } /* while */
559
560 /* allocate a buffer to replace the sequence in */
561 if (!(buffer = malloc(*repl_length)))
562 {
563 error(103);
564 return NULL;
565 }
566
567 /* replace the pattern into this temporary buffer */
568 lptr = buffer;
569 *lptr++ = '\t'; /* the "replace" patterns do not have tabs */
570 while (*pattern)
571 {
572 assert((int)(lptr - buffer) < *repl_length);
573 switch (*pattern)
574 {
575 case '%':
576 /* write out the symbol */
577 pattern++;
578 assert(isdigit(*pattern));
579 var = atoi(pattern) - 1;
580 assert(var >= 0 && var < _maxoptvars);
581 assert(symbols[var][0] != '\0'); /* variable should be defined */
582 strcpy(lptr, symbols[var]);
583 lptr += strlen(symbols[var]);
584 break;
585 case '!':
586 /* finish the line, optionally start the next line with an indent */
587 *lptr++ = '\n';
588 *lptr++ = '\0';
589 if (*(pattern + 1) != '\0')
590 *lptr++ = '\t';
591 break;
592 default:
593 *lptr++ = *pattern;
594 } /* switch */
595 pattern++;
596 } /* while */
597
598 assert((int)(lptr - buffer) == *repl_length);
599 return buffer;
600}
601
602static void
603strreplace(char *dest, char *replace, int sub_length, int repl_length,
604 int dest_length)
605{
606 int offset = sub_length - repl_length;
607
608 if (offset > 0) /* delete a section */
609 memmove(dest, dest + offset, dest_length - offset);
610 else if (offset < 0) /* insert a section */
611 memmove(dest - offset, dest, dest_length);
612 memcpy(dest, replace, repl_length);
613}
614
615/* stgopt
616 *
617 * Optimizes the staging buffer by checking for series of instructions that
618 * can be coded more compact. The routine expects the lines in the staging
619 * buffer to be separated with '\n' and '\0' characters.
620 *
621 * The longest sequences must be checked first.
622 */
623
624static void
625stgopt(char *start, char *end)
626{
627 char symbols[_maxoptvars][_aliasmax + 1];
628 int seq, match_length, repl_length;
629
630 assert(sequences != NULL);
631 while (start < end)
632 {
633 if ((sc_debug & sNOOPTIMIZE) != 0 || sc_status != statWRITE)
634 {
635 /* do not match anything if debug-level is maximum */
636 filewrite(start);
637 }
638 else
639 {
640 seq = 0;
641 while (sequences[seq].find)
642 {
643 assert(seq >= 0);
644 if (matchsequence
645 (start, end, sequences[seq].find, symbols, &match_length))
646 {
647 char *replace =
648 replacesequence(sequences[seq].replace, symbols,
649 &repl_length);
650 /* If the replacement is bigger than the original section, we may need
651 * to "grow" the staging buffer. This is quite complex, due to the
652 * re-ordering of expressions that can also happen in the staging
653 * buffer. In addition, it should not happen: the peephole optimizer
654 * must replace sequences with *shorter* sequences, not longer ones.
655 * So, I simply forbid sequences that are longer than the ones they
656 * are meant to replace.
657 */
658 assert(match_length >= repl_length);
659 if (match_length >= repl_length)
660 {
661 strreplace(start, replace, match_length,
662 repl_length, (int)(end - start));
663 end -= match_length - repl_length;
664 free(replace);
665 code_idx -= sequences[seq].savesize;
666 seq = 0; /* restart search for matches */
667 }
668 else
669 {
670 /* actually, we should never get here (match_length<repl_length) */
671 assert(0);
672 seq++;
673 } /* if */
674 }
675 else
676 {
677 seq++;
678 } /* if */
679 } /* while */
680 assert(sequences[seq].find == NULL);
681 filewrite(start);
682 } /* if */
683 assert(start < end);
684 start += strlen(start) + 1; /* to next string */
685 } /* while (start<end) */
686}
687
688#undef SCPACK_TABLE
diff --git a/libraries/embryo/src/bin/embryo_cc_sc7.scp b/libraries/embryo/src/bin/embryo_cc_sc7.scp
deleted file mode 100644
index 15c80ac..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sc7.scp
+++ /dev/null
@@ -1,1473 +0,0 @@
1/* Small compiler - Peephole optimizer "sequences" strings (plain
2 * and compressed formats)
3 *
4 * Copyright (c) ITB CompuPhase, 2000-2003
5 *
6 * This software is provided "as-is", without any express or implied warranty.
7 * In no event will the authors be held liable for any damages arising from
8 * the use of this software.
9 *
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
13 *
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software in
16 * a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 * 3. This notice may not be removed or altered from any source distribution.
21 *
22 * Version: $Id: embryo_cc_sc7.scp 35497 2008-08-17 07:44:18Z raster $
23 */
24
25int strexpand(char *dest, unsigned char *source, int maxlen,
26 unsigned char pairtable[128][2]);
27
28#define SCPACK_TERMINATOR , /* end each section with a comma */
29
30#define SCPACK_TABLE sequences_table
31/*-*SCPACK start of pair table, do not change or remove this line */
32unsigned char sequences_table[][2] = {
33 {32, 37}, {114, 105}, {112, 129}, {46, 130}, {49, 33}, {128, 132}, {97, 100},
34 {46, 97}, {135, 108}, {136, 116}, {111, 134}, {108, 138}, {50, 33}, {115,
35 104},
36 {128, 140}, {137, 33},
37 {46, 115}, {117, 141}, {112, 145}, {131, 133}, {139, 144}, {112, 143}, {131,
38 142},
39 {115, 116}, {111, 149}, {112, 152}, {131, 33}, {134, 100}, {110, 151},
40 {111, 156}, {99, 157}, {59, 36},
41 {146, 154}, {148, 150}, {112, 33}, {120, 162}, {101, 163}, {159, 164}, {137,
42 133},
43 {46, 99}, {122, 101}, {110, 100}, {155, 114}, {101, 113}, {168, 114},
44 {147, 160}, {51, 33}, {128, 174},
45 {103, 33}, {133, 165}, {104, 176}, {99, 178}, {120, 179}, {171, 33}, {106,
46 172},
47 {173, 161}, {155, 33}, {108, 167}, {117, 169}, {115, 175}, {186, 187},
48 {153, 184}, {141, 185}, {111, 188},
49 {98, 191}, {105, 100}, {115, 103}, {115, 108}, {193, 120}, {182, 133}, {114,
50 33},
51 {166, 161}, {190, 131}, {137, 142}, {169, 33}, {97, 202}, {139, 147},
52 {172, 111}, {158, 147}, {139, 150},
53 {105, 33}, {101, 115}, {209, 115}, {114, 116}, {148, 147}, {171, 133}, {189,
54 139},
55 {32, 140}, {146, 167}, {196, 170}, {158, 183}, {170, 183}, {199, 192},
56 {108, 196}, {97, 198}, {194, 211},
57 {46, 208}, {195, 210}, {200, 215}, {112, 222}, {159, 227}, {46, 98}, {118,
58 101},
59 {111, 230}, {109, 231}, {146, 143}, {99, 144}, {158, 150}, {97, 149},
60 {203, 153}, {52, 33}, {225, 33},
61 {158, 166}, {194, 181}, {195, 181}, {201, 180}, {223, 198}, {153, 203}, {214,
62 224},
63 {100, 101}, {128, 238}, {119, 236}, {249, 237}, {105, 110}, {115, 250},
64 {232, 143}, {205, 154}
65};
66/*-*SCPACK end of pair table, do not change or remove this line */
67
68#define seqsize(o,p) (opcodes(o)+opargs(p))
69typedef struct
70{
71 char *find;
72 char *replace;
73 int savesize; /* number of bytes saved (in bytecode) */
74} SEQUENCE;
75static SEQUENCE sequences_cmp[] = {
76 /* A very common sequence in four varieties
77 * load.s.pri n1 load.s.pri n2
78 * push.pri load.s.alt n1
79 * load.s.pri n2 -
80 * pop.alt -
81 * --------------------------------------
82 * load.pri n1 load.s.pri n2
83 * push.pri load.alt n1
84 * load.s.pri n2 -
85 * pop.alt -
86 * --------------------------------------
87 * load.s.pri n1 load.pri n2
88 * push.pri load.s.alt n1
89 * load.pri n2 -
90 * pop.alt -
91 * --------------------------------------
92 * load.pri n1 load.pri n2
93 * push.pri load.alt n1
94 * load.pri n2 -
95 * pop.alt -
96 */
97 {
98#ifdef SCPACK
99 "load.s.pri %1!push.pri!load.s.pri %2!pop.alt!",
100 "load.s.pri %2!load.s.alt %1!",
101#else
102 "\224\267\231",
103 "\241\224\246",
104#endif
105 seqsize(4, 2) - seqsize(2, 2)},
106 {
107#ifdef SCPACK
108 "load.pri %1!push.pri!load.s.pri %2!pop.alt!",
109 "load.s.pri %2!load.alt %1!",
110#else
111 "\213\267\231",
112 "\241\213\246",
113#endif
114 seqsize(4, 2) - seqsize(2, 2)},
115 {
116#ifdef SCPACK
117 "load.s.pri %1!push.pri!load.pri %2!pop.alt!",
118 "load.pri %2!load.s.alt %1!",
119#else
120 "\224\255\317\231",
121 "\317\224\246",
122#endif
123 seqsize(4, 2) - seqsize(2, 2)},
124 {
125#ifdef SCPACK
126 "load.pri %1!push.pri!load.pri %2!pop.alt!",
127 "load.pri %2!load.alt %1!",
128#else
129 "\213\255\317\231",
130 "\317\213\246",
131#endif
132 seqsize(4, 2) - seqsize(2, 2)},
133 /* (#1#) The above also occurs with "addr.pri" (array
134 * indexing) as the first line; so that adds 2 cases.
135 */
136 {
137#ifdef SCPACK
138 "addr.pri %1!push.pri!load.s.pri %2!pop.alt!",
139 "addr.alt %1!load.s.pri %2!",
140#else
141 "\333\231",
142 "\252\307",
143#endif
144 seqsize(4, 2) - seqsize(2, 2)},
145 {
146#ifdef SCPACK
147 "addr.pri %1!push.pri!load.pri %2!pop.alt!",
148 "addr.alt %1!load.pri %2!",
149#else
150 "\252\255\317\231",
151 "\252\246\317",
152#endif
153 seqsize(4, 2) - seqsize(2, 2)},
154 /* And the same sequence with const.pri as either the first
155 * or the second load instruction: four more cases.
156 */
157 {
158#ifdef SCPACK
159 "const.pri %1!push.pri!load.s.pri %2!pop.alt!",
160 "load.s.pri %2!const.alt %1!",
161#else
162 "\332\231",
163 "\241\360",
164#endif
165 seqsize(4, 2) - seqsize(2, 2)},
166 {
167#ifdef SCPACK
168 "const.pri %1!push.pri!load.pri %2!pop.alt!",
169 "load.pri %2!const.alt %1!",
170#else
171 "\236\255\317\231",
172 "\317\360",
173#endif
174 seqsize(4, 2) - seqsize(2, 2)},
175 {
176#ifdef SCPACK
177 "load.s.pri %1!push.pri!const.pri %2!pop.alt!",
178 "const.pri %2!load.s.alt %1!",
179#else
180 "\224\255\353\231",
181 "\353\224\246",
182#endif
183 seqsize(4, 2) - seqsize(2, 2)},
184 {
185#ifdef SCPACK
186 "load.pri %1!push.pri!const.pri %2!pop.alt!",
187 "const.pri %2!load.alt %1!",
188#else
189 "\213\255\353\231",
190 "\353\213\246",
191#endif
192 seqsize(4, 2) - seqsize(2, 2)},
193 /* The same as above, but now with "addr.pri" (array
194 * indexing) on the first line and const.pri on
195 * the second.
196 */
197 {
198#ifdef SCPACK
199 "addr.pri %1!push.pri!const.pri %2!pop.alt!",
200 "addr.alt %1!const.pri %2!",
201#else
202 "\252\255\353\231",
203 "\252\246\353",
204#endif
205 seqsize(4, 2) - seqsize(2, 2)},
206 /* ??? add references */
207 /* Chained relational operators can contain sequences like:
208 * move.pri load.s.pri n1
209 * push.pri -
210 * load.s.pri n1 -
211 * pop.alt -
212 * The above also accurs for "load.pri" and for "const.pri",
213 * so add another two cases.
214 */
215 {
216#ifdef SCPACK
217 "move.pri!push.pri!load.s.pri %1!pop.alt!",
218 "load.s.pri %1!",
219#else
220 "\350\232\240\324\231",
221 "\324",
222#endif
223 seqsize(4, 1) - seqsize(1, 1)},
224 {
225#ifdef SCPACK
226 "move.pri!push.pri!load.pri %1!pop.alt!",
227 "load.pri %1!",
228#else
229 "\350\232\240\314\231",
230 "\314",
231#endif
232 seqsize(4, 1) - seqsize(1, 1)},
233 {
234#ifdef SCPACK
235 "move.pri!push.pri!const.pri %1!pop.alt!",
236 "const.pri %1!",
237#else
238 "\350\232\240\316\231",
239 "\316",
240#endif
241 seqsize(4, 1) - seqsize(1, 1)},
242 /* More optimizations for chained relational operators; the
243 * continuation sequences can be simplified if they turn out
244 * to be termination sequences:
245 * xchg sless also for sless, sgeq and sleq
246 * sgrtr pop.alt
247 * swap.alt and
248 * and ;$exp
249 * pop.alt -
250 * ;$exp -
251 * --------------------------------------
252 * xchg sless also for sless, sgeq and sleq
253 * sgrtr pop.alt
254 * swap.alt and
255 * and jzer n1
256 * pop.alt -
257 * jzer n1 -
258 * --------------------------------------
259 * xchg jsgeq n1 also for sless, sgeq and sleq
260 * sgrtr ;$exp (occurs for non-chained comparisons)
261 * jzer n1 -
262 * ;$exp -
263 * --------------------------------------
264 * xchg sless also for sless, sgeq and sleq
265 * sgrtr ;$exp (occurs for non-chained comparisons)
266 * ;$exp -
267 */
268 {
269#ifdef SCPACK
270 "xchg!sgrtr!swap.alt!and!pop.alt!;$exp!",
271 "sless!pop.alt!and!;$exp!",
272#else
273 "\264\364\374\245",
274 "\357\365\245",
275#endif
276 seqsize(5, 0) - seqsize(3, 0)},
277 {
278#ifdef SCPACK
279 "xchg!sless!swap.alt!and!pop.alt!;$exp!",
280 "sgrtr!pop.alt!and!;$exp!",
281#else
282 "\264\357\374\245",
283 "\364\365\245",
284#endif
285 seqsize(5, 0) - seqsize(3, 0)},
286 {
287#ifdef SCPACK
288 "xchg!sgeq!swap.alt!and!pop.alt!;$exp!",
289 "sleq!pop.alt!and!;$exp!",
290#else
291 "\264\361\374\245",
292 "\362\365\245",
293#endif
294 seqsize(5, 0) - seqsize(3, 0)},
295 {
296#ifdef SCPACK
297 "xchg!sleq!swap.alt!and!pop.alt!;$exp!",
298 "sgeq!pop.alt!and!;$exp!",
299#else
300 "\264\362\374\245",
301 "\361\365\245",
302#endif
303 seqsize(5, 0) - seqsize(3, 0)},
304 {
305#ifdef SCPACK
306 "xchg!sgrtr!swap.alt!and!pop.alt!jzer %1!",
307 "sless!pop.alt!and!jzer %1!",
308#else
309 "\264\364\374\305",
310 "\357\365\305",
311#endif
312 seqsize(5, 0) - seqsize(3, 0)},
313 {
314#ifdef SCPACK
315 "xchg!sless!swap.alt!and!pop.alt!jzer %1!",
316 "sgrtr!pop.alt!and!jzer %1!",
317#else
318 "\264\357\374\305",
319 "\364\365\305",
320#endif
321 seqsize(5, 0) - seqsize(3, 0)},
322 {
323#ifdef SCPACK
324 "xchg!sgeq!swap.alt!and!pop.alt!jzer %1!",
325 "sleq!pop.alt!and!jzer %1!",
326#else
327 "\264\361\374\305",
328 "\362\365\305",
329#endif
330 seqsize(5, 0) - seqsize(3, 0)},
331 {
332#ifdef SCPACK
333 "xchg!sleq!swap.alt!and!pop.alt!jzer %1!",
334 "sgeq!pop.alt!and!jzer %1!",
335#else
336 "\264\362\374\305",
337 "\361\365\305",
338#endif
339 seqsize(5, 0) - seqsize(3, 0)},
340 {
341#ifdef SCPACK
342 "xchg!sgrtr!jzer %1!;$exp!",
343 "jsgeq %1!;$exp!",
344#else
345 "\264\364\266\261",
346 "j\302\253\261",
347#endif
348 seqsize(3, 1) - seqsize(1, 1)},
349 {
350#ifdef SCPACK
351 "xchg!sless!jzer %1!;$exp!",
352 "jsleq %1!;$exp!",
353#else
354 "\264\357\266\261",
355 "j\303\253\261",
356#endif
357 seqsize(3, 1) - seqsize(1, 1)},
358 {
359#ifdef SCPACK
360 "xchg!sgeq!jzer %1!;$exp!",
361 "jsgrtr %1!;$exp!",
362#else
363 "\264\361\266\261",
364 "j\337r\261",
365#endif
366 seqsize(3, 1) - seqsize(1, 1)},
367 {
368#ifdef SCPACK
369 "xchg!sleq!jzer %1!;$exp!",
370 "jsless %1!;$exp!",
371#else
372 "\264\362\266\261",
373 "j\341\261",
374#endif
375 seqsize(3, 1) - seqsize(1, 1)},
376 {
377#ifdef SCPACK
378 "xchg!sgrtr!;$exp!",
379 "sless!;$exp!",
380#else
381 "\264\364\245",
382 "\357\245",
383#endif
384 seqsize(2, 0) - seqsize(1, 0)},
385 {
386#ifdef SCPACK
387 "xchg!sless!;$exp!",
388 "sgrtr!;$exp!",
389#else
390 "\264\357\245",
391 "\364\245",
392#endif
393 seqsize(2, 0) - seqsize(1, 0)},
394 {
395#ifdef SCPACK
396 "xchg!sgeq!;$exp!",
397 "sleq!;$exp!",
398#else
399 "\264\361\245",
400 "\362\245",
401#endif
402 seqsize(2, 0) - seqsize(1, 0)},
403 {
404#ifdef SCPACK
405 "xchg!sleq!;$exp!",
406 "sgeq!;$exp!",
407#else
408 "\264\362\245",
409 "\361\245",
410#endif
411 seqsize(2, 0) - seqsize(1, 0)},
412 /* The entry to chained operators is also opt to optimization
413 * load.s.pri n1 load.s.pri n2
414 * load.s.alt n2 load.s.alt n1
415 * xchg -
416 * --------------------------------------
417 * load.s.pri n1 load.pri n2
418 * load.alt n2 load.s.alt n1
419 * xchg -
420 * --------------------------------------
421 * load.s.pri n1 const.pri n2
422 * const.alt n2 load.s.alt n1
423 * xchg -
424 * --------------------------------------
425 * and all permutations...
426 */
427 {
428#ifdef SCPACK
429 "load.s.pri %1!load.s.alt %2!xchg!",
430 "load.s.pri %2!load.s.alt %1!",
431#else
432 "\324\224\363",
433 "\241\224\246",
434#endif
435 seqsize(3, 2) - seqsize(2, 2)},
436 {
437#ifdef SCPACK
438 "load.s.pri %1!load.alt %2!xchg!",
439 "load.pri %2!load.s.alt %1!",
440#else
441 "\324\213\363",
442 "\317\224\246",
443#endif
444 seqsize(3, 2) - seqsize(2, 2)},
445 {
446#ifdef SCPACK
447 "load.s.pri %1!const.alt %2!xchg!",
448 "const.pri %2!load.s.alt %1!",
449#else
450 "\324\236\363",
451 "\353\224\246",
452#endif
453 seqsize(3, 2) - seqsize(2, 2)},
454 {
455#ifdef SCPACK
456 "load.pri %1!load.s.alt %2!xchg!",
457 "load.s.pri %2!load.alt %1!",
458#else
459 "\314\224\363",
460 "\241\213\246",
461#endif
462 seqsize(3, 2) - seqsize(2, 2)},
463 {
464#ifdef SCPACK
465 "load.pri %1!load.alt %2!xchg!",
466 "load.pri %2!load.alt %1!",
467#else
468 "\314\213\363",
469 "\317\213\246",
470#endif
471 seqsize(3, 2) - seqsize(2, 2)},
472 {
473#ifdef SCPACK
474 "load.pri %1!const.alt %2!xchg!",
475 "const.pri %2!load.alt %1!",
476#else
477 "\314\236\363",
478 "\353\213\246",
479#endif
480 seqsize(3, 2) - seqsize(2, 2)},
481 {
482#ifdef SCPACK
483 "const.pri %1!load.s.alt %2!xchg!",
484 "load.s.pri %2!const.alt %1!",
485#else
486 "\316\224\363",
487 "\241\360",
488#endif
489 seqsize(3, 2) - seqsize(2, 2)},
490 {
491#ifdef SCPACK
492 "const.pri %1!load.alt %2!xchg!",
493 "load.pri %2!const.alt %1!",
494#else
495 "\316\213\363",
496 "\317\360",
497#endif
498 seqsize(3, 2) - seqsize(2, 2)},
499 /* Array indexing can merit from special instructions.
500 * Simple indexed array lookup can be optimized quite
501 * a bit.
502 * addr.pri n1 addr.alt n1
503 * push.pri load.s.pri n2
504 * load.s.pri n2 bounds n3
505 * bounds n3 lidx.b n4
506 * shl.c.pri n4 -
507 * pop.alt -
508 * add -
509 * load.i -
510 *
511 * And to prepare for storing a value in an array
512 * addr.pri n1 addr.alt n1
513 * push.pri load.s.pri n2
514 * load.s.pri n2 bounds n3
515 * bounds n3 idxaddr.b n4
516 * shl.c.pri n4 -
517 * pop.alt -
518 * add -
519 *
520 * Notes (additional cases):
521 * 1. instruction addr.pri can also be const.pri (for
522 * global arrays)
523 * 2. the bounds instruction can be absent
524 * 3. when "n4" (the shift value) is the 2 (with 32-bit cels), use the
525 * even more optimal instructions LIDX and IDDXADDR
526 *
527 * If the array index is more complex, one can only optimize
528 * the last four instructions:
529 * shl.c.pri n1 pop.alt
530 * pop.alt lidx.b n1
531 * add -
532 * loadi -
533 * --------------------------------------
534 * shl.c.pri n1 pop.alt
535 * pop.alt idxaddr.b n1
536 * add -
537 */
538#if !defined BIT16
539 /* loading from array, "cell" shifted */
540 {
541#ifdef SCPACK
542 "addr.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri 2!pop.alt!add!load.i!",
543 "addr.alt %1!load.s.pri %2!bounds %3!lidx!",
544#else
545 "\333\300\342\366",
546 "\252\334\335!",
547#endif
548 seqsize(8, 4) - seqsize(4, 3)},
549 {
550#ifdef SCPACK
551 "const.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri 2!pop.alt!add!load.i!",
552 "const.alt %1!load.s.pri %2!bounds %3!lidx!",
553#else
554 "\332\300\342\366",
555 "\236\334\335!",
556#endif
557 seqsize(8, 4) - seqsize(4, 3)},
558 {
559#ifdef SCPACK
560 "addr.pri %1!push.pri!load.s.pri %2!shl.c.pri 2!pop.alt!add!load.i!",
561 "addr.alt %1!load.s.pri %2!lidx!",
562#else
563 "\333\342\366",
564 "\252\307\335!",
565#endif
566 seqsize(7, 3) - seqsize(3, 2)},
567 {
568#ifdef SCPACK
569 "const.pri %1!push.pri!load.s.pri %2!shl.c.pri 2!pop.alt!add!load.i!",
570 "const.alt %1!load.s.pri %2!lidx!",
571#else
572 "\332\342\366",
573 "\236\307\335!",
574#endif
575 seqsize(7, 3) - seqsize(3, 2)},
576#endif
577 /* loading from array, not "cell" shifted */
578 {
579#ifdef SCPACK
580 "addr.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri %4!pop.alt!add!load.i!",
581 "addr.alt %1!load.s.pri %2!bounds %3!lidx.b %4!",
582#else
583 "\333\300\310\370\366",
584 "\252\334\335\345\370",
585#endif
586 seqsize(8, 4) - seqsize(4, 4)},
587 {
588#ifdef SCPACK
589 "const.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri %4!pop.alt!add!load.i!",
590 "const.alt %1!load.s.pri %2!bounds %3!lidx.b %4!",
591#else
592 "\332\300\310\370\366",
593 "\236\334\335\345\370",
594#endif
595 seqsize(8, 4) - seqsize(4, 4)},
596 {
597#ifdef SCPACK
598 "addr.pri %1!push.pri!load.s.pri %2!shl.c.pri %3!pop.alt!add!load.i!",
599 "addr.alt %1!load.s.pri %2!lidx.b %3!",
600#else
601 "\333\310\257\366",
602 "\252\307\335\345\257",
603#endif
604 seqsize(7, 3) - seqsize(3, 3)},
605 {
606#ifdef SCPACK
607 "const.pri %1!push.pri!load.s.pri %2!shl.c.pri %3!pop.alt!add!load.i!",
608 "const.alt %1!load.s.pri %2!lidx.b %3!",
609#else
610 "\332\310\257\366",
611 "\236\307\335\345\257",
612#endif
613 seqsize(7, 3) - seqsize(3, 3)},
614#if !defined BIT16
615 /* array index calculation for storing a value, "cell" aligned */
616 {
617#ifdef SCPACK
618 "addr.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri 2!pop.alt!add!",
619 "addr.alt %1!load.s.pri %2!bounds %3!idxaddr!",
620#else
621 "\333\300\342\275",
622 "\252\334\331!",
623#endif
624 seqsize(7, 4) - seqsize(4, 3)},
625 {
626#ifdef SCPACK
627 "const.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri 2!pop.alt!add!",
628 "const.alt %1!load.s.pri %2!bounds %3!idxaddr!",
629#else
630 "\332\300\342\275",
631 "\236\334\331!",
632#endif
633 seqsize(7, 4) - seqsize(4, 3)},
634 {
635#ifdef SCPACK
636 "addr.pri %1!push.pri!load.s.pri %2!shl.c.pri 2!pop.alt!add!",
637 "addr.alt %1!load.s.pri %2!idxaddr!",
638#else
639 "\333\342\275",
640 "\252\307\331!",
641#endif
642 seqsize(6, 3) - seqsize(3, 2)},
643 {
644#ifdef SCPACK
645 "const.pri %1!push.pri!load.s.pri %2!shl.c.pri 2!pop.alt!add!",
646 "const.alt %1!load.s.pri %2!idxaddr!",
647#else
648 "\332\342\275",
649 "\236\307\331!",
650#endif
651 seqsize(6, 3) - seqsize(3, 2)},
652#endif
653 /* array index calculation for storing a value, not "cell" packed */
654 {
655#ifdef SCPACK
656 "addr.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri %4!pop.alt!add!",
657 "addr.alt %1!load.s.pri %2!bounds %3!idxaddr.b %4!",
658#else
659 "\333\300\310\370\275",
660 "\252\334\331\345\370",
661#endif
662 seqsize(7, 4) - seqsize(4, 4)},
663 {
664#ifdef SCPACK
665 "const.pri %1!push.pri!load.s.pri %2!bounds %3!shl.c.pri %4!pop.alt!add!",
666 "const.alt %1!load.s.pri %2!bounds %3!idxaddr.b %4!",
667#else
668 "\332\300\310\370\275",
669 "\236\334\331\345\370",
670#endif
671 seqsize(7, 4) - seqsize(4, 4)},
672 {
673#ifdef SCPACK
674 "addr.pri %1!push.pri!load.s.pri %2!shl.c.pri %3!pop.alt!add!",
675 "addr.alt %1!load.s.pri %2!idxaddr.b %3!",
676#else
677 "\333\310\257\275",
678 "\252\307\331\345\257",
679#endif
680 seqsize(6, 3) - seqsize(3, 3)},
681 {
682#ifdef SCPACK
683 "const.pri %1!push.pri!load.s.pri %2!shl.c.pri %3!pop.alt!add!",
684 "const.alt %1!load.s.pri %2!idxaddr.b %3!",
685#else
686 "\332\310\257\275",
687 "\236\307\331\345\257",
688#endif
689 seqsize(6, 3) - seqsize(3, 3)},
690#if !defined BIT16
691 /* the shorter array indexing sequences, see above for comments */
692 {
693#ifdef SCPACK
694 "shl.c.pri 2!pop.alt!add!loadi!",
695 "pop.alt!lidx!",
696#else
697 "\342\326\320",
698 "\231\335!",
699#endif
700 seqsize(4, 1) - seqsize(2, 0)},
701 {
702#ifdef SCPACK
703 "shl.c.pri 2!pop.alt!add!",
704 "pop.alt!idxaddr!",
705#else
706 "\342\275",
707 "\231\331!",
708#endif
709 seqsize(3, 1) - seqsize(2, 0)},
710#endif
711 {
712#ifdef SCPACK
713 "shl.c.pri %1!pop.alt!add!loadi!",
714 "pop.alt!lidx.b %1!",
715#else
716 "\276\223\326\320",
717 "\231\335\345\205",
718#endif
719 seqsize(4, 1) - seqsize(2, 1)},
720 {
721#ifdef SCPACK
722 "shl.c.pri %1!pop.alt!add!",
723 "pop.alt!idxaddr.b %1!",
724#else
725 "\276\223\275",
726 "\231\331\345\205",
727#endif
728 seqsize(3, 1) - seqsize(2, 1)},
729 /* For packed arrays, there is another case (packed arrays
730 * do not take advantage of the LIDX or IDXADDR instructions).
731 * addr.pri n1 addr.alt n1
732 * push.pri load.s.pri n2
733 * load.s.pri n2 bounds n3
734 * bounds n3 -
735 * pop.alt -
736 *
737 * Notes (additional cases):
738 * 1. instruction addr.pri can also be const.pri (for
739 * global arrays)
740 * 2. the bounds instruction can be absent, but that
741 * case is already handled (see #1#)
742 */
743 {
744#ifdef SCPACK
745 "addr.pri %1!push.pri!load.s.pri %2!bounds %3!pop.alt!",
746 "addr.alt %1!load.s.pri %2!bounds %3!",
747#else
748 "\333\300\231",
749 "\252\334",
750#endif
751 seqsize(5, 3) - seqsize(3, 3)},
752 {
753#ifdef SCPACK
754 "const.pri %1!push.pri!load.s.pri %2!bounds %3!pop.alt!",
755 "const.alt %1!load.s.pri %2!bounds %3!",
756#else
757 "\332\300\231",
758 "\236\334",
759#endif
760 seqsize(5, 3) - seqsize(3, 3)},
761 /* During a calculation, the intermediate result must sometimes
762 * be moved from PRI to ALT, like in:
763 * push.pri move.alt
764 * load.s.pri n1 load.s.pri n1
765 * pop.alt -
766 *
767 * The above also accurs for "load.pri" and for "const.pri",
768 * so add another two cases.
769 */
770 {
771#ifdef SCPACK
772 "push.pri!load.s.pri %1!pop.alt!",
773 "move.alt!load.s.pri %1!",
774#else
775 "\240\324\231",
776 "\375\324",
777#endif
778 seqsize(3, 1) - seqsize(2, 1)},
779 {
780#ifdef SCPACK
781 "push.pri!load.pri %1!pop.alt!",
782 "move.alt!load.pri %1!",
783#else
784 "\240\314\231",
785 "\375\314",
786#endif
787 seqsize(3, 1) - seqsize(2, 1)},
788 {
789#ifdef SCPACK
790 "push.pri!const.pri %1!pop.alt!",
791 "move.alt!const.pri %1!",
792#else
793 "\240\316\231",
794 "\375\316",
795#endif
796 seqsize(3, 1) - seqsize(2, 1)},
797 {
798#ifdef SCPACK
799 "push.pri!zero.pri!pop.alt!",
800 "move.alt!zero.pri!",
801#else
802 "\240\376\231",
803 "\375\376",
804#endif
805 seqsize(3, 0) - seqsize(2, 0)},
806 /* saving PRI and then loading from its address
807 * occurs when indexing a multi-dimensional array
808 */
809 {
810#ifdef SCPACK
811 "push.pri!load.i!pop.alt!",
812 "move.alt!load.i!",
813#else
814 "\240\213\340\231",
815 "\375\213\340",
816#endif
817 seqsize(3, 0) - seqsize(2, 0)},
818 /* An even simpler PUSH/POP optimization (occurs in
819 * switch statements):
820 * push.pri move.alt
821 * pop.alt -
822 */
823 {
824#ifdef SCPACK
825 "push.pri!pop.alt!",
826 "move.alt!",
827#else
828 "\240\231",
829 "\375",
830#endif
831 seqsize(2, 0) - seqsize(1, 0)},
832 /* And what to think of this PUSH/POP sequence, which occurs
833 * due to the support for user-defined assignment operator):
834 * push.alt -
835 * pop.alt -
836 */
837//???
838//{
839// #ifdef SCPACK
840// "push.alt!pop.alt!",
841// ";$", /* SCPACK cannot handle empty strings */
842// #else
843// "\225\237",
844// "\353",
845// #endif
846// seqsize(2,0) - seqsize(0,0)
847//},
848 /* Functions with many parameters with the same default
849 * value have sequences like:
850 * push.c n1 const.pri n1
851 * ;$par push.r.pri n2 ; where n2 is the number of pushes
852 * push.c n1 ;$par
853 * ;$par -
854 * push.c n1 -
855 * ;$par -
856 * etc. etc.
857 * The shortest matched sequence is 3, because a sequence of two can also be
858 * optimized as two "push.c n1" instructions.
859 * => this optimization does not work, because the argument re-ordering in
860 * a function call causes each argument to be optimized individually
861 */
862//{
863// #ifdef SCPACK
864// "const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!",
865// "const.pri %1!push.r.pri 5!;$par!",
866// #else
867// "\327\327\254",
868// "\352\221.r\2745!",
869// #endif
870// seqsize(10,5) - seqsize(2,2)
871//},
872//{
873// #ifdef SCPACK
874// "const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!",
875// "const.pri %1!push.r.pri 4!;$par!",
876// #else
877// "\327\327",
878// "\352\221.r\274\326",
879// #endif
880// seqsize(8,4) - seqsize(2,2)
881//},
882//{
883// #ifdef SCPACK
884// "const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!const.pri %1!push.pri!;$par!",
885// "const.pri %1!push.r.pri 3!;$par!",
886// #else
887// "\327\254",
888// "\352\221.r\274\247",
889// #endif
890// seqsize(6,3) - seqsize(2,2)
891//},
892 /* User-defined operators first load the operands into registers and
893 * then have them pushed onto the stack. This can give rise to sequences
894 * like:
895 * const.pri n1 push.c n1
896 * const.alt n2 push.c n2
897 * push.pri -
898 * push.alt -
899 * A similar sequence occurs with the two PUSH.pri/alt instructions inverted.
900 * The first, second, or both CONST.pri/alt instructions can also be
901 * LOAD.pri/alt.
902 * This gives 2 x 4 cases.
903 */
904 {
905#ifdef SCPACK
906 "const.pri %1!const.alt %2!push.pri!push.alt!",
907 "push.c %1!push.c %2!",
908#else
909 "\316\236\311\240\351",
910 "\330\205\330\216",
911#endif
912 seqsize(4, 2) - seqsize(2, 2)},
913 {
914#ifdef SCPACK
915 "const.pri %1!const.alt %2!push.alt!push.pri!",
916 "push.c %2!push.c %1!",
917#else
918 "\316\236\311\351\240",
919 "\330\216\330\205",
920#endif
921 seqsize(4, 2) - seqsize(2, 2)},
922 {
923#ifdef SCPACK
924 "const.pri %1!load.alt %2!push.pri!push.alt!",
925 "push.c %1!push %2!",
926#else
927 "\316\213\311\240\351",
928 "\330\205\222\216",
929#endif
930 seqsize(4, 2) - seqsize(2, 2)},
931 {
932#ifdef SCPACK
933 "const.pri %1!load.alt %2!push.alt!push.pri!",
934 "push %2!push.c %1!",
935#else
936 "\316\213\311\351\240",
937 "\222\216\330\205",
938#endif
939 seqsize(4, 2) - seqsize(2, 2)},
940 {
941#ifdef SCPACK
942 "load.pri %1!const.alt %2!push.pri!push.alt!",
943 "push %1!push.c %2!",
944#else
945 "\314\236\311\240\351",
946 "\222\205\330\216",
947#endif
948 seqsize(4, 2) - seqsize(2, 2)},
949 {
950#ifdef SCPACK
951 "load.pri %1!const.alt %2!push.alt!push.pri!",
952 "push.c %2!push %1!",
953#else
954 "\314\236\311\351\240",
955 "\330\216\222\205",
956#endif
957 seqsize(4, 2) - seqsize(2, 2)},
958 {
959#ifdef SCPACK
960 "load.pri %1!load.alt %2!push.pri!push.alt!",
961 "push %1!push %2!",
962#else
963 "\314\213\311\240\351",
964 "\222\205\222\216",
965#endif
966 seqsize(4, 2) - seqsize(2, 2)},
967 {
968#ifdef SCPACK
969 "load.pri %1!load.alt %2!push.alt!push.pri!",
970 "push %2!push %1!",
971#else
972 "\314\213\311\351\240",
973 "\222\216\222\205",
974#endif
975 seqsize(4, 2) - seqsize(2, 2)},
976 /* Function calls (parameters are passed on the stack)
977 * load.s.pri n1 push.s n1
978 * push.pri -
979 * --------------------------------------
980 * load.pri n1 push n1
981 * push.pri -
982 * --------------------------------------
983 * const.pri n1 push.c n1
984 * push.pri -
985 * --------------------------------------
986 * zero.pri push.c 0
987 * push.pri -
988 * --------------------------------------
989 * addr.pri n1 pushaddr n1
990 * push.pri -
991 *
992 * However, PRI must not be needed after this instruction
993 * if this shortcut is used. Check for the ;$par comment.
994 */
995 {
996#ifdef SCPACK
997 "load.s.pri %1!push.pri!;$par!",
998 "push.s %1!;$par!",
999#else
1000 "\224\255\344",
1001 "\222\220\205\344",
1002#endif
1003 seqsize(2, 1) - seqsize(1, 1)},
1004 {
1005#ifdef SCPACK
1006 "load.pri %1!push.pri!;$par!",
1007 "push %1!;$par!",
1008#else
1009 "\213\255\344",
1010 "\222\205\344",
1011#endif
1012 seqsize(2, 1) - seqsize(1, 1)},
1013 {
1014#ifdef SCPACK
1015 "const.pri %1!push.pri!;$par!",
1016 "push.c %1!;$par!",
1017#else
1018 "\236\255\344",
1019 "\330\205\344",
1020#endif
1021 seqsize(2, 1) - seqsize(1, 1)},
1022 {
1023#ifdef SCPACK
1024 "zero.pri!push.pri!;$par!",
1025 "push.c 0!;$par!",
1026#else
1027 "\376\240\344",
1028 "\330 0!\344",
1029#endif
1030 seqsize(2, 0) - seqsize(1, 1)},
1031 {
1032#ifdef SCPACK
1033 "addr.pri %1!push.pri!;$par!",
1034 "pushaddr %1!;$par!",
1035#else
1036 "\252\255\344",
1037 "\222\252\205\344",
1038#endif
1039 seqsize(2, 1) - seqsize(1, 1)},
1040 /* References with a default value generate new cells on the heap
1041 * dynamically. That code often ends with:
1042 * move.pri push.alt
1043 * push.pri -
1044 */
1045 {
1046#ifdef SCPACK
1047 "move.pri!push.pri!",
1048 "push.alt!",
1049#else
1050 "\350\232\240",
1051 "\351",
1052#endif
1053 seqsize(2, 0) - seqsize(1, 0)},
1054 /* Simple arithmetic operations on constants. Noteworthy is the
1055 * subtraction of a constant, since it is converted to the addition
1056 * of the inverse value.
1057 * const.alt n1 add.c n1
1058 * add -
1059 * --------------------------------------
1060 * const.alt n1 add.c -n1
1061 * sub -
1062 * --------------------------------------
1063 * const.alt n1 smul.c n1
1064 * smul -
1065 * --------------------------------------
1066 * const.alt n1 eq.c.pri n1
1067 * eq -
1068 */
1069 {
1070#ifdef SCPACK
1071 "const.alt %1!add!",
1072 "add.c %1!",
1073#else
1074 "\360\270",
1075 "\233\247\205",
1076#endif
1077 seqsize(2, 1) - seqsize(1, 1)},
1078 {
1079#ifdef SCPACK
1080 "const.alt %1!sub!",
1081 "add.c -%1!",
1082#else
1083 "\360sub!",
1084 "\233\247 -%\204",
1085#endif
1086 seqsize(2, 1) - seqsize(1, 1)},
1087 {
1088#ifdef SCPACK
1089 "const.alt %1!smul!",
1090 "smul.c %1!",
1091#else
1092 "\360smul!",
1093 "smu\271\205",
1094#endif
1095 seqsize(2, 1) - seqsize(1, 1)},
1096 {
1097#ifdef SCPACK
1098 "const.alt %1!eq!",
1099 "eq.c.pri %1!",
1100#else
1101 "\360\265",
1102 "\253\247\223",
1103#endif
1104 seqsize(2, 1) - seqsize(1, 1)},
1105 /* Some operations use the alternative subtraction operation --these
1106 * can also be optimized.
1107 * const.pri n1 load.s.pri n2
1108 * load.s.alt n2 add.c -n1
1109 * sub.alt -
1110 * --------------------------------------
1111 * const.pri n1 load.pri n2
1112 * load.alt n2 add.c -n1
1113 * sub.alt -
1114 */
1115 {
1116#ifdef SCPACK
1117 "const.pri %1!load.s.alt %2!sub.alt!",
1118 "load.s.pri %2!add.c -%1!",
1119#else
1120 "\316\224\311sub\217",
1121 "\241\233\247 -%\204",
1122#endif
1123 seqsize(3, 2) - seqsize(2, 2)},
1124 {
1125#ifdef SCPACK
1126 "const.pri %1!load.alt %2!sub.alt!",
1127 "load.pri %2!add.c -%1!",
1128#else
1129 "\316\213\311sub\217",
1130 "\317\233\247 -%\204",
1131#endif
1132 seqsize(3, 2) - seqsize(2, 2)},
1133 /* Compare and jump
1134 * eq jneq n1
1135 * jzer n1 -
1136 * --------------------------------------
1137 * eq jeq n1
1138 * jnz n1 -
1139 * --------------------------------------
1140 * neq jeq n1
1141 * jzer n1 -
1142 * --------------------------------------
1143 * neq jneq n1
1144 * jnz n1 -
1145 * Compares followed by jzer occur much more
1146 * often than compares followed with jnz. So we
1147 * take the easy route here.
1148 * less jgeq n1
1149 * jzer n1 -
1150 * --------------------------------------
1151 * leq jgrtr n1
1152 * jzer n1 -
1153 * --------------------------------------
1154 * grtr jleq n1
1155 * jzer n1 -
1156 * --------------------------------------
1157 * geq jless n1
1158 * jzer n1 -
1159 * --------------------------------------
1160 * sless jsgeq n1
1161 * jzer n1 -
1162 * --------------------------------------
1163 * sleq jsgrtr n1
1164 * jzer n1 -
1165 * --------------------------------------
1166 * sgrtr jsleq n1
1167 * jzer n1 -
1168 * --------------------------------------
1169 * sgeq jsless n1
1170 * jzer n1 -
1171 */
1172 {
1173#ifdef SCPACK
1174 "eq!jzer %1!",
1175 "jneq %1!",
1176#else
1177 "\265\305",
1178 "jn\325",
1179#endif
1180 seqsize(2, 1) - seqsize(1, 1)},
1181 {
1182#ifdef SCPACK
1183 "eq!jnz %1!",
1184 "jeq %1!",
1185#else
1186 "\265jnz\205",
1187 "j\325",
1188#endif
1189 seqsize(2, 1) - seqsize(1, 1)},
1190 {
1191#ifdef SCPACK
1192 "neq!jzer %1!",
1193 "jeq %1!",
1194#else
1195 "n\265\305",
1196 "j\325",
1197#endif
1198 seqsize(2, 1) - seqsize(1, 1)},
1199 {
1200#ifdef SCPACK
1201 "neq!jnz %1!",
1202 "jneq %1!",
1203#else
1204 "n\265jnz\205",
1205 "jn\325",
1206#endif
1207 seqsize(2, 1) - seqsize(1, 1)},
1208 {
1209#ifdef SCPACK
1210 "less!jzer %1!",
1211 "jgeq %1!",
1212#else
1213 "l\322!\305",
1214 "jg\325",
1215#endif
1216 seqsize(2, 1) - seqsize(1, 1)},
1217 {
1218#ifdef SCPACK
1219 "leq!jzer %1!",
1220 "jgrtr %1!",
1221#else
1222 "l\265\305",
1223 "jg\323r\205",
1224#endif
1225 seqsize(2, 1) - seqsize(1, 1)},
1226 {
1227#ifdef SCPACK
1228 "grtr!jzer %1!",
1229 "jleq %1!",
1230#else
1231 "g\323\306\305",
1232 "jl\325",
1233#endif
1234 seqsize(2, 1) - seqsize(1, 1)},
1235 {
1236#ifdef SCPACK
1237 "geq!jzer %1!",
1238 "jless %1!",
1239#else
1240 "g\265\305",
1241 "jl\322\205",
1242#endif
1243 seqsize(2, 1) - seqsize(1, 1)},
1244 {
1245#ifdef SCPACK
1246 "sless!jzer %1!",
1247 "jsgeq %1!",
1248#else
1249 "\357\305",
1250 "j\302\325",
1251#endif
1252 seqsize(2, 1) - seqsize(1, 1)},
1253 {
1254#ifdef SCPACK
1255 "sleq!jzer %1!",
1256 "jsgrtr %1!",
1257#else
1258 "\362\305",
1259 "j\337r\205",
1260#endif
1261 seqsize(2, 1) - seqsize(1, 1)},
1262 {
1263#ifdef SCPACK
1264 "sgrtr!jzer %1!",
1265 "jsleq %1!",
1266#else
1267 "\364\305",
1268 "j\303\325",
1269#endif
1270 seqsize(2, 1) - seqsize(1, 1)},
1271 {
1272#ifdef SCPACK
1273 "sgeq!jzer %1!",
1274 "jsless %1!",
1275#else
1276 "\361\305",
1277 "j\341\205",
1278#endif
1279 seqsize(2, 1) - seqsize(1, 1)},
1280 /* Test for zero (common case, especially for strings)
1281 * E.g. the test expression of: "for (i=0; str{i}!=0; ++i)"
1282 *
1283 * zero.alt jzer n1
1284 * jeq n1 -
1285 * --------------------------------------
1286 * zero.alt jnz n1
1287 * jneq n1 -
1288 */
1289 {
1290#ifdef SCPACK
1291 "zero.alt!jeq %1!",
1292 "jzer %1!",
1293#else
1294 "\315\217j\325",
1295 "\305",
1296#endif
1297 seqsize(2, 1) - seqsize(1, 1)},
1298 {
1299#ifdef SCPACK
1300 "zero.alt!jneq %1!",
1301 "jnz %1!",
1302#else
1303 "\315\217jn\325",
1304 "jnz\205",
1305#endif
1306 seqsize(2, 1) - seqsize(1, 1)},
1307 /* Incrementing and decrementing leaves a value in
1308 * in PRI which may not be used (for example, as the
1309 * third expression in a "for" loop).
1310 * inc n1 inc n1 ; ++n
1311 * load.pri n1 ;$exp
1312 * ;$exp -
1313 * --------------------------------------
1314 * load.pri n1 inc n1 ; n++, e.g. "for (n=0; n<10; n++)"
1315 * inc n1 ;$exp
1316 * ;$exp -
1317 * Plus the varieties for stack relative increments
1318 * and decrements.
1319 */
1320 {
1321#ifdef SCPACK
1322 "inc %1!load.pri %1!;$exp!",
1323 "inc %1!;$exp!",
1324#else
1325 "\373c\205\314\245",
1326 "\373c\261",
1327#endif
1328 seqsize(2, 2) - seqsize(1, 1)},
1329 {
1330#ifdef SCPACK
1331 "load.pri %1!inc %1!;$exp!",
1332 "inc %1!;$exp!",
1333#else
1334 "\314\373c\261",
1335 "\373c\261",
1336#endif
1337 seqsize(2, 2) - seqsize(1, 1)},
1338 {
1339#ifdef SCPACK
1340 "inc.s %1!load.s.pri %1!;$exp!",
1341 "inc.s %1!;$exp!",
1342#else
1343 "\373\352\205\324\245",
1344 "\373\352\261",
1345#endif
1346 seqsize(2, 2) - seqsize(1, 1)},
1347 {
1348#ifdef SCPACK
1349 "load.s.pri %1!inc.s %1!;$exp!",
1350 "inc.s %1!;$exp!",
1351#else
1352 "\324\373\352\261",
1353 "\373\352\261",
1354#endif
1355 seqsize(2, 2) - seqsize(1, 1)},
1356 {
1357#ifdef SCPACK
1358 "dec %1!load.pri %1!;$exp!",
1359 "dec %1!;$exp!",
1360#else
1361 "\367c\205\314\245",
1362 "\367c\261",
1363#endif
1364 seqsize(2, 2) - seqsize(1, 1)},
1365 {
1366#ifdef SCPACK
1367 "load.pri %1!dec %1!;$exp!",
1368 "dec %1!;$exp!",
1369#else
1370 "\314\367c\261",
1371 "\367c\261",
1372#endif
1373 seqsize(2, 2) - seqsize(1, 1)},
1374 {
1375#ifdef SCPACK
1376 "dec.s %1!load.s.pri %1!;$exp!",
1377 "dec.s %1!;$exp!",
1378#else
1379 "\367\352\205\324\245",
1380 "\367\352\261",
1381#endif
1382 seqsize(2, 2) - seqsize(1, 1)},
1383 {
1384#ifdef SCPACK
1385 "load.s.pri %1!dec.s %1!;$exp!",
1386 "dec.s %1!;$exp!",
1387#else
1388 "\324\367\352\261",
1389 "\367\352\261",
1390#endif
1391 seqsize(2, 2) - seqsize(1, 1)},
1392 /* ??? the same (increments and decrements) for references */
1393 /* Loading the constant zero has a special opcode.
1394 * When storing zero in memory, the value of PRI must not be later on.
1395 * const.pri 0 zero n1
1396 * stor.pri n1 ;$exp
1397 * ;$exp -
1398 * --------------------------------------
1399 * const.pri 0 zero.s n1
1400 * stor.s.pri n1 ;$exp
1401 * ;$exp -
1402 * --------------------------------------
1403 * zero.pri zero n1
1404 * stor.pri n1 ;$exp
1405 * ;$exp -
1406 * --------------------------------------
1407 * zero.pri zero.s n1
1408 * stor.s.pri n1 ;$exp
1409 * ;$exp -
1410 * --------------------------------------
1411 * const.pri 0 zero.pri
1412 * --------------------------------------
1413 * const.alt 0 zero.alt
1414 * The last two alternatives save more memory than they save
1415 * time, but anyway...
1416 */
1417 {
1418#ifdef SCPACK
1419 "const.pri 0!stor.pri %1!;$exp!",
1420 "zero %1!;$exp!",
1421#else
1422 "\236\203 0!\227or\223\245",
1423 "\315\261",
1424#endif
1425 seqsize(2, 2) - seqsize(1, 1)},
1426 {
1427#ifdef SCPACK
1428 "const.pri 0!stor.s.pri %1!;$exp!",
1429 "zero.s %1!;$exp!",
1430#else
1431 "\236\203 0!\227or\220\223\245",
1432 "\315\220\261",
1433#endif
1434 seqsize(2, 2) - seqsize(1, 1)},
1435 {
1436#ifdef SCPACK
1437 "zero.pri!stor.pri %1!;$exp!",
1438 "zero %1!;$exp!",
1439#else
1440 "\376\227or\223\245",
1441 "\315\261",
1442#endif
1443 seqsize(2, 1) - seqsize(1, 1)},
1444 {
1445#ifdef SCPACK
1446 "zero.pri!stor.s.pri %1!;$exp!",
1447 "zero.s %1!;$exp!",
1448#else
1449 "\376\227or\220\223\245",
1450 "\315\220\261",
1451#endif
1452 seqsize(2, 1) - seqsize(1, 1)},
1453 {
1454#ifdef SCPACK
1455 "const.pri 0!",
1456 "zero.pri!",
1457#else
1458 "\236\203 0!",
1459 "\376",
1460#endif
1461 seqsize(1, 1) - seqsize(1, 0)},
1462 {
1463#ifdef SCPACK
1464 "const.alt 0!",
1465 "zero.alt!",
1466#else
1467 "\236\211 0!",
1468 "\315\217",
1469#endif
1470 seqsize(1, 1) - seqsize(1, 0)},
1471 /* ----- */
1472 {NULL, NULL, 0}
1473};
diff --git a/libraries/embryo/src/bin/embryo_cc_scexpand.c b/libraries/embryo/src/bin/embryo_cc_scexpand.c
deleted file mode 100644
index 6ab34a1..0000000
--- a/libraries/embryo/src/bin/embryo_cc_scexpand.c
+++ /dev/null
@@ -1,53 +0,0 @@
1/* expand.c -- Byte Pair Encoding decompression */
2/* Copyright 1996 Philip Gage */
3
4/* Byte Pair Compression appeared in the September 1997
5 * issue of C/C++ Users Journal. The original source code
6 * may still be found at the web site of the magazine
7 * (www.cuj.com).
8 *
9 * The decompressor has been modified by me (Thiadmer
10 * Riemersma) to accept a string as input, instead of a
11 * complete file.
12 */
13
14
15#include "embryo_cc_sc.h"
16
17#define STACKSIZE 16
18
19int
20strexpand(char *dest, unsigned char *source, int maxlen, unsigned char pairtable[128][2])
21{
22 unsigned char stack[STACKSIZE];
23 short c, top = 0;
24 int len;
25
26 len = 1; /* already 1 byte for '\0' */
27 for (;;)
28 {
29 /* Pop byte from stack or read byte from the input string */
30 if (top)
31 c = stack[--top];
32 else if ((c = *(unsigned char *)source++) == '\0')
33 break;
34
35 /* Push pair on stack or output byte to the output string */
36 if (c > 127)
37 {
38 stack[top++] = pairtable[c - 128][1];
39 stack[top++] = pairtable[c - 128][0];
40 }
41 else
42 {
43 len++;
44 if (maxlen > 1)
45 {
46 *dest++ = (char)c;
47 maxlen--;
48 }
49 }
50 }
51 *dest = '\0';
52 return len;
53}
diff --git a/libraries/embryo/src/bin/embryo_cc_sclist.c b/libraries/embryo/src/bin/embryo_cc_sclist.c
deleted file mode 100644
index 94ebbb7..0000000
--- a/libraries/embryo/src/bin/embryo_cc_sclist.c
+++ /dev/null
@@ -1,293 +0,0 @@
1/* Small compiler - maintenance of various lists
2 *
3 * Name list (aliases)
4 * Include path list
5 *
6 * Copyright (c) ITB CompuPhase, 2001-2003
7 *
8 * This software is provided "as-is", without any express or implied warranty.
9 * In no event will the authors be held liable for any damages arising from
10 * the use of this software.
11 *
12 * Permission is granted to anyone to use this software for any purpose,
13 * including commercial applications, and to alter it and redistribute it
14 * freely, subject to the following restrictions:
15 *
16 * 1. The origin of this software must not be misrepresented; you must not
17 * claim that you wrote the original software. If you use this software in
18 * a product, an acknowledgment in the product documentation would be
19 * appreciated but is not required.
20 * 2. Altered source versions must be plainly marked as such, and must not be
21 * misrepresented as being the original software.
22 * 3. This notice may not be removed or altered from any source distribution.
23 *
24 * Version: $Id: embryo_cc_sclist.c 52451 2010-09-19 03:00:12Z raster $
25 */
26
27
28#ifdef HAVE_CONFIG_H
29# include <config.h>
30#endif
31
32#include <assert.h>
33#include <stdlib.h>
34#include <string.h>
35#include "embryo_cc_sc.h"
36
37static stringpair *
38insert_stringpair(stringpair * root, char *first, char *second, int matchlength)
39{
40 stringpair *cur, *pred;
41
42 assert(root != NULL);
43 assert(first != NULL);
44 assert(second != NULL);
45 /* create a new node, and check whether all is okay */
46 if (!(cur = (stringpair *)malloc(sizeof(stringpair))))
47 return NULL;
48 cur->first = strdup(first);
49 cur->second = strdup(second);
50 cur->matchlength = matchlength;
51 if (!cur->first || !cur->second)
52 {
53 if (cur->first)
54 free(cur->first);
55 if (cur->second)
56 free(cur->second);
57 free(cur);
58 return NULL;
59 } /* if */
60 /* link the node to the tree, find the position */
61 for (pred = root; pred->next && strcmp(pred->next->first, first) < 0;
62 pred = pred->next)
63 /* nothing */ ;
64 cur->next = pred->next;
65 pred->next = cur;
66 return cur;
67}
68
69static void
70delete_stringpairtable(stringpair * root)
71{
72 stringpair *cur, *next;
73
74 assert(root != NULL);
75 cur = root->next;
76 while (cur)
77 {
78 next = cur->next;
79 assert(cur->first != NULL);
80 assert(cur->second != NULL);
81 free(cur->first);
82 free(cur->second);
83 free(cur);
84 cur = next;
85 } /* while */
86 memset(root, 0, sizeof(stringpair));
87}
88
89static stringpair *
90find_stringpair(stringpair * cur, char *first, int matchlength)
91{
92 int result = 0;
93
94 assert(matchlength > 0); /* the function cannot handle zero-length comparison */
95 assert(first != NULL);
96 while (cur && result <= 0)
97 {
98 result = (int)*cur->first - (int)*first;
99 if (result == 0 && matchlength == cur->matchlength)
100 {
101 result = strncmp(cur->first, first, matchlength);
102 if (result == 0)
103 return cur;
104 } /* if */
105 cur = cur->next;
106 } /* while */
107 return NULL;
108}
109
110static int
111delete_stringpair(stringpair * root, stringpair * item)
112{
113 stringpair *cur;
114
115 assert(root != NULL);
116 cur = root;
117 while (cur->next)
118 {
119 if (cur->next == item)
120 {
121 cur->next = item->next; /* unlink from list */
122 assert(item->first != NULL);
123 assert(item->second != NULL);
124 free(item->first);
125 free(item->second);
126 free(item);
127 return TRUE;
128 } /* if */
129 cur = cur->next;
130 } /* while */
131 return FALSE;
132}
133
134/* ----- alias table --------------------------------------------- */
135static stringpair alias_tab = { NULL, NULL, NULL, 0 }; /* alias table */
136
137stringpair *
138insert_alias(char *name, char *alias)
139{
140 stringpair *cur;
141
142 assert(name != NULL);
143 assert(strlen(name) <= sNAMEMAX);
144 assert(alias != NULL);
145 assert(strlen(alias) <= sEXPMAX);
146 if (!(cur = insert_stringpair(&alias_tab, name, alias, strlen(name))))
147 error(103); /* insufficient memory (fatal error) */
148 return cur;
149}
150
151int
152lookup_alias(char *target, char *name)
153{
154 stringpair *cur =
155 find_stringpair(alias_tab.next, name, strlen(name));
156 if (cur)
157 {
158 assert(strlen(cur->second) <= sEXPMAX);
159 strcpy(target, cur->second);
160 } /* if */
161 return !!cur;
162}
163
164void
165delete_aliastable(void)
166{
167 delete_stringpairtable(&alias_tab);
168}
169
170/* ----- include paths list -------------------------------------- */
171static stringlist includepaths = { NULL, NULL }; /* directory list for include files */
172
173stringlist *
174insert_path(char *path)
175{
176 stringlist *cur;
177
178 assert(path != NULL);
179 if (!(cur = (stringlist *)malloc(sizeof(stringlist))))
180 error(103); /* insufficient memory (fatal error) */
181 if (!(cur->line = strdup(path)))
182 error(103); /* insufficient memory (fatal error) */
183 cur->next = includepaths.next;
184 includepaths.next = cur;
185 return cur;
186}
187
188char *
189get_path(int index)
190{
191 stringlist *cur = includepaths.next;
192
193 while (cur && index-- > 0)
194 cur = cur->next;
195 if (cur)
196 {
197 assert(cur->line != NULL);
198 return cur->line;
199 } /* if */
200 return NULL;
201}
202
203void
204delete_pathtable(void)
205{
206 stringlist *cur = includepaths.next, *next;
207
208 while (cur)
209 {
210 next = cur->next;
211 assert(cur->line != NULL);
212 free(cur->line);
213 free(cur);
214 cur = next;
215 } /* while */
216 memset(&includepaths, 0, sizeof(stringlist));
217}
218
219/* ----- text substitution patterns ------------------------------ */
220
221static stringpair substpair = { NULL, NULL, NULL, 0 }; /* list of substitution pairs */
222static stringpair *substindex['z' - 'A' + 1]; /* quick index to first character */
223
224static void
225adjustindex(char c)
226{
227 stringpair *cur;
228
229 assert((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_');
230 assert('A' < '_' && '_' < 'z');
231
232 for (cur = substpair.next; cur && cur->first[0] != c;
233 cur = cur->next)
234 /* nothing */ ;
235 substindex[(int)c - 'A'] = cur;
236}
237
238stringpair *
239insert_subst(char *pattern, char *substitution, int prefixlen)
240{
241 stringpair *cur;
242
243 assert(pattern != NULL);
244 assert(substitution != NULL);
245 if (!(cur = insert_stringpair(&substpair, pattern, substitution, prefixlen)))
246 error(103); /* insufficient memory (fatal error) */
247 adjustindex(*pattern);
248 return cur;
249}
250
251stringpair *
252find_subst(char *name, int length)
253{
254 stringpair *item;
255
256 assert(name != NULL);
257 assert(length > 0);
258 assert((*name >= 'A' && *name <= 'Z') || (*name >= 'a' && *name <= 'z')
259 || *name == '_');
260 item = substindex[(int)*name - 'A'];
261 if (item)
262 item = find_stringpair(item, name, length);
263 return item;
264}
265
266int
267delete_subst(char *name, int length)
268{
269 stringpair *item;
270
271 assert(name != NULL);
272 assert(length > 0);
273 assert((*name >= 'A' && *name <= 'Z') || (*name >= 'a' && *name <= 'z')
274 || *name == '_');
275 item = substindex[(int)*name - 'A'];
276 if (item)
277 item = find_stringpair(item, name, length);
278 if (!item)
279 return FALSE;
280 delete_stringpair(&substpair, item);
281 adjustindex(*name);
282 return TRUE;
283}
284
285void
286delete_substtable(void)
287{
288 int i;
289
290 delete_stringpairtable(&substpair);
291 for (i = 0; i < (int)(sizeof(substindex) / sizeof(substindex[0])); i++)
292 substindex[i] = NULL;
293}
diff --git a/libraries/embryo/src/bin/embryo_cc_scvars.c b/libraries/embryo/src/bin/embryo_cc_scvars.c
deleted file mode 100644
index fb9eb12..0000000
--- a/libraries/embryo/src/bin/embryo_cc_scvars.c
+++ /dev/null
@@ -1,88 +0,0 @@
1/* Small compiler
2 *
3 * Global (cross-module) variables.
4 *
5 * Copyright (c) ITB CompuPhase, 1997-2003
6 *
7 * This software is provided "as-is", without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software in
17 * a product, an acknowledgment in the product documentation would be
18 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
21 * 3. This notice may not be removed or altered from any source distribution.
22 *
23 * Version: $Id: embryo_cc_scvars.c 50816 2010-08-04 16:57:32Z lucas $
24 */
25
26
27#ifdef HAVE_CONFIG_H
28# include <config.h> /* for PATH_MAX */
29#endif
30
31#include "embryo_cc_sc.h"
32
33/* global variables
34 *
35 * All global variables that are shared amongst the compiler files are
36 * declared here.
37 */
38symbol loctab; /* local symbol table */
39symbol glbtab; /* global symbol table */
40cell *litq; /* the literal queue */
41char pline[sLINEMAX + 1]; /* the line read from the input file */
42char *lptr; /* points to the current position in "pline" */
43constvalue tagname_tab = { NULL, "", 0, 0 }; /* tagname table */
44constvalue libname_tab = { NULL, "", 0, 0 }; /* library table (#pragma library "..." syntax) */
45constvalue *curlibrary = NULL; /* current library */
46symbol *curfunc; /* pointer to current function */
47char *inpfname; /* pointer to name of the file currently read from */
48char outfname[PATH_MAX]; /* output file name */
49char sc_ctrlchar = CTRL_CHAR; /* the control character (or escape character) */
50int litidx = 0; /* index to literal table */
51int litmax = sDEF_LITMAX; /* current size of the literal table */
52int stgidx = 0; /* index to the staging buffer */
53int labnum = 0; /* number of (internal) labels */
54int staging = 0; /* true if staging output */
55cell declared = 0; /* number of local cells declared */
56cell glb_declared = 0; /* number of global cells declared */
57cell code_idx = 0; /* number of bytes with generated code */
58int ntv_funcid = 0; /* incremental number of native function */
59int errnum = 0; /* number of errors */
60int warnnum = 0; /* number of warnings */
61int sc_debug = sCHKBOUNDS; /* by default: bounds checking+assertions */
62int charbits = 8; /* a "char" is 8 bits */
63int sc_packstr = FALSE; /* strings are packed by default? */
64int sc_compress = TRUE; /* compress bytecode? */
65int sc_needsemicolon = TRUE; /* semicolon required to terminate expressions? */
66int sc_dataalign = sizeof(cell); /* data alignment value */
67int sc_alignnext = FALSE; /* must frame of the next function be aligned? */
68int curseg = 0; /* 1 if currently parsing CODE, 2 if parsing DATA */
69cell sc_stksize = sDEF_AMXSTACK; /* default stack size */
70int freading = FALSE; /* Is there an input file ready for reading? */
71int fline = 0; /* the line number in the current file */
72int fnumber = 0; /* the file number in the file table (debugging) */
73int fcurrent = 0; /* current file being processed (debugging) */
74int intest = 0; /* true if inside a test */
75int sideeffect = 0; /* true if an expression causes a side-effect */
76int stmtindent = 0; /* current indent of the statement */
77int indent_nowarn = TRUE; /* skip warning "217 loose indentation" */
78int sc_tabsize = 8; /* number of spaces that a TAB represents */
79int sc_allowtags = TRUE; /* allow/detect tagnames in lex() */
80int sc_status; /* read/write status */
81int sc_rationaltag = 0; /* tag for rational numbers */
82int rational_digits = 0; /* number of fractional digits */
83
84FILE *inpf = NULL; /* file read from (source or include) */
85FILE *inpf_org = NULL; /* main source file */
86FILE *outf = NULL; /* file written to */
87
88jmp_buf errbuf;
diff --git a/libraries/embryo/src/lib/Embryo.h b/libraries/embryo/src/lib/Embryo.h
deleted file mode 100644
index 4003f6b..0000000
--- a/libraries/embryo/src/lib/Embryo.h
+++ /dev/null
@@ -1,901 +0,0 @@
1/**
2@brief Embryo Library
3
4These routines are used for Embryo.
5
6@mainpage Embryo Library Documentation
7
8@image html e_big.png
9
10@version 1.0.0
11@author Carsten Haitzler <raster\@rasterman.com>
12@author Compuphase http://www.compuphase.com
13@date 2004-2012
14
15@section intro What is Embryo?
16
17Embryo is a tiny library designed to interpret limited Small programs
18compiled by the included compiler, @c embryo_cc. It is mostly a cleaned
19up and smaller version of the original Small abstract machine. The
20compiler is mostly untouched.
21
22Small was renamed to Pawn.
23For more information about the Pawn language, see
24@htmlonly <a href=http://www.compuphase.com/pawn/pawn.htm>Pawn</a>
25@endhtmlonly
26@latexonly http://www.compuphase.com/pawn/pawn.htm @endlatexonly
27For the basics about the Small language, see @ref Small_Page.
28
29@section How_to_Use How to Use Embryo?
30
31To use Embryo in your code, you need to do at least the following:
32
33@li Include @ref Embryo.h.
34@li Load the Embryo program using one of the
35 @ref Embryo_Program_Creation_Group.
36@li Set up the native calls with @ref embryo_program_native_call_add.
37@li Create a virtual machine with @ref embryo_program_vm_push.
38@li Then run the program with @ref embryo_program_run.
39
40@todo Clean up compiler code.
41@todo Proper overview of the operation of the interpreter, that is how
42 the heap, stack, virtual machines, etc fit together.
43
44@page Small_Page Brief Introduction to Small
45
46This section describes the basics of Small, as compiled and interpreted
47with Embryo.
48
49This summary assumes that you are familar with C. For a full list of
50differences between C and Small, again, see the full documentation.
51
52@section Small_Variables_Section Variables
53
54@subsection Small_Type_Subsection Types
55
56There is only one type, known as the "cell", which can hold an integer.
57
58@subsection Small_Scope_Subsection Scope
59
60The scope and usage of a variable depends on its declaration.
61
62@li A local variable is normally declared with the @c new keyword. E.g.
63 @code new variable @endcode
64@li A static function variable is defined within a function with the
65 @c static keyword.
66@li A global static variable is one that is only available within the
67 file it was declared in. Again, use the @c static keyword, but outside
68 of any function.
69@li A stock variable is one that may not be compiled into a program if it
70 is not used. It is declared using @c stock.
71@li A public variable is one that can be read by the host program using
72 @ref embryo_program_variable_find. It is declared using @c public
73 keyword.
74
75Remember that the keywords above are to be used on their own. That is,
76for example: @code public testvar @endcode not:
77@code new public testvar @endcode
78
79@subsection Small_Constants_Subsection Constants
80
81You can declare constants in two ways:
82@li Using the preprocessor macro @c \#define.
83@li By inserting @c const between the keyword and variable name of a
84 variable declaration. For example, to declare the variable @c var1
85 constant, you type @code new const var1 = 2 @endcode Now @c var1
86 cannot be changed.
87
88@subsection Small_Arrays_Subsection Arrays
89
90To declare an array, append square brackets to the end of the variable
91name. The following examples show how to declare arrays. Note the
92use of the ellipsis operator, which bases the array based on the last two
93declared values:
94
95@code
96new msg[] = "A message."
97new ints[] = {1, 3, 4}
98new ints2[20] = {1, 3} // All other elements 0.
99new ints3[10] = {1, ... } // All elements = 1
100new ints4[10] = {10, 20, ... } // Elements = 10 -> 100.
101 // The difference can be negative.
102new ints5[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
103@endcode
104
105@note Array initialisers need to be constant.
106
107@section Small_Func_Calls_Section Function Calls
108
109A typical function declaration is as follows:
110
111@code
112testfunc(param) {
113 // Do something ...
114 // over a couple of lines.
115}
116@endcode
117
118You can pass by reference. That is, the parameter you pass is changed
119outside of the function. For example:
120
121@code
122testfunc(&param) {
123 param = 10
124 // The passed variable will be set to 10 outside of the function.
125}
126@endcode
127
128To pass an array:
129
130@code
131testfunc(param[]) {
132 // Do something to the array
133}
134@endcode
135
136@note Arrays are passed by reference.
137
138@section Small_Control_Subsection Control Structures.
139
140Small has the following control structures, which similar to their C
141counterparts:
142@li @code if (expression) statement1 else statement2 @endcode
143@li @code switch (expression) {
144 case 0:
145 statement1 // Can only be one statement. Look Ma, no breaks!
146 case 1..3: // For values between 1 and 3 inclusive.
147 statement2
148 default: // Optional
149 statement3
150}
151@endcode
152@li @code while(expression) statement @endcode
153@li @code do statement while (expression) @endcode
154@li @code for (init_expression; before_iter_test_expression; after_iter_expression) statement @endcode
155
156@section Small_Preprocessor_Section Preprocessor
157
158The following preprocessor directives are available:
159@li @code #assert constant_expression @endcode
160@li @code #define pattern replacement @endcode
161@li @code #define pattern(%1,%2,...) replacement @endcode
162@li @code #include filename @endcode
163@li @code #if constant_expression
164 // Various bits of code
165#else
166 // Other bits of code
167#endif
168@endcode
169@li @code #undef pattern @endcode
170
171
172@page Available_Native_Calls_Page Available Calls
173
174Embryo provides a minimal set of native calls that can be used within
175any Embryo script. Those calls are detailed here.
176
177@note Some of the "core" functions here are also described in the full
178 Small documentation given
179
180@todo Finish this section.
181
182@section Args_ANC_Section Argument Functions
183
184@subsection Numargs_Desc numargs
185
186Returns the number of arguments passed to a function. Useful
187when dealing with variable argument lists.
188
189@subsection Getargs_Desc getarg(arg, index=0)
190
191Retrieves the argument number @c arg. If the argument is an array,
192use @c index to specify the index of the array to return.
193
194@subsection Setargs_Desc setargs(arg, index=0, value)
195
196Sets the argument number @c arg to the given @c arg. @c index specifies
197the index of @c arg to set if @c arg is an array.
198
199@section String_ANC_Section String Functions
200
201Functions that work on strings.
202
203@subsection Atoi_Desc atoi
204
205Translates an number in string form into an integer.
206
207@subsection Fnmatch_Desc fnmatch
208
209Buggered if I know what this does?
210
211@subsection Strcmp_Desc strcmp
212
213String comparing function.
214
215
216@section Float_ANC_Section Float Functions
217
218@subsection Float_Desc float
219
220@subsection Atof_Desc atof
221
222@subsection Float_Mul_Desc float_mul
223
224@subsection Float_Div_Desc float_div
225
226@subsection Float_Add_Desc float_add
227
228@subsection Float_Sub_Desc float_sub
229
230@subsection Fract_Desc fract
231
232@subsection Round_Desc round
233
234@subsection Float_Cmp_Desc float_cmp
235
236@subsection Sqrt_Desc sqrt
237
238@subsection Pow_Desc pow
239
240@subsection Log_Desc log
241
242@subsection Sin_Desc sin
243
244@subsection Cos_Desc cos
245
246@subsection Tan_Desc tan
247
248@subsection Abs_Desc abs
249
250Returns the absolute value of the given float.
251
252@section Time_ANC_Section Time Functions
253
254@subsection Seconds_Desc seconds()
255
256@subsection Date_Desc date
257
258
259@section Rand_ANC_Section Random Functions
260
261@subsection Rand_Desc rand()
262
263Returns a random integer.
264
265@subsection Randf_Desc randf()
266
267Returns a random float.
268
269@file Embryo.h
270@brief Embryo virtual machine library.
271
272This file includes the routines needed for Embryo library interaction.
273This is the @e only file you need to include.
274
275*/
276
277// The following definitions are in Embryo.h, but I did not want to
278// mess up the formatting of the file
279
280/**
281 @def EMBRYO_FUNCTION_NONE
282 An invalid/non-existent function.
283*/
284
285/**
286 @def EMBRYO_FUNCTION_MAIN
287 Start at program entry point. For use with @ref embryo_program_run.
288*/
289
290/**
291 @def EMBRYO_FUNCTION_CONT
292 Continue from last address. For use with @ref embryo_program_run.
293*/
294
295/**
296 @def EMBRYO_PROGRAM_OK
297 Program was run successfully.
298*/
299
300/**
301 @def EMBRYO_PROGRAM_SLEEP
302 The program's execution was interrupted by a Small @c sleep command.
303*/
304
305/**
306 @def EMBRYO_PROGRAM_FAIL
307 An error in the program caused it to fail.
308*/
309
310#ifndef _EMBRYO_H
311#define _EMBRYO_H
312
313#ifdef EAPI
314# undef EAPI
315#endif
316
317#ifdef _WIN32
318# ifdef EFL_EMBRYO_BUILD
319# ifdef DLL_EXPORT
320# define EAPI __declspec(dllexport)
321# else
322# define EAPI
323# endif /* ! DLL_EXPORT */
324# else
325# define EAPI __declspec(dllimport)
326# endif /* ! EFL_EMBRYO_BUILD */
327#else
328# ifdef __GNUC__
329# if __GNUC__ >= 4
330# define EAPI __attribute__ ((visibility("default")))
331# else
332# define EAPI
333# endif
334# else
335# define EAPI
336# endif
337#endif /* ! _WIN32 */
338
339#ifdef __cplusplus
340extern "C" {
341#endif
342
343#define EMBRYO_VERSION_MAJOR 1
344#define EMBRYO_VERSION_MINOR 2
345
346 typedef struct _Embryo_Version
347 {
348 int major;
349 int minor;
350 int micro;
351 int revision;
352 } Embryo_Version;
353
354 EAPI extern Embryo_Version *embryo_version;
355
356 /* potential error values */
357 typedef enum _Embryo_Error
358 {
359 EMBRYO_ERROR_NONE,
360 /* reserve the first 15 error codes for exit codes of the abstract machine */
361 EMBRYO_ERROR_EXIT, /** Forced exit */
362 EMBRYO_ERROR_ASSERT, /** Assertion failed */
363 EMBRYO_ERROR_STACKERR, /** Stack/heap collision */
364 EMBRYO_ERROR_BOUNDS, /** Index out of bounds */
365 EMBRYO_ERROR_MEMACCESS, /** Invalid memory access */
366 EMBRYO_ERROR_INVINSTR, /** Invalid instruction */
367 EMBRYO_ERROR_STACKLOW, /** Stack underflow */
368 EMBRYO_ERROR_HEAPLOW, /** Heap underflow */
369 EMBRYO_ERROR_CALLBACK, /** No callback, or invalid callback */
370 EMBRYO_ERROR_NATIVE, /** Native function failed */
371 EMBRYO_ERROR_DIVIDE, /** Divide by zero */
372 EMBRYO_ERROR_SLEEP, /** Go into sleepmode - code can be restarted */
373
374 EMBRYO_ERROR_MEMORY = 16, /** Out of memory */
375 EMBRYO_ERROR_FORMAT, /** Invalid file format */
376 EMBRYO_ERROR_VERSION, /** File is for a newer version of the Embryo_Program */
377 EMBRYO_ERROR_NOTFOUND, /** Function not found */
378 EMBRYO_ERROR_INDEX, /** Invalid index parameter (bad entry point) */
379 EMBRYO_ERROR_DEBUG, /** Debugger cannot run */
380 EMBRYO_ERROR_INIT, /** Embryo_Program not initialized (or doubly initialized) */
381 EMBRYO_ERROR_USERDATA, /** Unable to set user data field (table full) */
382 EMBRYO_ERROR_INIT_JIT, /** Cannot initialize the JIT */
383 EMBRYO_ERROR_PARAMS, /** Parameter error */
384 EMBRYO_ERROR_DOMAIN, /** Domain error, expression result does not fit in range */
385 } Embryo_Error;
386
387 /* program run return values */
388 typedef enum _Embryo_Status
389 {
390 EMBRYO_PROGRAM_FAIL = 0,
391 EMBRYO_PROGRAM_OK = 1,
392 EMBRYO_PROGRAM_SLEEP = 2,
393 EMBRYO_PROGRAM_BUSY = 3,
394 EMBRYO_PROGRAM_TOOLONG = 4
395 } Embryo_Status;
396
397 typedef unsigned int Embryo_UCell;
398 typedef int Embryo_Cell;
399 /** An invalid cell reference */
400#define EMBRYO_CELL_NONE 0x7fffffff
401
402 typedef struct _Embryo_Program Embryo_Program;
403 typedef int Embryo_Function;
404 /* possible function type values that are enumerated */
405#define EMBRYO_FUNCTION_NONE 0x7fffffff /* An invalid/non existent function */
406#define EMBRYO_FUNCTION_MAIN -1 /* Start at program entry point */
407#define EMBRYO_FUNCTION_CONT -2 /* Continue from last address */
408
409 typedef union
410 {
411 float f;
412 Embryo_Cell c;
413 } Embryo_Float_Cell;
414
415#if defined _MSC_VER || defined __SUNPRO_C
416/** Float to Embryo_Cell */
417# define EMBRYO_FLOAT_TO_CELL(f) (((Embryo_Float_Cell *)&(f))->c)
418/** Embryo_Cell to float */
419# define EMBRYO_CELL_TO_FLOAT(c) (((Embryo_Float_Cell *)&(c))->f)
420#else
421/** Float to Embryo_Cell */
422# define EMBRYO_FLOAT_TO_CELL(f) ((Embryo_Float_Cell) f).c
423/** Embryo_Cell to float */
424# define EMBRYO_CELL_TO_FLOAT(c) ((Embryo_Float_Cell) c).f
425#endif
426
427 /**
428 * @defgroup Embryo_Library_Group Library Maintenance Functions
429 *
430 * Functions that start up and shutdown the Embryo library.
431 */
432
433
434/**
435 * Initialises the Embryo library.
436 * @return The number of times the library has been initialised without being
437 * shut down.
438 * @ingroup Embryo_Library_Group
439 */
440EAPI int embryo_init(void);
441
442/**
443 * Shuts down the Embryo library.
444 * @return The number of times the library has been initialised without being
445 * shutdown.
446 * @ingroup Embryo_Library_Group
447 */
448EAPI int embryo_shutdown(void);
449
450 /**
451 * @defgroup Embryo_Program_Creation_Group Program Creation and Destruction Functions
452 *
453 * Functions that set up programs, and destroy them.
454 */
455
456/**
457 * Creates a new Embryo program, with bytecode data that can be freed.
458 * @param data Pointer to the bytecode of the program.
459 * @param size Number of bytes of bytecode.
460 * @return A new Embryo program.
461 * @ingroup Embryo_Program_Creation_Group
462 */
463EAPI Embryo_Program *embryo_program_new(void *data, int size);
464
465/**
466 * Creates a new Embryo program, with bytecode data that cannot be
467 * freed.
468 * @param data Pointer to the bytecode of the program.
469 * @param size Number of bytes of bytecode.
470 * @return A new Embryo program.
471 * @ingroup Embryo_Program_Creation_Group
472 */
473EAPI Embryo_Program *embryo_program_const_new(void *data, int size);
474
475/**
476 * Creates a new Embryo program based on the bytecode data stored in the
477 * given file.
478 * @param file Filename of the given file.
479 * @return A new Embryo program.
480 * @ingroup Embryo_Program_Creation_Group
481 */
482EAPI Embryo_Program *embryo_program_load(const char *file);
483
484/**
485 * Frees the given Embryo program.
486 * @param ep The given program.
487 * @ingroup Embryo_Program_Creation_Group
488 */
489EAPI void embryo_program_free(Embryo_Program *ep);
490
491/**
492 * Adds a native program call to the given Embryo program.
493 * @param ep The given Embryo program.
494 * @param name The name for the call used in the script.
495 * @param func The function to use when the call is made.
496 * @ingroup Embryo_Func_Group
497 */
498
499/**
500 * @defgroup Embryo_Func_Group Function Functions
501 *
502 * Functions that deal with Embryo program functions.
503 */
504EAPI void embryo_program_native_call_add(Embryo_Program *ep, const char *name, Embryo_Cell (*func) (Embryo_Program *ep, Embryo_Cell *params));
505
506/**
507 * Resets the current virtual machine session of the given program.
508 * @param ep The given program.
509 * @ingroup Embryo_Program_VM_Group
510 */
511
512/**
513 * @defgroup Embryo_Program_VM_Group Virtual Machine Functions
514 *
515 * Functions that deal with creating and destroying virtual machine sessions
516 * for a given program.
517 *
518 * A given embryo program can have multiple virtual machine sessions running.
519 * This is useful when you have a native call that in turn calls a function in
520 * the embryo program. The native call can start a new virtual machine
521 * session to run the function it needs. Once completed, the session can be
522 * popped off the program's stack, and the native call can return its value
523 * to the old session.
524 *
525 * A new virtual machine session is created by pushing a new virtual machine
526 * onto the session stack of a program using @ref embryo_program_vm_push.
527 * The current virtual machine session can be destroyed by calling
528 * @ref embryo_program_vm_pop.
529 */
530EAPI void embryo_program_vm_reset(Embryo_Program *ep);
531
532/**
533 * Starts a new virtual machine session for the given program.
534 *
535 * See @ref Embryo_Program_VM_Group for more information about how this works.
536 *
537 * @param ep The given program.
538 * @ingroup Embryo_Program_VM_Group
539 */
540EAPI void embryo_program_vm_push(Embryo_Program *ep);
541
542/**
543 * Frees the current virtual machine session associated with the given program.
544 *
545 * See @ref Embryo_Program_VM_Group for more information about how this works.
546 * Note that you will need to retrieve any return data or data on the stack
547 * before you pop.
548 *
549 * @param ep The given program.
550 * @ingroup Embryo_Program_VM_Group
551 */
552EAPI void embryo_program_vm_pop(Embryo_Program *ep);
553
554/**
555 * Ensures that the given unsigned short integer is in the small
556 * endian format.
557 * @param v Pointer to the given integer.
558 * @ingroup Embryo_Swap_Group
559 */
560
561/**
562 * @defgroup Embryo_Swap_Group Byte Swapping Functions
563 *
564 * Functions that are used to ensure that integers passed to the
565 * virtual machine are in small endian format. These functions are
566 * used to ensure that the virtual machine operates correctly on big
567 * endian machines.
568 */
569EAPI void embryo_swap_16(unsigned short *v);
570
571/**
572 * Ensures that the given unsigned integer is in the small endian
573 * format.
574 * @param v Pointer to the given integer.
575 * @ingroup Embryo_Swap_Group
576 */
577EAPI void embryo_swap_32(unsigned int *v);
578
579/**
580 * Returns the function in the given program with the given name.
581 * @param ep The given program.
582 * @param name The given function name.
583 * @return The function if successful. Otherwise, @c EMBRYO_FUNCTION_NONE.
584 * @ingroup Embryo_Func_Group
585 */
586EAPI Embryo_Function embryo_program_function_find(Embryo_Program *ep, const char *name);
587
588/**
589 * Retrieves the location of the public variable in the given program
590 * with the given name.
591 * @param ep The given program.
592 * @param name The given name.
593 * @return The address of the variable if found. @c EMBRYO_CELL_NONE
594 * otherwise.
595 * @ingroup Embryo_Public_Variable_Group
596 */
597
598/**
599 * @defgroup Embryo_Public_Variable_Group Public Variable Access Functions
600 *
601 * In an Embryo program, a global variable can be declared public, as
602 * described in @ref Small_Scope_Subsection. The functions here allow
603 * the host program to access these public variables.
604 */
605EAPI Embryo_Cell embryo_program_variable_find(Embryo_Program *ep, const char *name);
606
607/**
608 * Retrieves the number of public variables in the given program.
609 * @param ep The given program.
610 * @return The number of public variables.
611 * @ingroup Embryo_Public_Variable_Group
612 */
613EAPI int embryo_program_variable_count_get(Embryo_Program *ep);
614
615/**
616 * Retrieves the location of the public variable in the given program
617 * with the given identifier.
618 * @param ep The given program.
619 * @param num The identifier of the public variable.
620 * @return The virtual machine address of the variable if found.
621 * @c EMBRYO_CELL_NONE otherwise.
622 * @ingroup Embryo_Public_Variable_Group
623 */
624EAPI Embryo_Cell embryo_program_variable_get(Embryo_Program *ep, int num);
625
626/**
627 * Sets the error code for the given program to the given code.
628 * @param ep The given program.
629 * @param error The given error code.
630 * @ingroup Embryo_Error_Group
631 */
632
633/**
634 * @defgroup Embryo_Error_Group Error Functions
635 *
636 * Functions that set and retrieve error codes in Embryo programs.
637 */
638EAPI void embryo_program_error_set(Embryo_Program *ep, Embryo_Error error);
639
640/**
641 * Retrieves the current error code for the given program.
642 * @param ep The given program.
643 * @return The current error code.
644 * @ingroup Embryo_Error_Group
645 */
646EAPI Embryo_Error embryo_program_error_get(Embryo_Program *ep);
647
648/**
649 * Sets the data associated to the given program.
650 * @param ep The given program.
651 * @param data New bytecode data.
652 * @ingroup Embryo_Program_Data_Group
653 */
654
655/**
656 * @defgroup Embryo_Program_Data_Group Program Data Functions
657 *
658 * Functions that set and retrieve data associated with the given
659 * program.
660 */
661EAPI void embryo_program_data_set(Embryo_Program *ep, void *data);
662
663/**
664 * Retrieves the data associated to the given program.
665 * @param ep The given program.
666 * @ingroup Embryo_Program_Data_Group
667 */
668EAPI void *embryo_program_data_get(Embryo_Program *ep);
669
670/**
671 * Retrieves a string describing the given error code.
672 * @param error The given error code.
673 * @return String describing the given error code. If the given code is not
674 * known, the string "(unknown)" is returned.
675 * @ingroup Embryo_Error_Group
676 */
677EAPI const char *embryo_error_string_get(Embryo_Error error);
678
679/**
680 * Retrieves the length of the string starting at the given cell.
681 * @param ep The program the cell is part of.
682 * @param str_cell Pointer to the first cell of the string.
683 * @return The length of the string. @c 0 is returned if there is an error.
684 * @ingroup Embryo_Data_String_Group
685 */
686
687/**
688 * @defgroup Embryo_Data_String_Group Embryo Data String Functions
689 *
690 * Functions that operate on strings in the memory of a virtual machine.
691 */
692EAPI int embryo_data_string_length_get(Embryo_Program *ep, Embryo_Cell *str_cell);
693
694/**
695 * Copies the string starting at the given cell to the given buffer.
696 * @param ep The program the cell is part of.
697 * @param str_cell Pointer to the first cell of the string.
698 * @param dst The given buffer.
699 * @ingroup Embryo_Data_String_Group
700 */
701EAPI void embryo_data_string_get(Embryo_Program *ep, Embryo_Cell *str_cell, char *dst);
702
703/**
704 * Copies string in the given buffer into the virtual machine memory
705 * starting at the given cell.
706 * @param ep The program the cell is part of.
707 * @param src The given buffer.
708 * @param str_cell Pointer to the first cell to copy the string to.
709 * @ingroup Embryo_Data_String_Group
710 */
711EAPI void embryo_data_string_set(Embryo_Program *ep, const char *src, Embryo_Cell *str_cell);
712
713/**
714 * Retreives a pointer to the address in the virtual machine given by the
715 * given cell.
716 * @param ep The program whose virtual machine address is being queried.
717 * @param addr The given cell.
718 * @return A pointer to the cell at the given address.
719 * @ingroup Embryo_Data_String_Group
720 */
721EAPI Embryo_Cell *embryo_data_address_get(Embryo_Program *ep, Embryo_Cell addr);
722
723/**
724 * Increases the size of the heap of the given virtual machine by the given
725 * number of Embryo_Cells.
726 * @param ep The program with the given virtual machine.
727 * @param cells The given number of Embryo_Cells.
728 * @return The address of the new memory region on success.
729 * @c EMBRYO_CELL_NONE otherwise.
730 * @ingroup Embryo_Heap_Group
731 */
732
733/**
734 * @defgroup Embryo_Heap_Group Heap Functions
735 *
736 * The heap is an area of memory that can be allocated for program
737 * use at runtime. The heap functions here change the amount of heap
738 * memory available.
739 */
740EAPI Embryo_Cell embryo_data_heap_push(Embryo_Program *ep, int cells);
741
742/**
743 * Decreases the size of the heap of the given virtual machine down to the
744 * given size.
745 * @param ep The program with the given virtual machine.
746 * @param down_to The given size.
747 * @ingroup Embryo_Heap_Group
748 */
749EAPI void embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to);
750
751/**
752 * Returns the number of virtual machines are running for the given program.
753 * @param ep The given program.
754 * @return The number of virtual machines running.
755 * @ingroup Embryo_Run_Group
756 */
757
758/**
759 * @defgroup Embryo_Run_Group Program Run Functions
760 *
761 * Functions that are involved in actually running functions in an
762 * Embryo program.
763 */
764EAPI int embryo_program_recursion_get(Embryo_Program *ep);
765
766/**
767 * Runs the given function of the given Embryo program in the current
768 * virtual machine. The parameter @p fn can be found using
769 * @ref embryo_program_function_find.
770 *
771 * @note For Embryo to be able to run a function, it must have been
772 * declared @c public in the Small source code.
773 *
774 * @param ep The given program.
775 * @param fn The given function. Normally "main", in which case the
776 * constant @c EMBRYO_FUNCTION_MAIN can be used.
777 * @return @c EMBRYO_PROGRAM_OK on success. @c EMBRYO_PROGRAM_SLEEP if the
778 * program is halted by the Small @c sleep call.
779 * @c EMBRYO_PROGRAM_FAIL if there is an error.
780 * @c EMBRYO_PROGRAM_TOOLONG if the program executes for longer than
781 * it is allowed to in abstract machine instruction count.
782 * @ingroup Embryo_Run_Group
783 */
784EAPI Embryo_Status embryo_program_run(Embryo_Program *ep, Embryo_Function func);
785
786/**
787 * Retreives the return value of the last called function of the given
788 * program.
789 * @param ep The given program.
790 * @return An Embryo_Cell representing the return value of the function
791 * that was last called.
792 * @ingroup Embryo_Run_Group
793 */
794EAPI Embryo_Cell embryo_program_return_value_get(Embryo_Program *ep);
795
796/**
797 * Sets the maximum number of abstract machine cycles any given program run
798 * can execute before being put to sleep and returning.
799 *
800 * @param ep The given program.
801 * @param max The number of machine cycles as a limit.
802 *
803 * This sets the maximum number of abstract machine (virtual machine)
804 * instructions that a single run of an embryo function (even if its main)
805 * can use before embryo embryo_program_run() reutrns with the value
806 * EMBRYO_PROGRAM_TOOLONG. If the function fully executes within this number
807 * of cycles, embryo_program_run() will return as normal with either
808 * EMBRYO_PROGRAM_OK, EMBRYO_PROGRAM_FAIL or EMBRYO_PROGRAM_SLEEP. If the
809 * run exceeds this instruction count, then EMBRYO_PROGRAM_TOOLONG will be
810 * returned indicating the program exceeded its run count. If the app wishes
811 * to continue running this anyway - it is free to process its own events or
812 * whatever it wants and continue the function by calling
813 * embryo_program_run(program, EMBRYO_FUNCTION_CONT); which will start the
814 * run again until the instruction count is reached. This can keep being done
815 * to allow the calling program to still be able to control things outside the
816 * embryo function being called. If the maximum run cycle count is 0 then the
817 * program is allowed to run forever only returning when it is done.
818 *
819 * It is important to note that abstract machine cycles are NOT the same as
820 * the host machine cpu cycles. They are not fixed in runtime per cycle, so
821 * this is more of a helper tool than a way to HARD-FORCE a script to only
822 * run for a specific period of time. If the cycle count is set to something
823 * low like 5000 or 1000, then every 1000 (or 5000) cycles control will be
824 * returned to the calling process where it can check a timer to see if a
825 * physical runtime limit has been elapsed and then abort running further
826 * assuming a "runaway script" or keep continuing the script run. This
827 * limits resolution to only that many cycles which do not take a determined
828 * amount of time to execute, as this varies from cpu to cpu and also depends
829 * on how loaded the system is. Making the max cycle run too low will
830 * impact performance requiring the abstract machine to do setup and teardown
831 * cycles too often comapred to cycles actually executed.
832 *
833 * Also note it does NOT include nested abstract machines. IF this abstract
834 * machine run calls embryo script that calls a native function that in turn
835 * calls more embryo script, then the 2nd (and so on) levels are not included
836 * in this run count. They can set their own max instruction count values
837 * separately.
838 *
839 * The default max cycle run value is 0 in any program until set with this
840 * function.
841 *
842 * @ingroup Embryo_Run_Group
843 */
844EAPI void embryo_program_max_cycle_run_set(Embryo_Program *ep, int max);
845
846/**
847 * Retreives the maximum number of abstract machine cycles a program is allowed
848 * to run.
849 * @param ep The given program.
850 * @return The number of cycles a run cycle is allowed to run for this
851 * program.
852 *
853 * This returns the value set by embryo_program_max_cycle_run_set(). See
854 * embryo_program_max_cycle_run_set() for more information.
855 *
856 * @ingroup Embryo_Run_Group
857 */
858EAPI int embryo_program_max_cycle_run_get(Embryo_Program *ep);
859
860/**
861 * Pushes an Embryo_Cell onto the function stack to use as a parameter for
862 * the next function that is called in the given program.
863 * @param ep The given program.
864 * @param cell The Embryo_Cell to push onto the stack.
865 * @return @c 1 if successful. @c 0 otherwise.
866 * @ingroup Embryo_Parameter_Group
867 */
868
869/**
870 * @defgroup Embryo_Parameter_Group Function Parameter Functions
871 *
872 * Functions that set parameters for the next function that is called.
873 */
874EAPI int embryo_parameter_cell_push(Embryo_Program *ep, Embryo_Cell cell);
875
876/**
877 * Pushes a string onto the function stack to use as a parameter for the
878 * next function that is called in the given program.
879 * @param ep The given program.
880 * @param str The string to push onto the stack.
881 * @return @c 1 if successful. @c 0 otherwise.
882 * @ingroup Embryo_Parameter_Group
883 */
884EAPI int embryo_parameter_string_push(Embryo_Program *ep, const char *str);
885
886/**
887 * Pushes an array of Embryo_Cells onto the function stack to be used as
888 * parameters for the next function that is called in the given program.
889 * @param ep The given program.
890 * @param cells The array of Embryo_Cells.
891 * @param num The number of cells in @p cells.
892 * @return @c 1 if successful. @c 0 otherwise.
893 * @ingroup Embryo_Parameter_Group
894 */
895EAPI int embryo_parameter_cell_array_push(Embryo_Program *ep, Embryo_Cell *cells, int num);
896
897#ifdef __cplusplus
898}
899#endif
900
901#endif
diff --git a/libraries/embryo/src/lib/Makefile.am b/libraries/embryo/src/lib/Makefile.am
deleted file mode 100644
index d2ccb55..0000000
--- a/libraries/embryo/src/lib/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_builddir) \
8-I$(top_srcdir)/src/lib \
9-I$(top_srcdir)/src/lib/include \
10-DPACKAGE_BIN_DIR=\"$(bindir)\" \
11-DPACKAGE_LIB_DIR=\"$(libdir)\" \
12-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
13@EVIL_CFLAGS@ \
14@EXOTIC_CFLAGS@ \
15@EMBRYO_CPPFLAGS@ \
16@EFL_EMBRYO_BUILD@
17
18includes_HEADERS = Embryo.h
19includesdir = $(includedir)/embryo-@VMAJ@
20
21lib_LTLIBRARIES = libembryo.la
22
23libembryo_la_SOURCES = \
24embryo_amx.c \
25embryo_args.c \
26embryo_float.c \
27embryo_main.c \
28embryo_rand.c \
29embryo_str.c \
30embryo_time.c
31
32libembryo_la_CFLAGS = @EMBRYO_CFLAGS@
33libembryo_la_LIBADD = @EXOTIC_LIBS@ @EVIL_LIBS@ -lm
34libembryo_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
35
36EXTRA_DIST = embryo_private.h
diff --git a/libraries/embryo/src/lib/Makefile.in b/libraries/embryo/src/lib/Makefile.in
deleted file mode 100644
index c46a03e..0000000
--- a/libraries/embryo/src/lib/Makefile.in
+++ /dev/null
@@ -1,686 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
43 $(top_srcdir)/m4/efl_binary.m4 $(top_srcdir)/m4/efl_doxygen.m4 \
44 $(top_srcdir)/m4/efl_fnmatch.m4 \
45 $(top_srcdir)/m4/efl_gettimeofday.m4 \
46 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/libtool.m4 \
47 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
48 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
49 $(top_srcdir)/configure.ac
50am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
51 $(ACLOCAL_M4)
52mkinstalldirs = $(install_sh) -d
53CONFIG_HEADER = $(top_builddir)/config.h
54CONFIG_CLEAN_FILES =
55CONFIG_CLEAN_VPATH_FILES =
56am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
57am__vpath_adj = case $$p in \
58 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
59 *) f=$$p;; \
60 esac;
61am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
62am__install_max = 40
63am__nobase_strip_setup = \
64 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
65am__nobase_strip = \
66 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
67am__nobase_list = $(am__nobase_strip_setup); \
68 for p in $$list; do echo "$$p $$p"; done | \
69 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
70 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
71 if (++n[$$2] == $(am__install_max)) \
72 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
73 END { for (dir in files) print dir, files[dir] }'
74am__base_list = \
75 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
76 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
77am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
78LTLIBRARIES = $(lib_LTLIBRARIES)
79libembryo_la_DEPENDENCIES =
80am_libembryo_la_OBJECTS = libembryo_la-embryo_amx.lo \
81 libembryo_la-embryo_args.lo libembryo_la-embryo_float.lo \
82 libembryo_la-embryo_main.lo libembryo_la-embryo_rand.lo \
83 libembryo_la-embryo_str.lo libembryo_la-embryo_time.lo
84libembryo_la_OBJECTS = $(am_libembryo_la_OBJECTS)
85AM_V_lt = $(am__v_lt_$(V))
86am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
87am__v_lt_0 = --silent
88libembryo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
89 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libembryo_la_CFLAGS) \
90 $(CFLAGS) $(libembryo_la_LDFLAGS) $(LDFLAGS) -o $@
91DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
92depcomp = $(SHELL) $(top_srcdir)/depcomp
93am__depfiles_maybe = depfiles
94am__mv = mv -f
95COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
96 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
97LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
98 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
99 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
100 $(AM_CFLAGS) $(CFLAGS)
101AM_V_CC = $(am__v_CC_$(V))
102am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
103am__v_CC_0 = @echo " CC " $@;
104AM_V_at = $(am__v_at_$(V))
105am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
106am__v_at_0 = @
107CCLD = $(CC)
108LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
109 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
110 $(AM_LDFLAGS) $(LDFLAGS) -o $@
111AM_V_CCLD = $(am__v_CCLD_$(V))
112am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
113am__v_CCLD_0 = @echo " CCLD " $@;
114AM_V_GEN = $(am__v_GEN_$(V))
115am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
116am__v_GEN_0 = @echo " GEN " $@;
117SOURCES = $(libembryo_la_SOURCES)
118DIST_SOURCES = $(libembryo_la_SOURCES)
119HEADERS = $(includes_HEADERS)
120ETAGS = etags
121CTAGS = ctags
122DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
123ACLOCAL = @ACLOCAL@
124ALLOCA = @ALLOCA@
125AMTAR = @AMTAR@
126AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
127AR = @AR@
128AS = @AS@
129AUTOCONF = @AUTOCONF@
130AUTOHEADER = @AUTOHEADER@
131AUTOMAKE = @AUTOMAKE@
132AWK = @AWK@
133CC = @CC@
134CCDEPMODE = @CCDEPMODE@
135CFLAGS = @CFLAGS@
136CPP = @CPP@
137CPPFLAGS = @CPPFLAGS@
138CYGPATH_W = @CYGPATH_W@
139DEFS = @DEFS@
140DEPDIR = @DEPDIR@
141DLLTOOL = @DLLTOOL@
142DSYMUTIL = @DSYMUTIL@
143DUMPBIN = @DUMPBIN@
144ECHO_C = @ECHO_C@
145ECHO_N = @ECHO_N@
146ECHO_T = @ECHO_T@
147EFL_EMBRYO_BUILD = @EFL_EMBRYO_BUILD@
148EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
149EGREP = @EGREP@
150EINA_CFLAGS = @EINA_CFLAGS@
151EINA_LIBS = @EINA_LIBS@
152EMBRYO_CC_PRG = @EMBRYO_CC_PRG@
153EMBRYO_CFLAGS = @EMBRYO_CFLAGS@
154EMBRYO_CPPFLAGS = @EMBRYO_CPPFLAGS@
155EVIL_CFLAGS = @EVIL_CFLAGS@
156EVIL_LIBS = @EVIL_LIBS@
157EXEEXT = @EXEEXT@
158EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
159EXOTIC_LIBS = @EXOTIC_LIBS@
160FGREP = @FGREP@
161GREP = @GREP@
162INSTALL = @INSTALL@
163INSTALL_DATA = @INSTALL_DATA@
164INSTALL_PROGRAM = @INSTALL_PROGRAM@
165INSTALL_SCRIPT = @INSTALL_SCRIPT@
166INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
167LD = @LD@
168LDFLAGS = @LDFLAGS@
169LIBOBJS = @LIBOBJS@
170LIBS = @LIBS@
171LIBTOOL = @LIBTOOL@
172LIPO = @LIPO@
173LN_S = @LN_S@
174LTLIBOBJS = @LTLIBOBJS@
175MAKEINFO = @MAKEINFO@
176MKDIR_P = @MKDIR_P@
177NM = @NM@
178NMEDIT = @NMEDIT@
179OBJDUMP = @OBJDUMP@
180OBJEXT = @OBJEXT@
181OTOOL = @OTOOL@
182OTOOL64 = @OTOOL64@
183PACKAGE = @PACKAGE@
184PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
185PACKAGE_NAME = @PACKAGE_NAME@
186PACKAGE_STRING = @PACKAGE_STRING@
187PACKAGE_TARNAME = @PACKAGE_TARNAME@
188PACKAGE_URL = @PACKAGE_URL@
189PACKAGE_VERSION = @PACKAGE_VERSION@
190PATH_SEPARATOR = @PATH_SEPARATOR@
191PKG_CONFIG = @PKG_CONFIG@
192PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
193PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
194RANLIB = @RANLIB@
195SED = @SED@
196SET_MAKE = @SET_MAKE@
197SHELL = @SHELL@
198STRIP = @STRIP@
199VERSION = @VERSION@
200VMAJ = @VMAJ@
201abs_builddir = @abs_builddir@
202abs_srcdir = @abs_srcdir@
203abs_top_builddir = @abs_top_builddir@
204abs_top_srcdir = @abs_top_srcdir@
205ac_ct_CC = @ac_ct_CC@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207am__include = @am__include@
208am__leading_dot = @am__leading_dot@
209am__quote = @am__quote@
210am__tar = @am__tar@
211am__untar = @am__untar@
212bindir = @bindir@
213build = @build@
214build_alias = @build_alias@
215build_cpu = @build_cpu@
216build_os = @build_os@
217build_vendor = @build_vendor@
218builddir = @builddir@
219datadir = @datadir@
220datarootdir = @datarootdir@
221docdir = @docdir@
222dvidir = @dvidir@
223efl_doxygen = @efl_doxygen@
224efl_have_doxygen = @efl_have_doxygen@
225embryoincludedir = @embryoincludedir@
226exec_prefix = @exec_prefix@
227host = @host@
228host_alias = @host_alias@
229host_cpu = @host_cpu@
230host_os = @host_os@
231host_vendor = @host_vendor@
232htmldir = @htmldir@
233includedir = @includedir@
234infodir = @infodir@
235install_sh = @install_sh@
236libdir = @libdir@
237libexecdir = @libexecdir@
238localedir = @localedir@
239localstatedir = @localstatedir@
240lt_ECHO = @lt_ECHO@
241lt_enable_auto_import = @lt_enable_auto_import@
242mandir = @mandir@
243mkdir_p = @mkdir_p@
244oldincludedir = @oldincludedir@
245pdfdir = @pdfdir@
246pkgconfig_requires_private = @pkgconfig_requires_private@
247prefix = @prefix@
248program_transform_name = @program_transform_name@
249psdir = @psdir@
250release_info = @release_info@
251requirement_embryo = @requirement_embryo@
252sbindir = @sbindir@
253sharedstatedir = @sharedstatedir@
254srcdir = @srcdir@
255sysconfdir = @sysconfdir@
256target_alias = @target_alias@
257top_build_prefix = @top_build_prefix@
258top_builddir = @top_builddir@
259top_srcdir = @top_srcdir@
260version_info = @version_info@
261MAINTAINERCLEANFILES = Makefile.in
262AM_CPPFLAGS = \
263-I. \
264-I$(top_srcdir)/src/lib \
265-I$(top_builddir) \
266-I$(top_srcdir)/src/lib \
267-I$(top_srcdir)/src/lib/include \
268-DPACKAGE_BIN_DIR=\"$(bindir)\" \
269-DPACKAGE_LIB_DIR=\"$(libdir)\" \
270-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
271@EVIL_CFLAGS@ \
272@EXOTIC_CFLAGS@ \
273@EMBRYO_CPPFLAGS@ \
274@EFL_EMBRYO_BUILD@
275
276includes_HEADERS = Embryo.h
277includesdir = $(includedir)/embryo-@VMAJ@
278lib_LTLIBRARIES = libembryo.la
279libembryo_la_SOURCES = \
280embryo_amx.c \
281embryo_args.c \
282embryo_float.c \
283embryo_main.c \
284embryo_rand.c \
285embryo_str.c \
286embryo_time.c
287
288libembryo_la_CFLAGS = @EMBRYO_CFLAGS@
289libembryo_la_LIBADD = @EXOTIC_LIBS@ @EVIL_LIBS@ -lm
290libembryo_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
291EXTRA_DIST = embryo_private.h
292all: all-am
293
294.SUFFIXES:
295.SUFFIXES: .c .lo .o .obj
296$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
297 @for dep in $?; do \
298 case '$(am__configure_deps)' in \
299 *$$dep*) \
300 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
301 && { if test -f $@; then exit 0; else break; fi; }; \
302 exit 1;; \
303 esac; \
304 done; \
305 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \
306 $(am__cd) $(top_srcdir) && \
307 $(AUTOMAKE) --gnu src/lib/Makefile
308.PRECIOUS: Makefile
309Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
310 @case '$?' in \
311 *config.status*) \
312 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
313 *) \
314 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
315 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
316 esac;
317
318$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
319 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
320
321$(top_srcdir)/configure: $(am__configure_deps)
322 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
323$(ACLOCAL_M4): $(am__aclocal_m4_deps)
324 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
325$(am__aclocal_m4_deps):
326install-libLTLIBRARIES: $(lib_LTLIBRARIES)
327 @$(NORMAL_INSTALL)
328 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
329 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
330 list2=; for p in $$list; do \
331 if test -f $$p; then \
332 list2="$$list2 $$p"; \
333 else :; fi; \
334 done; \
335 test -z "$$list2" || { \
336 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
337 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
338 }
339
340uninstall-libLTLIBRARIES:
341 @$(NORMAL_UNINSTALL)
342 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
343 for p in $$list; do \
344 $(am__strip_dir) \
345 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
346 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
347 done
348
349clean-libLTLIBRARIES:
350 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
351 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
352 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
353 test "$$dir" != "$$p" || dir=.; \
354 echo "rm -f \"$${dir}/so_locations\""; \
355 rm -f "$${dir}/so_locations"; \
356 done
357libembryo.la: $(libembryo_la_OBJECTS) $(libembryo_la_DEPENDENCIES)
358 $(AM_V_CCLD)$(libembryo_la_LINK) -rpath $(libdir) $(libembryo_la_OBJECTS) $(libembryo_la_LIBADD) $(LIBS)
359
360mostlyclean-compile:
361 -rm -f *.$(OBJEXT)
362
363distclean-compile:
364 -rm -f *.tab.c
365
366@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_amx.Plo@am__quote@
367@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_args.Plo@am__quote@
368@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_float.Plo@am__quote@
369@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_main.Plo@am__quote@
370@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_rand.Plo@am__quote@
371@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_str.Plo@am__quote@
372@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libembryo_la-embryo_time.Plo@am__quote@
373
374.c.o:
375@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
376@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
377@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
378@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
379@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
380@am__fastdepCC_FALSE@ $(COMPILE) -c $<
381
382.c.obj:
383@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
384@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
385@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
386@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
387@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
388@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
389
390.c.lo:
391@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
392@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
393@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
394@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
395@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
396@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
397
398libembryo_la-embryo_amx.lo: embryo_amx.c
399@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_amx.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_amx.Tpo -c -o libembryo_la-embryo_amx.lo `test -f 'embryo_amx.c' || echo '$(srcdir)/'`embryo_amx.c
400@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_amx.Tpo $(DEPDIR)/libembryo_la-embryo_amx.Plo
401@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
402@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_amx.c' object='libembryo_la-embryo_amx.lo' libtool=yes @AMDEPBACKSLASH@
403@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
404@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_amx.lo `test -f 'embryo_amx.c' || echo '$(srcdir)/'`embryo_amx.c
405
406libembryo_la-embryo_args.lo: embryo_args.c
407@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_args.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_args.Tpo -c -o libembryo_la-embryo_args.lo `test -f 'embryo_args.c' || echo '$(srcdir)/'`embryo_args.c
408@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_args.Tpo $(DEPDIR)/libembryo_la-embryo_args.Plo
409@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
410@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_args.c' object='libembryo_la-embryo_args.lo' libtool=yes @AMDEPBACKSLASH@
411@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
412@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_args.lo `test -f 'embryo_args.c' || echo '$(srcdir)/'`embryo_args.c
413
414libembryo_la-embryo_float.lo: embryo_float.c
415@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_float.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_float.Tpo -c -o libembryo_la-embryo_float.lo `test -f 'embryo_float.c' || echo '$(srcdir)/'`embryo_float.c
416@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_float.Tpo $(DEPDIR)/libembryo_la-embryo_float.Plo
417@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
418@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_float.c' object='libembryo_la-embryo_float.lo' libtool=yes @AMDEPBACKSLASH@
419@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
420@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_float.lo `test -f 'embryo_float.c' || echo '$(srcdir)/'`embryo_float.c
421
422libembryo_la-embryo_main.lo: embryo_main.c
423@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_main.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_main.Tpo -c -o libembryo_la-embryo_main.lo `test -f 'embryo_main.c' || echo '$(srcdir)/'`embryo_main.c
424@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_main.Tpo $(DEPDIR)/libembryo_la-embryo_main.Plo
425@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
426@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_main.c' object='libembryo_la-embryo_main.lo' libtool=yes @AMDEPBACKSLASH@
427@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
428@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_main.lo `test -f 'embryo_main.c' || echo '$(srcdir)/'`embryo_main.c
429
430libembryo_la-embryo_rand.lo: embryo_rand.c
431@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_rand.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_rand.Tpo -c -o libembryo_la-embryo_rand.lo `test -f 'embryo_rand.c' || echo '$(srcdir)/'`embryo_rand.c
432@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_rand.Tpo $(DEPDIR)/libembryo_la-embryo_rand.Plo
433@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
434@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_rand.c' object='libembryo_la-embryo_rand.lo' libtool=yes @AMDEPBACKSLASH@
435@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
436@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_rand.lo `test -f 'embryo_rand.c' || echo '$(srcdir)/'`embryo_rand.c
437
438libembryo_la-embryo_str.lo: embryo_str.c
439@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_str.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_str.Tpo -c -o libembryo_la-embryo_str.lo `test -f 'embryo_str.c' || echo '$(srcdir)/'`embryo_str.c
440@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_str.Tpo $(DEPDIR)/libembryo_la-embryo_str.Plo
441@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
442@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_str.c' object='libembryo_la-embryo_str.lo' libtool=yes @AMDEPBACKSLASH@
443@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
444@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_str.lo `test -f 'embryo_str.c' || echo '$(srcdir)/'`embryo_str.c
445
446libembryo_la-embryo_time.lo: embryo_time.c
447@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -MT libembryo_la-embryo_time.lo -MD -MP -MF $(DEPDIR)/libembryo_la-embryo_time.Tpo -c -o libembryo_la-embryo_time.lo `test -f 'embryo_time.c' || echo '$(srcdir)/'`embryo_time.c
448@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libembryo_la-embryo_time.Tpo $(DEPDIR)/libembryo_la-embryo_time.Plo
449@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
450@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='embryo_time.c' object='libembryo_la-embryo_time.lo' libtool=yes @AMDEPBACKSLASH@
451@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
452@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libembryo_la_CFLAGS) $(CFLAGS) -c -o libembryo_la-embryo_time.lo `test -f 'embryo_time.c' || echo '$(srcdir)/'`embryo_time.c
453
454mostlyclean-libtool:
455 -rm -f *.lo
456
457clean-libtool:
458 -rm -rf .libs _libs
459install-includesHEADERS: $(includes_HEADERS)
460 @$(NORMAL_INSTALL)
461 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
462 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
463 for p in $$list; do \
464 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
465 echo "$$d$$p"; \
466 done | $(am__base_list) | \
467 while read files; do \
468 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
469 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
470 done
471
472uninstall-includesHEADERS:
473 @$(NORMAL_UNINSTALL)
474 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
475 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
476 test -n "$$files" || exit 0; \
477 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
478 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
479
480ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
481 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
482 unique=`for i in $$list; do \
483 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
484 done | \
485 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
486 END { if (nonempty) { for (i in files) print i; }; }'`; \
487 mkid -fID $$unique
488tags: TAGS
489
490TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
491 $(TAGS_FILES) $(LISP)
492 set x; \
493 here=`pwd`; \
494 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
495 unique=`for i in $$list; do \
496 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
497 done | \
498 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
499 END { if (nonempty) { for (i in files) print i; }; }'`; \
500 shift; \
501 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
502 test -n "$$unique" || unique=$$empty_fix; \
503 if test $$# -gt 0; then \
504 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
505 "$$@" $$unique; \
506 else \
507 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
508 $$unique; \
509 fi; \
510 fi
511ctags: CTAGS
512CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
513 $(TAGS_FILES) $(LISP)
514 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
515 unique=`for i in $$list; do \
516 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
517 done | \
518 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
519 END { if (nonempty) { for (i in files) print i; }; }'`; \
520 test -z "$(CTAGS_ARGS)$$unique" \
521 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
522 $$unique
523
524GTAGS:
525 here=`$(am__cd) $(top_builddir) && pwd` \
526 && $(am__cd) $(top_srcdir) \
527 && gtags -i $(GTAGS_ARGS) "$$here"
528
529distclean-tags:
530 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
531
532distdir: $(DISTFILES)
533 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
534 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
535 list='$(DISTFILES)'; \
536 dist_files=`for file in $$list; do echo $$file; done | \
537 sed -e "s|^$$srcdirstrip/||;t" \
538 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
539 case $$dist_files in \
540 */*) $(MKDIR_P) `echo "$$dist_files" | \
541 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
542 sort -u` ;; \
543 esac; \
544 for file in $$dist_files; do \
545 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
546 if test -d $$d/$$file; then \
547 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
548 if test -d "$(distdir)/$$file"; then \
549 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
550 fi; \
551 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
552 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
553 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
554 fi; \
555 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
556 else \
557 test -f "$(distdir)/$$file" \
558 || cp -p $$d/$$file "$(distdir)/$$file" \
559 || exit 1; \
560 fi; \
561 done
562check-am: all-am
563check: check-am
564all-am: Makefile $(LTLIBRARIES) $(HEADERS)
565installdirs:
566 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
567 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
568 done
569install: install-am
570install-exec: install-exec-am
571install-data: install-data-am
572uninstall: uninstall-am
573
574install-am: all-am
575 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
576
577installcheck: installcheck-am
578install-strip:
579 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
580 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
581 `test -z '$(STRIP)' || \
582 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
583mostlyclean-generic:
584
585clean-generic:
586
587distclean-generic:
588 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
589 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
590
591maintainer-clean-generic:
592 @echo "This command is intended for maintainers to use"
593 @echo "it deletes files that may require special tools to rebuild."
594 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
595clean: clean-am
596
597clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
598 mostlyclean-am
599
600distclean: distclean-am
601 -rm -rf ./$(DEPDIR)
602 -rm -f Makefile
603distclean-am: clean-am distclean-compile distclean-generic \
604 distclean-tags
605
606dvi: dvi-am
607
608dvi-am:
609
610html: html-am
611
612html-am:
613
614info: info-am
615
616info-am:
617
618install-data-am: install-includesHEADERS
619
620install-dvi: install-dvi-am
621
622install-dvi-am:
623
624install-exec-am: install-libLTLIBRARIES
625
626install-html: install-html-am
627
628install-html-am:
629
630install-info: install-info-am
631
632install-info-am:
633
634install-man:
635
636install-pdf: install-pdf-am
637
638install-pdf-am:
639
640install-ps: install-ps-am
641
642install-ps-am:
643
644installcheck-am:
645
646maintainer-clean: maintainer-clean-am
647 -rm -rf ./$(DEPDIR)
648 -rm -f Makefile
649maintainer-clean-am: distclean-am maintainer-clean-generic
650
651mostlyclean: mostlyclean-am
652
653mostlyclean-am: mostlyclean-compile mostlyclean-generic \
654 mostlyclean-libtool
655
656pdf: pdf-am
657
658pdf-am:
659
660ps: ps-am
661
662ps-am:
663
664uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
665
666.MAKE: install-am install-strip
667
668.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
669 clean-libLTLIBRARIES clean-libtool ctags distclean \
670 distclean-compile distclean-generic distclean-libtool \
671 distclean-tags distdir dvi dvi-am html html-am info info-am \
672 install install-am install-data install-data-am install-dvi \
673 install-dvi-am install-exec install-exec-am install-html \
674 install-html-am install-includesHEADERS install-info \
675 install-info-am install-libLTLIBRARIES install-man install-pdf \
676 install-pdf-am install-ps install-ps-am install-strip \
677 installcheck installcheck-am installdirs maintainer-clean \
678 maintainer-clean-generic mostlyclean mostlyclean-compile \
679 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
680 tags uninstall uninstall-am uninstall-includesHEADERS \
681 uninstall-libLTLIBRARIES
682
683
684# Tell versions [3.59,3.63) of GNU make to not export all variables.
685# Otherwise a system limit (for SysV at least) may be exceeded.
686.NOEXPORT:
diff --git a/libraries/embryo/src/lib/embryo_amx.c b/libraries/embryo/src/lib/embryo_amx.c
deleted file mode 100644
index 7a41111..0000000
--- a/libraries/embryo/src/lib/embryo_amx.c
+++ /dev/null
@@ -1,1995 +0,0 @@
1/* Abstract Machine for the Small compiler
2 *
3 * Copyright (c) ITB CompuPhase, 1997-2003
4 * Portions Copyright (c) Carsten Haitzler, 2004-2010 <raster@rasterman.com>
5 *
6 * This software is provided "as-is", without any express or implied warranty.
7 * In no event will the authors be held liable for any damages arising from
8 * the use of this software.
9 *
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
13 *
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software in
16 * a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 * 3. This notice may not be removed or altered from any source distribution.
21 */
22
23
24#ifdef HAVE_CONFIG_H
25# include "config.h"
26#endif
27
28#include <stdlib.h>
29#include <stdio.h>
30#include <string.h>
31
32#ifdef HAVE_EXOTIC
33# include <Exotic.h>
34#endif
35
36#include "Embryo.h"
37#include "embryo_private.h"
38
39
40#define JUMPABS(base, ip) ((Embryo_Cell *)(code + (*ip)))
41
42#ifdef WORDS_BIGENDIAN
43static void _embryo_byte_swap_16 (unsigned short *v);
44static void _embryo_byte_swap_32 (unsigned int *v);
45#endif
46static int _embryo_native_call (Embryo_Program *ep, Embryo_Cell index, Embryo_Cell *result, Embryo_Cell *params);
47static int _embryo_func_get (Embryo_Program *ep, int index, char *funcname);
48static int _embryo_var_get (Embryo_Program *ep, int index, char *varname, Embryo_Cell *ep_addr);
49static int _embryo_program_init (Embryo_Program *ep, void *code);
50
51#ifdef WORDS_BIGENDIAN
52static void
53_embryo_byte_swap_16(unsigned short *v)
54{
55 unsigned char *s, t;
56
57 s = (unsigned char *)v;
58 t = s[0]; s[0] = s[1]; s[1] = t;
59}
60
61static void
62_embryo_byte_swap_32(unsigned int *v)
63{
64 unsigned char *s, t;
65
66 s = (unsigned char *)v;
67 t = s[0]; s[0] = s[3]; s[3] = t;
68 t = s[1]; s[1] = s[2]; s[2] = t;
69}
70#endif
71
72static int
73_embryo_native_call(Embryo_Program *ep, Embryo_Cell index, Embryo_Cell *result, Embryo_Cell *params)
74{
75 Embryo_Header *hdr;
76 Embryo_Func_Stub *func_entry;
77 Embryo_Native f;
78
79 hdr = (Embryo_Header *)ep->base;
80 func_entry = GETENTRY(hdr, natives, index);
81 if ((func_entry->address <= 0) ||
82 (func_entry->address > ep->native_calls_size))
83 {
84 ep->error = EMBRYO_ERROR_CALLBACK;
85 return ep->error;
86 }
87 f = ep->native_calls[func_entry->address - 1];
88 if (!f)
89 {
90 ep->error = EMBRYO_ERROR_CALLBACK;
91 return ep->error;
92 }
93 ep->error = EMBRYO_ERROR_NONE;
94 *result = f(ep, params);
95 return ep->error;
96}
97
98static int
99_embryo_func_get(Embryo_Program *ep, int index, char *funcname)
100{
101 Embryo_Header *hdr;
102 Embryo_Func_Stub *func;
103
104 hdr = (Embryo_Header *)ep->code;
105 if (index >= (Embryo_Cell)NUMENTRIES(hdr, publics, natives))
106 return EMBRYO_ERROR_INDEX;
107
108 func = GETENTRY(hdr, publics, index);
109 strcpy(funcname, GETENTRYNAME(hdr, func));
110 return EMBRYO_ERROR_NONE;
111}
112
113static int
114_embryo_var_get(Embryo_Program *ep, int index, char *varname, Embryo_Cell *ep_addr)
115{
116
117 Embryo_Header *hdr;
118 Embryo_Func_Stub *var;
119
120 hdr=(Embryo_Header *)ep->base;
121 if (index >= (Embryo_Cell)NUMENTRIES(hdr, pubvars, tags))
122 return EMBRYO_ERROR_INDEX;
123
124 var = GETENTRY(hdr, pubvars, index);
125 strcpy(varname, GETENTRYNAME(hdr, var));
126 *ep_addr = var->address;
127 return EMBRYO_ERROR_NONE;
128}
129
130static int
131_embryo_program_init(Embryo_Program *ep, void *code)
132{
133 Embryo_Header *hdr;
134
135 if ((ep->flags & EMBRYO_FLAG_RELOC)) return 1;
136 ep->code = (unsigned char *)code;
137 hdr = (Embryo_Header *)ep->code;
138#ifdef WORDS_BIGENDIAN
139 embryo_swap_32((unsigned int *)&hdr->size);
140 embryo_swap_16((unsigned short *)&hdr->magic);
141 embryo_swap_16((unsigned short *)&hdr->flags);
142 embryo_swap_16((unsigned short *)&hdr->defsize);
143 embryo_swap_32((unsigned int *)&hdr->cod);
144 embryo_swap_32((unsigned int *)&hdr->dat);
145 embryo_swap_32((unsigned int *)&hdr->hea);
146 embryo_swap_32((unsigned int *)&hdr->stp);
147 embryo_swap_32((unsigned int *)&hdr->cip);
148 embryo_swap_32((unsigned int *)&hdr->publics);
149 embryo_swap_32((unsigned int *)&hdr->natives);
150 embryo_swap_32((unsigned int *)&hdr->libraries);
151 embryo_swap_32((unsigned int *)&hdr->pubvars);
152 embryo_swap_32((unsigned int *)&hdr->tags);
153 embryo_swap_32((unsigned int *)&hdr->nametable);
154#endif
155
156 if (hdr->magic != EMBRYO_MAGIC) return 0;
157 if ((hdr->file_version < MIN_FILE_VERSION) ||
158 (hdr->ep_version > CUR_FILE_VERSION)) return 0;
159 if ((hdr->defsize != sizeof(Embryo_Func_Stub)) &&
160 (hdr->defsize != (2 * sizeof(unsigned int)))) return 0;
161 if (hdr->defsize == (2 * sizeof(unsigned int)))
162 {
163 unsigned short *len;
164
165 len = (unsigned short*)((unsigned char*)ep->code + hdr->nametable);
166#ifdef WORDS_BIGENDIAN
167 embryo_swap_16((unsigned short *)len);
168#endif
169 if (*len > sNAMEMAX) return 0;
170 }
171 if (hdr->stp <= 0) return 0;
172 if ((hdr->flags & EMBRYO_FLAG_COMPACT)) return 0;
173
174#ifdef WORDS_BIGENDIAN
175 {
176 Embryo_Func_Stub *fs;
177 int i, num;
178
179 /* also align all addresses in the public function, public variable and */
180 /* public tag tables */
181 fs = GETENTRY(hdr, publics, 0);
182 num = NUMENTRIES(hdr, publics, natives);
183 for (i = 0; i < num; i++)
184 {
185 embryo_swap_32(&(fs->address));
186 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
187 }
188
189 fs = GETENTRY(hdr, pubvars, 0);
190 num = NUMENTRIES(hdr, pubvars, tags);
191 for (i = 0; i < num; i++)
192 {
193 embryo_swap_32(&(fs->address));
194 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
195 }
196
197 fs = GETENTRY(hdr, tags, 0);
198 num = NUMENTRIES(hdr, tags, nametable);
199 for (i = 0; i < num; i++)
200 {
201 embryo_swap_32(&(fs->address));
202 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
203 }
204 }
205#endif
206 ep->flags = EMBRYO_FLAG_RELOC;
207
208 {
209 Embryo_Cell cip, code_size, cip_end;
210 Embryo_Cell *code;
211
212 code_size = hdr->dat - hdr->cod;
213 code = (Embryo_Cell *)((unsigned char *)ep->code + (int)hdr->cod);
214 cip_end = code_size / sizeof(Embryo_Cell);
215 for (cip = 0; cip < cip_end; cip++)
216 {
217/* move this here - later we probably want something that verifies opcodes
218 * are valid and ok...
219 */
220#ifdef WORDS_BIGENDIAN
221 embryo_swap_32(&(code[cip]));
222#endif
223
224 }
225 }
226 /* init native api for handling floating point - default in embryo */
227 _embryo_args_init(ep);
228 _embryo_fp_init(ep);
229 _embryo_rand_init(ep);
230 _embryo_str_init(ep);
231 _embryo_time_init(ep);
232 return 1;
233}
234
235/*** EXPORTED CALLS ***/
236
237EAPI Embryo_Program *
238embryo_program_new(void *data, int size)
239{
240 Embryo_Program *ep;
241 void *code_data;
242
243 if (size < (int)sizeof(Embryo_Header)) return NULL;
244
245 ep = calloc(1, sizeof(Embryo_Program));
246 if (!ep) return NULL;
247
248 code_data = malloc(size);
249 if (!code_data)
250 {
251 free(ep);
252 return NULL;
253 }
254 memcpy(code_data, data, size);
255 if (_embryo_program_init(ep, code_data)) return ep;
256 free(code_data);
257 free(ep);
258 return NULL;
259}
260
261EAPI Embryo_Program *
262embryo_program_const_new(void *data, int size)
263{
264 Embryo_Program *ep;
265
266 if (size < (int)sizeof(Embryo_Header)) return NULL;
267
268 ep = calloc(1, sizeof(Embryo_Program));
269 if (!ep) return NULL;
270
271 if (_embryo_program_init(ep, data))
272 {
273 ep->dont_free_code = 1;
274 return ep;
275 }
276 free(ep);
277 return NULL;
278}
279
280EAPI Embryo_Program *
281embryo_program_load(const char *file)
282{
283 Embryo_Program *ep;
284 Embryo_Header hdr;
285 FILE *f;
286 void *program = NULL;
287 int program_size = 0;
288
289 f = fopen(file, "rb");
290 if (!f) return NULL;
291 fseek(f, 0, SEEK_END);
292 program_size = ftell(f);
293 fseek(f, 0L, SEEK_SET);
294 if (program_size < (int)sizeof(Embryo_Header))
295 {
296 fclose(f);
297 return NULL;
298 }
299 if (fread(&hdr, sizeof(Embryo_Header), 1, f) != 1)
300 {
301 fclose(f);
302 return NULL;
303 }
304 fseek(f, 0L, SEEK_SET);
305#ifdef WORDS_BIGENDIAN
306 embryo_swap_32((unsigned int *)(&hdr.size));
307#endif
308 if ((int)hdr.size < program_size) program_size = hdr.size;
309 program = malloc(program_size);
310 if (!program)
311 {
312 fclose(f);
313 return NULL;
314 }
315 if (fread(program, program_size, 1, f) != 1)
316 {
317 free(program);
318 fclose(f);
319 return NULL;
320 }
321 ep = embryo_program_new(program, program_size);
322 free(program);
323 fclose(f);
324 return ep;
325}
326
327EAPI void
328embryo_program_free(Embryo_Program *ep)
329{
330 int i;
331
332 if (ep->base) free(ep->base);
333 if ((!ep->dont_free_code) && (ep->code)) free(ep->code);
334 if (ep->native_calls) free(ep->native_calls);
335 for (i = 0; i < ep->params_size; i++)
336 {
337 if (ep->params[i].string) free(ep->params[i].string);
338 if (ep->params[i].cell_array) free(ep->params[i].cell_array);
339 }
340 if (ep->params) free(ep->params);
341 free(ep);
342}
343
344
345EAPI void
346embryo_program_native_call_add(Embryo_Program *ep, const char *name, Embryo_Cell (*func) (Embryo_Program *ep, Embryo_Cell *params))
347{
348 Embryo_Func_Stub *func_entry;
349 Embryo_Header *hdr;
350 int i, num;
351
352 if ((!ep ) || (!name) || (!func)) return;
353 if (strlen(name) > sNAMEMAX) return;
354
355 hdr = (Embryo_Header *)ep->code;
356 if (hdr->defsize < 1) return;
357 num = NUMENTRIES(hdr, natives, libraries);
358 if (num <= 0) return;
359
360 ep->native_calls_size++;
361 if (ep->native_calls_size > ep->native_calls_alloc)
362 {
363 Embryo_Native *calls;
364
365 ep->native_calls_alloc += 32;
366 calls = realloc(ep->native_calls,
367 ep->native_calls_alloc * sizeof(Embryo_Native));
368 if (!calls)
369 {
370 ep->native_calls_size--;
371 ep->native_calls_alloc -= 32;
372 return;
373 }
374 ep->native_calls = calls;
375 }
376 ep->native_calls[ep->native_calls_size - 1] = func;
377
378 func_entry = GETENTRY(hdr, natives, 0);
379 for (i = 0; i < num; i++)
380 {
381 if (func_entry->address == 0)
382 {
383 char *entry_name;
384
385 entry_name = GETENTRYNAME(hdr, func_entry);
386 if ((entry_name) && (!strcmp(entry_name, name)))
387 {
388 func_entry->address = ep->native_calls_size;
389 /* FIXME: embryo_cc is putting in multiple native */
390 /* function call entries - so we need to fill in all */
391 /* of them!!! */
392 /* return; */
393 }
394 }
395 func_entry =
396 (Embryo_Func_Stub *)((unsigned char *)func_entry + hdr->defsize);
397 }
398}
399
400
401EAPI void
402embryo_program_vm_reset(Embryo_Program *ep)
403{
404 Embryo_Header *hdr;
405
406 if ((!ep) || (!ep->base)) return;
407 hdr = (Embryo_Header *)ep->code;
408 memcpy(ep->base, hdr, hdr->size);
409 *(Embryo_Cell *)(ep->base + (int)hdr->stp - sizeof(Embryo_Cell)) = 0;
410
411 ep->hlw = hdr->hea - hdr->dat; /* stack and heap relative to data segment */
412 ep->stp = hdr->stp - hdr->dat - sizeof(Embryo_Cell);
413 ep->hea = ep->hlw;
414 ep->stk = ep->stp;
415}
416
417EAPI void
418embryo_program_vm_push(Embryo_Program *ep)
419{
420 Embryo_Header *hdr;
421
422 if (!ep) return;
423 ep->pushes++;
424 if (ep->pushes > 1)
425 {
426 embryo_program_vm_reset(ep);
427 return;
428 }
429 hdr = (Embryo_Header *)ep->code;
430 ep->base = malloc(hdr->stp);
431 if (!ep->base)
432 {
433 ep->pushes = 0;
434 return;
435 }
436 embryo_program_vm_reset(ep);
437}
438
439EAPI void
440embryo_program_vm_pop(Embryo_Program *ep)
441{
442 if ((!ep) || (!ep->base)) return;
443 ep->pushes--;
444 if (ep->pushes >= 1) return;
445 free(ep->base);
446 ep->base = NULL;
447}
448
449
450EAPI void
451embryo_swap_16(unsigned short *v
452#ifndef WORDS_BIGENDIAN
453 __UNUSED__
454#endif
455 )
456{
457#ifdef WORDS_BIGENDIAN
458 _embryo_byte_swap_16(v);
459#endif
460}
461
462EAPI void
463embryo_swap_32(unsigned int *v
464#ifndef WORDS_BIGENDIAN
465 __UNUSED__
466#endif
467 )
468{
469#ifdef WORDS_BIGENDIAN
470 _embryo_byte_swap_32(v);
471#endif
472}
473
474EAPI Embryo_Function
475embryo_program_function_find(Embryo_Program *ep, const char *name)
476{
477 int first, last, mid, result;
478 char pname[sNAMEMAX + 1];
479 Embryo_Header *hdr;
480
481 if (!ep) return EMBRYO_FUNCTION_NONE;
482 hdr = (Embryo_Header *)ep->code;
483 last = NUMENTRIES(hdr, publics, natives) - 1;
484 first = 0;
485 /* binary search */
486 while (first <= last)
487 {
488 mid = (first + last) / 2;
489 if (_embryo_func_get(ep, mid, pname) == EMBRYO_ERROR_NONE)
490 result = strcmp(pname, name);
491 else
492 return EMBRYO_FUNCTION_NONE;
493/* result = -1;*/
494 if (result > 0) last = mid - 1;
495 else if (result < 0) first = mid + 1;
496 else return mid;
497 }
498 return EMBRYO_FUNCTION_NONE;
499}
500
501
502EAPI Embryo_Cell
503embryo_program_variable_find(Embryo_Program *ep, const char *name)
504{
505 int first, last, mid, result;
506 char pname[sNAMEMAX + 1];
507 Embryo_Cell paddr;
508 Embryo_Header *hdr;
509
510 if (!ep) return EMBRYO_CELL_NONE;
511 if (!ep->base) return EMBRYO_CELL_NONE;
512 hdr = (Embryo_Header *)ep->base;
513 last = NUMENTRIES(hdr, pubvars, tags) - 1;
514 first = 0;
515 /* binary search */
516 while (first <= last)
517 {
518 mid = (first + last) / 2;
519 if (_embryo_var_get(ep, mid, pname, &paddr) == EMBRYO_ERROR_NONE)
520 result = strcmp(pname, name);
521 else
522 return EMBRYO_CELL_NONE;
523/* result = -1;*/
524 if (result > 0) last = mid - 1;
525 else if (result < 0) first = mid + 1;
526 else return paddr;
527 }
528 return EMBRYO_CELL_NONE;
529}
530
531EAPI int
532embryo_program_variable_count_get(Embryo_Program *ep)
533{
534 Embryo_Header *hdr;
535
536 if (!ep) return 0;
537 if (!ep->base) return 0;
538 hdr = (Embryo_Header *)ep->base;
539 return NUMENTRIES(hdr, pubvars, tags);
540}
541
542EAPI Embryo_Cell
543embryo_program_variable_get(Embryo_Program *ep, int num)
544{
545 Embryo_Cell paddr;
546 char pname[sNAMEMAX + 1];
547
548 if (!ep) return EMBRYO_CELL_NONE;
549 if (!ep->base) return EMBRYO_CELL_NONE;
550 if (_embryo_var_get(ep, num, pname, &paddr) == EMBRYO_ERROR_NONE)
551 return paddr;
552 return EMBRYO_CELL_NONE;
553}
554
555
556EAPI void
557embryo_program_error_set(Embryo_Program *ep, Embryo_Error error)
558{
559 if (!ep) return;
560 ep->error = error;
561}
562
563EAPI Embryo_Error
564embryo_program_error_get(Embryo_Program *ep)
565{
566 if (!ep) return EMBRYO_ERROR_NONE;
567 return ep->error;
568}
569
570
571EAPI void
572embryo_program_data_set(Embryo_Program *ep, void *data)
573{
574 if (!ep) return;
575 ep->data = data;
576}
577
578EAPI void *
579embryo_program_data_get(Embryo_Program *ep)
580{
581 if (!ep) return NULL;
582 return ep->data;
583}
584
585EAPI const char *
586embryo_error_string_get(Embryo_Error error)
587{
588 const char *messages[] =
589 {
590 /* EMBRYO_ERROR_NONE */ "(none)",
591 /* EMBRYO_ERROR_EXIT */ "Forced exit",
592 /* EMBRYO_ERROR_ASSERT */ "Assertion failed",
593 /* EMBRYO_ERROR_STACKERR */ "Stack/heap collision (insufficient stack size)",
594 /* EMBRYO_ERROR_BOUNDS */ "Array index out of bounds",
595 /* EMBRYO_ERROR_MEMACCESS */ "Invalid memory access",
596 /* EMBRYO_ERROR_INVINSTR */ "Invalid instruction",
597 /* EMBRYO_ERROR_STACKLOW */ "Stack underflow",
598 /* EMBRYO_ERROR_HEAPLOW */ "Heap underflow",
599 /* EMBRYO_ERROR_CALLBACK */ "No (valid) native function callback",
600 /* EMBRYO_ERROR_NATIVE */ "Native function failed",
601 /* EMBRYO_ERROR_DIVIDE */ "Divide by zero",
602 /* EMBRYO_ERROR_SLEEP */ "(sleep mode)",
603 /* 13 */ "(reserved)",
604 /* 14 */ "(reserved)",
605 /* 15 */ "(reserved)",
606 /* EMBRYO_ERROR_MEMORY */ "Out of memory",
607 /* EMBRYO_ERROR_FORMAT */ "Invalid/unsupported P-code file format",
608 /* EMBRYO_ERROR_VERSION */ "File is for a newer version of the Embryo_Program",
609 /* EMBRYO_ERROR_NOTFOUND */ "Native/Public function is not found",
610 /* EMBRYO_ERROR_INDEX */ "Invalid index parameter (bad entry point)",
611 /* EMBRYO_ERROR_DEBUG */ "Debugger cannot run",
612 /* EMBRYO_ERROR_INIT */ "Embryo_Program not initialized (or doubly initialized)",
613 /* EMBRYO_ERROR_USERDATA */ "Unable to set user data field (table full)",
614 /* EMBRYO_ERROR_INIT_JIT */ "Cannot initialize the JIT",
615 /* EMBRYO_ERROR_PARAMS */ "Parameter error",
616 };
617 if (((int)error < 0) ||
618 ((int)error >= (int)(sizeof(messages) / sizeof(messages[0]))))
619 return (const char *)"(unknown)";
620 return messages[error];
621}
622
623
624EAPI int
625embryo_data_string_length_get(Embryo_Program *ep, Embryo_Cell *str_cell)
626{
627 int len;
628 Embryo_Header *hdr;
629
630 if ((!ep) || (!ep->base)) return 0;
631 hdr = (Embryo_Header *)ep->base;
632 if ((!str_cell) ||
633 ((void *)str_cell >= (void *)(ep->base + hdr->stp)) ||
634 ((void *)str_cell < (void *)ep->base))
635 return 0;
636 for (len = 0; str_cell[len] != 0; len++);
637 return len;
638}
639
640EAPI void
641embryo_data_string_get(Embryo_Program *ep, Embryo_Cell *str_cell, char *dst)
642{
643 int i;
644 Embryo_Header *hdr;
645
646 if (!dst) return;
647 if ((!ep) || (!ep->base))
648 {
649 dst[0] = 0;
650 return;
651 }
652 hdr = (Embryo_Header *)ep->base;
653 if ((!str_cell) ||
654 ((void *)str_cell >= (void *)(ep->base + hdr->stp)) ||
655 ((void *)str_cell < (void *)ep->base))
656 {
657 dst[0] = 0;
658 return;
659 }
660 for (i = 0; str_cell[i] != 0; i++)
661 {
662#ifdef WORDS_BIGENDIAN
663 {
664 Embryo_Cell tmp;
665
666 tmp = str_cell[i];
667 _embryo_byte_swap_32(&tmp);
668 dst[i] = tmp;
669 }
670#else
671 dst[i] = str_cell[i];
672#endif
673 }
674 dst[i] = 0;
675}
676
677EAPI void
678embryo_data_string_set(Embryo_Program *ep, const char *src, Embryo_Cell *str_cell)
679{
680 int i;
681 Embryo_Header *hdr;
682
683 if (!ep) return;
684 if (!ep->base) return;
685 hdr = (Embryo_Header *)ep->base;
686 if ((!str_cell) ||
687 ((void *)str_cell >= (void *)(ep->base + hdr->stp)) ||
688 ((void *)str_cell < (void *)ep->base))
689 return;
690 if (!src)
691 {
692 str_cell[0] = 0;
693 return;
694 }
695 for (i = 0; src[i] != 0; i++)
696 {
697 if ((void *)(&(str_cell[i])) >= (void *)(ep->base + hdr->stp)) return;
698 else if ((void *)(&(str_cell[i])) == (void *)(ep->base + hdr->stp - 1))
699 {
700 str_cell[i] = 0;
701 return;
702 }
703#ifdef WORDS_BIGENDIAN
704 {
705 Embryo_Cell tmp;
706
707 tmp = src[i];
708 _embryo_byte_swap_32(&tmp);
709 str_cell[i] = tmp;
710 }
711#else
712 str_cell[i] = src[i];
713#endif
714 }
715 str_cell[i] = 0;
716}
717
718EAPI Embryo_Cell *
719embryo_data_address_get(Embryo_Program *ep, Embryo_Cell addr)
720{
721 Embryo_Header *hdr;
722 unsigned char *data;
723
724 if ((!ep) || (!ep->base)) return NULL;
725 hdr = (Embryo_Header *)ep->base;
726 data = ep->base + (int)hdr->dat;
727 if ((addr < 0) || (addr >= hdr->stp)) return NULL;
728 return (Embryo_Cell *)(data + (int)addr);
729}
730
731
732EAPI Embryo_Cell
733embryo_data_heap_push(Embryo_Program *ep, int cells)
734{
735 Embryo_Header *hdr;
736 Embryo_Cell addr;
737
738 if ((!ep) || (!ep->base)) return EMBRYO_CELL_NONE;
739 hdr = (Embryo_Header *)ep->base;
740 if (ep->stk - ep->hea - (cells * sizeof(Embryo_Cell)) < STKMARGIN)
741 return EMBRYO_CELL_NONE;
742 addr = ep->hea;
743 ep->hea += (cells * sizeof(Embryo_Cell));
744 return addr;
745}
746
747EAPI void
748embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to)
749{
750 if (!ep) return;
751 if (down_to < 0) down_to = 0;
752 if (ep->hea > down_to) ep->hea = down_to;
753}
754
755
756EAPI int
757embryo_program_recursion_get(Embryo_Program *ep)
758{
759 return ep->run_count;
760}
761
762#ifdef __GNUC__
763#if 1
764#define EMBRYO_EXEC_JUMPTABLE
765#endif
766#endif
767
768/* jump table optimization - only works for gcc though */
769#ifdef EMBRYO_EXEC_JUMPTABLE
770#define SWITCH(x) while (1) { goto *switchtable[x];
771#define SWITCHEND break; }
772#define CASE(x) SWITCHTABLE_##x:
773#define BREAK break;
774#else
775#define SWITCH(x) switch (x) {
776#define SWITCHEND }
777#define CASE(x) case x:
778#define BREAK break
779#endif
780
781EAPI Embryo_Status
782embryo_program_run(Embryo_Program *ep, Embryo_Function fn)
783{
784 Embryo_Header *hdr;
785 Embryo_Func_Stub *func;
786 unsigned char *code, *data;
787 Embryo_Cell pri, alt, stk, frm, hea, hea_start;
788 Embryo_Cell reset_stk, reset_hea, *cip;
789 Embryo_UCell codesize;
790 int i;
791 unsigned char op;
792 Embryo_Cell offs;
793 int num;
794 int max_run_cycles;
795 int cycle_count;
796#ifdef EMBRYO_EXEC_JUMPTABLE
797 /* we limit the jumptable to 256 elements. why? above we forced "op" to be
798 * a unsigned char - that means 256 max values. we limit opcode overflow
799 * here, so eliminating crashes on table lookups with bad/corrupt bytecode.
800 * no need to atuall do compares, branches etc. the datatype does the work
801 * for us. so that means EXCESS elements are all declared as OP_NONE to
802 * keep them innocuous.
803 */
804 static const void *switchtable[256] =
805 {
806 &&SWITCHTABLE_EMBRYO_OP_NONE,
807 &&SWITCHTABLE_EMBRYO_OP_LOAD_PRI,
808 &&SWITCHTABLE_EMBRYO_OP_LOAD_ALT,
809 &&SWITCHTABLE_EMBRYO_OP_LOAD_S_PRI,
810 &&SWITCHTABLE_EMBRYO_OP_LOAD_S_ALT,
811 &&SWITCHTABLE_EMBRYO_OP_LREF_PRI,
812 &&SWITCHTABLE_EMBRYO_OP_LREF_ALT,
813 &&SWITCHTABLE_EMBRYO_OP_LREF_S_PRI,
814 &&SWITCHTABLE_EMBRYO_OP_LREF_S_ALT,
815 &&SWITCHTABLE_EMBRYO_OP_LOAD_I,
816 &&SWITCHTABLE_EMBRYO_OP_LODB_I,
817 &&SWITCHTABLE_EMBRYO_OP_CONST_PRI,
818 &&SWITCHTABLE_EMBRYO_OP_CONST_ALT,
819 &&SWITCHTABLE_EMBRYO_OP_ADDR_PRI,
820 &&SWITCHTABLE_EMBRYO_OP_ADDR_ALT,
821 &&SWITCHTABLE_EMBRYO_OP_STOR_PRI,
822 &&SWITCHTABLE_EMBRYO_OP_STOR_ALT,
823 &&SWITCHTABLE_EMBRYO_OP_STOR_S_PRI,
824 &&SWITCHTABLE_EMBRYO_OP_STOR_S_ALT,
825 &&SWITCHTABLE_EMBRYO_OP_SREF_PRI,
826 &&SWITCHTABLE_EMBRYO_OP_SREF_ALT,
827 &&SWITCHTABLE_EMBRYO_OP_SREF_S_PRI,
828 &&SWITCHTABLE_EMBRYO_OP_SREF_S_ALT,
829 &&SWITCHTABLE_EMBRYO_OP_STOR_I,
830 &&SWITCHTABLE_EMBRYO_OP_STRB_I,
831 &&SWITCHTABLE_EMBRYO_OP_LIDX,
832 &&SWITCHTABLE_EMBRYO_OP_LIDX_B,
833 &&SWITCHTABLE_EMBRYO_OP_IDXADDR,
834 &&SWITCHTABLE_EMBRYO_OP_IDXADDR_B,
835 &&SWITCHTABLE_EMBRYO_OP_ALIGN_PRI,
836 &&SWITCHTABLE_EMBRYO_OP_ALIGN_ALT,
837 &&SWITCHTABLE_EMBRYO_OP_LCTRL,
838 &&SWITCHTABLE_EMBRYO_OP_SCTRL,
839 &&SWITCHTABLE_EMBRYO_OP_MOVE_PRI,
840 &&SWITCHTABLE_EMBRYO_OP_MOVE_ALT,
841 &&SWITCHTABLE_EMBRYO_OP_XCHG,
842 &&SWITCHTABLE_EMBRYO_OP_PUSH_PRI,
843 &&SWITCHTABLE_EMBRYO_OP_PUSH_ALT,
844 &&SWITCHTABLE_EMBRYO_OP_PUSH_R,
845 &&SWITCHTABLE_EMBRYO_OP_PUSH_C,
846 &&SWITCHTABLE_EMBRYO_OP_PUSH,
847 &&SWITCHTABLE_EMBRYO_OP_PUSH_S,
848 &&SWITCHTABLE_EMBRYO_OP_POP_PRI,
849 &&SWITCHTABLE_EMBRYO_OP_POP_ALT,
850 &&SWITCHTABLE_EMBRYO_OP_STACK,
851 &&SWITCHTABLE_EMBRYO_OP_HEAP,
852 &&SWITCHTABLE_EMBRYO_OP_PROC,
853 &&SWITCHTABLE_EMBRYO_OP_RET,
854 &&SWITCHTABLE_EMBRYO_OP_RETN,
855 &&SWITCHTABLE_EMBRYO_OP_CALL,
856 &&SWITCHTABLE_EMBRYO_OP_CALL_PRI,
857 &&SWITCHTABLE_EMBRYO_OP_JUMP,
858 &&SWITCHTABLE_EMBRYO_OP_JREL,
859 &&SWITCHTABLE_EMBRYO_OP_JZER,
860 &&SWITCHTABLE_EMBRYO_OP_JNZ,
861 &&SWITCHTABLE_EMBRYO_OP_JEQ,
862 &&SWITCHTABLE_EMBRYO_OP_JNEQ,
863 &&SWITCHTABLE_EMBRYO_OP_JLESS,
864 &&SWITCHTABLE_EMBRYO_OP_JLEQ,
865 &&SWITCHTABLE_EMBRYO_OP_JGRTR,
866 &&SWITCHTABLE_EMBRYO_OP_JGEQ,
867 &&SWITCHTABLE_EMBRYO_OP_JSLESS,
868 &&SWITCHTABLE_EMBRYO_OP_JSLEQ,
869 &&SWITCHTABLE_EMBRYO_OP_JSGRTR,
870 &&SWITCHTABLE_EMBRYO_OP_JSGEQ,
871 &&SWITCHTABLE_EMBRYO_OP_SHL,
872 &&SWITCHTABLE_EMBRYO_OP_SHR,
873 &&SWITCHTABLE_EMBRYO_OP_SSHR,
874 &&SWITCHTABLE_EMBRYO_OP_SHL_C_PRI,
875 &&SWITCHTABLE_EMBRYO_OP_SHL_C_ALT,
876 &&SWITCHTABLE_EMBRYO_OP_SHR_C_PRI,
877 &&SWITCHTABLE_EMBRYO_OP_SHR_C_ALT,
878 &&SWITCHTABLE_EMBRYO_OP_SMUL,
879 &&SWITCHTABLE_EMBRYO_OP_SDIV,
880 &&SWITCHTABLE_EMBRYO_OP_SDIV_ALT,
881 &&SWITCHTABLE_EMBRYO_OP_UMUL,
882 &&SWITCHTABLE_EMBRYO_OP_UDIV,
883 &&SWITCHTABLE_EMBRYO_OP_UDIV_ALT,
884 &&SWITCHTABLE_EMBRYO_OP_ADD,
885 &&SWITCHTABLE_EMBRYO_OP_SUB,
886 &&SWITCHTABLE_EMBRYO_OP_SUB_ALT,
887 &&SWITCHTABLE_EMBRYO_OP_AND,
888 &&SWITCHTABLE_EMBRYO_OP_OR,
889 &&SWITCHTABLE_EMBRYO_OP_XOR,
890 &&SWITCHTABLE_EMBRYO_OP_NOT,
891 &&SWITCHTABLE_EMBRYO_OP_NEG,
892 &&SWITCHTABLE_EMBRYO_OP_INVERT,
893 &&SWITCHTABLE_EMBRYO_OP_ADD_C,
894 &&SWITCHTABLE_EMBRYO_OP_SMUL_C,
895 &&SWITCHTABLE_EMBRYO_OP_ZERO_PRI,
896 &&SWITCHTABLE_EMBRYO_OP_ZERO_ALT,
897 &&SWITCHTABLE_EMBRYO_OP_ZERO,
898 &&SWITCHTABLE_EMBRYO_OP_ZERO_S,
899 &&SWITCHTABLE_EMBRYO_OP_SIGN_PRI,
900 &&SWITCHTABLE_EMBRYO_OP_SIGN_ALT,
901 &&SWITCHTABLE_EMBRYO_OP_EQ,
902 &&SWITCHTABLE_EMBRYO_OP_NEQ,
903 &&SWITCHTABLE_EMBRYO_OP_LESS,
904 &&SWITCHTABLE_EMBRYO_OP_LEQ,
905 &&SWITCHTABLE_EMBRYO_OP_GRTR,
906 &&SWITCHTABLE_EMBRYO_OP_GEQ,
907 &&SWITCHTABLE_EMBRYO_OP_SLESS,
908 &&SWITCHTABLE_EMBRYO_OP_SLEQ,
909 &&SWITCHTABLE_EMBRYO_OP_SGRTR,
910 &&SWITCHTABLE_EMBRYO_OP_SGEQ,
911 &&SWITCHTABLE_EMBRYO_OP_EQ_C_PRI,
912 &&SWITCHTABLE_EMBRYO_OP_EQ_C_ALT,
913 &&SWITCHTABLE_EMBRYO_OP_INC_PRI,
914 &&SWITCHTABLE_EMBRYO_OP_INC_ALT,
915 &&SWITCHTABLE_EMBRYO_OP_INC,
916 &&SWITCHTABLE_EMBRYO_OP_INC_S,
917 &&SWITCHTABLE_EMBRYO_OP_INC_I,
918 &&SWITCHTABLE_EMBRYO_OP_DEC_PRI,
919 &&SWITCHTABLE_EMBRYO_OP_DEC_ALT,
920 &&SWITCHTABLE_EMBRYO_OP_DEC,
921 &&SWITCHTABLE_EMBRYO_OP_DEC_S,
922 &&SWITCHTABLE_EMBRYO_OP_DEC_I,
923 &&SWITCHTABLE_EMBRYO_OP_MOVS,
924 &&SWITCHTABLE_EMBRYO_OP_CMPS,
925 &&SWITCHTABLE_EMBRYO_OP_FILL,
926 &&SWITCHTABLE_EMBRYO_OP_HALT,
927 &&SWITCHTABLE_EMBRYO_OP_BOUNDS,
928 &&SWITCHTABLE_EMBRYO_OP_SYSREQ_PRI,
929 &&SWITCHTABLE_EMBRYO_OP_SYSREQ_C,
930 &&SWITCHTABLE_EMBRYO_OP_FILE,
931 &&SWITCHTABLE_EMBRYO_OP_LINE,
932 &&SWITCHTABLE_EMBRYO_OP_SYMBOL,
933 &&SWITCHTABLE_EMBRYO_OP_SRANGE,
934 &&SWITCHTABLE_EMBRYO_OP_JUMP_PRI,
935 &&SWITCHTABLE_EMBRYO_OP_SWITCH,
936 &&SWITCHTABLE_EMBRYO_OP_CASETBL,
937 &&SWITCHTABLE_EMBRYO_OP_SWAP_PRI,
938 &&SWITCHTABLE_EMBRYO_OP_SWAP_ALT,
939 &&SWITCHTABLE_EMBRYO_OP_PUSHADDR,
940 &&SWITCHTABLE_EMBRYO_OP_NOP,
941 &&SWITCHTABLE_EMBRYO_OP_SYSREQ_D,
942 &&SWITCHTABLE_EMBRYO_OP_SYMTAG,
943 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
944 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
945 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
946 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
947 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
948 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
949 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
950 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
951 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
952 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
953 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
954 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
955 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
956 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
957 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
958 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
959 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
960 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
961 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
962 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
963 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
964 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
965 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE,
966 &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_NONE
967 };
968#endif
969 if (!ep) return EMBRYO_PROGRAM_FAIL;
970 if (!(ep->flags & EMBRYO_FLAG_RELOC))
971 {
972 ep->error = EMBRYO_ERROR_INIT;
973 return EMBRYO_PROGRAM_FAIL;
974 }
975 if (!ep->base)
976 {
977 ep->error = EMBRYO_ERROR_INIT;
978 return EMBRYO_PROGRAM_FAIL;
979 }
980 if (ep->run_count > 0)
981 {
982 /* return EMBRYO_PROGRAM_BUSY; */
983 /* FIXME: test C->vm->C->vm recursion more fully */
984 /* it seems to work... just fine!!! - strange! */
985 }
986
987 /* set up the registers */
988 hdr = (Embryo_Header *)ep->base;
989 codesize = (Embryo_UCell)(hdr->dat - hdr->cod);
990 code = ep->base + (int)hdr->cod;
991 data = ep->base + (int)hdr->dat;
992 hea_start = hea = ep->hea;
993 stk = ep->stk;
994 reset_stk = stk;
995 reset_hea = hea;
996 frm = alt = pri = 0;
997
998 /* get the start address */
999 if (fn == EMBRYO_FUNCTION_MAIN)
1000 {
1001 if (hdr->cip < 0)
1002 {
1003 ep->error = EMBRYO_ERROR_INDEX;
1004 return EMBRYO_PROGRAM_FAIL;
1005 }
1006 cip = (Embryo_Cell *)(code + (int)hdr->cip);
1007 }
1008 else if (fn == EMBRYO_FUNCTION_CONT)
1009 {
1010 /* all registers: pri, alt, frm, cip, hea, stk, reset_stk, reset_hea */
1011 frm = ep->frm;
1012 stk = ep->stk;
1013 hea = ep->hea;
1014 pri = ep->pri;
1015 alt = ep->alt;
1016 reset_stk = ep->reset_stk;
1017 reset_hea = ep->reset_hea;
1018 cip = (Embryo_Cell *)(code + (int)ep->cip);
1019 }
1020 else if (fn < 0)
1021 {
1022 ep->error = EMBRYO_ERROR_INDEX;
1023 return EMBRYO_PROGRAM_FAIL;
1024 }
1025 else
1026 {
1027 if (fn >= (Embryo_Cell)NUMENTRIES(hdr, publics, natives))
1028 {
1029 ep->error = EMBRYO_ERROR_INDEX;
1030 return EMBRYO_PROGRAM_FAIL;
1031 }
1032 func = GETENTRY(hdr, publics, fn);
1033 cip = (Embryo_Cell *)(code + (int)func->address);
1034 }
1035 /* check values just copied */
1036 CHKSTACK();
1037 CHKHEAP();
1038
1039 if (fn != EMBRYO_FUNCTION_CONT)
1040 {
1041 int i;
1042
1043 for (i = ep->params_size - 1; i >= 0; i--)
1044 {
1045 Embryo_Param *pr;
1046
1047 pr = &(ep->params[i]);
1048 if (pr->string)
1049 {
1050 int len;
1051 Embryo_Cell ep_addr, *addr;
1052
1053 len = strlen(pr->string);
1054 ep_addr = embryo_data_heap_push(ep, len + 1);
1055 if (ep_addr == EMBRYO_CELL_NONE)
1056 {
1057 ep->error = EMBRYO_ERROR_HEAPLOW;
1058 return EMBRYO_PROGRAM_FAIL;
1059 }
1060 addr = embryo_data_address_get(ep, ep_addr);
1061 if (addr)
1062 embryo_data_string_set(ep, pr->string, addr);
1063 else
1064 {
1065 ep->error = EMBRYO_ERROR_HEAPLOW;
1066 return EMBRYO_PROGRAM_FAIL;
1067 }
1068 PUSH(ep_addr);
1069 free(pr->string);
1070 }
1071 else if (pr->cell_array)
1072 {
1073 int len;
1074 Embryo_Cell ep_addr, *addr;
1075
1076 len = pr->cell_array_size;
1077 ep_addr = embryo_data_heap_push(ep, len + 1);
1078 if (ep_addr == EMBRYO_CELL_NONE)
1079 {
1080 ep->error = EMBRYO_ERROR_HEAPLOW;
1081 return EMBRYO_PROGRAM_FAIL;
1082 }
1083 addr = embryo_data_address_get(ep, ep_addr);
1084 if (addr)
1085 memcpy(addr, pr->cell_array,
1086 pr->cell_array_size * sizeof(Embryo_Cell));
1087 else
1088 {
1089 ep->error = EMBRYO_ERROR_HEAPLOW;
1090 return EMBRYO_PROGRAM_FAIL;
1091 }
1092 PUSH(ep_addr);
1093 free(pr->cell_array);
1094 }
1095 else
1096 {
1097 PUSH(pr->cell);
1098 }
1099 }
1100 PUSH(ep->params_size * sizeof(Embryo_Cell));
1101 PUSH(0);
1102 if (ep->params)
1103 {
1104 free(ep->params);
1105 ep->params = NULL;
1106 }
1107 ep->params_size = ep->params_alloc = 0;
1108 }
1109 /* check stack/heap before starting to run */
1110 CHKMARGIN();
1111
1112 /* track recursion depth */
1113 ep->run_count++;
1114
1115 max_run_cycles = ep->max_run_cycles;
1116 /* start running */
1117 for (cycle_count = 0;;)
1118 {
1119 if (max_run_cycles > 0)
1120 {
1121 if (cycle_count >= max_run_cycles)
1122 {
1123 TOOLONG(ep);
1124 }
1125 cycle_count++;
1126 }
1127 op = (Embryo_Opcode)*cip++;
1128 SWITCH(op);
1129 CASE(EMBRYO_OP_LOAD_PRI);
1130 GETPARAM(offs);
1131 pri = *(Embryo_Cell *)(data + (int)offs);
1132 BREAK;
1133 CASE(EMBRYO_OP_LOAD_ALT);
1134 GETPARAM(offs);
1135 alt = *(Embryo_Cell *)(data + (int)offs);
1136 BREAK;
1137 CASE(EMBRYO_OP_LOAD_S_PRI);
1138 GETPARAM(offs);
1139 pri = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1140 BREAK;
1141 CASE(EMBRYO_OP_LOAD_S_ALT);
1142 GETPARAM(offs);
1143 alt = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1144 BREAK;
1145 CASE(EMBRYO_OP_LREF_PRI);
1146 GETPARAM(offs);
1147 offs = *(Embryo_Cell *)(data + (int)offs);
1148 pri = *(Embryo_Cell *)(data + (int)offs);
1149 BREAK;
1150 CASE(EMBRYO_OP_LREF_ALT);
1151 GETPARAM(offs);
1152 offs = *(Embryo_Cell *)(data + (int)offs);
1153 alt = *(Embryo_Cell *)(data + (int)offs);
1154 BREAK;
1155 CASE(EMBRYO_OP_LREF_S_PRI);
1156 GETPARAM(offs);
1157 offs = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1158 pri = *(Embryo_Cell *)(data + (int)offs);
1159 BREAK;
1160 CASE(EMBRYO_OP_LREF_S_ALT);
1161 GETPARAM(offs);
1162 offs = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1163 alt = *(Embryo_Cell *)(data + (int)offs);
1164 BREAK;
1165 CASE(EMBRYO_OP_LOAD_I);
1166 CHKMEM(pri);
1167 pri = *(Embryo_Cell *)(data + (int)pri);
1168 BREAK;
1169 CASE(EMBRYO_OP_LODB_I);
1170 GETPARAM(offs);
1171 CHKMEM(pri);
1172 switch (offs)
1173 {
1174 case 1:
1175 pri = *(data + (int)pri);
1176 break;
1177 case 2:
1178 pri = *(unsigned short *)(data + (int)pri);
1179 break;
1180 case 4:
1181 pri = *(unsigned int *)(data + (int)pri);
1182 break;
1183 default:
1184 ABORT(ep, EMBRYO_ERROR_INVINSTR);
1185 break;
1186 }
1187 BREAK;
1188 CASE(EMBRYO_OP_CONST_PRI);
1189 GETPARAM(pri);
1190 BREAK;
1191 CASE(EMBRYO_OP_CONST_ALT);
1192 GETPARAM(alt);
1193 BREAK;
1194 CASE(EMBRYO_OP_ADDR_PRI);
1195 GETPARAM(pri);
1196 pri += frm;
1197 BREAK;
1198 CASE(EMBRYO_OP_ADDR_ALT);
1199 GETPARAM(alt);
1200 alt += frm;
1201 BREAK;
1202 CASE(EMBRYO_OP_STOR_PRI);
1203 GETPARAM(offs);
1204 *(Embryo_Cell *)(data + (int)offs) = pri;
1205 BREAK;
1206 CASE(EMBRYO_OP_STOR_ALT);
1207 GETPARAM(offs);
1208 *(Embryo_Cell *)(data + (int)offs) = alt;
1209 BREAK;
1210 CASE(EMBRYO_OP_STOR_S_PRI);
1211 GETPARAM(offs);
1212 *(Embryo_Cell *)(data + (int)frm + (int)offs) = pri;
1213 BREAK;
1214 CASE(EMBRYO_OP_STOR_S_ALT);
1215 GETPARAM(offs);
1216 *(Embryo_Cell *)(data + (int)frm + (int)offs) = alt;
1217 BREAK;
1218 CASE(EMBRYO_OP_SREF_PRI);
1219 GETPARAM(offs);
1220 offs = *(Embryo_Cell *)(data + (int)offs);
1221 *(Embryo_Cell *)(data + (int)offs) = pri;
1222 BREAK;
1223 CASE(EMBRYO_OP_SREF_ALT);
1224 GETPARAM(offs);
1225 offs = *(Embryo_Cell *)(data + (int)offs);
1226 *(Embryo_Cell *)(data + (int)offs) = alt;
1227 BREAK;
1228 CASE(EMBRYO_OP_SREF_S_PRI);
1229 GETPARAM(offs);
1230 offs = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1231 *(Embryo_Cell *)(data + (int)offs) = pri;
1232 BREAK;
1233 CASE(EMBRYO_OP_SREF_S_ALT);
1234 GETPARAM(offs);
1235 offs = *(Embryo_Cell *)(data + (int)frm + (int)offs);
1236 *(Embryo_Cell *)(data + (int)offs) = alt;
1237 BREAK;
1238 CASE(EMBRYO_OP_STOR_I);
1239 CHKMEM(alt);
1240 *(Embryo_Cell *)(data + (int)alt) = pri;
1241 BREAK;
1242 CASE(EMBRYO_OP_STRB_I);
1243 GETPARAM(offs);
1244 CHKMEM(alt);
1245 switch (offs)
1246 {
1247 case 1:
1248 *(data + (int)alt) = (unsigned char)pri;
1249 break;
1250 case 2:
1251 *(unsigned short *)(data + (int)alt) = (unsigned short)pri;
1252 break;
1253 case 4:
1254 *(unsigned int *)(data + (int)alt) = (unsigned int)pri;
1255 break;
1256 default:
1257 ABORT(ep, EMBRYO_ERROR_INVINSTR);
1258 break;
1259 }
1260 BREAK;
1261 CASE(EMBRYO_OP_LIDX);
1262 offs = (pri * sizeof(Embryo_Cell)) + alt;
1263 CHKMEM(offs);
1264 pri = *(Embryo_Cell *)(data + (int)offs);
1265 BREAK;
1266 CASE(EMBRYO_OP_LIDX_B);
1267 GETPARAM(offs);
1268 offs = (pri << (int)offs) + alt;
1269 CHKMEM(offs);
1270 pri = *(Embryo_Cell *)(data + (int)offs);
1271 BREAK;
1272 CASE(EMBRYO_OP_IDXADDR);
1273 pri = (pri * sizeof(Embryo_Cell)) + alt;
1274 BREAK;
1275 CASE(EMBRYO_OP_IDXADDR_B);
1276 GETPARAM(offs);
1277 pri = (pri << (int)offs) + alt;
1278 BREAK;
1279 CASE(EMBRYO_OP_ALIGN_PRI);
1280 GETPARAM(offs);
1281#ifdef WORDS_BIGENDIAN
1282 if ((size_t)offs < sizeof(Embryo_Cell))
1283 pri ^= sizeof(Embryo_Cell) - offs;
1284#endif
1285 BREAK;
1286 CASE(EMBRYO_OP_ALIGN_ALT);
1287 GETPARAM(offs);
1288#ifdef WORDS_BIGENDIAN
1289 if ((size_t)offs < sizeof(Embryo_Cell))
1290 alt ^= sizeof(Embryo_Cell) - offs;
1291#endif
1292 BREAK;
1293 CASE(EMBRYO_OP_LCTRL);
1294 GETPARAM(offs);
1295 switch (offs)
1296 {
1297 case 0:
1298 pri = hdr->cod;
1299 break;
1300 case 1:
1301 pri = hdr->dat;
1302 break;
1303 case 2:
1304 pri = hea;
1305 break;
1306 case 3:
1307 pri = ep->stp;
1308 break;
1309 case 4:
1310 pri = stk;
1311 break;
1312 case 5:
1313 pri = frm;
1314 break;
1315 case 6:
1316 pri = (Embryo_Cell)((unsigned char *)cip - code);
1317 break;
1318 default:
1319 ABORT(ep, EMBRYO_ERROR_INVINSTR);
1320 break;
1321 }
1322 BREAK;
1323 CASE(EMBRYO_OP_SCTRL);
1324 GETPARAM(offs);
1325 switch (offs)
1326 {
1327 case 0:
1328 case 1:
1329 case 2:
1330 hea = pri;
1331 break;
1332 case 3:
1333 /* cannot change these parameters */
1334 break;
1335 case 4:
1336 stk = pri;
1337 break;
1338 case 5:
1339 frm = pri;
1340 break;
1341 case 6:
1342 cip = (Embryo_Cell *)(code + (int)pri);
1343 break;
1344 default:
1345 ABORT(ep, EMBRYO_ERROR_INVINSTR);
1346 break;
1347 }
1348 BREAK;
1349 CASE(EMBRYO_OP_MOVE_PRI);
1350 pri = alt;
1351 BREAK;
1352 CASE(EMBRYO_OP_MOVE_ALT);
1353 alt = pri;
1354 BREAK;
1355 CASE(EMBRYO_OP_XCHG);
1356 offs = pri; /* offs is a temporary variable */
1357 pri = alt;
1358 alt = offs;
1359 BREAK;
1360 CASE(EMBRYO_OP_PUSH_PRI);
1361 PUSH(pri);
1362 BREAK;
1363 CASE(EMBRYO_OP_PUSH_ALT);
1364 PUSH(alt);
1365 BREAK;
1366 CASE(EMBRYO_OP_PUSH_C);
1367 GETPARAM(offs);
1368 PUSH(offs);
1369 BREAK;
1370 CASE(EMBRYO_OP_PUSH_R);
1371 GETPARAM(offs);
1372 while (offs--) PUSH(pri);
1373 BREAK;
1374 CASE(EMBRYO_OP_PUSH);
1375 GETPARAM(offs);
1376 PUSH(*(Embryo_Cell *)(data + (int)offs));
1377 BREAK;
1378 CASE(EMBRYO_OP_PUSH_S);
1379 GETPARAM(offs);
1380 PUSH(*(Embryo_Cell *)(data + (int)frm + (int)offs));
1381 BREAK;
1382 CASE(EMBRYO_OP_POP_PRI);
1383 POP(pri);
1384 BREAK;
1385 CASE(EMBRYO_OP_POP_ALT);
1386 POP(alt);
1387 BREAK;
1388 CASE(EMBRYO_OP_STACK);
1389 GETPARAM(offs);
1390 alt = stk;
1391 stk += offs;
1392 CHKMARGIN();
1393 CHKSTACK();
1394 BREAK;
1395 CASE(EMBRYO_OP_HEAP);
1396 GETPARAM(offs);
1397 alt = hea;
1398 hea += offs;
1399 CHKMARGIN();
1400 CHKHEAP();
1401 BREAK;
1402 CASE(EMBRYO_OP_PROC);
1403 PUSH(frm);
1404 frm = stk;
1405 CHKMARGIN();
1406 BREAK;
1407 CASE(EMBRYO_OP_RET);
1408 POP(frm);
1409 POP(offs);
1410 if ((Embryo_UCell)offs >= codesize)
1411 ABORT(ep, EMBRYO_ERROR_MEMACCESS);
1412 cip = (Embryo_Cell *)(code + (int)offs);
1413 BREAK;
1414 CASE(EMBRYO_OP_RETN);
1415 POP(frm);
1416 POP(offs);
1417 if ((Embryo_UCell)offs >= codesize)
1418 ABORT(ep, EMBRYO_ERROR_MEMACCESS);
1419 cip = (Embryo_Cell *)(code + (int)offs);
1420 stk += *(Embryo_Cell *)(data + (int)stk) + sizeof(Embryo_Cell); /* remove parameters from the stack */
1421 ep->stk = stk;
1422 BREAK;
1423 CASE(EMBRYO_OP_CALL);
1424 PUSH(((unsigned char *)cip - code) + sizeof(Embryo_Cell));/* skip address */
1425 cip = JUMPABS(code, cip); /* jump to the address */
1426 BREAK;
1427 CASE(EMBRYO_OP_CALL_PRI);
1428 PUSH((unsigned char *)cip - code);
1429 cip = (Embryo_Cell *)(code + (int)pri);
1430 BREAK;
1431 CASE(EMBRYO_OP_JUMP);
1432 /* since the GETPARAM() macro modifies cip, you cannot
1433 * do GETPARAM(cip) directly */
1434 cip = JUMPABS(code, cip);
1435 BREAK;
1436 CASE(EMBRYO_OP_JREL);
1437 offs = *cip;
1438 cip = (Embryo_Cell *)((unsigned char *)cip + (int)offs + sizeof(Embryo_Cell));
1439 BREAK;
1440 CASE(EMBRYO_OP_JZER);
1441 if (pri == 0)
1442 cip = JUMPABS(code, cip);
1443 else
1444 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1445 BREAK;
1446 CASE(EMBRYO_OP_JNZ);
1447 if (pri != 0)
1448 cip = JUMPABS(code, cip);
1449 else
1450 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1451 BREAK;
1452 CASE(EMBRYO_OP_JEQ);
1453 if (pri==alt)
1454 cip = JUMPABS(code, cip);
1455 else
1456 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1457 BREAK;
1458 CASE(EMBRYO_OP_JNEQ);
1459 if (pri != alt)
1460 cip = JUMPABS(code, cip);
1461 else
1462 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1463 BREAK;
1464 CASE(EMBRYO_OP_JLESS);
1465 if ((Embryo_UCell)pri < (Embryo_UCell)alt)
1466 cip = JUMPABS(code, cip);
1467 else
1468 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1469 BREAK;
1470 CASE(EMBRYO_OP_JLEQ);
1471 if ((Embryo_UCell)pri <= (Embryo_UCell)alt)
1472 cip = JUMPABS(code, cip);
1473 else
1474 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1475 BREAK;
1476 CASE(EMBRYO_OP_JGRTR);
1477 if ((Embryo_UCell)pri > (Embryo_UCell)alt)
1478 cip = JUMPABS(code, cip);
1479 else
1480 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1481 BREAK;
1482 CASE(EMBRYO_OP_JGEQ);
1483 if ((Embryo_UCell)pri >= (Embryo_UCell)alt)
1484 cip = JUMPABS(code, cip);
1485 else
1486 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1487 BREAK;
1488 CASE(EMBRYO_OP_JSLESS);
1489 if (pri < alt)
1490 cip = JUMPABS(code, cip);
1491 else
1492 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1493 BREAK;
1494 CASE(EMBRYO_OP_JSLEQ);
1495 if (pri <= alt)
1496 cip = JUMPABS(code, cip);
1497 else
1498 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1499 BREAK;
1500 CASE(EMBRYO_OP_JSGRTR);
1501 if (pri > alt)
1502 cip = JUMPABS(code, cip);
1503 else
1504 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1505 BREAK;
1506 CASE(EMBRYO_OP_JSGEQ);
1507 if (pri >= alt)
1508 cip = JUMPABS(code, cip);
1509 else
1510 cip = (Embryo_Cell *)((unsigned char *)cip + sizeof(Embryo_Cell));
1511 BREAK;
1512 CASE(EMBRYO_OP_SHL);
1513 pri <<= alt;
1514 BREAK;
1515 CASE(EMBRYO_OP_SHR);
1516 pri = (Embryo_UCell)pri >> (int)alt;
1517 BREAK;
1518 CASE(EMBRYO_OP_SSHR);
1519 pri >>= alt;
1520 BREAK;
1521 CASE(EMBRYO_OP_SHL_C_PRI);
1522 GETPARAM(offs);
1523 pri <<= offs;
1524 BREAK;
1525 CASE(EMBRYO_OP_SHL_C_ALT);
1526 GETPARAM(offs);
1527 alt <<= offs;
1528 BREAK;
1529 CASE(EMBRYO_OP_SHR_C_PRI);
1530 GETPARAM(offs);
1531 pri = (Embryo_UCell)pri >> (int)offs;
1532 BREAK;
1533 CASE(EMBRYO_OP_SHR_C_ALT);
1534 GETPARAM(offs);
1535 alt = (Embryo_UCell)alt >> (int)offs;
1536 BREAK;
1537 CASE(EMBRYO_OP_SMUL);
1538 pri *= alt;
1539 BREAK;
1540 CASE(EMBRYO_OP_SDIV);
1541 if (alt == 0) ABORT(ep, EMBRYO_ERROR_DIVIDE);
1542 /* divide must always round down; this is a bit
1543 * involved to do in a machine-independent way.
1544 */
1545 offs = ((pri % alt) + alt) % alt; /* true modulus */
1546 pri = (pri - offs) / alt; /* division result */
1547 alt = offs;
1548 BREAK;
1549 CASE(EMBRYO_OP_SDIV_ALT);
1550 if (pri == 0) ABORT(ep, EMBRYO_ERROR_DIVIDE);
1551 /* divide must always round down; this is a bit
1552 * involved to do in a machine-independent way.
1553 */
1554 offs = ((alt % pri) + pri) % pri; /* true modulus */
1555 pri = (alt - offs) / pri; /* division result */
1556 alt = offs;
1557 BREAK;
1558 CASE(EMBRYO_OP_UMUL);
1559 pri = (Embryo_UCell)pri * (Embryo_UCell)alt;
1560 BREAK;
1561 CASE(EMBRYO_OP_UDIV);
1562 if (alt == 0) ABORT(ep, EMBRYO_ERROR_DIVIDE);
1563 offs = (Embryo_UCell)pri % (Embryo_UCell)alt; /* temporary storage */
1564 pri = (Embryo_UCell)pri / (Embryo_UCell)alt;
1565 alt = offs;
1566 BREAK;
1567 CASE(EMBRYO_OP_UDIV_ALT);
1568 if (pri == 0) ABORT(ep, EMBRYO_ERROR_DIVIDE);
1569 offs = (Embryo_UCell)alt % (Embryo_UCell)pri; /* temporary storage */
1570 pri = (Embryo_UCell)alt / (Embryo_UCell)pri;
1571 alt = offs;
1572 BREAK;
1573 CASE(EMBRYO_OP_ADD);
1574 pri += alt;
1575 BREAK;
1576 CASE(EMBRYO_OP_SUB);
1577 pri -= alt;
1578 BREAK;
1579 CASE(EMBRYO_OP_SUB_ALT);
1580 pri = alt - pri;
1581 BREAK;
1582 CASE(EMBRYO_OP_AND);
1583 pri &= alt;
1584 BREAK;
1585 CASE(EMBRYO_OP_OR);
1586 pri |= alt;
1587 BREAK;
1588 CASE(EMBRYO_OP_XOR);
1589 pri ^= alt;
1590 BREAK;
1591 CASE(EMBRYO_OP_NOT);
1592 pri = !pri;
1593 BREAK;
1594 CASE(EMBRYO_OP_NEG);
1595 pri = -pri;
1596 BREAK;
1597 CASE(EMBRYO_OP_INVERT);
1598 pri = ~pri;
1599 BREAK;
1600 CASE(EMBRYO_OP_ADD_C);
1601 GETPARAM(offs);
1602 pri += offs;
1603 BREAK;
1604 CASE(EMBRYO_OP_SMUL_C);
1605 GETPARAM(offs);
1606 pri *= offs;
1607 BREAK;
1608 CASE(EMBRYO_OP_ZERO_PRI);
1609 pri = 0;
1610 BREAK;
1611 CASE(EMBRYO_OP_ZERO_ALT);
1612 alt = 0;
1613 BREAK;
1614 CASE(EMBRYO_OP_ZERO);
1615 GETPARAM(offs);
1616 *(Embryo_Cell *)(data + (int)offs) = 0;
1617 BREAK;
1618 CASE(EMBRYO_OP_ZERO_S);
1619 GETPARAM(offs);
1620 *(Embryo_Cell *)(data + (int)frm + (int)offs) = 0;
1621 BREAK;
1622 CASE(EMBRYO_OP_SIGN_PRI);
1623 if ((pri & 0xff) >= 0x80) pri |= ~(Embryo_UCell)0xff;
1624 BREAK;
1625 CASE(EMBRYO_OP_SIGN_ALT);
1626 if ((alt & 0xff) >= 0x80) alt |= ~(Embryo_UCell)0xff;
1627 BREAK;
1628 CASE(EMBRYO_OP_EQ);
1629 pri = (pri == alt) ? 1 : 0;
1630 BREAK;
1631 CASE(EMBRYO_OP_NEQ);
1632 pri = (pri != alt) ? 1 : 0;
1633 BREAK;
1634 CASE(EMBRYO_OP_LESS);
1635 pri = ((Embryo_UCell)pri < (Embryo_UCell)alt) ? 1 : 0;
1636 BREAK;
1637 CASE(EMBRYO_OP_LEQ);
1638 pri = ((Embryo_UCell)pri <= (Embryo_UCell)alt) ? 1 : 0;
1639 BREAK;
1640 CASE(EMBRYO_OP_GRTR);
1641 pri = ((Embryo_UCell)pri > (Embryo_UCell)alt) ? 1 : 0;
1642 BREAK;
1643 CASE(EMBRYO_OP_GEQ);
1644 pri = ((Embryo_UCell)pri >= (Embryo_UCell)alt) ? 1 : 0;
1645 BREAK;
1646 CASE(EMBRYO_OP_SLESS);
1647 pri = (pri < alt) ? 1 : 0;
1648 BREAK;
1649 CASE(EMBRYO_OP_SLEQ);
1650 pri = (pri <= alt) ? 1 : 0;
1651 BREAK;
1652 CASE(EMBRYO_OP_SGRTR);
1653 pri = (pri > alt) ? 1 : 0;
1654 BREAK;
1655 CASE(EMBRYO_OP_SGEQ);
1656 pri = (pri >= alt) ? 1 : 0;
1657 BREAK;
1658 CASE(EMBRYO_OP_EQ_C_PRI);
1659 GETPARAM(offs);
1660 pri = (pri == offs) ? 1 : 0;
1661 BREAK;
1662 CASE(EMBRYO_OP_EQ_C_ALT);
1663 GETPARAM(offs);
1664 pri = (alt == offs) ? 1 : 0;
1665 BREAK;
1666 CASE(EMBRYO_OP_INC_PRI);
1667 pri++;
1668 BREAK;
1669 CASE(EMBRYO_OP_INC_ALT);
1670 alt++;
1671 BREAK;
1672 CASE(EMBRYO_OP_INC);
1673 GETPARAM(offs);
1674 *(Embryo_Cell *)(data + (int)offs) += 1;
1675 BREAK;
1676 CASE(EMBRYO_OP_INC_S);
1677 GETPARAM(offs);
1678 *(Embryo_Cell *)(data + (int)frm + (int)offs) += 1;
1679 BREAK;
1680 CASE(EMBRYO_OP_INC_I);
1681 *(Embryo_Cell *)(data + (int)pri) += 1;
1682 BREAK;
1683 CASE(EMBRYO_OP_DEC_PRI);
1684 pri--;
1685 BREAK;
1686 CASE(EMBRYO_OP_DEC_ALT);
1687 alt--;
1688 BREAK;
1689 CASE(EMBRYO_OP_DEC);
1690 GETPARAM(offs);
1691 *(Embryo_Cell *)(data + (int)offs) -= 1;
1692 BREAK;
1693 CASE(EMBRYO_OP_DEC_S);
1694 GETPARAM(offs);
1695 *(Embryo_Cell *)(data + (int)frm + (int)offs) -= 1;
1696 BREAK;
1697 CASE(EMBRYO_OP_DEC_I);
1698 *(Embryo_Cell *)(data + (int)pri) -= 1;
1699 BREAK;
1700 CASE(EMBRYO_OP_MOVS);
1701 GETPARAM(offs);
1702 CHKMEM(pri);
1703 CHKMEM(pri + offs);
1704 CHKMEM(alt);
1705 CHKMEM(alt + offs);
1706 memcpy(data+(int)alt, data+(int)pri, (int)offs);
1707 BREAK;
1708 CASE(EMBRYO_OP_CMPS);
1709 GETPARAM(offs);
1710 CHKMEM(pri);
1711 CHKMEM(pri + offs);
1712 CHKMEM(alt);
1713 CHKMEM(alt + offs);
1714 pri = memcmp(data + (int)alt, data + (int)pri, (int)offs);
1715 BREAK;
1716 CASE(EMBRYO_OP_FILL);
1717 GETPARAM(offs);
1718 CHKMEM(alt);
1719 CHKMEM(alt + offs);
1720 for (i = (int)alt;
1721 (size_t)offs >= sizeof(Embryo_Cell);
1722 i += sizeof(Embryo_Cell), offs -= sizeof(Embryo_Cell))
1723 *(Embryo_Cell *)(data + i) = pri;
1724 BREAK;
1725 CASE(EMBRYO_OP_HALT);
1726 GETPARAM(offs);
1727 ep->retval = pri;
1728 /* store complete status */
1729 ep->frm = frm;
1730 ep->stk = stk;
1731 ep->hea = hea;
1732 ep->pri = pri;
1733 ep->alt = alt;
1734 ep->cip = (Embryo_Cell)((unsigned char*)cip - code);
1735 if (offs == EMBRYO_ERROR_SLEEP)
1736 {
1737 ep->reset_stk = reset_stk;
1738 ep->reset_hea = reset_hea;
1739 ep->run_count--;
1740 return EMBRYO_PROGRAM_SLEEP;
1741 }
1742 OK(ep, (int)offs);
1743 CASE(EMBRYO_OP_BOUNDS);
1744 GETPARAM(offs);
1745 if ((Embryo_UCell)pri > (Embryo_UCell)offs)
1746 ABORT(ep, EMBRYO_ERROR_BOUNDS);
1747 BREAK;
1748 CASE(EMBRYO_OP_SYSREQ_PRI);
1749 /* save a few registers */
1750 ep->cip = (Embryo_Cell)((unsigned char *)cip - code);
1751 ep->hea = hea;
1752 ep->frm = frm;
1753 ep->stk = stk;
1754 num = _embryo_native_call(ep, pri, &pri, (Embryo_Cell *)(data + (int)stk));
1755 if (num != EMBRYO_ERROR_NONE)
1756 {
1757 if (num == EMBRYO_ERROR_SLEEP)
1758 {
1759 ep->pri = pri;
1760 ep->alt = alt;
1761 ep->reset_stk = reset_stk;
1762 ep->reset_hea = reset_hea;
1763 ep->run_count--;
1764 return EMBRYO_PROGRAM_SLEEP;
1765 }
1766 ABORT(ep, num);
1767 }
1768 BREAK;
1769 CASE(EMBRYO_OP_SYSREQ_C);
1770 GETPARAM(offs);
1771 /* save a few registers */
1772 ep->cip = (Embryo_Cell)((unsigned char *)cip - code);
1773 ep->hea = hea;
1774 ep->frm = frm;
1775 ep->stk = stk;
1776 num = _embryo_native_call(ep, offs, &pri, (Embryo_Cell *)(data + (int)stk));
1777 if (num != EMBRYO_ERROR_NONE)
1778 {
1779 if (num == EMBRYO_ERROR_SLEEP)
1780 {
1781 ep->pri = pri;
1782 ep->alt = alt;
1783 ep->reset_stk = reset_stk;
1784 ep->reset_hea = reset_hea;
1785 ep->run_count--;
1786 return EMBRYO_PROGRAM_SLEEP;
1787 }
1788 {
1789 Embryo_Header *hdr;
1790 int i, num;
1791 Embryo_Func_Stub *func_entry;
1792
1793 hdr = (Embryo_Header *)ep->code;
1794 num = NUMENTRIES(hdr, natives, libraries);
1795 func_entry = GETENTRY(hdr, natives, 0);
1796 for (i = 0; i < num; i++)
1797 {
1798 char *entry_name;
1799
1800 entry_name = GETENTRYNAME(hdr, func_entry);
1801 if (i == offs)
1802 printf("EMBRYO: CALL [%i] %s() non-existent!\n", i, entry_name);
1803 func_entry =
1804 (Embryo_Func_Stub *)((unsigned char *)func_entry + hdr->defsize);
1805 }
1806 }
1807 ABORT(ep, num);
1808 }
1809 BREAK;
1810 CASE(EMBRYO_OP_SYSREQ_D);
1811 GETPARAM(offs);
1812 /* save a few registers */
1813 ep->cip = (Embryo_Cell)((unsigned char *)cip - code);
1814 ep->hea = hea;
1815 ep->frm = frm;
1816 ep->stk = stk;
1817 num = _embryo_native_call(ep, offs, &pri, (Embryo_Cell *)(data + (int)stk));
1818 if (num != EMBRYO_ERROR_NONE)
1819 {
1820 if (num == EMBRYO_ERROR_SLEEP)
1821 {
1822 ep->pri = pri;
1823 ep->alt = alt;
1824 ep->reset_stk = reset_stk;
1825 ep->reset_hea = reset_hea;
1826 ep->run_count--;
1827 return EMBRYO_PROGRAM_SLEEP;
1828 }
1829 ABORT(ep, ep->error);
1830 }
1831 BREAK;
1832 CASE(EMBRYO_OP_JUMP_PRI);
1833 cip = (Embryo_Cell *)(code + (int)pri);
1834 BREAK;
1835 CASE(EMBRYO_OP_SWITCH);
1836 {
1837 Embryo_Cell *cptr;
1838
1839 /* +1, to skip the "casetbl" opcode */
1840 cptr = (Embryo_Cell *)(code + (*cip)) + 1;
1841 /* number of records in the case table */
1842 num = (int)(*cptr);
1843 /* preset to "none-matched" case */
1844 cip = (Embryo_Cell *)(code + *(cptr + 1));
1845 for (cptr += 2;
1846 (num > 0) && (*cptr != pri);
1847 num--, cptr += 2);
1848 /* case found */
1849 if (num > 0)
1850 cip = (Embryo_Cell *)(code + *(cptr + 1));
1851 }
1852 BREAK;
1853 CASE(EMBRYO_OP_SWAP_PRI);
1854 offs = *(Embryo_Cell *)(data + (int)stk);
1855 *(Embryo_Cell *)(data + (int)stk) = pri;
1856 pri = offs;
1857 BREAK;
1858 CASE(EMBRYO_OP_SWAP_ALT);
1859 offs = *(Embryo_Cell *)(data + (int)stk);
1860 *(Embryo_Cell *)(data + (int)stk) = alt;
1861 alt = offs;
1862 BREAK;
1863 CASE(EMBRYO_OP_PUSHADDR);
1864 GETPARAM(offs);
1865 PUSH(frm + offs);
1866 BREAK;
1867 CASE(EMBRYO_OP_NOP);
1868 BREAK;
1869 CASE(EMBRYO_OP_NONE);
1870 CASE(EMBRYO_OP_FILE);
1871 CASE(EMBRYO_OP_LINE);
1872 CASE(EMBRYO_OP_SYMBOL);
1873 CASE(EMBRYO_OP_SRANGE);
1874 CASE(EMBRYO_OP_CASETBL);
1875 CASE(EMBRYO_OP_SYMTAG);
1876 BREAK;
1877#ifndef EMBRYO_EXEC_JUMPTABLE
1878 default:
1879 ABORT(ep, EMBRYO_ERROR_INVINSTR);
1880#endif
1881 SWITCHEND;
1882 }
1883 ep->max_run_cycles = max_run_cycles;
1884 ep->run_count--;
1885 ep->hea = hea_start;
1886 return EMBRYO_PROGRAM_OK;
1887}
1888
1889EAPI Embryo_Cell
1890embryo_program_return_value_get(Embryo_Program *ep)
1891{
1892 if (!ep) return 0;
1893 return ep->retval;
1894}
1895
1896EAPI void
1897embryo_program_max_cycle_run_set(Embryo_Program *ep, int max)
1898{
1899 if (!ep) return;
1900 if (max < 0) max = 0;
1901 ep->max_run_cycles = max;
1902}
1903
1904EAPI int
1905embryo_program_max_cycle_run_get(Embryo_Program *ep)
1906{
1907 if (!ep) return 0;
1908 return ep->max_run_cycles;
1909}
1910
1911
1912EAPI int
1913embryo_parameter_cell_push(Embryo_Program *ep, Embryo_Cell cell)
1914{
1915 Embryo_Param *pr;
1916
1917 ep->params_size++;
1918 if (ep->params_size > ep->params_alloc)
1919 {
1920 ep->params_alloc += 8;
1921 pr = realloc(ep->params, ep->params_alloc * sizeof(Embryo_Param));
1922 if (!pr) return 0;
1923 ep->params = pr;
1924 }
1925 pr = &(ep->params[ep->params_size - 1]);
1926 pr->string = NULL;
1927 pr->cell_array = NULL;
1928 pr->cell_array_size = 0;
1929 pr->cell = 0;
1930 pr->cell = cell;
1931 return 1;
1932}
1933
1934EAPI int
1935embryo_parameter_string_push(Embryo_Program *ep, const char *str)
1936{
1937 Embryo_Param *pr;
1938 char *str_dup;
1939
1940 if (!str)
1941 return embryo_parameter_string_push(ep, "");
1942 str_dup = strdup(str);
1943 if (!str_dup) return 0;
1944 ep->params_size++;
1945 if (ep->params_size > ep->params_alloc)
1946 {
1947 ep->params_alloc += 8;
1948 pr = realloc(ep->params, ep->params_alloc * sizeof(Embryo_Param));
1949 if (!pr)
1950 {
1951 free(str_dup);
1952 return 0;
1953 }
1954 ep->params = pr;
1955 }
1956 pr = &(ep->params[ep->params_size - 1]);
1957 pr->string = NULL;
1958 pr->cell_array = NULL;
1959 pr->cell_array_size = 0;
1960 pr->cell = 0;
1961 pr->string = str_dup;
1962 return 1;
1963}
1964
1965EAPI int
1966embryo_parameter_cell_array_push(Embryo_Program *ep, Embryo_Cell *cells, int num)
1967{
1968 Embryo_Param *pr;
1969 Embryo_Cell *cell_array;
1970
1971 if ((!cells) || (num <= 0))
1972 return embryo_parameter_cell_push(ep, 0);
1973 cell_array = malloc(num * sizeof(Embryo_Cell));
1974 ep->params_size++;
1975 if (ep->params_size > ep->params_alloc)
1976 {
1977 ep->params_alloc += 8;
1978 pr = realloc(ep->params, ep->params_alloc * sizeof(Embryo_Param));
1979 if (!pr)
1980 {
1981 free(cell_array);
1982 return 0;
1983 }
1984 ep->params = pr;
1985 }
1986 pr = &(ep->params[ep->params_size - 1]);
1987 pr->string = NULL;
1988 pr->cell_array = NULL;
1989 pr->cell_array_size = 0;
1990 pr->cell = 0;
1991 pr->cell_array = cell_array;
1992 pr->cell_array_size = num;
1993 memcpy(pr->cell_array, cells, num * sizeof(Embryo_Cell));
1994 return 1;
1995}
diff --git a/libraries/embryo/src/lib/embryo_args.c b/libraries/embryo/src/lib/embryo_args.c
deleted file mode 100644
index 0c0089e..0000000
--- a/libraries/embryo/src/lib/embryo_args.c
+++ /dev/null
@@ -1,128 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#ifdef HAVE_ALLOCA_H
6# include <alloca.h>
7#elif defined __GNUC__
8# define alloca __builtin_alloca
9#elif defined _AIX
10# define alloca __alloca
11#elif defined _MSC_VER
12# include <malloc.h>
13# define alloca _alloca
14#else
15# include <stddef.h>
16# ifdef __cplusplus
17extern "C"
18# endif
19void *alloca (size_t);
20#endif
21
22#include "Embryo.h"
23#include "embryo_private.h"
24
25#define STRSET(ep, par, str) { \
26 Embryo_Cell *___cptr; \
27 if ((___cptr = embryo_data_address_get(ep, par))) { \
28 embryo_data_string_set(ep, str, ___cptr); \
29 } }
30
31/* exported args api */
32
33static Embryo_Cell
34_embryo_args_numargs(Embryo_Program *ep, Embryo_Cell *params __UNUSED__)
35{
36 Embryo_Header *hdr;
37 unsigned char *data;
38 Embryo_Cell bytes;
39
40 hdr = (Embryo_Header *)ep->base;
41 data = ep->base + (int)hdr->dat;
42 bytes = *(Embryo_Cell *)(data + (int)ep->frm +
43 (2 * sizeof(Embryo_Cell)));
44 return bytes / sizeof(Embryo_Cell);
45}
46
47static Embryo_Cell
48_embryo_args_getarg(Embryo_Program *ep, Embryo_Cell *params)
49{
50 Embryo_Header *hdr;
51 unsigned char *data;
52 Embryo_Cell val;
53
54 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
55 hdr = (Embryo_Header *)ep->base;
56 data = ep->base + (int)hdr->dat;
57 val = *(Embryo_Cell *)(data + (int)ep->frm +
58 (((int)params[1] + 3) * sizeof(Embryo_Cell)));
59 val += params[2] * sizeof(Embryo_Cell);
60 val = *(Embryo_Cell *)(data + (int)val);
61 return val;
62}
63
64static Embryo_Cell
65_embryo_args_setarg(Embryo_Program *ep, Embryo_Cell *params)
66{
67 Embryo_Header *hdr;
68 unsigned char *data;
69 Embryo_Cell val;
70
71 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
72 hdr = (Embryo_Header *)ep->base;
73 data = ep->base + (int)hdr->dat;
74 val = *(Embryo_Cell *)(data + (int)ep->frm +
75 (((int)params[1] + 3) * sizeof(Embryo_Cell)));
76 val += params[2] * sizeof(Embryo_Cell);
77 if ((val < 0) || ((val >= ep->hea) && (val < ep->stk))) return 0;
78 *(Embryo_Cell *)(data + (int)val) = params[3];
79 return 1;
80}
81
82static Embryo_Cell
83_embryo_args_getsarg(Embryo_Program *ep, Embryo_Cell *params)
84{
85 Embryo_Header *hdr;
86 unsigned char *data;
87 Embryo_Cell base_cell;
88 char *s;
89 int i = 0;
90
91 /* params[1] = arg_no */
92 /* params[2] = buf */
93 /* params[3] = buflen */
94 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
95 if (params[3] <= 0) return 0; /* buflen must be > 0 */
96 hdr = (Embryo_Header *)ep->base;
97 data = ep->base + (int)hdr->dat;
98 base_cell = *(Embryo_Cell *)(data + (int)ep->frm +
99 (((int)params[1] + 3) * sizeof(Embryo_Cell)));
100
101 s = alloca(params[3]);
102
103 while (i < params[3])
104 {
105 int offset = base_cell + (i * sizeof(Embryo_Cell));
106
107 s[i] = *(Embryo_Cell *)(data + offset);
108 if (!s[i++]) break;
109 }
110
111 s[i - 1] = 0;
112 STRSET(ep, params[2], s);
113
114 return i - 1; /* characters written minus terminator */
115}
116
117/* functions used by the rest of embryo */
118
119void
120_embryo_args_init(Embryo_Program *ep)
121{
122 embryo_program_native_call_add(ep, "numargs", _embryo_args_numargs);
123 embryo_program_native_call_add(ep, "getarg", _embryo_args_getarg);
124 embryo_program_native_call_add(ep, "setarg", _embryo_args_setarg);
125 embryo_program_native_call_add(ep, "getfarg", _embryo_args_getarg);
126 embryo_program_native_call_add(ep, "setfarg", _embryo_args_setarg);
127 embryo_program_native_call_add(ep, "getsarg", _embryo_args_getsarg);
128}
diff --git a/libraries/embryo/src/lib/embryo_float.c b/libraries/embryo/src/lib/embryo_float.c
deleted file mode 100644
index 608be9d..0000000
--- a/libraries/embryo/src/lib/embryo_float.c
+++ /dev/null
@@ -1,331 +0,0 @@
1/* Float arithmetic for the Small AMX engine
2 *
3 * Copyright (c) Artran, Inc. 1999
4 * Written by Greg Garner (gmg@artran.com)
5 * Portions Copyright (c) Carsten Haitzler, 2004 <raster@rasterman.com>
6 *
7 * This software is provided "as-is", without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software in
17 * a product, an acknowledgment in the product documentation would be
18 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
21 * 3. This notice may not be removed or altered from any source distribution.
22 */
23
24/* CHANGES -
25 * 2002-08-27: Basic conversion of source from C++ to C by Adam D. Moss
26 * <adam@gimp.org> <aspirin@icculus.org>
27 * 2003-08-29: Removal of the dynamic memory allocation and replacing two
28 * type conversion functions by macros, by Thiadmer Riemersma
29 * 2003-09-22: Moved the type conversion macros to AMX.H, and simplifications
30 * of some routines, by Thiadmer Riemersma
31 * 2003-11-24: A few more native functions (geometry), plus minor modifications,
32 * mostly to be compatible with dynamically loadable extension
33 * modules, by Thiadmer Riemersma
34 * 2004-03-20: Cleaned up and reduced size for Embryo, Modified to conform to
35 * E coding style. Added extra parameter checks.
36 * Carsten Haitzler, <raster@rasterman.com>
37 */
38
39
40#ifdef HAVE_CONFIG_H
41# include "config.h"
42#endif
43
44#include <stdlib.h>
45#include <math.h>
46
47#include "Embryo.h"
48#include "embryo_private.h"
49
50#define PI 3.1415926535897932384626433832795f
51
52/* internally useful calls */
53
54static float
55_embryo_fp_degrees_to_radians(float angle, int radix)
56{
57 switch (radix)
58 {
59 case 1: /* degrees, sexagesimal system (technically: degrees/minutes/seconds) */
60 return (angle * PI / 180.0f);
61 case 2: /* grades, centesimal system */
62 return (angle * PI / 200.0f);
63 default: /* assume already radian */
64 break;
65 }
66 return angle;
67}
68
69/* exported float api */
70
71static Embryo_Cell
72_embryo_fp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
73{
74 /* params[1] = long value to convert to a float */
75 float f;
76
77 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
78 f = (float)params[1];
79 return EMBRYO_FLOAT_TO_CELL(f);
80}
81
82static Embryo_Cell
83_embryo_fp_str(Embryo_Program *ep, Embryo_Cell *params)
84{
85 /* params[1] = virtual string address to convert to a float */
86 char buf[64];
87 Embryo_Cell *str;
88 float f;
89 int len;
90
91 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
92 str = embryo_data_address_get(ep, params[1]);
93 len = embryo_data_string_length_get(ep, str);
94 if ((len == 0) || (len >= (int)sizeof(buf))) return 0;
95 embryo_data_string_get(ep, str, buf);
96 f = (float)atof(buf);
97 return EMBRYO_FLOAT_TO_CELL(f);
98}
99
100static Embryo_Cell
101_embryo_fp_mul(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
102{
103 /* params[1] = float operand 1 */
104 /* params[2] = float operand 2 */
105 float f;
106
107 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
108 f = EMBRYO_CELL_TO_FLOAT(params[1]) * EMBRYO_CELL_TO_FLOAT(params[2]);
109 return EMBRYO_FLOAT_TO_CELL(f);
110}
111
112static Embryo_Cell
113_embryo_fp_div(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
114{
115 /* params[1] = float dividend (top) */
116 /* params[2] = float divisor (bottom) */
117 float f;
118
119 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
120 f = EMBRYO_CELL_TO_FLOAT(params[1]) / EMBRYO_CELL_TO_FLOAT(params[2]);
121 return EMBRYO_FLOAT_TO_CELL(f);
122}
123
124static Embryo_Cell
125_embryo_fp_add(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
126{
127 /* params[1] = float operand 1 */
128 /* params[2] = float operand 2 */
129 float f;
130
131 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
132 f = EMBRYO_CELL_TO_FLOAT(params[1]) + EMBRYO_CELL_TO_FLOAT(params[2]);
133 return EMBRYO_FLOAT_TO_CELL(f);
134}
135
136static Embryo_Cell
137_embryo_fp_sub(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
138{
139 /* params[1] = float operand 1 */
140 /* params[2] = float operand 2 */
141 float f;
142
143 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
144 f = EMBRYO_CELL_TO_FLOAT(params[1]) - EMBRYO_CELL_TO_FLOAT(params[2]);
145 return EMBRYO_FLOAT_TO_CELL(f);
146}
147
148/* Return fractional part of float */
149static Embryo_Cell
150_embryo_fp_fract(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
151{
152 /* params[1] = float operand */
153 float f;
154
155 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
156 f = EMBRYO_CELL_TO_FLOAT(params[1]);
157 f -= (floorf(f));
158 return EMBRYO_FLOAT_TO_CELL(f);
159}
160
161/* Return integer part of float, rounded */
162static Embryo_Cell
163_embryo_fp_round(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
164{
165 /* params[1] = float operand */
166 /* params[2] = Type of rounding (cell) */
167 float f;
168
169 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
170 f = EMBRYO_CELL_TO_FLOAT(params[1]);
171 switch (params[2])
172 {
173 case 1: /* round downwards (truncate) */
174 f = (floorf(f));
175 break;
176 case 2: /* round upwards */
177 f = (ceilf(f));
178 break;
179 case 3: /* round towards zero */
180 if (f >= 0.0) f = (floorf(f));
181 else f = (ceilf(f));
182 break;
183 default: /* standard, round to nearest */
184 f = (floorf(f + 0.5));
185 break;
186 }
187 return (Embryo_Cell)f;
188}
189
190static Embryo_Cell
191_embryo_fp_cmp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
192{
193 /* params[1] = float operand 1 */
194 /* params[2] = float operand 2 */
195 float f, ff;
196
197 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
198 f = EMBRYO_CELL_TO_FLOAT(params[1]);
199 ff = EMBRYO_CELL_TO_FLOAT(params[2]);
200 if (f == ff) return 0;
201 else if (f > ff) return 1;
202 return -1;
203}
204
205static Embryo_Cell
206_embryo_fp_sqroot(Embryo_Program *ep, Embryo_Cell *params)
207{
208 /* params[1] = float operand */
209 float f;
210
211 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
212 f = EMBRYO_CELL_TO_FLOAT(params[1]);
213 f = sqrtf(f);
214 if (f < 0)
215 {
216 embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN);
217 return 0;
218 }
219 return EMBRYO_FLOAT_TO_CELL(f);
220}
221
222static Embryo_Cell
223_embryo_fp_power(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
224{
225 /* params[1] = float operand 1 */
226 /* params[2] = float operand 2 */
227 float f, ff;
228
229 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
230 f = EMBRYO_CELL_TO_FLOAT(params[1]);
231 ff = EMBRYO_CELL_TO_FLOAT(params[2]);
232 f = powf(f, ff);
233 return EMBRYO_FLOAT_TO_CELL(f);
234}
235
236static Embryo_Cell
237_embryo_fp_log(Embryo_Program *ep, Embryo_Cell *params)
238{
239 /* params[1] = float operand 1 (value) */
240 /* params[2] = float operand 2 (base) */
241 float f, ff;
242
243 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
244 f = EMBRYO_CELL_TO_FLOAT(params[1]);
245 ff = EMBRYO_CELL_TO_FLOAT(params[2]);
246 if ((f <= 0.0) || (ff <= 0.0))
247 {
248 embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN);
249 return 0;
250 }
251 if (ff == 10.0) f = log10f(f);
252 else f = (logf(f) / logf(ff));
253 return EMBRYO_FLOAT_TO_CELL(f);
254}
255
256static Embryo_Cell
257_embryo_fp_sin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
258{
259 /* params[1] = float operand 1 (angle) */
260 /* params[2] = float operand 2 (radix) */
261 float f;
262
263 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
264 f = EMBRYO_CELL_TO_FLOAT(params[1]);
265 f = _embryo_fp_degrees_to_radians(f, params[2]);
266 f = sinf(f);
267 return EMBRYO_FLOAT_TO_CELL(f);
268}
269
270static Embryo_Cell
271_embryo_fp_cos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
272{
273 /* params[1] = float operand 1 (angle) */
274 /* params[2] = float operand 2 (radix) */
275 float f;
276
277 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
278 f = EMBRYO_CELL_TO_FLOAT(params[1]);
279 f = _embryo_fp_degrees_to_radians(f, params[2]);
280 f = cosf(f);
281 return EMBRYO_FLOAT_TO_CELL(f);
282}
283
284static Embryo_Cell
285_embryo_fp_tan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
286{
287 /* params[1] = float operand 1 (angle) */
288 /* params[2] = float operand 2 (radix) */
289 float f;
290
291 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
292 f = EMBRYO_CELL_TO_FLOAT(params[1]);
293 f = _embryo_fp_degrees_to_radians(f, params[2]);
294 f = tanf(f);
295 return EMBRYO_FLOAT_TO_CELL(f);
296}
297
298static Embryo_Cell
299_embryo_fp_abs(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
300{
301 /* params[1] = float operand */
302 float f;
303
304 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
305 f = EMBRYO_CELL_TO_FLOAT(params[1]);
306 f = (f >= 0) ? f : -f;
307 return EMBRYO_FLOAT_TO_CELL(f);
308}
309
310/* functions used by the rest of embryo */
311
312void
313_embryo_fp_init(Embryo_Program *ep)
314{
315 embryo_program_native_call_add(ep, "float", _embryo_fp);
316 embryo_program_native_call_add(ep, "atof", _embryo_fp_str);
317 embryo_program_native_call_add(ep, "float_mul", _embryo_fp_mul);
318 embryo_program_native_call_add(ep, "float_div", _embryo_fp_div);
319 embryo_program_native_call_add(ep, "float_add", _embryo_fp_add);
320 embryo_program_native_call_add(ep, "float_sub", _embryo_fp_sub);
321 embryo_program_native_call_add(ep, "fract", _embryo_fp_fract);
322 embryo_program_native_call_add(ep, "round", _embryo_fp_round);
323 embryo_program_native_call_add(ep, "float_cmp", _embryo_fp_cmp);
324 embryo_program_native_call_add(ep, "sqrt", _embryo_fp_sqroot);
325 embryo_program_native_call_add(ep, "pow", _embryo_fp_power);
326 embryo_program_native_call_add(ep, "log", _embryo_fp_log);
327 embryo_program_native_call_add(ep, "sin", _embryo_fp_sin);
328 embryo_program_native_call_add(ep, "cos", _embryo_fp_cos);
329 embryo_program_native_call_add(ep, "tan", _embryo_fp_tan);
330 embryo_program_native_call_add(ep, "abs", _embryo_fp_abs);
331}
diff --git a/libraries/embryo/src/lib/embryo_main.c b/libraries/embryo/src/lib/embryo_main.c
deleted file mode 100644
index 0b01b11..0000000
--- a/libraries/embryo/src/lib/embryo_main.c
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <stdlib.h>
6#include <time.h>
7
8#include "Embryo.h"
9#include "embryo_private.h"
10
11static Embryo_Version _version = { VMAJ, VMIN, VMIC, VREV };
12EAPI Embryo_Version *embryo_version = &_version;
13
14static int _embryo_init_count = 0;
15
16/*** EXPORTED CALLS ***/
17
18EAPI int
19embryo_init(void)
20{
21 if (++_embryo_init_count != 1)
22 return _embryo_init_count;
23
24 srand(time(NULL));
25
26 return _embryo_init_count;
27}
28
29EAPI int
30embryo_shutdown(void)
31{
32 if (--_embryo_init_count != 0)
33 return _embryo_init_count;
34
35 return _embryo_init_count;
36}
diff --git a/libraries/embryo/src/lib/embryo_private.h b/libraries/embryo/src/lib/embryo_private.h
deleted file mode 100644
index a4205e1..0000000
--- a/libraries/embryo/src/lib/embryo_private.h
+++ /dev/null
@@ -1,298 +0,0 @@
1#ifndef _EMBRYO_PRIVATE_H
2#define _EMBRYO_PRIVATE_H
3
4
5#ifdef __GNUC__
6# if __GNUC__ >= 4
7// BROKEN in gcc 4 on amd64
8//# pragma GCC visibility push(hidden)
9# endif
10#endif
11
12typedef enum _Embryo_Opcode Embryo_Opcode;
13
14enum _Embryo_Opcode
15{
16 EMBRYO_OP_NONE,
17 EMBRYO_OP_LOAD_PRI,
18 EMBRYO_OP_LOAD_ALT,
19 EMBRYO_OP_LOAD_S_PRI,
20 EMBRYO_OP_LOAD_S_ALT,
21 EMBRYO_OP_LREF_PRI,
22 EMBRYO_OP_LREF_ALT,
23 EMBRYO_OP_LREF_S_PRI,
24 EMBRYO_OP_LREF_S_ALT,
25 EMBRYO_OP_LOAD_I,
26 EMBRYO_OP_LODB_I,
27 EMBRYO_OP_CONST_PRI,
28 EMBRYO_OP_CONST_ALT,
29 EMBRYO_OP_ADDR_PRI,
30 EMBRYO_OP_ADDR_ALT,
31 EMBRYO_OP_STOR_PRI,
32 EMBRYO_OP_STOR_ALT,
33 EMBRYO_OP_STOR_S_PRI,
34 EMBRYO_OP_STOR_S_ALT,
35 EMBRYO_OP_SREF_PRI,
36 EMBRYO_OP_SREF_ALT,
37 EMBRYO_OP_SREF_S_PRI,
38 EMBRYO_OP_SREF_S_ALT,
39 EMBRYO_OP_STOR_I,
40 EMBRYO_OP_STRB_I,
41 EMBRYO_OP_LIDX,
42 EMBRYO_OP_LIDX_B,
43 EMBRYO_OP_IDXADDR,
44 EMBRYO_OP_IDXADDR_B,
45 EMBRYO_OP_ALIGN_PRI,
46 EMBRYO_OP_ALIGN_ALT,
47 EMBRYO_OP_LCTRL,
48 EMBRYO_OP_SCTRL,
49 EMBRYO_OP_MOVE_PRI,
50 EMBRYO_OP_MOVE_ALT,
51 EMBRYO_OP_XCHG,
52 EMBRYO_OP_PUSH_PRI,
53 EMBRYO_OP_PUSH_ALT,
54 EMBRYO_OP_PUSH_R,
55 EMBRYO_OP_PUSH_C,
56 EMBRYO_OP_PUSH,
57 EMBRYO_OP_PUSH_S,
58 EMBRYO_OP_POP_PRI,
59 EMBRYO_OP_POP_ALT,
60 EMBRYO_OP_STACK,
61 EMBRYO_OP_HEAP,
62 EMBRYO_OP_PROC,
63 EMBRYO_OP_RET,
64 EMBRYO_OP_RETN,
65 EMBRYO_OP_CALL,
66 EMBRYO_OP_CALL_PRI,
67 EMBRYO_OP_JUMP,
68 EMBRYO_OP_JREL,
69 EMBRYO_OP_JZER,
70 EMBRYO_OP_JNZ,
71 EMBRYO_OP_JEQ,
72 EMBRYO_OP_JNEQ,
73 EMBRYO_OP_JLESS,
74 EMBRYO_OP_JLEQ,
75 EMBRYO_OP_JGRTR,
76 EMBRYO_OP_JGEQ,
77 EMBRYO_OP_JSLESS,
78 EMBRYO_OP_JSLEQ,
79 EMBRYO_OP_JSGRTR,
80 EMBRYO_OP_JSGEQ,
81 EMBRYO_OP_SHL,
82 EMBRYO_OP_SHR,
83 EMBRYO_OP_SSHR,
84 EMBRYO_OP_SHL_C_PRI,
85 EMBRYO_OP_SHL_C_ALT,
86 EMBRYO_OP_SHR_C_PRI,
87 EMBRYO_OP_SHR_C_ALT,
88 EMBRYO_OP_SMUL,
89 EMBRYO_OP_SDIV,
90 EMBRYO_OP_SDIV_ALT,
91 EMBRYO_OP_UMUL,
92 EMBRYO_OP_UDIV,
93 EMBRYO_OP_UDIV_ALT,
94 EMBRYO_OP_ADD,
95 EMBRYO_OP_SUB,
96 EMBRYO_OP_SUB_ALT,
97 EMBRYO_OP_AND,
98 EMBRYO_OP_OR,
99 EMBRYO_OP_XOR,
100 EMBRYO_OP_NOT,
101 EMBRYO_OP_NEG,
102 EMBRYO_OP_INVERT,
103 EMBRYO_OP_ADD_C,
104 EMBRYO_OP_SMUL_C,
105 EMBRYO_OP_ZERO_PRI,
106 EMBRYO_OP_ZERO_ALT,
107 EMBRYO_OP_ZERO,
108 EMBRYO_OP_ZERO_S,
109 EMBRYO_OP_SIGN_PRI,
110 EMBRYO_OP_SIGN_ALT,
111 EMBRYO_OP_EQ,
112 EMBRYO_OP_NEQ,
113 EMBRYO_OP_LESS,
114 EMBRYO_OP_LEQ,
115 EMBRYO_OP_GRTR,
116 EMBRYO_OP_GEQ,
117 EMBRYO_OP_SLESS,
118 EMBRYO_OP_SLEQ,
119 EMBRYO_OP_SGRTR,
120 EMBRYO_OP_SGEQ,
121 EMBRYO_OP_EQ_C_PRI,
122 EMBRYO_OP_EQ_C_ALT,
123 EMBRYO_OP_INC_PRI,
124 EMBRYO_OP_INC_ALT,
125 EMBRYO_OP_INC,
126 EMBRYO_OP_INC_S,
127 EMBRYO_OP_INC_I,
128 EMBRYO_OP_DEC_PRI,
129 EMBRYO_OP_DEC_ALT,
130 EMBRYO_OP_DEC,
131 EMBRYO_OP_DEC_S,
132 EMBRYO_OP_DEC_I,
133 EMBRYO_OP_MOVS,
134 EMBRYO_OP_CMPS,
135 EMBRYO_OP_FILL,
136 EMBRYO_OP_HALT,
137 EMBRYO_OP_BOUNDS,
138 EMBRYO_OP_SYSREQ_PRI,
139 EMBRYO_OP_SYSREQ_C,
140 EMBRYO_OP_FILE,
141 EMBRYO_OP_LINE,
142 EMBRYO_OP_SYMBOL,
143 EMBRYO_OP_SRANGE,
144 EMBRYO_OP_JUMP_PRI,
145 EMBRYO_OP_SWITCH,
146 EMBRYO_OP_CASETBL,
147 EMBRYO_OP_SWAP_PRI,
148 EMBRYO_OP_SWAP_ALT,
149 EMBRYO_OP_PUSHADDR,
150 EMBRYO_OP_NOP,
151 EMBRYO_OP_SYSREQ_D,
152 EMBRYO_OP_SYMTAG,
153 /* ----- */
154 EMBRYO_OP_NUM_OPCODES
155};
156
157#define NUMENTRIES(hdr, field, nextfield) \
158(int)(((hdr)->nextfield - (hdr)->field) / (hdr)->defsize)
159#define GETENTRY(hdr, table, index) \
160(Embryo_Func_Stub *)((unsigned char*)(hdr) + \
161(int)(hdr)->table + index * (hdr)->defsize)
162#ifdef WORDS_BIGENDIAN
163static int __inline __entryswap32(int v)
164{int vv; vv = v; embryo_swap_32((unsigned int *)&vv); return vv;}
165# define GETENTRYNAME(hdr, entry) \
166(((hdr)->defsize == 2 * sizeof(unsigned int)) \
167? (char *)((unsigned char*)(hdr) + \
168__entryswap32(*((unsigned int *)(entry) + 1))) \
169: (entry)->name)
170#else
171# define GETENTRYNAME(hdr, entry) \
172(((hdr)->defsize == 2 * sizeof(unsigned int)) \
173? (char *)((unsigned char*)(hdr) + *((unsigned int *)(entry) + 1)) \
174: (entry)->name)
175#endif
176
177#define CUR_FILE_VERSION 7 /* current file version; also the current Embryo_Program version */
178#define MIN_FILE_VERSION 7 /* lowest supported file format version for the current Embryo_Program version */
179#define MIN_AMX_VERSION 7 /* minimum Embryo_Program version needed to support the current file format */
180#define sEXPMAX 19 /* maximum name length for file version <= 6 */
181#define sNAMEMAX 31 /* maximum name length of symbol name */
182#define EMBRYO_MAGIC 0xf1e0 /* magic byte pattern */
183#define EMBRYO_FLAG_COMPACT 0x04 /* compact encoding */
184#define EMBRYO_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
185#define GETPARAM(v) (v = *(Embryo_Cell *)cip++)
186#define PUSH(v) (stk -= sizeof(Embryo_Cell), *(Embryo_Cell *)(data + (int)stk) = v)
187#define POP(v) (v = *(Embryo_Cell *)(data + (int)stk), stk += sizeof(Embryo_Cell))
188#define ABORT(ep,v) {(ep)->stk = reset_stk; (ep)->hea = reset_hea; (ep)->run_count--; ep->error = v; (ep)->max_run_cycles = max_run_cycles; return EMBRYO_PROGRAM_FAIL;}
189#define OK(ep,v) {(ep)->stk = reset_stk; (ep)->hea = reset_hea; (ep)->run_count--; ep->error = v; (ep)->max_run_cycles = max_run_cycles; return EMBRYO_PROGRAM_OK;}
190#define TOOLONG(ep) {(ep)->pri = pri; (ep)->cip = (Embryo_Cell)((unsigned char *)cip - code); (ep)->alt = alt; (ep)->frm = frm; (ep)->stk = stk; (ep)->hea = hea; (ep)->reset_stk = reset_stk; (ep)->reset_hea = reset_hea; (ep)->run_count--; (ep)->max_run_cycles = max_run_cycles; return EMBRYO_PROGRAM_TOOLONG;}
191#define STKMARGIN ((Embryo_Cell)(16 * sizeof(Embryo_Cell)))
192#define CHKMARGIN() if ((hea + STKMARGIN) > stk) {ep->error = EMBRYO_ERROR_STACKERR; return 0;}
193#define CHKSTACK() if (stk > ep->stp) {ep->run_count--; ep->error = EMBRYO_ERROR_STACKLOW; return 0;}
194#define CHKHEAP() if (hea < ep->hlw) {ep->run_count--; ep->error = EMBRYO_ERROR_HEAPLOW; return 0;}
195#define CHKMEM(x) if ((((x) >= hea) && ((x) < stk)) || ((Embryo_UCell)(x) >= (Embryo_UCell)ep->stp)) ABORT(ep, EMBRYO_ERROR_MEMACCESS);
196
197typedef struct _Embryo_Param Embryo_Param;
198typedef struct _Embryo_Header Embryo_Header;
199typedef struct _Embryo_Func_Stub Embryo_Func_Stub;
200
201typedef Embryo_Cell (*Embryo_Native)(Embryo_Program *ep, Embryo_Cell *params);
202
203struct _Embryo_Param
204{
205 char *string;
206 Embryo_Cell *cell_array;
207 int cell_array_size;
208 Embryo_Cell cell;
209};
210
211struct _Embryo_Program
212{
213 unsigned char *base; /* points to the Embryo_Program header ("ephdr") plus the code, optionally also the data */
214 int pushes; /* number of pushes - pops */
215 /* for external functions a few registers must be accessible from the outside */
216 Embryo_Cell cip; /* instruction pointer: relative to base + ephdr->cod */
217 Embryo_Cell frm; /* stack frame base: relative to base + ephdr->dat */
218 Embryo_Cell hea; /* top of the heap: relative to base + ephdr->dat */
219 Embryo_Cell hlw; /* bottom of the heap: relative to base + ephdr->dat */
220 Embryo_Cell stk; /* stack pointer: relative to base + ephdr->dat */
221 Embryo_Cell stp; /* top of the stack: relative to base + ephdr->dat */
222 int flags; /* current status */
223 /* native functions can raise an error */
224 int error;
225 /* the sleep opcode needs to store the full Embryo_Program status */
226 Embryo_Cell pri;
227 Embryo_Cell alt;
228 Embryo_Cell reset_stk;
229 Embryo_Cell reset_hea;
230 Embryo_Cell *syscall_d; /* relocated value/address for the SYSCALL.D opcode */
231
232 /* extended stuff */
233 Embryo_Native *native_calls;
234 int native_calls_size;
235 int native_calls_alloc;
236
237 unsigned char *code;
238 unsigned char dont_free_code : 1;
239 Embryo_Cell retval;
240
241 Embryo_Param *params;
242 int params_size;
243 int params_alloc;
244
245 int run_count;
246
247 int max_run_cycles;
248
249 void *data;
250};
251
252#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
253# pragma pack(1)
254# define EMBRYO_STRUCT_PACKED
255#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
256# define EMBRYO_STRUCT_PACKED __attribute__((packed))
257#else
258# define EMBRYO_STRUCT_PACKED
259#endif
260
261struct _Embryo_Func_Stub
262{
263 int address;
264 char name[sEXPMAX+1];
265} EMBRYO_STRUCT_PACKED;
266
267struct _Embryo_Header
268{
269 unsigned int size; /* size of the "file" */
270 unsigned short magic; /* signature */
271 char file_version; /* file format version */
272 char ep_version; /* required version of the Embryo_Program */
273 short flags;
274 short defsize; /* size of a definition record */
275 int cod; /* initial value of COD - code block */
276 int dat; /* initial value of DAT - data block */
277 int hea; /* initial value of HEA - start of the heap */
278 int stp; /* initial value of STP - stack top */
279 int cip; /* initial value of CIP - the instruction pointer */
280 int publics; /* offset to the "public functions" table */
281 int natives; /* offset to the "native functions" table */
282 int libraries; /* offset to the table of libraries */
283 int pubvars; /* the "public variables" table */
284 int tags; /* the "public tagnames" table */
285 int nametable; /* name table, file version 7 only */
286} EMBRYO_STRUCT_PACKED;
287
288#if defined _MSC_VER || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
289# pragma pack()
290#endif
291
292void _embryo_args_init(Embryo_Program *ep);
293void _embryo_fp_init(Embryo_Program *ep);
294void _embryo_rand_init(Embryo_Program *ep);
295void _embryo_str_init(Embryo_Program *ep);
296void _embryo_time_init(Embryo_Program *ep);
297
298#endif
diff --git a/libraries/embryo/src/lib/embryo_rand.c b/libraries/embryo/src/lib/embryo_rand.c
deleted file mode 100644
index 627f7ed..0000000
--- a/libraries/embryo/src/lib/embryo_rand.c
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <stdlib.h>
6
7#include "Embryo.h"
8#include "embryo_private.h"
9
10/* exported random number api */
11
12static Embryo_Cell
13_embryo_rand_rand(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__)
14{
15 return (Embryo_Cell)(rand() & 0xffff);
16}
17
18static Embryo_Cell
19_embryo_rand_randf(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__)
20{
21 double r;
22 float f;
23
24 r = (double)(rand() & 0xffff) / 65535.0;
25 f = (float)r;
26 return EMBRYO_FLOAT_TO_CELL(f);
27}
28
29/* functions used by the rest of embryo */
30
31void
32_embryo_rand_init(Embryo_Program *ep)
33{
34 embryo_program_native_call_add(ep, "rand", _embryo_rand_rand);
35 embryo_program_native_call_add(ep, "randf", _embryo_rand_randf);
36}
diff --git a/libraries/embryo/src/lib/embryo_str.c b/libraries/embryo/src/lib/embryo_str.c
deleted file mode 100644
index 0c2faa2..0000000
--- a/libraries/embryo/src/lib/embryo_str.c
+++ /dev/null
@@ -1,498 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#ifdef STDC_HEADERS
6# include <stdlib.h>
7# include <stddef.h>
8#else
9# ifdef HAVE_STDLIB_H
10# include <stdlib.h>
11# endif
12#endif
13#ifdef HAVE_ALLOCA_H
14# include <alloca.h>
15#elif !defined alloca
16# ifdef __GNUC__
17# define alloca __builtin_alloca
18# elif defined _AIX
19# define alloca __alloca
20# elif defined _MSC_VER
21# include <malloc.h>
22# define alloca _alloca
23# elif !defined HAVE_ALLOCA
24# ifdef __cplusplus
25extern "C"
26# endif
27void *alloca (size_t);
28# endif
29#endif
30
31#ifdef HAVE_EXOTIC
32# include <Exotic.h>
33#endif
34
35#include <stdlib.h>
36#include <stdio.h>
37#include <string.h>
38#include <fnmatch.h>
39
40#include "Embryo.h"
41#include "embryo_private.h"
42
43#define STRGET(ep, str, par) { \
44 Embryo_Cell *___cptr; \
45 str = NULL; \
46 if ((___cptr = embryo_data_address_get(ep, par))) { \
47 int ___l; \
48 ___l = embryo_data_string_length_get(ep, ___cptr); \
49 (str) = alloca(___l + 1); \
50 if (str) embryo_data_string_get(ep, ___cptr, str); \
51 } }
52#define STRSET(ep, par, str) { \
53 Embryo_Cell *___cptr; \
54 if ((___cptr = embryo_data_address_get(ep, par))) { \
55 embryo_data_string_set(ep, str, ___cptr); \
56 } }
57
58/* exported string api */
59
60static Embryo_Cell
61_embryo_str_atoi(Embryo_Program *ep, Embryo_Cell *params)
62{
63 char *s1;
64
65 /* params[1] = str */
66 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
67 STRGET(ep, s1, params[1]);
68 if (!s1) return 0;
69 return (Embryo_Cell)atoi(s1);
70}
71
72static Embryo_Cell
73_embryo_str_fnmatch(Embryo_Program *ep, Embryo_Cell *params)
74{
75 char *s1, *s2;
76
77 /* params[1] = glob */
78 /* params[2] = str */
79 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
80 STRGET(ep, s1, params[1]);
81 STRGET(ep, s2, params[2]);
82 if ((!s1) || (!s2)) return -1;
83 return (Embryo_Cell)fnmatch(s1, s2, 0);
84}
85
86static Embryo_Cell
87_embryo_str_strcmp(Embryo_Program *ep, Embryo_Cell *params)
88{
89 char *s1, *s2;
90
91 /* params[1] = str1 */
92 /* params[2] = str2 */
93 if (params[0] != (2 * sizeof(Embryo_Cell))) return -1;
94 STRGET(ep, s1, params[1]);
95 STRGET(ep, s2, params[2]);
96 if ((!s1) || (!s2)) return -1;
97 return (Embryo_Cell)strcmp(s1, s2);
98}
99
100static Embryo_Cell
101_embryo_str_strncmp(Embryo_Program *ep, Embryo_Cell *params)
102{
103 char *s1, *s2;
104
105 /* params[1] = str1 */
106 /* params[2] = str2 */
107 /* params[3] = n */
108 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
109 if (params[3] < 0) params[3] = 0;
110 STRGET(ep, s1, params[1]);
111 STRGET(ep, s2, params[2]);
112 if ((!s1) || (!s2)) return -1;
113 return (Embryo_Cell)strncmp(s1, s2, (size_t)params[3]);
114}
115
116static Embryo_Cell
117_embryo_str_strcpy(Embryo_Program *ep, Embryo_Cell *params)
118{
119 char *s1;
120
121 /* params[1] = dst */
122 /* params[2] = str */
123 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
124 STRGET(ep, s1, params[2]);
125 if (!s1) return 0;
126 STRSET(ep, params[1], s1);
127 return 0;
128}
129
130static Embryo_Cell
131_embryo_str_strncpy(Embryo_Program *ep, Embryo_Cell *params)
132{
133 char *s1;
134 int l;
135
136 /* params[1] = dst */
137 /* params[2] = str */
138 /* params[3] = n */
139 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
140 if (params[3] < 0) params[3] = 0;
141 STRGET(ep, s1, params[2]);
142 if (!s1) return 0;
143 l = strlen(s1);
144 if (l > params[3]) s1[params[3]] = 0;
145 STRSET(ep, params[1], s1);
146 return 0;
147}
148
149static Embryo_Cell
150_embryo_str_strlen(Embryo_Program *ep, Embryo_Cell *params)
151{
152 char *s1;
153
154 /* params[1] = str */
155 if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
156 STRGET(ep, s1, params[1]);
157 if (!s1) return 0;
158 return (Embryo_Cell)strlen(s1);
159}
160
161static Embryo_Cell
162_embryo_str_strcat(Embryo_Program *ep, Embryo_Cell *params)
163{
164 char *s1, *s2, *s3;
165
166 /* params[1] = dsr */
167 /* params[2] = str */
168 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
169 STRGET(ep, s1, params[1]);
170 STRGET(ep, s2, params[2]);
171 if ((!s1) || (!s2)) return 0;
172 s3 = alloca(strlen(s1) + strlen(s2) + 1);
173 if (!s3) return 0;
174 strcpy(s3, s1);
175 strcat(s3, s2);
176 STRSET(ep, params[1], s3);
177 return 0;
178}
179
180static Embryo_Cell
181_embryo_str_strncat(Embryo_Program *ep, Embryo_Cell *params)
182{
183 char *s1, *s2, *s3;
184 int l1, l2;
185
186 /* params[1] = dst */
187 /* params[2] = str */
188 /* params[3] = n */
189 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
190 if (params[3] < 0) params[3] = 0;
191 STRGET(ep, s1, params[1]);
192 STRGET(ep, s2, params[2]);
193 if ((!s1) || (!s2)) return 0;
194 l1 = strlen(s1);
195 l2 = strlen(s2);
196 s3 = alloca(l1 + l2 + 1);
197 if (!s3) return 0;
198 strcpy(s3, s1);
199 strncat(s3, s2, params[3]);
200 if (l2 >= params[3]) s3[l1 + params[3]] = 0;
201 STRSET(ep, params[1], s3);
202 return 0;
203}
204
205static Embryo_Cell
206_embryo_str_strprep(Embryo_Program *ep, Embryo_Cell *params)
207{
208 char *s1, *s2, *s3;
209
210 /* params[1] = dst */
211 /* params[2] = str */
212 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
213 STRGET(ep, s1, params[1]);
214 STRGET(ep, s2, params[2]);
215 if ((!s1) || (!s2)) return 0;
216 s3 = alloca(strlen(s1) + strlen(s2) + 1);
217 if (!s3) return 0;
218 strcpy(s3, s2);
219 strcat(s3, s1);
220 STRSET(ep, params[1], s3);
221 return 0;
222}
223
224static Embryo_Cell
225_embryo_str_strnprep(Embryo_Program *ep, Embryo_Cell *params)
226{
227 char *s1, *s2, *s3;
228 int l1, l2;
229
230 /* params[1] = dst */
231 /* params[2] = str */
232 /* params[3] = n */
233 if (params[0] != (3 * sizeof(Embryo_Cell))) return 0;
234 if (params[3] < 0) params[3] = 0;
235 STRGET(ep, s1, params[1]);
236 STRGET(ep, s2, params[2]);
237 if ((!s1) || (!s2)) return 0;
238 l1 = strlen(s1);
239 l2 = strlen(s2);
240 s3 = alloca(l1 + l2 + 1);
241 if (!s3) return 0;
242 strncpy(s3, s2, params[3]);
243 if (params[3] <= l2) s3[params[3]] = 0;
244 strcat(s3, s1);
245 STRSET(ep, params[1], s3);
246 return 0;
247}
248
249static Embryo_Cell
250_embryo_str_strcut(Embryo_Program *ep, Embryo_Cell *params)
251{
252 char *s1, *s2;
253 int l1;
254
255 /* params[1] = dst */
256 /* params[2] = str */
257 /* params[3] = n */
258 /* params[4] = n2 */
259 if (params[0] != (4 * sizeof(Embryo_Cell))) return 0;
260 if (params[3] < 0) params[3] = 0;
261 if (params[4] < params[3]) params[4] = params[3];
262 STRGET(ep, s1, params[2]);
263 if (!s1) return 0;
264 l1 = strlen(s1);
265 if (params[3] >= l1) params[3] = l1;
266 if (params[4] >= l1) params[4] = l1;
267 if (params[4] == params[3])
268 {
269 STRSET(ep, params[1], "");
270 return 0;
271 }
272 s2 = alloca(params[4] - params[3] + 1);
273 strncpy(s2, s1 + params[3], params[4] - params[3]);
274 s2[params[4] - params[3]] = 0;
275 STRSET(ep, params[1], s2);
276 return 0;
277}
278
279static Embryo_Cell
280_embryo_str_snprintf(Embryo_Program *ep, Embryo_Cell *params)
281{
282 char *s1, *s2;
283 int i, o;
284 int inesc = 0;
285 int insub = 0;
286 int p, pnum;
287
288 /* params[1] = buf */
289 /* params[2] = bufsize */
290 /* params[3] = format_string */
291 /* params[4] = first arg ... */
292 if (params[0] < (Embryo_Cell)(3 * sizeof(Embryo_Cell))) return 0;
293 if (params[2] <= 0) return 0;
294 STRGET(ep, s1, params[3]);
295 if (!s1) return -1;
296 s2 = alloca(params[2] + 1);
297 if (!s2) return -1;
298 s2[0] = 0;
299 pnum = (params[0] / sizeof(Embryo_Cell)) - 3;
300 for (p = 0, o = 0, i = 0; (s1[i]) && (o < (params[2] - 1)) && (p < (pnum + 1)); i++)
301 {
302 if ((!inesc) && (!insub))
303 {
304 if (s1[i] == '\\') inesc = 1;
305 else if (s1[i] == '%') insub = 1;
306 if ((!inesc) && (!insub))
307 {
308 s2[o] = s1[i];
309 o++;
310 }
311 }
312 else
313 {
314 Embryo_Cell *cptr;
315
316 if (inesc)
317 {
318 switch (s1[i])
319 {
320 case 't':
321 s2[o] = '\t';
322 o++;
323 break;
324 case 'n':
325 s2[o] = '\n';
326 o++;
327 break;
328 default:
329 s2[o] = s1[i];
330 o++;
331 break;
332 }
333 inesc = 0;
334 }
335 if ((insub) && (s1[i] == '%')) pnum++;
336 if ((insub) && (p < pnum))
337 {
338 switch (s1[i])
339 {
340 case '%':
341 s2[o] = '%';
342 o++;
343 break;
344 case 'c':
345 cptr = embryo_data_address_get(ep, params[4 + p]);
346 if (cptr) s2[o] = (char)(*cptr);
347 p++;
348 o++;
349 break;
350 case 'i':
351 case 'd':
352 case 'x':
353 case 'X':
354 {
355 char fmt[10] = "";
356 char tmp[256] = "";
357 int l;
358
359 if (s1[i] == 'i') strcpy(fmt, "%i");
360 else if (s1[i] == 'd') strcpy(fmt, "%d");
361 else if (s1[i] == 'x') strcpy(fmt, "%x");
362 else if (s1[i] == 'X') strcpy(fmt, "%08x");
363 cptr = embryo_data_address_get(ep, params[4 + p]);
364 if (cptr) snprintf(tmp, sizeof(tmp), fmt, (int)(*cptr));
365 l = strlen(tmp);
366 if ((o + l) > (params[2] - 1))
367 {
368 l = params[2] - 1 - o;
369 if (l < 0) l = 0;
370 tmp[l] = 0;
371 }
372 strcpy(s2 + o, tmp);
373 o += l;
374 p++;
375 }
376 break;
377 case 'f':
378 {
379 char tmp[256] = "";
380 int l;
381
382 cptr = embryo_data_address_get(ep, params[4 + p]);
383 if (cptr) snprintf(tmp, sizeof(tmp), "%f", (double)EMBRYO_CELL_TO_FLOAT(*cptr));
384 l = strlen(tmp);
385 if ((o + l) > (params[2] - 1))
386 {
387 l = params[2] - 1 - o;
388 if (l < 0) l = 0;
389 tmp[l] = 0;
390 }
391 strcpy(s2 + o, tmp);
392 o += l;
393 p++;
394 }
395 break;
396 case 's':
397 {
398 char *tmp;
399 int l;
400
401 STRGET(ep, tmp, params[4 + p]);
402 l = strlen(tmp);
403 if ((o + l) > (params[2] - 1))
404 {
405 l = params[2] - 1 - o;
406 if (l < 0) l = 0;
407 tmp[l] = 0;
408 }
409 strcpy(s2 + o, tmp);
410 o += l;
411 p++;
412 }
413 break;
414 default:
415 break;
416 }
417 insub = 0;
418 }
419 else if (insub)
420 insub = 0;
421 }
422 }
423 s2[o] = 0;
424
425 STRSET(ep, params[1], s2);
426 return o;
427}
428
429static Embryo_Cell
430_embryo_str_strstr(Embryo_Program *ep, Embryo_Cell *params)
431{
432 char *s1, *s2, *p;
433
434 /* params[1] = str */
435 /* params[2] = ndl */
436 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
437 STRGET(ep, s1, params[1]);
438 STRGET(ep, s2, params[2]);
439 if ((!s1) || (!s2)) return -1;
440 p = strstr(s1, s2);
441 if (!p) return -1;
442 return (Embryo_Cell)(p - s1);
443}
444
445static Embryo_Cell
446_embryo_str_strchr(Embryo_Program *ep, Embryo_Cell *params)
447{
448 char *s1, *s2, *p;
449
450 /* params[1] = str */
451 /* params[2] = ch */
452 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
453 STRGET(ep, s1, params[1]);
454 STRGET(ep, s2, params[2]);
455 if ((!s1) || (!s2)) return -1;
456 p = strchr(s1, s2[0]);
457 if (!p) return -1;
458 return (Embryo_Cell)(p - s1);
459}
460
461static Embryo_Cell
462_embryo_str_strrchr(Embryo_Program *ep, Embryo_Cell *params)
463{
464 char *s1, *s2, *p;
465
466 /* params[1] = str */
467 /* params[2] = ch */
468 if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
469 STRGET(ep, s1, params[1]);
470 STRGET(ep, s2, params[2]);
471 if ((!s1) || (!s2)) return -1;
472 p = strrchr(s1, s2[0]);
473 if (!p) return -1;
474 return (Embryo_Cell)(p - s1);
475}
476
477/* functions used by the rest of embryo */
478
479void
480_embryo_str_init(Embryo_Program *ep)
481{
482 embryo_program_native_call_add(ep, "atoi", _embryo_str_atoi);
483 embryo_program_native_call_add(ep, "fnmatch", _embryo_str_fnmatch);
484 embryo_program_native_call_add(ep, "strcmp", _embryo_str_strcmp);
485 embryo_program_native_call_add(ep, "strncmp", _embryo_str_strncmp);
486 embryo_program_native_call_add(ep, "strcpy", _embryo_str_strcpy);
487 embryo_program_native_call_add(ep, "strncpy", _embryo_str_strncpy);
488 embryo_program_native_call_add(ep, "strlen", _embryo_str_strlen);
489 embryo_program_native_call_add(ep, "strcat", _embryo_str_strcat);
490 embryo_program_native_call_add(ep, "strncat", _embryo_str_strncat);
491 embryo_program_native_call_add(ep, "strprep", _embryo_str_strprep);
492 embryo_program_native_call_add(ep, "strnprep", _embryo_str_strnprep);
493 embryo_program_native_call_add(ep, "strcut", _embryo_str_strcut);
494 embryo_program_native_call_add(ep, "snprintf", _embryo_str_snprintf);
495 embryo_program_native_call_add(ep, "strstr", _embryo_str_strstr);
496 embryo_program_native_call_add(ep, "strchr", _embryo_str_strchr);
497 embryo_program_native_call_add(ep, "strrchr", _embryo_str_strrchr);
498}
diff --git a/libraries/embryo/src/lib/embryo_time.c b/libraries/embryo/src/lib/embryo_time.c
deleted file mode 100644
index 90c14cf..0000000
--- a/libraries/embryo/src/lib/embryo_time.c
+++ /dev/null
@@ -1,97 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#ifndef EFL_HAVE_GETTIMEOFDAY
6# error "Your platform isn't supported yet"
7#endif
8
9#include <sys/time.h>
10#include <time.h>
11
12#ifdef _MSC_VER
13# include <winsock2.h>
14#endif
15
16#ifdef HAVE_EVIL
17# include <Evil.h>
18#endif
19
20#ifdef HAVE_EXOTIC
21# include <Exotic.h>
22#endif
23
24#include "Embryo.h"
25#include "embryo_private.h"
26
27/* exported time api */
28
29static Embryo_Cell
30_embryo_time_seconds(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__)
31{
32 struct timeval timev;
33 double t;
34 float f;
35
36 gettimeofday(&timev, NULL);
37 t = (double)(timev.tv_sec - ((timev.tv_sec / (60 * 60 * 24)) * (60 * 60 * 24)))
38 + (((double)timev.tv_usec) / 1000000);
39 f = (float)t;
40 return EMBRYO_FLOAT_TO_CELL(f);
41}
42
43static Embryo_Cell
44_embryo_time_date(Embryo_Program *ep, Embryo_Cell *params)
45{
46 static time_t last_tzset = 0;
47 struct timeval timev;
48 struct tm *tm;
49 time_t tt;
50
51 if (params[0] != (8 * sizeof(Embryo_Cell))) return 0;
52 gettimeofday(&timev, NULL);
53 tt = (time_t)(timev.tv_sec);
54 if ((tt > (last_tzset + 1)) ||
55 (tt < (last_tzset - 1)))
56 {
57 last_tzset = tt;
58 tzset();
59 }
60 tm = localtime(&tt);
61 if (tm)
62 {
63 Embryo_Cell *cptr;
64 double t;
65 float f;
66
67 cptr = embryo_data_address_get(ep, params[1]);
68 if (cptr) *cptr = tm->tm_year + 1900;
69 cptr = embryo_data_address_get(ep, params[2]);
70 if (cptr) *cptr = tm->tm_mon + 1;
71 cptr = embryo_data_address_get(ep, params[3]);
72 if (cptr) *cptr = tm->tm_mday;
73 cptr = embryo_data_address_get(ep, params[4]);
74 if (cptr) *cptr = tm->tm_yday;
75 cptr = embryo_data_address_get(ep, params[5]);
76 if (cptr) *cptr = (tm->tm_wday + 6) % 7;
77 cptr = embryo_data_address_get(ep, params[6]);
78 if (cptr) *cptr = tm->tm_hour;
79 cptr = embryo_data_address_get(ep, params[7]);
80 if (cptr) *cptr = tm->tm_min;
81 cptr = embryo_data_address_get(ep, params[8]);
82 t = (double)tm->tm_sec + (((double)timev.tv_usec) / 1000000);
83 f = (float)t;
84 if (cptr) *cptr = EMBRYO_FLOAT_TO_CELL(f);
85
86 }
87 return 0;
88}
89
90/* functions used by the rest of embryo */
91
92void
93_embryo_time_init(Embryo_Program *ep)
94{
95 embryo_program_native_call_add(ep, "seconds", _embryo_time_seconds);
96 embryo_program_native_call_add(ep, "date", _embryo_time_date);
97}